PERFORCE change 107161 for review

Robert Watson rwatson at FreeBSD.org
Tue Oct 3 04:27:32 PDT 2006


http://perforce.freebsd.org/chv.cgi?CH=107161

Change 107161 by rwatson at rwatson_peppercorn on 2006/10/03 11:26:05

	Update for 6.x-only suser() use.

Affected files ...

.. //depot/projects/trustedbsd/priv6/src/sys/dev/ipw/if_ipw.c#2 edit

Differences ...

==== //depot/projects/trustedbsd/priv6/src/sys/dev/ipw/if_ipw.c#2 (text+ko) ====

@@ -44,6 +44,7 @@
 #include <sys/systm.h>
 #include <sys/malloc.h>
 #include <sys/module.h>
+#include <sys/priv.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
 
@@ -1579,7 +1580,7 @@
 
 	case SIOCSLOADFW:
 		/* only super-user can do that! */
-		if ((error = suser(curthread)) != 0)
+		if ((error = priv_check(curthread, PRIV_DRIVER)) != 0)
 			break;
 
 		ifr = (struct ifreq *)data;
@@ -1588,7 +1589,7 @@
 
 	case SIOCSKILLFW:
 		/* only super-user can do that! */
-		if ((error = suser(curthread)) != 0)
+		if ((error = priv_check(curthread, PRIV_DRIVER)) != 0)
 			break;
 
 		ifp->if_flags &= ~IFF_UP;


More information about the trustedbsd-cvs mailing list