Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e461251e authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Don't apply permission changes to symlink.

Bug: 10183961
Bug: 10186213
Bug: 8985290
Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
parent 5dbdef0e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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",