aboutsummaryrefslogtreecommitdiffstats
path: root/libselinux/src/label_backends_android.c
Commit message (Collapse)AuthorAgeFilesLines
* libselinux: android: allow dup *_context entriesJeff Vander Stoep2018-04-191-4/+6
| | | | | | | | | | | | | | | | | Similar to upstream commit 742a350d "libsepol/cil: Improve processing of context rules", allow multiple-same mappings, but make this the default for android-specific *_contexts files. Continue to print a warning. This is useful for Treble where some device-specific mappings may be moved to core policy. e.g. https://android-review.googlesource.com/c/platform/system/sepolicy/+/663068. Old vendor images must continue to work with new system images even when they contain the same mapping. Bug: 78134108 Test: Verify multiple same mappings load correctly, and multiple different specs continue to fail. Change-Id: I80e81814b7ce213489a7820a12be3fb297150e7d
* Merge remote-tracking branch 'aosp/upstream-master' into mymergeJeff Vander Stoep2017-04-121-1/+1
|\ | | | | | | | | | | Bug: 36508258 Test: build and boot Marlin. Change-Id: Ic5f92ad304dca23ddbfaaffd86489f3a556f9a1e
| * libselinux: add O_CLOEXECNick Kralevich2017-04-121-1/+1
| | | | | | | | | | | | | | Makes libselinux safer and less likely to leak file descriptors when used as part of a multithreaded program. Signed-off-by: Nick Kralevich <nnk@google.com>
* | libselinux: android: allow multiple service and property contextsSandeep Patil2017-01-131-52/+99
|/ | | | | | | | | | | | Adds support in service and property labeling backend so selabel_open() with multiple input files works for both. Bug: 33746484 Test: Successfully boot with original service and property contexts. Successfully boot with split serivce and property contexts. Change-Id: I47325e5102bcd5d8df212c2dec2cf814ee954ed8 Signed-off-by: Sandeep Patil <sspatil@google.com>
* libselinux: replace all malloc + memset by calloc in android label backend.Sandeep Patil2017-01-131-6/+3
| | | | Signed-off-by: Sandeep Patil <sspatil@google.com>
* libselinux: android: fix lax service context lookupJanis Danisevskis2016-09-291-2/+52
| | | | | | | | | | | | | | | We use the same lookup function for service contexts that we use for property contexts. However, property contexts are namespace based and only compare the prefix. This may lead to service associations with a wrong label. This patch introduces a new back end for android services with a stricter lookup function. Now the service name must match the key of the service label exactly. Signed-off-by: Janis Danisevskis <jdanis@android.com>
* libselinux: renamed andriod label backend source fileJanis Danisevskis2016-09-291-0/+304
Signed-off-by: Janis Danisevskis <jdanis@android.com>