Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test: root can connect to chmod'd pipes

  • Loading branch information...
commit d0c010e39beae175ecfdb213ec898dd88aefbb03 1 parent b48f7f7
@isaacs isaacs authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/simple/test-net-pipe-connect-errors.js
View
6 test/simple/test-net-pipe-connect-errors.js
@@ -53,8 +53,8 @@ noEntSocketClient.on('error', function(err) {
});
-// On Windows a chmod has no effect on named pipes
-if (process.platform !== 'win32') {
+// On Windows or when running as root, a chmod has no effect on named pipes
+if (process.platform !== 'win32' && process.getuid() !== 0) {
// Trying to connect to a socket one has no access to should result in EACCES
var accessServer = net.createServer(function() {
assert.ok(false);
@@ -79,7 +79,7 @@ if (process.platform !== 'win32') {
process.on('exit', function() {
assert.ok(notSocketErrorFired);
assert.ok(noEntErrorFired);
- if (process.platform !== 'win32') {
+ if (process.platform !== 'win32' && process.getuid() !== 0) {
assert.ok(accessErrorFired);
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.