diff options
| author | Eric W. Biederman <[email protected]> | 2012-11-16 03:02:58 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2012-11-19 01:30:55 +0000 |
| commit | 73f7ef435934e952c1d70d83d69921ea5d1f6bd4 (patch) | |
| tree | a5d0bbe5e1154eaec96f859507e90bae4b34d0b9 /net/sysctl_net.c | |
| parent | userns: make each net (net_ns) belong to a user_ns (diff) | |
| download | kernel-73f7ef435934e952c1d70d83d69921ea5d1f6bd4.tar.gz kernel-73f7ef435934e952c1d70d83d69921ea5d1f6bd4.zip | |
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 <[email protected]>
Signed-off-by: "Eric W. Biederman" <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sysctl_net.c')
| -rw-r--r-- | net/sysctl_net.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sysctl_net.c b/net/sysctl_net.c index e3a6e37cd1c5..e98f3932bdfb 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -38,8 +38,7 @@ static int is_seen(struct ctl_table_set *set) } /* Return standard mode bits for table entry. */ -static int net_ctl_permissions(struct ctl_table_root *root, - struct nsproxy *nsproxy, +static int net_ctl_permissions(struct ctl_table_header *head, struct ctl_table *table) { /* Allow network administrator to have same access as root. */ |
