diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-02-20 23:49:31 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-02-20 23:49:31 +0000 |
commit | 2bf000ef9b16fc43cc55f7a29dbbe68df5421f25 (patch) | |
tree | 15dcef89340806618f669f0df392e4a86aa6ed48 /sys | |
parent | 277133d8d854b4d2b169a1bdc55b61a8e390bd1b (diff) | |
download | FreeBSD-src-2bf000ef9b16fc43cc55f7a29dbbe68df5421f25.zip FreeBSD-src-2bf000ef9b16fc43cc55f7a29dbbe68df5421f25.tar.gz |
Remove unnecessary privilege and privilege check for WITNESS sysctl.
Head nod: jhb
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_witness.c | 6 | ||||
-rw-r--r-- | sys/sys/priv.h | 19 |
2 files changed, 9 insertions, 16 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 106b098..7596a04 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -539,12 +539,6 @@ sysctl_debug_witness_watch(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &value, 0, req); if (error != 0 || req->newptr == NULL) return (error); - /* - * XXXRW: Why a priv check here? - */ - error = priv_check(req->td, PRIV_WITNESS); - if (error != 0) - return (error); if (value == witness_watch) return (0); if (value != 0) diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 138482e..165bf9e 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -77,16 +77,15 @@ #define PRIV_SWAPON 9 /* Can swapon(). */ #define PRIV_SWAPOFF 10 /* Can swapoff(). */ #define PRIV_MSGBUF 11 /* Can read kernel message buffer. */ -#define PRIV_WITNESS 12 /* Can configure WITNESS. */ -#define PRIV_IO 13 /* Can perform low-level I/O. */ -#define PRIV_KEYBOARD 14 /* Reprogram keyboard. */ -#define PRIV_DRIVER 15 /* Low-level driver privilege. */ -#define PRIV_ADJTIME 16 /* Set time adjustment. */ -#define PRIV_NTP_ADJTIME 17 /* Set NTP time adjustment. */ -#define PRIV_CLOCK_SETTIME 18 /* Can call clock_settime. */ -#define PRIV_SETTIMEOFDAY 19 /* Can call settimeofday. */ -#define PRIV_SETHOSTID 20 /* Can call sethostid. */ -#define PRIV_SETDOMAINNAME 21 /* Can call setdomainname. */ +#define PRIV_IO 12 /* Can perform low-level I/O. */ +#define PRIV_KEYBOARD 13 /* Reprogram keyboard. */ +#define PRIV_DRIVER 14 /* Low-level driver privilege. */ +#define PRIV_ADJTIME 15 /* Set time adjustment. */ +#define PRIV_NTP_ADJTIME 16 /* Set NTP time adjustment. */ +#define PRIV_CLOCK_SETTIME 17 /* Can call clock_settime. */ +#define PRIV_SETTIMEOFDAY 18 /* Can call settimeofday. */ +#define PRIV_SETHOSTID 19 /* Can call sethostid. */ +#define PRIV_SETDOMAINNAME 20 /* Can call setdomainname. */ /* * Audit subsystem privileges. |