From b3a2b23fceef36ed0955b94ebdb2271cf93ab92d Mon Sep 17 00:00:00 2001 From: ewt Date: Wed, 29 Oct 1997 20:08:20 +0000 Subject: [PATCH] set uid/gid of source files to the same as the process's CVS patchset: 1879 CVS date: 1997/10/29 20:08:20 --- CHANGES | 5 +++++ lib/install.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index cfa338d..73a19c1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +2.4.9 -> 2.4.10: + - obsolete entries could cause segv's during upgrades + - sources now installed with uid/gid of process rather then + the ids used when the src rpm was created + 2.4.8 -> 2.4.9: - fix for verification on systems where a single group id maps to mulitiple group names (Benedict Lofstedt) diff --git a/lib/install.c b/lib/install.c index c8b8acb..a0a838f 100644 --- a/lib/install.c +++ b/lib/install.c @@ -1160,6 +1160,8 @@ static int installSources(Header h, char * rootdir, int fd, char * chptr; char * currDir; int currDirLen; + uid_t currUid = getuid(); + gid_t currGid = getgid(); rpmMessage(RPMMESS_DEBUG, "installing a source package\n"); @@ -1193,8 +1195,11 @@ static int installSources(Header h, char * rootdir, int fd, /* we can't remap v1 packages */ assembleFileList(h, &fileMem, &fileCount, &files, 0); - for (i = 0; i < fileCount; i++) + for (i = 0; i < fileCount; i++) { files[i].relativePath = files[i].relativePath; + files[i].uid = currUid; + files[i].gid = currGid; + } if (headerIsEntry(h, RPMTAG_COOKIE)) for (i = 0; i < fileCount; i++) -- 2.7.4