summaryrefslogtreecommitdiff
path: root/debuggerd/debuggerd.cpp
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-06-12 22:03:50 -0700
committerNick Kralevich <nnk@google.com>2015-06-12 22:12:33 -0700
commit4d87095ebfefdb9e641492462f0a0e21d5b96ecf (patch)
tree436768267355be6e72efa4481635954fa28a3661 /debuggerd/debuggerd.cpp
parent555d91985d174217c3e805997bcd86d9c94f5a6b (diff)
Remove calls to is_selinux_enabled()
d34e407aeb5898f19d4f042b7558420bbb3a1817 removed support for running with SELinux completely disabled. SELinux must either be in permissive or enforcing mode now. Remove unnecessary calls to is_selinux_enabled(). It always returns true now. Change-Id: Ife3156b74b13b2e590afe4accf716fc7776567e5
Diffstat (limited to 'debuggerd/debuggerd.cpp')
-rw-r--r--debuggerd/debuggerd.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp
index b84a4e587..26d63894d 100644
--- a/debuggerd/debuggerd.cpp
+++ b/debuggerd/debuggerd.cpp
@@ -134,8 +134,6 @@ static int get_process_info(pid_t tid, pid_t* out_pid, uid_t* out_uid, uid_t* ou
return fields == 7 ? 0 : -1;
}
-static int selinux_enabled;
-
/*
* Corresponds with debugger_action_t enum type in
* include/cutils/debugger.h.
@@ -153,9 +151,6 @@ static bool selinux_action_allowed(int s, pid_t tid, debugger_action_t action)
const char *perm;
bool allowed = false;
- if (selinux_enabled <= 0)
- return true;
-
if (action <= 0 || action >= (sizeof(debuggerd_perms)/sizeof(debuggerd_perms[0]))) {
ALOGE("SELinux: No permission defined for debugger action %d", action);
return false;
@@ -589,7 +584,6 @@ static void usage() {
int main(int argc, char** argv) {
union selinux_callback cb;
if (argc == 1) {
- selinux_enabled = is_selinux_enabled();
cb.func_log = selinux_log_callback;
selinux_set_callback(SELINUX_CB_LOG, cb);
return do_server();