[master 1/4] dd: fix permissions on extracted files (#1222056)

wgwoods installerbot-noreply at redhat.com
Wed Jun 24 16:25:45 UTC 2015


From: Will Woods <wwoods at redhat.com>

We weren't applying the archive's permissions to newly-created files, so
binaries weren't executable, etc.

This patch adds the missing chmod() call to do so.

Resolves: RHBZ#1222056
---
 utils/dd/rpmutils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils/dd/rpmutils.c b/utils/dd/rpmutils.c
index 4f06d25..6d64917 100644
--- a/utils/dd/rpmutils.c
+++ b/utils/dd/rpmutils.c
@@ -405,6 +405,8 @@ int explodeDDRPM(const char *source,
                 needskip = 0;
             } else {
                 needskip = 0;
+                /* set permissions on the new file */
+                chmod(filename+offset, fstat->st_mode);
             }
 
             fclose(fdout);


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/1f14a3609ece98d741999103bb42545d532ddcc9


More information about the anaconda-patches mailing list