New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

zoneid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zoneid

Binding for illumos zone-related library functions

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

This package exposes the following libc functions on illumos systems:

#include <zone.h>

zoneid_t getzoneid(void);
zoneid_t getzoneidbyname(const char *name);
ssize_t getzonenamebyid(zoneid_t id, char *buf, size_t buflen);

For details on these functions, see getzoneid(3c).

Synopsis

Here's an example use:

var mod_assert = require('assert');
var mod_zoneid = require('zoneid');

var myzoneid = mod_zoneid.getzoneid();
var myzonename = mod_zoneid.getzonenamebyid(myzoneid);

console.log(myzoneid);
console.log(myzonename);
mod_assert.equal(myzoneid, mod_zoneid.getzoneidbyname(myzonename));

In the global zone, this prints:

0
global

In a non-global zone, this could print:

71
a2cf54c9-ec0d-412d-b40d-d38c6092b114

Keywords

illumos

FAQs

Package last updated on 10 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts