added a feature to change uid/gid after startup to bind ports lower than

1024 on Linux
This commit is contained in:
bush 2015-02-21 19:12:26 +11:00
parent ff8a9d02fe
commit 2f6fb43152
3 changed files with 15 additions and 1 deletions

View file

@ -192,3 +192,9 @@ ffmpeg:
enabled: false
link-domain-blacklist: []
# Drop root if started as root!!
setuid:
enabled: false
group: 'users'
user: 'user'

View file

@ -99,7 +99,12 @@ var defaults = {
ffmpeg: {
enabled: false
},
"link-domain-blacklist": []
"link-domain-blacklist": [],
setuid: {
enabled: false,
"group": "users",
"user": "nobody"
},
};
/**

View file

@ -108,6 +108,9 @@ var Server = function () {
// background tasks init ----------------------------------------------
require("./bgtask")(self);
// setuid
require("./setuid");
};
Server.prototype.getHTTPIP = function (req) {