mirror of https://github.com/calzoneman/sync.git
Forgot the new file :o
This commit is contained in:
parent
2f6fb43152
commit
960f94bfb6
|
@ -0,0 +1,15 @@
|
||||||
|
var Config = require("./config");
|
||||||
|
|
||||||
|
if (Config.get("setuid.enabled")) {
|
||||||
|
setTimeout(function() {
|
||||||
|
try {
|
||||||
|
console.log('Old User ID: ' + process.getuid() + ', Old Group ID: ' + process.getgid());
|
||||||
|
process.setgid(Config.get("setuid.group"));
|
||||||
|
process.setuid(Config.get("setuid.user"));
|
||||||
|
console.log('New User ID: ' + process.getuid() + ', New Group ID: ' + process.getgid());
|
||||||
|
} catch (err) {
|
||||||
|
console.log('Cowardly refusing to keep the process alive as root.');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}, 15);
|
||||||
|
};
|
Loading…
Reference in New Issue