PERFORCE change 107159 for review
Robert Watson
rwatson at FreeBSD.org
Tue Oct 3 04:24:01 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=107159
Change 107159 by rwatson at rwatson_peppercorn on 2006/10/03 11:23:49
Update for priv(9) difference in RELENG_6, annotate oddness.
Affected files ...
.. //depot/projects/trustedbsd/priv6/src/sys/contrib/dev/ath/freebsd/ah_osdep.c#2 edit
Differences ...
==== //depot/projects/trustedbsd/priv6/src/sys/contrib/dev/ath/freebsd/ah_osdep.c#2 (text+ko) ====
@@ -44,6 +44,7 @@
#include <sys/sysctl.h>
#include <sys/bus.h>
#include <sys/malloc.h>
+#include <sys/priv.h>
#include <sys/proc.h>
#include <machine/stdarg.h>
@@ -198,8 +199,12 @@
{
int error;
+ /*
+ * XXXRW: Why is this required? We should only get here if privilege
+ * was granted for the sysctl call.
+ */
if (enable) {
- error = suser(curthread);
+ error = priv_check(curthread, PRIV_DRIVER);
if (error == 0) {
error = alq_open(&ath_hal_alq, ath_hal_logfile,
curthread->td_ucred, ALQ_DEFAULT_CMODE,
More information about the trustedbsd-cvs
mailing list