diff options
author | James Morris <jmorris@redhat.com> | 2004-06-17 18:15:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-17 18:15:25 -0700 |
commit | c83293d53792446fde0007db076947bdbdf099e7 (patch) | |
tree | 2fc6c522f701e6a8222abb129258018f60221aac /security | |
parent | ed54f747aca1978c4dfffad0cfe654b5f543729f (diff) | |
download | history-c83293d53792446fde0007db076947bdbdf099e7.tar.gz |
[PATCH] 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.
Cc: David S. Miller <davem@redhat.com>
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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); |