aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/include/security.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/include/security.h')
-rw-r--r--security/selinux/include/security.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
index 210eec77e7ff..b94378afea25 100644
--- a/security/selinux/include/security.h
+++ b/security/selinux/include/security.h
@@ -34,7 +34,7 @@
34#define POLICYDB_VERSION_MAX POLICYDB_VERSION_RANGETRANS 34#define POLICYDB_VERSION_MAX POLICYDB_VERSION_RANGETRANS
35#endif 35#endif
36 36
37struct sk_buff; 37struct netlbl_lsm_secattr;
38 38
39extern int selinux_enabled; 39extern int selinux_enabled;
40extern int selinux_mls_enabled; 40extern int selinux_mls_enabled;
@@ -82,8 +82,6 @@ int security_netif_sid(char *name, u32 *if_sid,
82int security_node_sid(u16 domain, void *addr, u32 addrlen, 82int security_node_sid(u16 domain, void *addr, u32 addrlen,
83 u32 *out_sid); 83 u32 *out_sid);
84 84
85void security_skb_extlbl_sid(struct sk_buff *skb, u32 base_sid, u32 *sid);
86
87int security_validate_transition(u32 oldsid, u32 newsid, u32 tasksid, 85int security_validate_transition(u32 oldsid, u32 newsid, u32 tasksid,
88 u16 tclass); 86 u16 tclass);
89 87
@@ -102,5 +100,30 @@ int security_fs_use(const char *fstype, unsigned int *behavior,
102int security_genfs_sid(const char *fstype, char *name, u16 sclass, 100int security_genfs_sid(const char *fstype, char *name, u16 sclass,
103 u32 *sid); 101 u32 *sid);
104 102
103#ifdef CONFIG_NETLABEL
104int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr,
105 u32 base_sid,
106 u32 *sid);
107
108int security_netlbl_sid_to_secattr(u32 sid,
109 struct netlbl_lsm_secattr *secattr);
110#else
111static inline int security_netlbl_secattr_to_sid(
112 struct netlbl_lsm_secattr *secattr,
113 u32 base_sid,
114 u32 *sid)
115{
116 return -EIDRM;
117}
118
119static inline int security_netlbl_sid_to_secattr(u32 sid,
120 struct netlbl_lsm_secattr *secattr)
121{
122 return -ENOENT;
123}
124#endif /* CONFIG_NETLABEL */
125
126const char *security_get_initial_sid_context(u32 sid);
127
105#endif /* _SELINUX_SECURITY_H_ */ 128#endif /* _SELINUX_SECURITY_H_ */
106 129