diff options
Diffstat (limited to 'security/selinux/include/selinux_netlabel.h')
-rw-r--r-- | security/selinux/include/selinux_netlabel.h | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/security/selinux/include/selinux_netlabel.h b/security/selinux/include/selinux_netlabel.h index 9de10cc2cef2..2a732c9033e3 100644 --- a/security/selinux/include/selinux_netlabel.h +++ b/security/selinux/include/selinux_netlabel.h | |||
@@ -38,19 +38,17 @@ | |||
38 | 38 | ||
39 | #ifdef CONFIG_NETLABEL | 39 | #ifdef CONFIG_NETLABEL |
40 | void selinux_netlbl_cache_invalidate(void); | 40 | void selinux_netlbl_cache_invalidate(void); |
41 | int selinux_netlbl_socket_post_create(struct socket *sock, | 41 | int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, u32 base_sid, u32 *sid); |
42 | int sock_family, | 42 | int selinux_netlbl_socket_post_create(struct socket *sock); |
43 | u32 sid); | ||
44 | void selinux_netlbl_sock_graft(struct sock *sk, struct socket *sock); | 43 | void selinux_netlbl_sock_graft(struct sock *sk, struct socket *sock); |
45 | u32 selinux_netlbl_inet_conn_request(struct sk_buff *skb, u32 sock_sid); | ||
46 | int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | 44 | int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, |
47 | struct sk_buff *skb, | 45 | struct sk_buff *skb, |
48 | struct avc_audit_data *ad); | 46 | struct avc_audit_data *ad); |
49 | u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock); | 47 | void selinux_netlbl_sk_security_reset(struct sk_security_struct *ssec, |
50 | u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb); | 48 | int family); |
51 | void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, | 49 | void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, |
52 | int family); | 50 | int family); |
53 | void selinux_netlbl_sk_clone_security(struct sk_security_struct *ssec, | 51 | void selinux_netlbl_sk_security_clone(struct sk_security_struct *ssec, |
54 | struct sk_security_struct *newssec); | 52 | struct sk_security_struct *newssec); |
55 | int selinux_netlbl_inode_permission(struct inode *inode, int mask); | 53 | int selinux_netlbl_inode_permission(struct inode *inode, int mask); |
56 | int selinux_netlbl_socket_setsockopt(struct socket *sock, | 54 | int selinux_netlbl_socket_setsockopt(struct socket *sock, |
@@ -62,23 +60,23 @@ static inline void selinux_netlbl_cache_invalidate(void) | |||
62 | return; | 60 | return; |
63 | } | 61 | } |
64 | 62 | ||
65 | static inline int selinux_netlbl_socket_post_create(struct socket *sock, | 63 | static inline int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, |
66 | int sock_family, | 64 | u32 base_sid, |
67 | u32 sid) | 65 | u32 *sid) |
68 | { | 66 | { |
67 | *sid = SECSID_NULL; | ||
69 | return 0; | 68 | return 0; |
70 | } | 69 | } |
71 | 70 | ||
72 | static inline void selinux_netlbl_sock_graft(struct sock *sk, | 71 | static inline int selinux_netlbl_socket_post_create(struct socket *sock) |
73 | struct socket *sock) | ||
74 | { | 72 | { |
75 | return; | 73 | return 0; |
76 | } | 74 | } |
77 | 75 | ||
78 | static inline u32 selinux_netlbl_inet_conn_request(struct sk_buff *skb, | 76 | static inline void selinux_netlbl_sock_graft(struct sock *sk, |
79 | u32 sock_sid) | 77 | struct socket *sock) |
80 | { | 78 | { |
81 | return SECSID_NULL; | 79 | return; |
82 | } | 80 | } |
83 | 81 | ||
84 | static inline int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | 82 | static inline int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, |
@@ -88,14 +86,11 @@ static inline int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | |||
88 | return 0; | 86 | return 0; |
89 | } | 87 | } |
90 | 88 | ||
91 | static inline u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock) | 89 | static inline void selinux_netlbl_sk_security_reset( |
92 | { | 90 | struct sk_security_struct *ssec, |
93 | return SECSID_NULL; | 91 | int family) |
94 | } | ||
95 | |||
96 | static inline u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb) | ||
97 | { | 92 | { |
98 | return SECSID_NULL; | 93 | return; |
99 | } | 94 | } |
100 | 95 | ||
101 | static inline void selinux_netlbl_sk_security_init( | 96 | static inline void selinux_netlbl_sk_security_init( |
@@ -105,7 +100,7 @@ static inline void selinux_netlbl_sk_security_init( | |||
105 | return; | 100 | return; |
106 | } | 101 | } |
107 | 102 | ||
108 | static inline void selinux_netlbl_sk_clone_security( | 103 | static inline void selinux_netlbl_sk_security_clone( |
109 | struct sk_security_struct *ssec, | 104 | struct sk_security_struct *ssec, |
110 | struct sk_security_struct *newssec) | 105 | struct sk_security_struct *newssec) |
111 | { | 106 | { |