system/core
Revision | fb9270766f83901b76e1037a3f4c702eb102da00 (tree) |
---|---|
Time | 2019-11-16 06:04:30 |
Author | William Bellavance <flintman@flin...> |
Commiter | Nolen Johnson |
init: don't skip starting a service with no domain if permissive
Requires external/libselinux change as well
Change-Id: I3f2887930e15d09014c2594141ba4acbbc8d6d9d
@@ -373,9 +373,11 @@ bool Service::Start() { | ||
373 | 373 | } |
374 | 374 | if (rc == 0 && scon == mycon) { |
375 | 375 | ERROR("Service %s does not have a SELinux domain defined.\n", name_.c_str()); |
376 | - free(mycon); | |
377 | - free(fcon); | |
378 | - return false; | |
376 | + if (selinux_status_getenforce() > 0) { | |
377 | + free(mycon); | |
378 | + free(fcon); | |
379 | + return false; | |
380 | + } | |
379 | 381 | } |
380 | 382 | free(mycon); |
381 | 383 | free(fcon); |