Staging: ft1000: fix world writable debugfs file
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 10 Dec 2010 18:55:27 +0000 (10:55 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 10 Dec 2010 18:55:27 +0000 (10:55 -0800)
You should not be able to write to a debugfs file from any user.

Cc: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c

index da76f11a552fc67e1bded98a486ad4fce4c1833b..e39809229d4650f04ac4a35e6df8f343405cebd8 100644 (file)
@@ -173,7 +173,7 @@ int ft1000_create_dev(struct ft1000_device *dev)
                goto debug_dir_fail;
        }
 
-       file = debugfs_create_file("device", S_IRUGO | S_IWUGO, dir,
+       file = debugfs_create_file("device", S_IRUGO | S_IWUSR, dir,
                                        NULL, &ft1000fops);
        if (IS_ERR(file)) {
                result = PTR_ERR(file);