aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/include/selinux_netlabel.h
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2006-08-29 20:53:48 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:18:34 -0400
commit99f59ed073d3c1b890690064ab285a201dea2e35 (patch)
tree0f6ae012cf4f988d3ae0c665fd3b12ea05409ec8 /security/selinux/include/selinux_netlabel.h
parentfc747e82b40ea50a62eb2aef55bedd4465607cb0 (diff)
[NetLabel]: Correctly initialize the NetLabel fields.
Fix a problem where the NetLabel specific fields of the sk_security_struct structure were not being initialized early enough in some cases. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/selinux/include/selinux_netlabel.h')
-rw-r--r--security/selinux/include/selinux_netlabel.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/security/selinux/include/selinux_netlabel.h b/security/selinux/include/selinux_netlabel.h
index 88c463eef1e1..d885d880540e 100644
--- a/security/selinux/include/selinux_netlabel.h
+++ b/security/selinux/include/selinux_netlabel.h
@@ -39,6 +39,10 @@ int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec,
39 struct avc_audit_data *ad); 39 struct avc_audit_data *ad);
40u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock); 40u32 selinux_netlbl_socket_getpeersec_stream(struct socket *sock);
41u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb); 41u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb);
42void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec,
43 int family);
44void selinux_netlbl_sk_clone_security(struct sk_security_struct *ssec,
45 struct sk_security_struct *newssec);
42 46
43int __selinux_netlbl_inode_permission(struct inode *inode, int mask); 47int __selinux_netlbl_inode_permission(struct inode *inode, int mask);
44/** 48/**
@@ -115,6 +119,20 @@ static inline u32 selinux_netlbl_socket_getpeersec_dgram(struct sk_buff *skb)
115 return SECSID_NULL; 119 return SECSID_NULL;
116} 120}
117 121
122static inline void selinux_netlbl_sk_security_init(
123 struct sk_security_struct *ssec,
124 int family)
125{
126 return;
127}
128
129static inline void selinux_netlbl_sk_clone_security(
130 struct sk_security_struct *ssec,
131 struct sk_security_struct *newssec)
132{
133 return;
134}
135
118static inline int selinux_netlbl_inode_permission(struct inode *inode, 136static inline int selinux_netlbl_inode_permission(struct inode *inode,
119 int mask) 137 int mask)
120{ 138{