Use authbind to bind privileged ports

This commit is contained in:
Manuel de Brito Fontes 2018-08-03 09:50:53 -04:00 committed by Manuel Alejandro de Brito Fontes
parent e2f5d9066e
commit b148f113ae
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
14 changed files with 48 additions and 69 deletions

View file

@ -80,9 +80,9 @@ func nginxExecCommand(args ...string) *exec.Cmd {
ngx = defBinary
}
cmdArgs := []string{"-c", cfgPath}
cmdArgs := []string{"--deep", ngx, "-c", cfgPath}
cmdArgs = append(cmdArgs, args...)
return exec.Command(ngx, cmdArgs...)
return exec.Command("authbind", cmdArgs...)
}
func nginxTestCommand(cfg string) *exec.Cmd {
@ -91,5 +91,5 @@ func nginxTestCommand(cfg string) *exec.Cmd {
ngx = defBinary
}
return exec.Command(ngx, "-c", cfg, "-t")
return exec.Command("authbind", "--deep", ngx, "-c", cfg, "-t")
}