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:
@@ -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;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.c,v 1.63 2011/08/14 11:46:28 christos Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.64 2012/11/04 20:46:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: conf.c,v 1.63 2011/08/14 11:46:28 christos Exp $");
|
||||
__RCSID("$NetBSD: conf.c,v 1.64 2012/11/04 20:46:46 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -42,6 +42,7 @@ __RCSID("$NetBSD: conf.c,v 1.63 2011/08/14 11:46:28 christos Exp $");
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <glob.h>
|
||||
#include <netdb.h>
|
||||
#include <signal.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.62 2011/08/29 20:41:06 joerg Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.63 2013/03/21 05:53:01 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -118,7 +118,7 @@ void closedataconn(FILE *);
|
||||
char *conffilename(const char *);
|
||||
void count_users(void);
|
||||
void cprintf(FILE *, const char *, ...)
|
||||
__attribute__((__format__(__printf__, 2, 3)));
|
||||
__printflike(2, 3);
|
||||
void cwd(const char *);
|
||||
FILE *dataconn(const char *, off_t, const char *);
|
||||
void delete(const char *);
|
||||
@@ -155,7 +155,7 @@ void removedir(const char *);
|
||||
void renamecmd(const char *, const char *);
|
||||
char *renamefrom(const char *);
|
||||
void reply(int, const char *, ...)
|
||||
__attribute__((__format__(__printf__, 2, 3)));
|
||||
__printflike(2, 3);
|
||||
void retrieve(const char *[], const char *);
|
||||
void send_file_list(const char *);
|
||||
void show_chdir_messages(int);
|
||||
@@ -295,7 +295,7 @@ struct ftpclass {
|
||||
LLT sendlowat; /* SO_SNDLOWAT size */
|
||||
};
|
||||
|
||||
extern void ftp_loop(void) __attribute__ ((noreturn));
|
||||
__dead extern void ftp_loop(void);
|
||||
extern void ftp_handle_line(char *);
|
||||
|
||||
#ifndef GLOBAL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ftpd.c,v 1.198 2012/06/19 06:06:34 dholland Exp $ */
|
||||
/* $NetBSD: ftpd.c,v 1.200 2013/07/31 19:50:47 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
|
||||
@@ -97,7 +97,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: ftpd.c,v 1.198 2012/06/19 06:06:34 dholland Exp $");
|
||||
__RCSID("$NetBSD: ftpd.c,v 1.200 2013/07/31 19:50:47 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -261,11 +261,11 @@ static int write_data(int, char *, size_t, off_t *, struct timeval *,
|
||||
int);
|
||||
static enum send_status
|
||||
send_data_with_read(int, int, const struct stat *, int);
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
static enum send_status
|
||||
send_data_with_mmap(int, int, const struct stat *, int);
|
||||
static void logrusage(const struct rusage *, const struct rusage *);
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
static void logout_utmp(void);
|
||||
|
||||
int main(int, char *[]);
|
||||
@@ -482,7 +482,7 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
}
|
||||
errno = 0;
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
l = sysconf(_SC_LOGIN_NAME_MAX);
|
||||
if (l == -1 && errno != 0) {
|
||||
syslog(LOG_ERR, "sysconf _SC_LOGIN_NAME_MAX: %m");
|
||||
@@ -494,7 +494,7 @@ main(int argc, char *argv[])
|
||||
curname_len = (size_t)l;
|
||||
#else
|
||||
curname_len = _POSIX_LOGIN_NAME_MAX;
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
curname = malloc(curname_len);
|
||||
if (curname == NULL) {
|
||||
syslog(LOG_ERR, "malloc: %m");
|
||||
@@ -704,7 +704,7 @@ main(int argc, char *argv[])
|
||||
sa.sa_handler = toolong;
|
||||
(void) sigaction(SIGALRM, &sa, NULL);
|
||||
sa.sa_handler = sigurg;
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
(void) sigaction(SIGURG, &sa, NULL);
|
||||
|
||||
/* Try to handle urgent data inline */
|
||||
@@ -719,7 +719,7 @@ main(int argc, char *argv[])
|
||||
sizeof(int)) < 0)
|
||||
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
#ifdef F_SETOWN
|
||||
if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1)
|
||||
@@ -1606,10 +1606,10 @@ do_pass(int pass_checked, int pass_rval, const char *passwd)
|
||||
}
|
||||
#ifndef LOGIN_CAP
|
||||
setsid();
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
setlogin(pw->pw_name);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
if (dropprivs ||
|
||||
(curclass.type != CLASS_REAL &&
|
||||
ntohs(ctrl_addr.su_port) > IPPORT_RESERVED + 1)) {
|
||||
@@ -1694,9 +1694,9 @@ retrieve(const char *argv[], const char *name)
|
||||
int (*closefunc)(FILE *) = NULL;
|
||||
int dolog, sendrv, closerv, stderrfd, isconversion, isdata, isls;
|
||||
struct timeval start, finish, td, *tdp;
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
struct rusage rusage_before, rusage_after;
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
const char *dispname;
|
||||
const char *error;
|
||||
|
||||
@@ -1777,25 +1777,25 @@ retrieve(const char *argv[], const char *name)
|
||||
if (dout == NULL)
|
||||
goto done;
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
(void)getrusage(RUSAGE_SELF, &rusage_before);
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
(void)gettimeofday(&start, NULL);
|
||||
sendrv = send_data(fin, dout, &st, isdata);
|
||||
(void)gettimeofday(&finish, NULL);
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
(void)getrusage(RUSAGE_SELF, &rusage_after);
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
closedataconn(dout); /* close now to affect timing stats */
|
||||
timersub(&finish, &start, &td);
|
||||
tdp = &td;
|
||||
done:
|
||||
if (dolog) {
|
||||
logxfer("get", byte_count, name, NULL, tdp, error);
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
if (tdp != NULL)
|
||||
logrusage(&rusage_before, &rusage_after);
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
}
|
||||
closerv = (*closefunc)(fin);
|
||||
if (sendrv == 0) {
|
||||
@@ -2014,7 +2014,7 @@ dataconn(const char *name, off_t size, const char *fmode)
|
||||
}
|
||||
(void) close(pdata);
|
||||
pdata = s;
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
switch (from.su_family) {
|
||||
case AF_INET:
|
||||
#ifdef IP_TOS
|
||||
@@ -2026,7 +2026,7 @@ dataconn(const char *name, off_t size, const char *fmode)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
/* Set keepalives on the socket to detect dropped conns. */
|
||||
#ifdef SO_KEEPALIVE
|
||||
keepalive = 1;
|
||||
@@ -2169,7 +2169,7 @@ send_data_with_read(int filefd, int netfd, const struct stat *st, int isdata)
|
||||
(void)gettimeofday(&then, NULL);
|
||||
} else
|
||||
bufrem = readsize;
|
||||
while (1) {
|
||||
for (;;) {
|
||||
(void) alarm(curclass.timeout);
|
||||
c = read(filefd, buf, readsize);
|
||||
if (c == 0)
|
||||
@@ -2232,7 +2232,7 @@ send_data_with_mmap(int filefd, int netfd, const struct stat *st, int isdata)
|
||||
(void)gettimeofday(&then, NULL);
|
||||
} else
|
||||
bufrem = winsize;
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
while (1) {
|
||||
mapsize = MIN(filesize - off, winsize);
|
||||
if (mapsize == 0)
|
||||
@@ -2257,7 +2257,7 @@ send_data_with_mmap(int filefd, int netfd, const struct stat *st, int isdata)
|
||||
}
|
||||
return (SS_SUCCESS);
|
||||
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
try_read:
|
||||
return (send_data_with_read(filefd, netfd, st, isdata));
|
||||
}
|
||||
@@ -2414,7 +2414,7 @@ receive_data(FILE *instr, FILE *outstr)
|
||||
(void) alarm(curclass.timeout);
|
||||
if (curclass.readsize)
|
||||
readsize = curclass.readsize;
|
||||
else if (fstat(filefd, &st))
|
||||
else if (fstat(filefd, &st) != -1)
|
||||
readsize = (ssize_t)st.st_blksize;
|
||||
else
|
||||
readsize = BUFSIZ;
|
||||
@@ -2852,7 +2852,6 @@ reply(int n, const char *fmt, ...)
|
||||
size_t b;
|
||||
va_list ap;
|
||||
|
||||
b = 0;
|
||||
if (n == 0)
|
||||
b = snprintf(msg, sizeof(msg), " ");
|
||||
else if (n < 0)
|
||||
@@ -3671,7 +3670,7 @@ logxfer(const char *command, off_t bytes, const char *file1, const char *file2,
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
/*
|
||||
* Log the resource usage.
|
||||
*
|
||||
@@ -3696,7 +3695,7 @@ logrusage(const struct rusage *rusage_before,
|
||||
rusage_after->ru_majflt - rusage_before->ru_majflt,
|
||||
rusage_after->ru_nswap - rusage_before->ru_nswap);
|
||||
}
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
/*
|
||||
* Determine if `password' is valid for user given in `pw'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* $NetBSD: version.h,v 1.74 2010/03/21 20:27:26 lukem Exp $ */
|
||||
/* $NetBSD: version.h,v 1.75 2013/03/21 00:17:26 lukem Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
|
||||
* Copyright (c) 1999-2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
@@ -29,5 +29,5 @@
|
||||
*/
|
||||
|
||||
#ifndef FTPD_VERSION
|
||||
#define FTPD_VERSION "NetBSD-ftpd 20100320"
|
||||
#define FTPD_VERSION "NetBSD-ftpd 20110904"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user