diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/security.h | 13 |
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; | |||
67 | struct xfrm_user_sec_ctx; | 67 | struct xfrm_user_sec_ctx; |
68 | 68 | ||
69 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 69 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
70 | extern int cap_netlink_recv(struct sk_buff *skb); | 70 | extern 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 | ||
2035 | static inline int security_netlink_recv(struct sk_buff * skb) | 2036 | static 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 | ||
2673 | static inline int security_netlink_recv (struct sk_buff *skb) | 2674 | static 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 | ||
2678 | static inline struct dentry *securityfs_create_dir(const char *name, | 2679 | static inline struct dentry *securityfs_create_dir(const char *name, |