aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-05-14 16:52:16 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-05-14 16:52:16 +0000
commitf12d5605339a37ed412ec00e5f7215a785cf315c (patch)
treedbf7817b634cf9b7c3f3b1286e9afc48954b83d6
parent4fa4ad13ede708c9eab6eff8ae86616489ac2d2f (diff)
parenta15fcce79d1f5e7966c881f1469d6d358c344115 (diff)
downloadselinux-android12--mainline-release.tar.gz
Snap for 7362376 from a15fcce79d1f5e7966c881f1469d6d358c344115 to sc-mainline-releaseandroid-mainline-12.0.0_r4android-mainline-12.0.0_r36android12--mainline-release
Change-Id: I5edb0cd61c868cf5c10cc1a25c5f01950c39b96a
-rw-r--r--OWNERS2
-rw-r--r--libselinux/src/android/android_platform.c6
-rw-r--r--secilc/secilc.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/OWNERS b/OWNERS
index 215ed6a6..cfada96f 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,3 +1,3 @@
+alanstokes@google.com
jeffv@google.com
jgalenson@google.com
-nnk@google.com
diff --git a/libselinux/src/android/android_platform.c b/libselinux/src/android/android_platform.c
index 2ffe4155..2e52c153 100644
--- a/libselinux/src/android/android_platform.c
+++ b/libselinux/src/android/android_platform.c
@@ -1179,9 +1179,9 @@ struct pkg_info *package_info_lookup(const char *name)
* credentials are presented (filenames inside are mangled), so we need
* to delay restorecon of those until vold explicitly requests it. */
// NOTE: these paths need to be kept in sync with vold
-#define DATA_SYSTEM_CE_PREFIX "/data/system_ce/"
-#define DATA_VENDOR_CE_PREFIX "/data/vendor_ce/"
-#define DATA_MISC_CE_PREFIX "/data/misc_ce/"
+#define DATA_SYSTEM_CE_PREFIX "/data/system_ce"
+#define DATA_VENDOR_CE_PREFIX "/data/vendor_ce"
+#define DATA_MISC_CE_PREFIX "/data/misc_ce"
/* The path prefixes of package data directories. */
#define DATA_DATA_PATH "/data/data"
diff --git a/secilc/secilc.c b/secilc/secilc.c
index 186c5a73..9c78e425 100644
--- a/secilc/secilc.c
+++ b/secilc/secilc.c
@@ -268,6 +268,12 @@ int main(int argc, char *argv[])
}
file_size = filedata.st_size;
+ if (!file_size) {
+ fclose(file);
+ file = NULL;
+ continue;
+ }
+
buffer = malloc(file_size);
rc = fread(buffer, file_size, 1, file);
if (rc != 1) {