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
This commit is contained in:
Panu Matilainen 2008-11-05 12:38:16 +02:00
parent 1f5d9dff73
commit 455a4cd652
3 changed files with 2 additions and 6 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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). */