diff options
author | Chris Wright <chrisw@osdl.org> | 2004-10-25 04:06:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-25 04:06:13 -0700 |
commit | 7c73faedcca00abb6b67b14209393dc532710fc6 (patch) | |
tree | 51140245f2aabf8eddf283ccd224c36beea8950d /security | |
parent | 6f62d84064de8ff7c514ab5e3cba536973edb3ce (diff) | |
download | history-7c73faedcca00abb6b67b14209393dc532710fc6.tar.gz |
[PATCH] lsm: remove net related includes from security.h
With this we're back to the times when changing skbuff.h only triggers
rebuild of _net_ related stuff 8)
This uncovered a bug in rmap.h, that was not including mm.h to get the
definition of struct vm_area_struct, working by luck.
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 6890914525dce2..7a1cf54da4d1cd 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -24,6 +24,23 @@ #include <linux/xattr.h> #include <linux/hugetlb.h> +int cap_netlink_send(struct sock *sk, struct sk_buff *skb) +{ + NETLINK_CB(skb).eff_cap = current->cap_effective; + return 0; +} + +EXPORT_SYMBOL(cap_netlink_send); + +int cap_netlink_recv(struct sk_buff *skb) +{ + if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN)) + return -EPERM; + return 0; +} + +EXPORT_SYMBOL(cap_netlink_recv); + int cap_capable (struct task_struct *tsk, int cap) { /* Derived from include/linux/sched.h:capable. */ |