提交 80408357 编写于 作者: V Vasiliy Kulikov 提交者: Matthew Garrett

platform: x86: asus_acpi: world-writable procfs files

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: NVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 8a6a142c
...@@ -1081,14 +1081,8 @@ static int asus_hotk_add_fs(struct acpi_device *device) ...@@ -1081,14 +1081,8 @@ static int asus_hotk_add_fs(struct acpi_device *device)
struct proc_dir_entry *proc; struct proc_dir_entry *proc;
mode_t mode; 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)) { if ((asus_uid == 0) && (asus_gid == 0)) {
mode = S_IFREG | S_IRUGO | S_IWUGO; mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP;
} else { } else {
mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP;
printk(KERN_WARNING " asus_uid and asus_gid parameters are " printk(KERN_WARNING " asus_uid and asus_gid parameters are "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册