summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-11-05 12:38:16 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-11-05 12:38:16 +0200
commit455a4cd65269272a8e11a50d1242b36b2163e2de (patch)
tree8f67dd2271464182ba1ce88b0c3d4ca55476a649 /lib
parent1f5d9dff73cd8ea0ee0c6ff1e843c99c78f9c38d (diff)
downloadrpm-455a4cd65269272a8e11a50d1242b36b2163e2de.tar.gz
rpm-455a4cd65269272a8e11a50d1242b36b2163e2de.tar.bz2
rpm-455a4cd65269272a8e11a50d1242b36b2163e2de.zip
Remove useless rpmfi->gid and uid "defaults"
- they were only ever set on src.rpm installation yet overridden by package contents unless src.rpm didn't contain RPMTAG_FILEUSERNAME (and GROUP). Which would mean rpm 1.0 packages or thereabouts, or a malformed package. In that case we just fall back to root uid, it hardly matters
Diffstat (limited to 'lib')
-rw-r--r--lib/fsm.c4
-rw-r--r--lib/psm.c2
-rw-r--r--lib/rpmfi_internal.h2
3 files changed, 2 insertions, 6 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index ecfb1f703..835061f9a 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -722,8 +722,8 @@ static int fsmMapAttrs(FSM_t fsm)
mode_t finalMode = (fi->fmodes ? fi->fmodes[i] : perms);
dev_t finalRdev = (fi->frdevs ? fi->frdevs[i] : 0);
rpm_time_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0);
- uid_t uid = fi->uid;
- gid_t gid = fi->gid;
+ uid_t uid = 0;
+ gid_t gid = 0;
if (fi->fuser && unameToUid(fi->fuser[i], &uid)) {
if (fsm->goal == FSM_PKGINSTALL)
diff --git a/lib/psm.c b/lib/psm.c
index f2864952a..7fb189194 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -304,8 +304,6 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
fi->fmapflags = _free(fi->fmapflags);
fi->mapflags = CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID;
- fi->uid = getuid();
- fi->gid = getgid();
fi->astriplen = 0;
fi->striplen = 0;
diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h
index 8329c2118..e772ab671 100644
--- a/lib/rpmfi_internal.h
+++ b/lib/rpmfi_internal.h
@@ -83,8 +83,6 @@ struct rpmfi_s {
headerGetFlags scareFlags; /*!< headerGet flags wrt scareMem */
/*-----------------------------*/
- uid_t uid; /*!< File uid (default). */
- gid_t gid; /*!< File gid (default). */
rpmfileAttrs flags; /*!< File flags (default). */
rpmFileAction action; /*!< File disposition (default). */
rpmFileAction * actions; /*!< File disposition(s). */