Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/pkg_install/create Pull up 1.11-1.15:
details: https://anonhg.NetBSD.org/src/rev/e20ba9183710
branches: netbsd-1-4
changeset: 469264:e20ba9183710
user: he <he%NetBSD.org@localhost>
date: Sun Aug 22 17:46:25 1999 +0000
description:
Pull up 1.11-1.15:
Treat absolute paths in PLIST properly, i.e. do not allow them at all.
De-linting. (hubertf)
diffstat:
usr.sbin/pkg_install/create/pl.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diffs (46 lines):
diff -r a4d35ddec04d -r e20ba9183710 usr.sbin/pkg_install/create/pl.c
--- a/usr.sbin/pkg_install/create/pl.c Sun Aug 22 17:44:38 1999 +0000
+++ b/usr.sbin/pkg_install/create/pl.c Sun Aug 22 17:46:25 1999 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: pl.c,v 1.11 1999/03/02 10:32:23 agc Exp $ */
+/* $NetBSD: pl.c,v 1.11.2.1 1999/08/22 17:46:25 he Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: pl.c,v 1.11 1997/10/08 07:46:35 charnier Exp";
#else
-__RCSID("$NetBSD: pl.c,v 1.11 1999/03/02 10:32:23 agc Exp $");
+__RCSID("$NetBSD: pl.c,v 1.11.2.1 1999/08/22 17:46:25 he Exp $");
#endif
#endif
@@ -69,7 +69,7 @@
static int
dircmp(const void *vp1, const void *vp2)
{
- return strcmp(vp2, vp1);
+ return strcmp((const char *)vp2, (const char *)vp1);
}
/* re-order the PLIST_DIR_RM entries into reverse alphabetic order */
@@ -139,16 +139,11 @@
* starts, it's ok to do this somewhere here
*/
{
- char *s, t[FILENAME_MAX], *u;
+ char *s, t[FILENAME_MAX];
- if (p->name[0] == '/')
- u=p->name;
- else {
- snprintf(t, FILENAME_MAX, "%s/%s", cwd, p->name);
- u=t;
- }
+ (void) snprintf(t, sizeof(t), "%s/%s", cwd, p->name);
- s=pkgdb_retrieve(u);
+ s=pkgdb_retrieve(t);
#ifdef PKGDB_DEBUG
fprintf(stderr, "pkgdb_retrieve(\"%s\")=\"%s\"\n", t, s); /* pkgdb-debug - HF */
#endif
Home |
Main Index |
Thread Index |
Old Index