diff options
author | Patrick McHardy <kaber@trash.net> | 2011-03-03 13:55:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-03 13:55:40 -0500 |
commit | c53fa1ed92cd671a1dfb1e7569e9ab672612ddc6 (patch) | |
tree | 9bb539a7731af94cac0112b8f13771e4a33e0450 /security | |
parent | 06dc94b1ed05f91e246315afeb1c652d6d0dc9ab (diff) |
netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms
Netlink message processing in the kernel is synchronous these days, the
session information can be collected when needed.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c8d699270687..cef42f5d69a2 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -4669,6 +4669,7 @@ static int selinux_netlink_recv(struct sk_buff *skb, int capability) | |||
4669 | { | 4669 | { |
4670 | int err; | 4670 | int err; |
4671 | struct common_audit_data ad; | 4671 | struct common_audit_data ad; |
4672 | u32 sid; | ||
4672 | 4673 | ||
4673 | err = cap_netlink_recv(skb, capability); | 4674 | err = cap_netlink_recv(skb, capability); |
4674 | if (err) | 4675 | if (err) |
@@ -4677,8 +4678,9 @@ static int selinux_netlink_recv(struct sk_buff *skb, int capability) | |||
4677 | COMMON_AUDIT_DATA_INIT(&ad, CAP); | 4678 | COMMON_AUDIT_DATA_INIT(&ad, CAP); |
4678 | ad.u.cap = capability; | 4679 | ad.u.cap = capability; |
4679 | 4680 | ||
4680 | return avc_has_perm(NETLINK_CB(skb).sid, NETLINK_CB(skb).sid, | 4681 | security_task_getsecid(current, &sid); |
4681 | SECCLASS_CAPABILITY, CAP_TO_MASK(capability), &ad); | 4682 | return avc_has_perm(sid, sid, SECCLASS_CAPABILITY, |
4683 | CAP_TO_MASK(capability), &ad); | ||
4682 | } | 4684 | } |
4683 | 4685 | ||
4684 | static int ipc_alloc_security(struct task_struct *task, | 4686 | static int ipc_alloc_security(struct task_struct *task, |