Put privilege drop to previous location

This commit is contained in:
2024-11-08 19:23:54 +01:00
parent f0257a2784
commit 492e56a098
2 changed files with 8 additions and 7 deletions

View File

@@ -212,13 +212,6 @@ func main() {
serverStart()
}()
// Because this program will want to bind to a privileged port (like 80), the listener must
// be established first, then the user can be changed, and after that,
// the actual http server can be started.
if err := runtimeEnv.DropPrivileges(config.Keys.Group, config.Keys.User); err != nil {
log.Fatalf("error while preparing server start: %s", err.Error())
}
wg.Add(1)
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)