Fix #4714: correctly check thread can bind to privileged ports
This commit is contained in:
parent
14d8f58592
commit
b82c67405f
|
@ -24,7 +24,7 @@ const dhcpcdConf = "etc/dhcpcd.conf"
|
||||||
func canBindPrivilegedPorts() (can bool, err error) {
|
func canBindPrivilegedPorts() (can bool, err error) {
|
||||||
cnbs, err := unix.PrctlRetInt(
|
cnbs, err := unix.PrctlRetInt(
|
||||||
unix.PR_CAP_AMBIENT,
|
unix.PR_CAP_AMBIENT,
|
||||||
unix.PR_CAP_AMBIENT_IS_SET,
|
unix.PR_CAP_AMBIENT_RAISE,
|
||||||
unix.CAP_NET_BIND_SERVICE,
|
unix.CAP_NET_BIND_SERVICE,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in New Issue