chantra / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
dac7c0
--- rpm-4.11.3/build/files.c.old	2019-01-02 13:14:10.217068479 +0100
dac7c0
+++ rpm-4.11.3/build/files.c	2019-03-20 13:18:38.290142740 +0100
dac7c0
@@ -2015,23 +2015,32 @@
dac7c0
 	    flp->fl_mode &= S_IFMT;
dac7c0
 	    flp->fl_mode |= fl.def.ar.ar_fmode;
dac7c0
 	}
dac7c0
+
dac7c0
 	if (fl.def.ar.ar_user) {
dac7c0
 	    flp->uname = fl.def.ar.ar_user;
dac7c0
 	} else {
dac7c0
 	    flp->uname = rpmstrPoolId(fl.pool, rpmugUname(flp->fl_uid), 1);
dac7c0
 	}
dac7c0
+	if (! flp->uname) {
dac7c0
+	    flp->uname = rpmstrPoolId(fl.pool, rpmugUname(getuid()), 1);
dac7c0
+	}
dac7c0
+	if (! flp->uname) {
dac7c0
+	    flp->uname = rpmstrPoolId(fl.pool, "root", 1);
dac7c0
+	}
dac7c0
+
dac7c0
 	if (fl.def.ar.ar_group) {
dac7c0
 	    flp->gname = fl.def.ar.ar_group;
dac7c0
 	} else {
dac7c0
 	    flp->gname = rpmstrPoolId(fl.pool, rpmugGname(flp->fl_gid), 1);
dac7c0
 	}
dac7c0
-	flp->langs = xstrdup("");
dac7c0
-	
dac7c0
-	if (! (flp->uname && flp->gname)) {
dac7c0
-	    rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), diskPath);
dac7c0
-	    fl.processingFailed = 1;
dac7c0
+	if (! flp->gname) {
dac7c0
+	    flp->gname = rpmstrPoolId(fl.pool, rpmugGname(getgid()), 1);
dac7c0
+	}
dac7c0
+	if (! flp->gname) {
dac7c0
+	    flp->gname = rpmstrPoolId(fl.pool, "root", 1);
dac7c0
 	}
dac7c0
 
dac7c0
+	flp->langs = xstrdup("");
dac7c0
 	fl.files.used++;
dac7c0
     }
dac7c0
     argvFree(files);
dac7c0
--- rpm-4.11.3/build/parsePrep.c.old	2013-11-22 11:31:31.000000000 +0100
dac7c0
+++ rpm-4.11.3/build/parsePrep.c	2019-03-20 13:19:33.705172465 +0100
dac7c0
@@ -29,10 +29,6 @@
dac7c0
 		urlfn, strerror(errno));
dac7c0
 	return RPMRC_FAIL;
dac7c0
     }
dac7c0
-    if (!rpmugUname(sb.st_uid) || !rpmugGname(sb.st_gid)) {
dac7c0
-	rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), urlfn);
dac7c0
-	return RPMRC_FAIL;
dac7c0
-    }
dac7c0
 
dac7c0
     return RPMRC_OK;
dac7c0
 }