-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deb/extract: Extract with umask set to 0
Permission bits passed to open(2) are AND-ed with current process umask. Set umask to 0 at the beginning of extractData() and restore it at the end, to extract files with desired permissions no matter what's the current process umask. How does dpkg do it? It invokes tar binary to extract data.tar.gz, and tar sets current process umask to 0 if it's running as root. (See --no-same-permissions in tar(1)). Also fix expected permissions of /tmp from 01775 to 01777.
- Loading branch information
Showing
2 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters