diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-02-19 22:40:02 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-02-19 22:40:02 +0000 |
commit | f191f06add69ee54350ddff9fdf4cafc3f889b49 (patch) | |
tree | 280cfc5978ec7947a1ef204d19a0ad8e264b60cf /sys/netatalk | |
parent | d298e8c0c269ddbcd6979437a7f31d21acc482f1 (diff) | |
download | FreeBSD-src-f191f06add69ee54350ddff9fdf4cafc3f889b49.zip FreeBSD-src-f191f06add69ee54350ddff9fdf4cafc3f889b49.tar.gz |
Use privilege PRIV_NET_ADDIFADDR rather than suser() to authorize
adding a netatalk address to an interface.
Diffstat (limited to 'sys/netatalk')
-rw-r--r-- | sys/netatalk/at_control.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index a5dbe93..c8c563f 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -31,6 +31,7 @@ #include <sys/sockio.h> #include <sys/malloc.h> #include <sys/kernel.h> +#include <sys/priv.h> #include <sys/socket.h> #include <net/if.h> #include <net/route.h> @@ -121,7 +122,7 @@ at_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, * * XXXRW: Layering? */ - if (suser(td)) + if (priv_check(td, PRIV_NET_ADDIFADDR)) return (EPERM); sat = satosat(&ifr->ifr_addr); |