diff options
Diffstat (limited to 'security/selinux/include/security.h')
-rw-r--r-- | security/selinux/include/security.h | 29 |
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 | ||
37 | struct sk_buff; | 37 | struct netlbl_lsm_secattr; |
38 | 38 | ||
39 | extern int selinux_enabled; | 39 | extern int selinux_enabled; |
40 | extern int selinux_mls_enabled; | 40 | extern int selinux_mls_enabled; |
@@ -82,8 +82,6 @@ int security_netif_sid(char *name, u32 *if_sid, | |||
82 | int security_node_sid(u16 domain, void *addr, u32 addrlen, | 82 | int security_node_sid(u16 domain, void *addr, u32 addrlen, |
83 | u32 *out_sid); | 83 | u32 *out_sid); |
84 | 84 | ||
85 | void security_skb_extlbl_sid(struct sk_buff *skb, u32 base_sid, u32 *sid); | ||
86 | |||
87 | int security_validate_transition(u32 oldsid, u32 newsid, u32 tasksid, | 85 | int 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, | |||
102 | int security_genfs_sid(const char *fstype, char *name, u16 sclass, | 100 | int security_genfs_sid(const char *fstype, char *name, u16 sclass, |
103 | u32 *sid); | 101 | u32 *sid); |
104 | 102 | ||
103 | #ifdef CONFIG_NETLABEL | ||
104 | int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr, | ||
105 | u32 base_sid, | ||
106 | u32 *sid); | ||
107 | |||
108 | int security_netlbl_sid_to_secattr(u32 sid, | ||
109 | struct netlbl_lsm_secattr *secattr); | ||
110 | #else | ||
111 | static 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 | |||
119 | static 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 | |||
126 | const char *security_get_initial_sid_context(u32 sid); | ||
127 | |||
105 | #endif /* _SELINUX_SECURITY_H_ */ | 128 | #endif /* _SELINUX_SECURITY_H_ */ |
106 | 129 | ||