1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Ensure correct dir permissions in the database.

Fix for FS#9176.
A previous commit (6e8daa553b) already forced all database files to 644.
Now the directories are also forced to 755.

Additionally, repo-add now sets the umask to 022, just like makepkg does, to
fix the problem at its root.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Chantry Xavier 2008-01-13 11:08:59 +01:00 committed by Dan McGee
parent bbe02ec57f
commit 8186dc11a9
2 changed files with 5 additions and 0 deletions

View File

@ -399,6 +399,8 @@ int _alpm_unpack(const char *archive, const char *prefix, const char *fn)
if(S_ISREG(st->st_mode)) {
archive_entry_set_mode(entry, 0644);
} else if(S_ISDIR(st->st_mode)) {
archive_entry_set_mode(entry, 0755);
}
if (fn && strcmp(fn, entryname)) {

View File

@ -28,6 +28,9 @@ confdir='@sysconfdir@'
FORCE=0
REPO_DB_FILE=""
# ensure we have a sane umask set
umask 0022
msg() {
local mesg=$1; shift
printf "==> ${mesg}\n" "$@" >&1