diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2014-09-08 15:51:55 -0400 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2014-09-08 15:51:55 -0400 |
commit | 8ac2a648b6c12c15bb1a62c8f827dabf0ced9704 (patch) | |
tree | df90f7bc93846ba72272f7f9fb81770d82f11b48 | |
parent | 8c1642ad4ea8fbeb7d03f30e5f50e03c28d40065 (diff) | |
download | frameworks_native-8ac2a648b6c12c15bb1a62c8f827dabf0ced9704.zip frameworks_native-8ac2a648b6c12c15bb1a62c8f827dabf0ced9704.tar.gz frameworks_native-8ac2a648b6c12c15bb1a62c8f827dabf0ced9704.tar.bz2 |
Fix relabeling of secondary user package directories.
When relabeling secondary user package directories, we need to use
the uid of the directory rather than the primary package UID;
otherwise, levelFrom=user will not work correctly.
Change-Id: I0d76ec6ec6fe56a566023ca5e1398efdf28fc81e
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
-rw-r--r-- | cmds/installd/commands.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index a347fa8..7a0ad2a 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -1518,7 +1518,7 @@ int restorecon_data(const char* pkgName, const char* seinfo, uid_t uid) continue; } - if (selinux_android_restorecon_pkgdir(pkgdir, seinfo, uid, flags) < 0) { + if (selinux_android_restorecon_pkgdir(pkgdir, seinfo, s.st_uid, flags) < 0) { ALOGE("restorecon failed for %s: %s\n", pkgdir, strerror(errno)); ret |= -1; } |