Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/usr.sbin/pkg_install/add Pull up revisions 1.64-1.66 (r...
details: https://anonhg.NetBSD.org/src/rev/264f57215b83
branches: netbsd-1-6
changeset: 528260:264f57215b83
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jun 28 12:42:58 2002 +0000
description:
Pull up revisions 1.64-1.66 (requested by taca in ticket #369):
- fix buffer size checks
- define PKG_PATTEN_MAX and PKG_SUFFIX_MAX and
use them instead of constants like 255.
- add asserts and buffer size checks.
- constify and make WARNS=2 clean.
- Fixes provided by Stoned Elipot <seb%script.jussieu.fr@localhost> in PR 17323
diffstat:
usr.sbin/pkg_install/add/perform.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diffs (51 lines):
diff -r 13d2d9f3329e -r 264f57215b83 usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c Fri Jun 28 12:42:49 2002 +0000
+++ b/usr.sbin/pkg_install/add/perform.c Fri Jun 28 12:42:58 2002 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: perform.c,v 1.63 2002/04/02 15:08:33 agc Exp $ */
+/* $NetBSD: perform.c,v 1.63.2.1 2002/06/28 12:42:58 lukem Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.63 2002/04/02 15:08:33 agc Exp $");
+__RCSID("$NetBSD: perform.c,v 1.63.2.1 2002/06/28 12:42:58 lukem Exp $");
#endif
#endif
@@ -45,17 +45,6 @@
static package_t Plist;
static char *Home;
-/*
- * Called to see if pkg is already installed as some other version,
- * note found version in "note".
- */
-static int
-note_whats_installed(const char *found, char *note)
-{
- (void) strcpy(note, found);
- return 0;
-}
-
static int
sanity_check(char *pkg)
{
@@ -687,7 +676,6 @@
/* Time to record the deed? */
if (!NoRecord && !Fake) {
char contents[FILENAME_MAX];
- FILE *cfile;
umask(022);
if (getuid() != 0)
@@ -755,6 +743,7 @@
char *t;
t = strrchr(contents, '/');
strcpy(t + 1, s);
+ free(s);
} else {
errx(1, "Where did our dependency go?!");
/* this shouldn't happen... X-) */
Home |
Main Index |
Thread Index |
Old Index