Date: Fri, 27 Feb 2009 22:12:15 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189125 - head/sys/dev/usb Message-ID: <200902272212.n1RMCFlG084758@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Fri Feb 27 22:12:15 2009 New Revision: 189125 URL: http://svn.freebsd.org/changeset/base/189125 Log: 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 Modified: head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_generic.c Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Fri Feb 27 21:50:15 2009 (r189124) +++ head/sys/dev/usb/usb_dev.c Fri Feb 27 22:12:15 2009 (r189125) @@ -1466,7 +1466,7 @@ usb2_static_ioctl(struct cdev *dev, u_lo *(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; Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Fri Feb 27 21:50:15 2009 (r189124) +++ head/sys/dev/usb/usb_generic.c Fri Feb 27 22:12:15 2009 (r189125) @@ -1685,7 +1685,7 @@ ugen_set_power_mode(struct usb2_fifo *f, (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 struct usb2_hub *hub; int err; - err = priv_check(curthread, PRIV_ROOT); + err = priv_check(curthread, PRIV_DRIVER); if (err) { return (err); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902272212.n1RMCFlG084758>