Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install: broken symbolic permissions (#514)
* Test: running "perl install -m a=rx xargs build/" didn't install xargs with the correct permissions * Problem1: Return value of mod() was not saved into $bits * Problem2: When doing '=' operation, the value of the current permissions ($current) was being used incorrectly * Resetting permissions to 0 for '=' operation allows only the appropriate bits to be set, not extra ones based on source file stat() * Problem3: The permission bit for 'r' saved in $perms{$s} was lost because of assignment of permission for 'x'; code should use OR on $perms{$s} instead * Operators '+' and '=' should both apply OR to the permissions; the difference is that '+' applies to the Source file permissions whereas '=' applies to 0 %ls -l xargs # source permissions are 755 -rwxr-xr-x 1 pi pi 2481 Mar 6 16:14 xargs %perl install -m a=rx xargs build/ # patch applied; destination permissions are 555 %ls -l build/xargs -r-xr-xr-x 1 pi pi 2481 Mar 22 13:51 build/xargs
- Loading branch information