set uid timeout

Allow the timeout to be changed allowing more time before dropping root
privledges
This commit is contained in:
bush6 2015-02-24 08:08:43 +10:00
parent 960f94bfb6
commit ca0f0c4086
3 changed files with 5 additions and 2 deletions

View File

@ -198,3 +198,5 @@ setuid:
enabled: false enabled: false
group: 'users' group: 'users'
user: 'user' user: 'user'
# how long to wait in ms before changing uid/gid
timeout: 15

View File

@ -103,7 +103,8 @@ var defaults = {
setuid: { setuid: {
enabled: false, enabled: false,
"group": "users", "group": "users",
"user": "nobody" "user": "nobody",
"timeout": 15
}, },
}; };

View File

@ -11,5 +11,5 @@ if (Config.get("setuid.enabled")) {
console.log('Cowardly refusing to keep the process alive as root.'); console.log('Cowardly refusing to keep the process alive as root.');
process.exit(1); process.exit(1);
} }
}, 15); }, (Config.get("setuid.timeout")));
}; };