teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.4.2-netsharedpath.patch

Paul Nasrat 57dc36
--- rpm-4.4.2/lib/transaction.c.netsharedpath	2006-02-13 18:15:37.000000000 -0500
Paul Nasrat 57dc36
+++ rpm-4.4.2/lib/transaction.c	2006-02-13 18:15:38.000000000 -0500
Paul Nasrat 57dc36
@@ -820,6 +820,9 @@
Paul Nasrat 57dc36
 		    /*@innercontinue@*/ continue;
Paul Nasrat 57dc36
 		if (strncmp(dn, *nsp, dnlen))
Paul Nasrat 57dc36
 		    /*@innercontinue@*/ continue;
Paul Nasrat 57dc36
+		/* Insure that only the netsharedpath basename is compared. */
Paul Nasrat 57dc36
+		if ((s = strchr((*nsp) + dnlen, '/')) != NULL && s[1] != '\0')
Paul Nasrat 57dc36
+		    /*@innercontinue@*/ continue;
Paul Nasrat 57dc36
 		if (strncmp(bn, (*nsp) + dnlen, bnlen))
Paul Nasrat 57dc36
 		    /*@innercontinue@*/ continue;
Paul Nasrat 57dc36
 		len = dnlen + bnlen;