Debian Codegraph @

src/util/selinux-fallback.c

raw
1 /*
2 * Bus SELinux Fallback Helpers
3 *
4 * This fallback is used when libselinux is not available, and is meant to be
5 * functionally equivalent to util/selinux.c in case SELinux is disabled, but
6 * without requiring the library.
7 *
8 * See util/selinux.c for details.
9 */
10
11 #include <c-stdaux.h>
12 #include <stdlib.h>
13 #include "util/selinux.h"
14
15 bool bus_selinux_is_enabled(void) {
16 return false;
17 }
18
19 bool bus_selinux_is_enforcing(void) {
20 return false;
21 }
22
23 const char *bus_selinux_policy_root(void) {
24 return NULL;
25 }
26
27 int bus_selinux_registry_new(BusSELinuxRegistry **registryp, const char *fallback_context) {
28 *registryp = NULL;
29 return 0;
30 }
31
32 BusSELinuxRegistry *bus_selinux_registry_ref(BusSELinuxRegistry *registry) {
33 return NULL;
34 }
35
36 BusSELinuxRegistry *bus_selinux_registry_unref(BusSELinuxRegistry *registry) {
37 return NULL;
38 }
39
40 int bus_selinux_registry_add_name(BusSELinuxRegistry *registry, const char *name, const char *context) {
41 return 0;
42 }
43
44 int bus_selinux_check_own(BusSELinuxRegistry *registry,
45 const char *owner_context,
46 const char *name) {
47 return 0;
48 }
49
50 int bus_selinux_check_send(BusSELinuxRegistry *registry,
51 const char *context_sender,
52 const char *context_receiver) {
53 return 0;
54 }
55
56 int bus_selinux_init_global(Log *log) {
57 return 0;
58 }
59
60 void bus_selinux_deinit_global(void) {
61 return;
62 }