diff options
author | isaacs <i@izs.me> | 2011-01-22 03:36:54 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-02-08 04:09:05 +0300 |
commit | 78225016d36d1aa8c2d3f133bb7af94abbe3c932 (patch) | |
tree | a7b505c2fb2e7c2ecca542a22547ce2baeea7cd9 /lib/utils/default-config.js | |
parent | 33c41b3e62555c89ec4df649943fa3fdd09ee069 (diff) |
default user=nobody, operator=$UID, and group=$GID
Diffstat (limited to 'lib/utils/default-config.js')
-rw-r--r-- | lib/utils/default-config.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/utils/default-config.js b/lib/utils/default-config.js index 90aa60cf3..26d404a54 100644 --- a/lib/utils/default-config.js +++ b/lib/utils/default-config.js @@ -21,6 +21,9 @@ if (!process.execPath) { } var stdio = process.binding("stdio") +var uid = process.env.SUDO_UID || process.env.SUDO_USER || process.getuid() + , gid = process.env.SUDO_GID || process.getgid() + module.exports = { "auto-activate" : "always" , "auto-deactivate" : true @@ -33,7 +36,7 @@ module.exports = , editor : process.env.EDITOR || "vi" , force : false , globalconfig : path.join(process.execPath, "..", "..", "etc", "npmrc") - , group : process.getgid() + , group : gid , gzipbin : process.env.GZIPBIN || "gzip" , listopts: "" , logfd : stdio.stderrFD @@ -54,6 +57,7 @@ module.exports = , tmproot : (process.env.TMPDIR || "/tmp") , "update-dependents" : true , userconfig : path.join(process.env.HOME, ".npmrc") - , user : process.getuid() + , user : "nobody" + , operator: uid , _exit : true } |