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/admin Pull up 1.3-1.6:
details: https://anonhg.NetBSD.org/src/rev/6008e4b25e6f
branches: netbsd-1-4
changeset: 469261:6008e4b25e6f
user: he <he%NetBSD.org@localhost>
date: Sun Aug 22 17:40:14 1999 +0000
description:
Pull up 1.3-1.6:
Treat absolute paths in PLIST properly, i.e. do not allow them
at all. (hubertf)
diffstat:
usr.sbin/pkg_install/admin/main.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r a66a154ce6a7 -r 6008e4b25e6f usr.sbin/pkg_install/admin/main.c
--- a/usr.sbin/pkg_install/admin/main.c Sun Aug 22 17:38:09 1999 +0000
+++ b/usr.sbin/pkg_install/admin/main.c Sun Aug 22 17:40:14 1999 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: main.c,v 1.3 1999/03/22 05:02:40 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.3.2.1 1999/08/22 17:40:14 he Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.3 1999/03/22 05:02:40 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.3.2.1 1999/08/22 17:40:14 he Exp $");
#endif
/*
@@ -84,7 +84,7 @@
abort();
}
- snprintf(file, FILENAME_MAX, "%s/%s", dirp, p->name);
+ (void) snprintf(file, sizeof(file), "%s/%s", dirp, p->name);
if (!isfile(file))
warnx("%s: File %s is in %s but not on filesystem!", PkgName, file, CONTENTS_FNAME);
@@ -112,7 +112,7 @@
if (strcmp(p->name, ".") != 0)
dirp = p->name;
else {
- snprintf(dir, FILENAME_MAX, "%s/%s", _pkgdb_getPKGDB_DIR(), pkgdir);
+ (void) snprintf(dir, sizeof(dir), "%s/%s", _pkgdb_getPKGDB_DIR(), pkgdir);
dirp = dir;
}
break;
@@ -208,7 +208,7 @@
abort();
}
- snprintf(file, FILENAME_MAX, "%s/%s", dirp, p->name);
+ (void) snprintf(file, sizeof(file), "%s/%s", dirp, p->name);
if (!isfile(file))
warnx("%s: File %s is in %s but not on filesystem!",
@@ -222,7 +222,7 @@
if (strcmp(p->name, ".") != 0)
dirp = p->name;
else {
- snprintf(dir, FILENAME_MAX, "%s/%s", PkgDBDir, de->d_name);
+ (void) snprintf(dir, sizeof(dir), "%s/%s", PkgDBDir, de->d_name);
dirp = dir;
}
break;
Home |
Main Index |
Thread Index |
Old Index