History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull security layer fixlet from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: sysctl: fix write access to dmesg_restrict/kptr_restrict

Linus Torvalds committed 14 years ago

Commit d6a624e2 parents f21fec9 620f6e81 file · +4 −4Browse files

Unified · Split

kernel/sysctl.c+4−4
@@ -170,7 +170,7 @@ static int proc_taint(struct ctl_table *table, int write, · 169 unmodified lines
170170 #endif
171171
172172 #ifdef CONFIG_PRINTK
173−static int proc_dmesg_restrict(struct ctl_table *table, int write,
173+static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
174174 void __user *buffer, size_t *lenp, loff_t *ppos);
175175 #endif
176176
@@ -703,7 +703,7 @@ static struct ctl_table kern_table[] = { · 526 unmodified lines
703703 .data = &dmesg_restrict,
704704 .maxlen = sizeof(int),
705705 .mode = 0644,
706− .proc_handler = proc_dointvec_minmax,
706+ .proc_handler = proc_dointvec_minmax_sysadmin,
707707 .extra1 = &zero,
708708 .extra2 = &one,
709709 },
@@ -712,7 +712,7 @@ static struct ctl_table kern_table[] = { · 2 unmodified lines
712712 .data = &kptr_restrict,
713713 .maxlen = sizeof(int),
714714 .mode = 0644,
715− .proc_handler = proc_dmesg_restrict,
715+ .proc_handler = proc_dointvec_minmax_sysadmin,
716716 .extra1 = &zero,
717717 .extra2 = &two,
718718 },
@@ -1943,7 +1943,7 @@ static int proc_taint(struct ctl_table *table, int write, · 1224 unmodified lines
19431943 }
19441944
19451945 #ifdef CONFIG_PRINTK
1946−static int proc_dmesg_restrict(struct ctl_table *table, int write,
1946+static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
19471947 void __user *buffer, size_t *lenp, loff_t *ppos)
19481948 {
19491949 if (write && !capable(CAP_SYS_ADMIN))