sys_netbsd: add support for dropping root privileges on FreeBSD

On FreeBSD, use the privops helper for the adjtime(), ntp_adjtime(),
settimeofday(), and bind() system calls.
This commit is contained in:
Miroslav Lichvar
2015-12-10 09:33:56 +01:00
parent 12ee4bf6ac
commit 82510e6b1f
3 changed files with 15 additions and 6 deletions

5
configure vendored
View File

@@ -376,10 +376,13 @@ case $OPERATINGSYSTEM in
add_def LINUX
echo "Configuring for " $SYSTEM
;;
FreeBSD)
EXTRA_OBJECTS="sys_generic.o sys_netbsd.o sys_timex.o"
add_def FREEBSD
if [ $feat_droproot = "1" ]; then
add_def FEAT_PRIVDROP
priv_ops="ADJUSTTIME ADJUSTTIMEX SETTIME BINDSOCKET"
fi
echo "Configuring for $SYSTEM"
;;
NetBSD)