diff --git a/.gitignore b/.gitignore index 4a4d573d925083d5124d2effb6d876166b82230a..959fcc6a6577499d9714f92bd17e6597496e3866 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,7 @@ typings/ # next.js build output .next + +# Ignore temporary backup files created by vim +*~ +.swp diff --git a/dylan-testing/core/init.js b/dylan-testing/core/init.js index 5d8204aa19617eb72548ec785f14b6ff1cf9f8c3..314219abc47dfd40e9682f110cea05cb85c47c6b 100644 --- a/dylan-testing/core/init.js +++ b/dylan-testing/core/init.js @@ -90,9 +90,14 @@ module.exports = function main(){ var spawnOpts = { stdio:"inherit", uid:config.serviceUid, gid:config.serviceGid }; - cproc.spawn(nodejs, ["core/pam-service.js"], spawnOpts); + var rootSpawnOpts = {stdio:"inherit", gid:config.serviceGid}; + cproc.spawn(nodejs, ["core/pam-service.js"], rootSpawnOpts); cproc.spawn(nodejs, ["core/proxy-service.js"], spawnOpts); cproc.spawn(nodejs, ["core/login-service.js"], spawnOpts); + + // Drop privileges + process.setgid(config.serviceGid); + process.setuid(config.serviceUid); } catch(e){ //console.error("Fatal Error: " + e.message); diff --git a/dylan-testing/package.json b/dylan-testing/package.json index 3c5ca475175069335baac089084da3f76d2ff188..94c7b195d3068badbe5b289991d577c4537ae6c3 100644 --- a/dylan-testing/package.json +++ b/dylan-testing/package.json @@ -1,7 +1,7 @@ { "name": "ucc-portal", "version": "0.0.1", - "description": "An easy to use self-service portal for UCC members to configure their shell, mail forwarding address, and other things that would normally require knowledge of the Linux command line.", + "description": "An easy to use self-service portal for UCC members to check their dispense credit, configure mail forwarding address, and other things that would normally require knowledge of the Linux command line.", "main": "uccportal.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"