diff options
Diffstat (limited to 'include/linux/selinux.h')
| -rw-r--r-- | include/linux/selinux.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/include/linux/selinux.h b/include/linux/selinux.h index 82e0f26a1299..44f459612690 100644 --- a/include/linux/selinux.h +++ b/include/linux/selinux.h | |||
| @@ -21,74 +21,11 @@ struct kern_ipc_perm; | |||
| 21 | #ifdef CONFIG_SECURITY_SELINUX | 21 | #ifdef CONFIG_SECURITY_SELINUX |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| 24 | * selinux_string_to_sid - map a security context string to a security ID | ||
| 25 | * @str: the security context string to be mapped | ||
| 26 | * @sid: ID value returned via this. | ||
| 27 | * | ||
| 28 | * Returns 0 if successful, with the SID stored in sid. A value | ||
| 29 | * of zero for sid indicates no SID could be determined (but no error | ||
| 30 | * occurred). | ||
| 31 | */ | ||
| 32 | int selinux_string_to_sid(char *str, u32 *sid); | ||
| 33 | |||
| 34 | /** | ||
| 35 | * selinux_secmark_relabel_packet_permission - secmark permission check | ||
| 36 | * @sid: SECMARK ID value to be applied to network packet | ||
| 37 | * | ||
| 38 | * Returns 0 if the current task is allowed to set the SECMARK label of | ||
| 39 | * packets with the supplied security ID. Note that it is implicit that | ||
| 40 | * the packet is always being relabeled from the default unlabeled value, | ||
| 41 | * and that the access control decision is made in the AVC. | ||
| 42 | */ | ||
| 43 | int selinux_secmark_relabel_packet_permission(u32 sid); | ||
| 44 | |||
| 45 | /** | ||
| 46 | * selinux_secmark_refcount_inc - increments the secmark use counter | ||
| 47 | * | ||
| 48 | * SELinux keeps track of the current SECMARK targets in use so it knows | ||
| 49 | * when to apply SECMARK label access checks to network packets. This | ||
| 50 | * function incements this reference count to indicate that a new SECMARK | ||
| 51 | * target has been configured. | ||
| 52 | */ | ||
| 53 | void selinux_secmark_refcount_inc(void); | ||
| 54 | |||
| 55 | /** | ||
| 56 | * selinux_secmark_refcount_dec - decrements the secmark use counter | ||
| 57 | * | ||
| 58 | * SELinux keeps track of the current SECMARK targets in use so it knows | ||
| 59 | * when to apply SECMARK label access checks to network packets. This | ||
| 60 | * function decements this reference count to indicate that one of the | ||
| 61 | * existing SECMARK targets has been removed/flushed. | ||
| 62 | */ | ||
| 63 | void selinux_secmark_refcount_dec(void); | ||
| 64 | |||
| 65 | /** | ||
| 66 | * selinux_is_enabled - is SELinux enabled? | 24 | * selinux_is_enabled - is SELinux enabled? |
| 67 | */ | 25 | */ |
| 68 | bool selinux_is_enabled(void); | 26 | bool selinux_is_enabled(void); |
| 69 | #else | 27 | #else |
| 70 | 28 | ||
| 71 | static inline int selinux_string_to_sid(const char *str, u32 *sid) | ||
| 72 | { | ||
| 73 | *sid = 0; | ||
| 74 | return 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline int selinux_secmark_relabel_packet_permission(u32 sid) | ||
| 78 | { | ||
| 79 | return 0; | ||
| 80 | } | ||
| 81 | |||
| 82 | static inline void selinux_secmark_refcount_inc(void) | ||
| 83 | { | ||
| 84 | return; | ||
| 85 | } | ||
| 86 | |||
| 87 | static inline void selinux_secmark_refcount_dec(void) | ||
| 88 | { | ||
| 89 | return; | ||
| 90 | } | ||
| 91 | |||
| 92 | static inline bool selinux_is_enabled(void) | 29 | static inline bool selinux_is_enabled(void) |
| 93 | { | 30 | { |
| 94 | return false; | 31 | return false; |
