diff options
Diffstat (limited to 'security/selinux/include/security.h')
-rw-r--r-- | security/selinux/include/security.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 210eec77e7ff..605b07165af8 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | struct sk_buff; | 37 | struct sk_buff; |
38 | struct netlbl_lsm_secattr; | ||
38 | 39 | ||
39 | extern int selinux_enabled; | 40 | extern int selinux_enabled; |
40 | extern int selinux_mls_enabled; | 41 | extern int selinux_mls_enabled; |
@@ -102,5 +103,28 @@ int security_fs_use(const char *fstype, unsigned int *behavior, | |||
102 | int security_genfs_sid(const char *fstype, char *name, u16 sclass, | 103 | int security_genfs_sid(const char *fstype, char *name, u16 sclass, |
103 | u32 *sid); | 104 | u32 *sid); |
104 | 105 | ||
106 | #ifdef CONFIG_NETLABEL | ||
107 | int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr, | ||
108 | u32 base_sid, | ||
109 | u32 *sid); | ||
110 | |||
111 | int security_netlbl_sid_to_secattr(u32 sid, | ||
112 | struct netlbl_lsm_secattr *secattr); | ||
113 | #else | ||
114 | static inline int security_netlbl_secattr_to_sid( | ||
115 | struct netlbl_lsm_secattr *secattr, | ||
116 | u32 base_sid, | ||
117 | u32 *sid) | ||
118 | { | ||
119 | return -EIDRM; | ||
120 | } | ||
121 | |||
122 | static inline int security_netlbl_sid_to_secattr(u32 sid, | ||
123 | struct netlbl_lsm_secattr *secattr) | ||
124 | { | ||
125 | return -ENOENT; | ||
126 | } | ||
127 | #endif /* CONFIG_NETLABEL */ | ||
128 | |||
105 | #endif /* _SELINUX_SECURITY_H_ */ | 129 | #endif /* _SELINUX_SECURITY_H_ */ |
106 | 130 | ||