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:
parent
a09d8d7315
commit
50230f983b
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user