Changing permissions of /dev/usb[n] to 664?

Julian Elischer julian at elischer.org
Sat Nov 6 23:05:59 PST 2004


Craig Rodrigues wrote:
> Hi,
> 
> Is there any particular reason to leave the
> permissions of /dev/usb[n] at 660 instead of 664?
> 
> That would allow non-root users to run usbdevs
> to list the USB devices on the system.
> 
> 
> --- usb.c.orig	Sun Nov  7 01:41:43 2004
> +++ usb.c	Sun Nov  7 01:41:56 2004
> @@ -320,11 +320,11 @@
>  	/* The per controller devices (used for usb_discover) */
>  	/* XXX This is redundant now, but old usbd's will want it */
>  	sc->sc_usbdev = make_dev(&usb_cdevsw, device_get_unit(self), UID_ROOT,
> -	    GID_OPERATOR, 0660, "usb%d", device_get_unit(self));
> +	    GID_OPERATOR, 0664, "usb%d", device_get_unit(self));
>  	if (usb_ndevs++ == 0) {
>  		/* The device spitting out events */
>  		usb_dev = make_dev(&usb_cdevsw, USB_DEV_MINOR, UID_ROOT,
> -		    GID_OPERATOR, 0660, "usb");
> +		    GID_OPERATOR, 0664, "usb");
>  	}
>  #endif
>  
> 
> 
> 

Do you WANT non operators to be aware of the hardware configuration?
Surely people who need to know can be in group operator.

I'm not saying that you don't, just that it needs to be considerred.
And is that ALL they can do if you change it?




More information about the freebsd-usb mailing list