aboutsummaryrefslogtreecommitdiffstats
path: root/security/dummy.c
diff options
context:
space:
mode:
authorDarrel Goeddel <dgoeddel@trustedcs.com>2006-06-27 16:26:11 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-29 19:57:55 -0400
commitc7bdb545d23026b18be53289fd866d1ac07f5f8c (patch)
tree6d9a218871d88f7579dd53f14692df2529b6e712 /security/dummy.c
parent576a30eb6453439b3c37ba24455ac7090c247b5a (diff)
[NETLINK]: Encapsulate eff_cap usage within security framework.
This patch encapsulates the usage of eff_cap (in netlink_skb_params) within the security framework by extending security_netlink_recv to include a required capability parameter and converting all direct usage of eff_caps outside of the lsm modules to use the interface. It also updates the SELinux implementation of the security_netlink_send and security_netlink_recv hooks to take advantage of the sid in the netlink_skb_params struct. This also enables SELinux to perform auditing of netlink capability checks. Please apply, for 2.6.18 if possible. Signed-off-by: Darrel Goeddel <dgoeddel@trustedcs.com> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/dummy.c')
-rw-r--r--security/dummy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/dummy.c b/security/dummy.c
index 310fcdf7b749..913540808577 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -675,9 +675,9 @@ static int dummy_netlink_send (struct sock *sk, struct sk_buff *skb)
675 return 0; 675 return 0;
676} 676}
677 677
678static int dummy_netlink_recv (struct sk_buff *skb) 678static int dummy_netlink_recv (struct sk_buff *skb, int cap)
679{ 679{
680 if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN)) 680 if (!cap_raised (NETLINK_CB (skb).eff_cap, cap))
681 return -EPERM; 681 return -EPERM;
682 return 0; 682 return 0;
683} 683}