summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-02-04 15:23:59 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-02 09:46:54 -0500
commitc904991ebdd0e1c3637f519431f0bea6b56d1741 (patch)
tree1851d5fea81c51174485d11db46f08d82f8e78ae
parent21f36372097491d31bb4a375f9a1c81be4ed8a87 (diff)
downloadlwn-c904991ebdd0e1c3637f519431f0bea6b56d1741.tar.gz
lwn-c904991ebdd0e1c3637f519431f0bea6b56d1741.zip
platform: x86: asus_acpi: world-writable procfs files
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>
-rw-r--r--drivers/platform/x86/asus_acpi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c
index ddf5240ade8c..d66c07a0a8ac 100644
--- a/drivers/platform/x86/asus_acpi.c
+++ b/drivers/platform/x86/asus_acpi.c
@@ -1001,14 +1001,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 "