summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2015-06-03 09:25:37 -0400
committerNick Kralevich <nnk@google.com>2015-06-03 13:46:08 -0700
commit2139c7fa37e581f6d2f573003afc16fbef700ad1 (patch)
treeefbed61300e6b3cc66e7dc1e7d045838d2a8d9b5 /cmds
parentd910f3cf78ae878b1b86ead7ca837004c3a25aaa (diff)
downloadframeworks_native-2139c7fa37e581f6d2f573003afc16fbef700ad1.zip
frameworks_native-2139c7fa37e581f6d2f573003afc16fbef700ad1.tar.gz
frameworks_native-2139c7fa37e581f6d2f573003afc16fbef700ad1.tar.bz2
Call selinux_status_open() prior to use of selinux_status_updated().
The selinux_status_*() interfaces require calling selinux_status_open() first. Since this was not being called by servicemanager, the selinux_status_updated() call was always failing and servicemanager was not reloading service_contexts upon a policy reload. (cherrypicked from commit bea0746b241d15626cf0a56828efc1d4640dbda7) Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Diffstat (limited to 'cmds')
-rw-r--r--cmds/servicemanager/service_manager.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index cacfe14..7fa9a39 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -361,6 +361,7 @@ int main(int argc, char **argv)
selinux_enabled = is_selinux_enabled();
sehandle = selinux_android_service_context_handle();
+ selinux_status_open(true);
if (selinux_enabled > 0) {
if (sehandle == NULL) {