]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:07 +0000 (16:53 +0200)
commit 8040835760adf0ef66876c063d47f79f015fb55d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/asus_acpi.c

index e2ab023ef2237f4438d4c8fc59f0ed33fa3873c1..0037320f0f160b2bf5a6f9a5fe6869d8a812fb8b 100644 (file)
@@ -985,14 +985,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 "