aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 20:43:43 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 20:43:43 -0400
commit74e651f0aa100f3e5d3432a8dd8869c089e8d72f (patch)
tree457e8d6ec4c28f3b1f3f4fcbf45df9b91f9ee9c7 /include/linux/security.h
parent6002e45045a190a112bc3bc2134d0ff4fac7ced7 (diff)
parent0702056f9f41274a06e21cb05f12b4265b4867a2 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits) [TIPC]: Initial activation message now includes TIPC version number [TIPC]: Improve response to requests for node/link information [TIPC]: Fixed skb_under_panic caused by tipc_link_bundle_buf [IrDA]: Fix the AU1000 FIR dependencies [IrDA]: Fix RCU lock pairing on error path [XFRM]: unexport xfrm_state_mtu [NET]: make skb_release_data() static [NETFILTE] ipv4: Fix typo (Bugzilla #6753) [IrDA]: MCS7780 usb_driver struct should be static [BNX2]: Turn off link during shutdown [BNX2]: Use dev_kfree_skb() instead of the _irq version [ATM]: basic sysfs support for ATM devices [ATM]: [suni] change suni_init to __devinit [ATM]: [iphase] should be __devinit not __init [ATM]: [idt77105] should be __devinit not __init [BNX2]: Add NETIF_F_TSO_ECN [NET]: Add ECN support for TSO [AF_UNIX]: Datagram getpeersec [NET]: Fix logical error in skb_gso_ok [PKT_SCHED]: PSCHED_TADD() and PSCHED_TADD2() can result,tv_usec >= 1000000 ...
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 51805806f974..c7ea15716dce 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -67,7 +67,7 @@ struct xfrm_state;
67struct xfrm_user_sec_ctx; 67struct xfrm_user_sec_ctx;
68 68
69extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); 69extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
70extern int cap_netlink_recv(struct sk_buff *skb); 70extern int cap_netlink_recv(struct sk_buff *skb, int cap);
71 71
72/* 72/*
73 * Values used in the task_security_ops calls 73 * Values used in the task_security_ops calls
@@ -656,6 +656,7 @@ struct swap_info_struct;
656 * Check permission before processing the received netlink message in 656 * Check permission before processing the received netlink message in
657 * @skb. 657 * @skb.
658 * @skb contains the sk_buff structure for the netlink message. 658 * @skb contains the sk_buff structure for the netlink message.
659 * @cap indicates the capability required
659 * Return 0 if permission is granted. 660 * Return 0 if permission is granted.
660 * 661 *
661 * Security hooks for Unix domain networking. 662 * Security hooks for Unix domain networking.
@@ -1266,7 +1267,7 @@ struct security_operations {
1266 struct sembuf * sops, unsigned nsops, int alter); 1267 struct sembuf * sops, unsigned nsops, int alter);
1267 1268
1268 int (*netlink_send) (struct sock * sk, struct sk_buff * skb); 1269 int (*netlink_send) (struct sock * sk, struct sk_buff * skb);
1269 int (*netlink_recv) (struct sk_buff * skb); 1270 int (*netlink_recv) (struct sk_buff * skb, int cap);
1270 1271
1271 /* allow module stacking */ 1272 /* allow module stacking */
1272 int (*register_security) (const char *name, 1273 int (*register_security) (const char *name,
@@ -2032,9 +2033,9 @@ static inline int security_netlink_send(struct sock *sk, struct sk_buff * skb)
2032 return security_ops->netlink_send(sk, skb); 2033 return security_ops->netlink_send(sk, skb);
2033} 2034}
2034 2035
2035static inline int security_netlink_recv(struct sk_buff * skb) 2036static inline int security_netlink_recv(struct sk_buff * skb, int cap)
2036{ 2037{
2037 return security_ops->netlink_recv(skb); 2038 return security_ops->netlink_recv(skb, cap);
2038} 2039}
2039 2040
2040/* prototypes */ 2041/* prototypes */
@@ -2670,9 +2671,9 @@ static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb)
2670 return cap_netlink_send (sk, skb); 2671 return cap_netlink_send (sk, skb);
2671} 2672}
2672 2673
2673static inline int security_netlink_recv (struct sk_buff *skb) 2674static inline int security_netlink_recv (struct sk_buff *skb, int cap)
2674{ 2675{
2675 return cap_netlink_recv (skb); 2676 return cap_netlink_recv (skb, cap);
2676} 2677}
2677 2678
2678static inline struct dentry *securityfs_create_dir(const char *name, 2679static inline struct dentry *securityfs_create_dir(const char *name,