From 5f811dc0207ead061b89d3acc6466bb390fd242e Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 29 Nov 2007 13:40:14 -0600 Subject: Ensure 0644 permissions for install and changelog files Signed-off-by: Aaron Griffin Signed-off-by: Dan McGee --- lib/libalpm/add.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 7a268048..4ea3c869 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -296,10 +296,12 @@ static int extract_single_file(struct archive *archive, /* the install script goes inside the db */ snprintf(filename, PATH_MAX, "%s/%s-%s/install", db->path, newpkg->name, newpkg->version); + archive_entry_set_mode(entry, 0644); } else if(strcmp(entryname, ".CHANGELOG") == 0) { /* the changelog goes inside the db */ snprintf(filename, PATH_MAX, "%s/%s-%s/changelog", db->path, newpkg->name, newpkg->version); + archive_entry_set_mode(entry, 0644); } else if(*entryname == '.') { /* for now, ignore all files starting with '.' that haven't * already been handled (for future possibilities) */ -- cgit v1.2.3-70-g09d2