mirror of
https://github.com/unraid/api.git
synced 2026-01-08 09:39:49 -06:00
fix: remove uid downgrade on server load
This commit is contained in:
@@ -189,16 +189,7 @@ export const server = {
|
||||
server: stoppableServer,
|
||||
async start() {
|
||||
// Start http server
|
||||
return stoppableServer.listen(port, () => {
|
||||
// Downgrade process user to owner of this file
|
||||
fs.stat(__filename, (error, stats) => {
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
process.setuid(stats.uid);
|
||||
});
|
||||
});
|
||||
return stoppableServer.listen(port);
|
||||
},
|
||||
stop(callback?: () => void) {
|
||||
// Stop http server from accepting new connections and close existing connections
|
||||
|
||||
Reference in New Issue
Block a user