mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Signed-off-by: Stephen Smalley <[email protected]> Acked-by: James Morris <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
576a30eb64
commit
c7bdb545d2
12 changed files with 35 additions and 34 deletions
|
|
@ -320,7 +320,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||
goto errout;
|
||||
}
|
||||
|
||||
if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb)) {
|
||||
if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb, CAP_NET_ADMIN)) {
|
||||
err = -EPERM;
|
||||
goto errout;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue