mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
d328b83682
commit
73f7ef4359
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user