]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
platform: x86: asus_acpi: world-writable procfs files
authorVasiliy Kulikov <segoon@openwall.com>
Fri, 4 Feb 2011 12:23:59 +0000 (15:23 +0300)
committerMatthew Garrett <mjg@redhat.com>
Mon, 21 Feb 2011 22:06:14 +0000 (17:06 -0500)
Don't allow everybody to change ACPI settings.  The comment says that it
is done deliberatelly, however, the comment before disp_proc_write()
says that at least one of these setting is experimental.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/asus_acpi.c

index 4633fd8532cc4be6aa308ab93eba36fb7e9d7113..fe495939c30745f4ea279a33fbb5a2e64467dada 100644 (file)
@@ -1081,14 +1081,8 @@ static int asus_hotk_add_fs(struct acpi_device *device)
        struct proc_dir_entry *proc;
        mode_t mode;
 
-       /*
-        * If parameter uid or gid is not changed, keep the default setting for
-        * our proc entries (-rw-rw-rw-) else, it means we care about security,
-        * and then set to -rw-rw----
-        */
-
        if ((asus_uid == 0) && (asus_gid == 0)) {
-               mode = S_IFREG | S_IRUGO | S_IWUGO;
+               mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP;
        } else {
                mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP;
                printk(KERN_WARNING "  asus_uid and asus_gid parameters are "