Permalink
Browse files

Don't even try to get uid if in unsafe mode

  • Loading branch information...
1 parent 43badf5 commit 6917dc792c3ba9563924be14c647735aa01822cc @isaacs isaacs committed Feb 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/utils/uid-number.js
View
@@ -8,7 +8,7 @@ var exec = require("./exec")
, uidSupport = process.getuid && process.setuid
function uidNumber (uid, gid, cb) {
- if (!uidSupport) return cb()
+ if (!uidSupport || npm.config.get("unsafe-perm")) return cb()
if (typeof cb !== "function") cb = gid, gid = null
if (typeof cb !== "function") cb = uid, uid = null
if (gid == null) gid = process.getgid()

0 comments on commit 6917dc7

Please sign in to comment.