Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
2013-12-06 12:04:52 +01:00
parent ff10274392
commit 84d9c625bf
4655 changed files with 379317 additions and 151059 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: cmds.c,v 1.31 2012/06/19 06:06:34 dholland Exp $ */
/* $NetBSD: cmds.c,v 1.33 2013/07/03 14:15:47 christos Exp $ */
/*
* Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: cmds.c,v 1.31 2012/06/19 06:06:34 dholland Exp $");
__RCSID("$NetBSD: cmds.c,v 1.33 2013/07/03 14:15:47 christos Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -878,7 +878,7 @@ discover_path(char *last_path, const char *new_path)
cp = tp;
nomorelink = 1;
while ((cp = strstr(++cp, "/")) != NULL) {
while ((cp = strstr(cp + 1, "/")) != NULL) {
sz1 = (unsigned long)cp - (unsigned long)tp;
if (sz1 > MAXPATHLEN)
goto bad;
@@ -951,8 +951,8 @@ discover_path(char *last_path, const char *new_path)
tp[strlen(tp) - 1] = '\0';
/* check that the path is correct */
stat(tp, &st1);
stat(".", &st2);
if (stat(tp, &st1) == -1 || stat(".", &st2) == -1)
goto bad;
if ((st1.st_dev != st2.st_dev) || (st1.st_ino != st2.st_ino))
goto bad;