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 bea0746b24)

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
Stephen Smalley 2015-06-03 09:25:37 -04:00 committed by Nick Kralevich
parent d910f3cf78
commit 2139c7fa37
1 changed files with 1 additions and 0 deletions

View File

@ -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) {