From 8affdf7fe871c78783d63093cc9006867f67e929 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Tue, 28 Mar 2017 23:12:19 +0200 Subject: Fix https --- websockets/server.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'websockets') diff --git a/websockets/server.js b/websockets/server.js index 67ed6d1..aa349cb 100755 --- a/websockets/server.js +++ b/websockets/server.js @@ -20,6 +20,13 @@ if(process.argv.length>=4){ }; } +if(process.getuid()==0){ + console.log(`Old uid: ${process.getuid()}, old gid: ${process.getgid()}; setting to nobody...`); + process.setgid("nobody"); + process.setuid("nobody"); + console.log(`New uid: ${process.getuid()}, new gid: ${process.getgid()}`); +} + let httpsServer,wsServer; if(httpsConfig){ -- cgit v1.2.3-70-g09d2