diff options
Diffstat (limited to 'init/property_service.c')
-rw-r--r-- | init/property_service.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/init/property_service.c b/init/property_service.c index c6c2e3f..2c1b4a1 100644 --- a/init/property_service.c +++ b/init/property_service.c @@ -40,10 +40,8 @@ #include <sys/atomics.h> #include <private/android_filesystem_config.h> -#ifdef HAVE_SELINUX #include <selinux/selinux.h> #include <selinux/label.h> -#endif #include "property_service.h" #include "init.h" @@ -199,7 +197,6 @@ static void update_prop_info(prop_info *pi, const char *value, unsigned len) static int check_mac_perms(const char *name, char *sctx) { -#ifdef HAVE_SELINUX if (is_selinux_enabled() <= 0) return 1; @@ -223,15 +220,10 @@ static int check_mac_perms(const char *name, char *sctx) freecon(tctx); err: return result; - -#endif - return 1; } static int check_control_mac_perms(const char *name, char *sctx) { -#ifdef HAVE_SELINUX - /* * Create a name prefix out of ctl.<service name> * The new prefix allows the use of the existing @@ -245,9 +237,6 @@ static int check_control_mac_perms(const char *name, char *sctx) return 0; return check_mac_perms(ctl_name, sctx); - -#endif - return 1; } /* @@ -394,11 +383,9 @@ int property_set(const char *name, const char *value) * to prevent them from being overwritten by default values. */ write_persistent_property(name, value); -#ifdef HAVE_SELINUX } else if (strcmp("selinux.reload_policy", name) == 0 && strcmp("1", value) == 0) { selinux_reload_policy(); -#endif } property_changed(name, value); return 0; @@ -440,9 +427,7 @@ void handle_property_set_fd() msg.name[PROP_NAME_MAX-1] = 0; msg.value[PROP_VALUE_MAX-1] = 0; -#ifdef HAVE_SELINUX getpeercon(s, &source_ctx); -#endif if(memcmp(msg.name,"ctl.",4) == 0) { // Keep the old close-socket-early behavior when handling @@ -467,10 +452,7 @@ void handle_property_set_fd() // the property is written to memory. close(s); } -#ifdef HAVE_SELINUX freecon(source_ctx); -#endif - break; default: |