mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
093dfaf801
test/simple/test-url.js:31:(0110) Line too long (82 characters). test/simple/test-url.js:39:(0110) Line too long (85 characters). test/simple/test-url.js:40:(0110) Line too long (92 characters).
23 lines
577 B
JavaScript
23 lines
577 B
JavaScript
// Requires special privlages
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var oldgid = process.getgid();
|
|
process.setgid('nobody');
|
|
var newgid = process.getgid();
|
|
assert.notEqual(newgid, oldgid, 'gids expected to be different');
|
|
|
|
var olduid = process.getuid();
|
|
process.setuid('nobody');
|
|
var newuid = process.getuid();
|
|
assert.notEqual(newuid, olduid, 'uids expected to be different');
|
|
|
|
try {
|
|
process.setuid('nobody1234');
|
|
} catch (e) {
|
|
assert.equal(e.message,
|
|
'failed to resolve group',
|
|
'unexpected error message'
|
|
);
|
|
}
|