]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: misc: cypress_cy7c63: fix up some sysfs attribute permissions
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Nov 2010 19:32:38 +0000 (11:32 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:26:57 +0000 (13:26 -0800)
commit c990600d340641150f7270470a64bd99a5c0b225 upstream.

They should not be writable by any user.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oliver Bock <bock@tfh-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/cypress_cy7c63.c

index 5720bfef6a389ada6709be2ffac3aca06a1d969a..49deeb6c3b528135ed8fc207a101e12e857f26e7 100644 (file)
@@ -195,11 +195,9 @@ static ssize_t get_port1_handler(struct device *dev,
        return read_port(dev, attr, buf, 1, CYPRESS_READ_PORT_ID1);
 }
 
-static DEVICE_ATTR(port0, S_IWUGO | S_IRUGO,
-                  get_port0_handler, set_port0_handler);
+static DEVICE_ATTR(port0, S_IRUGO | S_IWUSR, get_port0_handler, set_port0_handler);
 
-static DEVICE_ATTR(port1, S_IWUGO | S_IRUGO,
-                  get_port1_handler, set_port1_handler);
+static DEVICE_ATTR(port1, S_IRUGO | S_IWUSR, get_port1_handler, set_port1_handler);
 
 
 static int cypress_probe(struct usb_interface *interface,