Remove unnecessary privilege and privilege check for WITNESS sysctl.

Head nod:	jhb
This commit is contained in:
Robert Watson 2007-02-20 23:49:31 +00:00
parent 85fea78497
commit 7ee76f9d4e
2 changed files with 9 additions and 16 deletions

View File

@ -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)

View File

@ -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.