diff options
author | James Morris <jmorris@redhat.com> | 2004-06-15 07:45:30 -0700 |
---|---|---|
committer | David S. Miller <davem@nuts.davemloft.net> | 2004-06-15 07:45:30 -0700 |
commit | a86219af34304d840c05c5af64b6c5ef12371f7c (patch) | |
tree | ebb7f4a188c1744984ce6ca97cec60dacef1cf77 /security | |
parent | e74974d73dc9c7d901b72be5a08fa7a9aaf8774a (diff) | |
download | history-a86219af34304d840c05c5af64b6c5ef12371f7c.tar.gz |
[SELINUX]: Fine-grained Netlink support - add sk to netlink_send hook
Modifies the LSM netlink_send() hook so that it takes a struct sock
parameter. SELinux will use this parameter to lookup the class of socket,
which was assigned during socket security initialization.
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@redhat.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/dummy.c | 2 | ||||
-rw-r--r-- | security/selinux/hooks.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/security/dummy.c b/security/dummy.c index 3e768e0503be05..05d9885886eba1 100644 --- a/security/dummy.c +++ b/security/dummy.c @@ -720,7 +720,7 @@ static int dummy_sem_semop (struct sem_array *sma, return 0; } -static int dummy_netlink_send (struct sk_buff *skb) +static int dummy_netlink_send (struct sock *sk, struct sk_buff *skb) { if (current->euid == 0) cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN); diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index fdc5cecddec6d2..784833f3820192 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1567,7 +1567,7 @@ static int selinux_vm_enough_memory(long pages) return -ENOMEM; } -static int selinux_netlink_send(struct sk_buff *skb) +static int selinux_netlink_send(struct sock *sk, struct sk_buff *skb) { if (capable(CAP_NET_ADMIN)) cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN); |