diff --git a/config.template.yaml b/config.template.yaml index d325dead..d92d6fd4 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -198,3 +198,5 @@ setuid: enabled: false group: 'users' user: 'user' +# how long to wait in ms before changing uid/gid + timeout: 15 diff --git a/lib/config.js b/lib/config.js index 686d85eb..5b849d0f 100644 --- a/lib/config.js +++ b/lib/config.js @@ -103,7 +103,8 @@ var defaults = { setuid: { enabled: false, "group": "users", - "user": "nobody" + "user": "nobody", + "timeout": 15 }, }; diff --git a/lib/setuid.js b/lib/setuid.js index da29266e..82345531 100644 --- a/lib/setuid.js +++ b/lib/setuid.js @@ -11,5 +11,5 @@ if (Config.get("setuid.enabled")) { console.log('Cowardly refusing to keep the process alive as root.'); process.exit(1); } - }, 15); + }, (Config.get("setuid.timeout"))); };