diff options
author | Tom Cherry <tomcherry@google.com> | 2019-08-19 15:21:25 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2019-12-04 15:43:21 -0800 |
commit | c88d8f93cfaa8cbf368a0fa94e8bc84bc55c3ece (patch) | |
tree | 3caaa75251230d98f2b21dadd9b8892c2442c976 /init/selinux.cpp | |
parent | f7a6c4587f06bc7e79748acd97dc4dd5b741f328 (diff) |
init: Replace property_set() with android::base::SetProperty()
Init is no longer a special case and talks to property service just
like every other client, therefore move it away from property_set()
and to android::base::SetProperty().
In doing so, this change moves the initial property set up from the
kernel command line and property files directly into PropertyInit().
This makes the responsibilities between init and property services
more clear.
Test: boot, unit test cases
Change-Id: I36b8c83e845d887f1b203355c2391ec123c3d05f
Diffstat (limited to 'init/selinux.cpp')
-rw-r--r-- | init/selinux.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/init/selinux.cpp b/init/selinux.cpp index a9cd290d6..2fc8f6d0a 100644 --- a/init/selinux.cpp +++ b/init/selinux.cpp @@ -88,12 +88,11 @@ enum EnforcingStatus { SELINUX_PERMISSIVE, SELINUX_ENFORCING }; EnforcingStatus StatusFromCmdline() { EnforcingStatus status = SELINUX_ENFORCING; - import_kernel_cmdline(false, - [&](const std::string& key, const std::string& value, bool in_qemu) { - if (key == "androidboot.selinux" && value == "permissive") { - status = SELINUX_PERMISSIVE; - } - }); + ImportKernelCmdline([&](const std::string& key, const std::string& value) { + if (key == "androidboot.selinux" && value == "permissive") { + status = SELINUX_PERMISSIVE; + } + }); return status; } |