Change the last references to PRIV_ROOT. /dev/usb used to be world writable so

further root checks were needed, this isnt the case anymore but just change it
to PRIV_DRIVER until it can be investigated later.

Spotted by:	rwatson
This commit is contained in:
Andrew Thompson 2009-02-27 22:12:15 +00:00
parent a09d8d7315
commit 50230f983b
2 changed files with 3 additions and 3 deletions

View File

@ -1466,7 +1466,7 @@ usb2_static_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
*(int *)data = usb2_template;
break;
case USB_SET_TEMPLATE:
err = priv_check(curthread, PRIV_ROOT);
err = priv_check(curthread, PRIV_DRIVER);
if (err)
break;
usb2_template = *(int *)data;

View File

@ -1685,7 +1685,7 @@ ugen_set_power_mode(struct usb2_fifo *f, int mode)
(udev->parent_hub == NULL)) {
return (EINVAL);
}
err = priv_check(curthread, PRIV_ROOT);
err = priv_check(curthread, PRIV_DRIVER);
if (err)
return (err);
@ -1766,7 +1766,7 @@ ugen_do_port_feature(struct usb2_fifo *f, uint8_t port_no,
struct usb2_hub *hub;
int err;
err = priv_check(curthread, PRIV_ROOT);
err = priv_check(curthread, PRIV_DRIVER);
if (err) {
return (err);
}