summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChris Wright <chrisw@osdl.org>2004-10-25 04:06:13 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-25 04:06:13 -0700
commit7c73faedcca00abb6b67b14209393dc532710fc6 (patch)
tree51140245f2aabf8eddf283ccd224c36beea8950d /include/linux
parent6f62d84064de8ff7c514ab5e3cba536973edb3ce (diff)
[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 'include/linux')
-rw-r--r--include/linux/rmap.h1
-rw-r--r--include/linux/security.h25
2 files changed, 8 insertions, 18 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 291d36c9e987..9e6a26527047 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -7,6 +7,7 @@
#include <linux/config.h>
#include <linux/list.h>
#include <linux/slab.h>
+#include <linux/mm.h>
#include <linux/spinlock.h>
/*
diff --git a/include/linux/security.h b/include/linux/security.h
index bf7bb29c9719..5f56f92e9569 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -30,8 +30,6 @@
#include <linux/shm.h>
#include <linux/msg.h>
#include <linux/sched.h>
-#include <linux/skbuff.h>
-#include <linux/netlink.h>
struct ctl_table;
@@ -55,18 +53,14 @@ extern void cap_task_reparent_to_init (struct task_struct *p);
extern int cap_syslog (int type);
extern int cap_vm_enough_memory (long pages);
-static inline int cap_netlink_send (struct sock *sk, struct sk_buff *skb)
-{
- NETLINK_CB (skb).eff_cap = current->cap_effective;
- return 0;
-}
+struct msghdr;
+struct sk_buff;
+struct sock;
+struct sockaddr;
+struct socket;
-static inline int cap_netlink_recv (struct sk_buff *skb)
-{
- if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN))
- return -EPERM;
- return 0;
-}
+extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
+extern int cap_netlink_recv(struct sk_buff *skb);
/*
* Values used in the task_security_ops calls
@@ -2518,11 +2512,6 @@ static inline int security_setprocattr(struct task_struct *p, char *name, void *
return -EINVAL;
}
-/*
- * The netlink capability defaults need to be used inline by default
- * (rather than hooking into the capability module) to reduce overhead
- * in the networking code.
- */
static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb)
{
return cap_netlink_send (sk, skb);