set uid/gid of source files to the same as the process's
authorewt <devnull@localhost>
Wed, 29 Oct 1997 20:08:20 +0000 (20:08 +0000)
committerewt <devnull@localhost>
Wed, 29 Oct 1997 20:08:20 +0000 (20:08 +0000)
CVS patchset: 1879
CVS date: 1997/10/29 20:08:20

CHANGES
lib/install.c

diff --git a/CHANGES b/CHANGES
index cfa338d..73a19c1 100644 (file)
--- 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)
index c8b8acb..a0a838f 100644 (file)
@@ -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++)