diff options
Diffstat (limited to 'security/selinux/include/selinux_netlabel.h')
-rw-r--r-- | security/selinux/include/selinux_netlabel.h | 71 |
1 files changed, 34 insertions, 37 deletions
diff --git a/security/selinux/include/selinux_netlabel.h b/security/selinux/include/selinux_netlabel.h index 2a732c9033e3..218e3f77c350 100644 --- a/security/selinux/include/selinux_netlabel.h +++ b/security/selinux/include/selinux_netlabel.h | |||
@@ -38,19 +38,22 @@ | |||
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_skbuff_getsid(struct sk_buff *skb, u32 base_sid, u32 *sid); | 41 | |
42 | int selinux_netlbl_socket_post_create(struct socket *sock); | ||
43 | void selinux_netlbl_sock_graft(struct sock *sk, struct socket *sock); | ||
44 | int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | ||
45 | struct sk_buff *skb, | ||
46 | struct avc_audit_data *ad); | ||
47 | void selinux_netlbl_sk_security_reset(struct sk_security_struct *ssec, | 42 | void selinux_netlbl_sk_security_reset(struct sk_security_struct *ssec, |
48 | int family); | 43 | int family); |
49 | void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, | 44 | void selinux_netlbl_sk_security_init(struct sk_security_struct *ssec, |
50 | int family); | 45 | int family); |
51 | void selinux_netlbl_sk_security_clone(struct sk_security_struct *ssec, | 46 | void selinux_netlbl_sk_security_clone(struct sk_security_struct *ssec, |
52 | struct sk_security_struct *newssec); | 47 | struct sk_security_struct *newssec); |
48 | |||
49 | int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, u32 base_sid, u32 *sid); | ||
50 | |||
51 | void selinux_netlbl_sock_graft(struct sock *sk, struct socket *sock); | ||
52 | int selinux_netlbl_socket_post_create(struct socket *sock); | ||
53 | int selinux_netlbl_inode_permission(struct inode *inode, int mask); | 53 | int selinux_netlbl_inode_permission(struct inode *inode, int mask); |
54 | int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | ||
55 | struct sk_buff *skb, | ||
56 | struct avc_audit_data *ad); | ||
54 | int selinux_netlbl_socket_setsockopt(struct socket *sock, | 57 | int selinux_netlbl_socket_setsockopt(struct socket *sock, |
55 | int level, | 58 | int level, |
56 | int optname); | 59 | int optname); |
@@ -60,59 +63,53 @@ static inline void selinux_netlbl_cache_invalidate(void) | |||
60 | return; | 63 | return; |
61 | } | 64 | } |
62 | 65 | ||
63 | static inline int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, | 66 | static inline void selinux_netlbl_sk_security_reset( |
64 | u32 base_sid, | 67 | struct sk_security_struct *ssec, |
65 | u32 *sid) | 68 | int family) |
66 | { | 69 | { |
67 | *sid = SECSID_NULL; | 70 | return; |
68 | return 0; | ||
69 | } | 71 | } |
70 | 72 | static inline void selinux_netlbl_sk_security_init( | |
71 | static inline int selinux_netlbl_socket_post_create(struct socket *sock) | 73 | struct sk_security_struct *ssec, |
74 | int family) | ||
72 | { | 75 | { |
73 | return 0; | 76 | return; |
74 | } | 77 | } |
75 | 78 | static inline void selinux_netlbl_sk_security_clone( | |
76 | static inline void selinux_netlbl_sock_graft(struct sock *sk, | 79 | struct sk_security_struct *ssec, |
77 | struct socket *sock) | 80 | struct sk_security_struct *newssec) |
78 | { | 81 | { |
79 | return; | 82 | return; |
80 | } | 83 | } |
81 | 84 | ||
82 | static inline int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | 85 | static inline int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, |
83 | struct sk_buff *skb, | 86 | u32 base_sid, |
84 | struct avc_audit_data *ad) | 87 | u32 *sid) |
85 | { | 88 | { |
89 | *sid = SECSID_NULL; | ||
86 | return 0; | 90 | return 0; |
87 | } | 91 | } |
88 | 92 | ||
89 | static inline void selinux_netlbl_sk_security_reset( | 93 | static inline void selinux_netlbl_sock_graft(struct sock *sk, |
90 | struct sk_security_struct *ssec, | 94 | struct socket *sock) |
91 | int family) | ||
92 | { | ||
93 | return; | ||
94 | } | ||
95 | |||
96 | static inline void selinux_netlbl_sk_security_init( | ||
97 | struct sk_security_struct *ssec, | ||
98 | int family) | ||
99 | { | 95 | { |
100 | return; | 96 | return; |
101 | } | 97 | } |
102 | 98 | static inline int selinux_netlbl_socket_post_create(struct socket *sock) | |
103 | static inline void selinux_netlbl_sk_security_clone( | ||
104 | struct sk_security_struct *ssec, | ||
105 | struct sk_security_struct *newssec) | ||
106 | { | 99 | { |
107 | return; | 100 | return 0; |
108 | } | 101 | } |
109 | |||
110 | static inline int selinux_netlbl_inode_permission(struct inode *inode, | 102 | static inline int selinux_netlbl_inode_permission(struct inode *inode, |
111 | int mask) | 103 | int mask) |
112 | { | 104 | { |
113 | return 0; | 105 | return 0; |
114 | } | 106 | } |
115 | 107 | static inline int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, | |
108 | struct sk_buff *skb, | ||
109 | struct avc_audit_data *ad) | ||
110 | { | ||
111 | return 0; | ||
112 | } | ||
116 | static inline int selinux_netlbl_socket_setsockopt(struct socket *sock, | 113 | static inline int selinux_netlbl_socket_setsockopt(struct socket *sock, |
117 | int level, | 114 | int level, |
118 | int optname) | 115 | int optname) |