From 3bad28ec006ad6ab2bca4e5103860b75391e3c9d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Nov 2010 11:18:33 -0800 Subject: Staging: frontier: fix up some sysfs attribute permissions They should not be writable by any user Reported-by: Linus Torvalds Cc: David Taht Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/frontier/tranzport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/frontier') diff --git a/drivers/staging/frontier/tranzport.c b/drivers/staging/frontier/tranzport.c index a145a15cfdb3..1611a27e9b77 100644 --- a/drivers/staging/frontier/tranzport.c +++ b/drivers/staging/frontier/tranzport.c @@ -204,7 +204,7 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev) t->value = temp; \ return count; \ } \ - static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value); + static DEVICE_ATTR(value, S_IRUSR | S_IRUGO, show_##value, set_##value); show_int(enable); show_int(offline); -- cgit v1.2.3-59-g8ed1b From 2a767fda5d0d8dcff465724dfad6ee131489b3f2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 18 Nov 2010 11:21:04 -0800 Subject: Staging: frontier: fix up my fixup for some sysfs attribute permissions They should be writable by root, not readable. Doh, stupid me with the wrong flags. Reported-by: Jonathan Cameron Cc: David Taht Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/frontier/tranzport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/frontier') diff --git a/drivers/staging/frontier/tranzport.c b/drivers/staging/frontier/tranzport.c index 1611a27e9b77..8894ab14f167 100644 --- a/drivers/staging/frontier/tranzport.c +++ b/drivers/staging/frontier/tranzport.c @@ -204,7 +204,7 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev) t->value = temp; \ return count; \ } \ - static DEVICE_ATTR(value, S_IRUSR | S_IRUGO, show_##value, set_##value); + static DEVICE_ATTR(value, S_IWUSR | S_IRUGO, show_##value, set_##value); show_int(enable); show_int(offline); -- cgit v1.2.3-59-g8ed1b