From 19913888adf1a47a728778222cc01c633b3e8ac2 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Mon, 19 Feb 2007 22:40:02 +0000 Subject: [PATCH] Use privilege PRIV_NET_ADDIFADDR rather than suser() to authorize adding a netatalk address to an interface. --- sys/netatalk/at_control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index a5dbe93abf38..c8c563fcd68e 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -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);