aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/include/selinux_netlabel.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/include/selinux_netlabel.h')
-rw-r--r--security/selinux/include/selinux_netlabel.h43
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
40void selinux_netlbl_cache_invalidate(void); 40void selinux_netlbl_cache_invalidate(void);
41int selinux_netlbl_socket_post_create(struct socket *sock, 41int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, u32 base_sid, u32 *sid);
42 int sock_family, 42int selinux_netlbl_socket_post_create(struct socket *sock);
43 u32 sid);
44void selinux_netlbl_sock_graft(struct sock *sk, struct socket *sock); 43void selinux_netlbl_sock_graft(struct sock *sk, struct socket *sock);
45u32 selinux_netlbl_inet_conn_request(struct sk_buff *skb, u32 sock_sid);
46int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, 44int 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);
49u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock); 47void selinux_netlbl_sk_security_reset(struct sk_security_struct *ssec,
50u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb); 48 int family);
51void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, 49void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
52 int family); 50 int family);
53void selinux_netlbl_sk_clone_security(struct sk_security_struct *ssec, 51void selinux_netlbl_sk_security_clone(struct sk_security_struct *ssec,
54 struct sk_security_struct *newssec); 52 struct sk_security_struct *newssec);
55int selinux_netlbl_inode_permission(struct inode *inode, int mask); 53int selinux_netlbl_inode_permission(struct inode *inode, int mask);
56int selinux_netlbl_socket_setsockopt(struct socket *sock, 54int 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
65static inline int selinux_netlbl_socket_post_create(struct socket *sock, 63static 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
72static inline void selinux_netlbl_sock_graft(struct sock *sk, 71static 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
78static inline u32 selinux_netlbl_inet_conn_request(struct sk_buff *skb, 76static 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
84static inline int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, 82static 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
91static inline u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock) 89static inline void selinux_netlbl_sk_security_reset(
92{ 90 struct sk_security_struct *ssec,
93 return SECSID_NULL; 91 int family)
94}
95
96static inline u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb)
97{ 92{
98 return SECSID_NULL; 93 return;
99} 94}
100 95
101static inline void selinux_netlbl_sk_security_init( 96static 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
108static inline void selinux_netlbl_sk_clone_security( 103static 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{