aboutsummaryrefslogtreecommitdiffstats
path: root/net/sysctl_net.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-11-15 22:02:58 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-18 20:30:55 -0500
commit73f7ef435934e952c1d70d83d69921ea5d1f6bd4 (patch)
treea5d0bbe5e1154eaec96f859507e90bae4b34d0b9 /net/sysctl_net.c
parentd328b836823cd4a76611a45f52e208f8ce3d75d7 (diff)
sysctl: Pass useful parameters to sysctl permissions
- Current is implicitly avaiable so passing current->nsproxy isn't useful. - The ctl_table_header is needed to find how the sysctl table is connected to the rest of sysctl. - ctl_table_root is avaiable in the ctl_table_header so no need to it. With these changes it becomes possible to write a version of net_sysctl_permission that takes into account the network namespace of the sysctl table, an important feature in extending the user namespace. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sysctl_net.c')
-rw-r--r--net/sysctl_net.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index e3a6e37cd1c..e98f3932bdf 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -38,8 +38,7 @@ static int is_seen(struct ctl_table_set *set)
38} 38}
39 39
40/* Return standard mode bits for table entry. */ 40/* Return standard mode bits for table entry. */
41static int net_ctl_permissions(struct ctl_table_root *root, 41static int net_ctl_permissions(struct ctl_table_header *head,
42 struct nsproxy *nsproxy,
43 struct ctl_table *table) 42 struct ctl_table *table)
44{ 43{
45 /* Allow network administrator to have same access as root. */ 44 /* Allow network administrator to have same access as root. */