aboutsummaryrefslogtreecommitdiffstats
path: root/updater/install.c
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-09-10 15:34:19 -0700
committerNick Kralevich <nnk@google.com>2013-09-10 15:34:19 -0700
commite461251e2caa5561cf6a315bffaebfd4eb896b1d (patch)
treea854f6d9fe24b0ebca253df94c1dbcd31b3c6779 /updater/install.c
parent5dbdef0e5b8a841fadc64d016d10ce81a962b284 (diff)
downloadbootable_recovery-e461251e2caa5561cf6a315bffaebfd4eb896b1d.zip
bootable_recovery-e461251e2caa5561cf6a315bffaebfd4eb896b1d.tar.gz
bootable_recovery-e461251e2caa5561cf6a315bffaebfd4eb896b1d.tar.bz2
Don't apply permission changes to symlink.
Bug: 10183961 Bug: 10186213 Bug: 8985290 Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
Diffstat (limited to 'updater/install.c')
-rw-r--r--updater/install.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c
index 770dbd0..0a85945 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -726,6 +726,11 @@ static int ApplyParsedPerms(
{
int bad = 0;
+ /* ignore symlinks */
+ if (S_ISLNK(statptr->st_mode)) {
+ return 0;
+ }
+
if (parsed.has_uid) {
if (chown(filename, parsed.uid, -1) < 0) {
printf("ApplyParsedPerms: chown of %s to %d failed: %s\n",