ACPI: debugfs custom_method open to non-root
authorDave Jones <davej@redhat.com>
Sat, 13 Nov 2010 05:58:54 +0000 (00:58 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:33:13 +0000 (13:33 -0800)
commit ed3aada1bf34c5a9e98af167f125f8a740fc726a upstream.

Currently we have:

  --w--w--w-. 1 root root 0 2010-11-11 14:56 /sys/kernel/debug/acpi/custom_method

which is just crazy. Change this to --w-------.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/debugfs.c

index 7de27d49c4b9fca8fe773e2444ba8e240417585d..74c4a398604afc55dd675ff92c7844c83d9e89ae 100644 (file)
@@ -79,7 +79,7 @@ int __init acpi_debugfs_init(void)
        if (!acpi_dir)
                goto err;
 
-       cm_dentry = debugfs_create_file("custom_method", S_IWUGO,
+       cm_dentry = debugfs_create_file("custom_method", S_IWUSR,
                                        acpi_dir, NULL, &cm_fops);
        if (!cm_dentry)
                goto err;