projects
/
linux-flexiantxendom0.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysctl: fix write access to dmesg_restrict/kptr_restrict
[linux-flexiantxendom0.git]
/
kernel
/
sysctl.c
diff --git
a/kernel/sysctl.c
b/kernel/sysctl.c
index
ae27196
..
ea7ec7f
100644
(file)
--- a/
kernel/sysctl.c
+++ b/
kernel/sysctl.c
@@
-166,7
+166,7
@@
static int proc_taint(struct ctl_table *table, int write,
#endif
#ifdef CONFIG_PRINTK
#endif
#ifdef CONFIG_PRINTK
-static int proc_dmesg_restrict(struct ctl_table *table, int write,
+static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos);
#endif
void __user *buffer, size_t *lenp, loff_t *ppos);
#endif
@@
-713,7
+713,7
@@
static struct ctl_table kern_table[] = {
.data = &dmesg_restrict,
.maxlen = sizeof(int),
.mode = 0644,
.data = &dmesg_restrict,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec_minmax,
+ .proc_handler = proc_dointvec_minmax_sysadmin,
.extra1 = &zero,
.extra2 = &one,
},
.extra1 = &zero,
.extra2 = &one,
},
@@
-722,7
+722,7
@@
static struct ctl_table kern_table[] = {
.data = &kptr_restrict,
.maxlen = sizeof(int),
.mode = 0644,
.data = &kptr_restrict,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dmesg_restrict,
+ .proc_handler = proc_dointvec_minmax_sysadmin,
.extra1 = &zero,
.extra2 = &two,
},
.extra1 = &zero,
.extra2 = &two,
},
@@
-2422,7
+2422,7
@@
static int proc_taint(struct ctl_table *table, int write,
}
#ifdef CONFIG_PRINTK
}
#ifdef CONFIG_PRINTK
-static int proc_dmesg_restrict(struct ctl_table *table, int write,
+static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
if (write && !capable(CAP_SYS_ADMIN))
void __user *buffer, size_t *lenp, loff_t *ppos)
{
if (write && !capable(CAP_SYS_ADMIN))