CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Thu Jun 3 10:23:33 UTC 2021 Modified Files: src/usr.bin/ftp: Makefile ssl.c ssl.h version.h Log Message: use fetch_*() for I/O with SMALLPROG / !WITH_SSL builds Adapt the SMALLPROG / -UWITH_SSL build to also use the fetch_*() methods from ssl.c, instead of using stdio, as stdio isn't robust when using interruptable signals. Disable ssl-specific support in the fetch_*() methods if WITH_SSL isn't defined, so SMALLPROG still doesn't have ssl support (as expected). The resulting SMALLPROG binary is slightly larger than before (e.g., 157KiB vs 153KiB on amd64). Set version to 20210603 for this fix and the SO_KEEPALIVE fix for PR 56129. PR install/56219 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.bin/ftp/Makefile cvs rdiff -u -r1.9 -r1.10 src/usr.bin/ftp/ssl.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/ftp/ssl.h cvs rdiff -u -r1.92 -r1.93 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/Makefile diff -u src/usr.bin/ftp/Makefile:1.38 src/usr.bin/ftp/Makefile:1.39 --- src/usr.bin/ftp/Makefile:1.38 Sun Sep 6 07:20:31 2020 +++ src/usr.bin/ftp/Makefile Thu Jun 3 10:23:33 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2020/09/06 07:20:31 mrg Exp $ +# $NetBSD: Makefile,v 1.39 2021/06/03 10:23:33 lukem Exp $ # from: @(#)Makefile 8.2 (Berkeley) 4/3/94 .include @@ -8,6 +8,7 @@ USE_FORT?= yes # network client PROG= ftp SRCS= cmds.c cmdtab.c complete.c domacro.c fetch.c ftp.c main.c \ progressbar.c ruserpass.c util.c +SRCS+= ssl.c # Uncomment the following to provide defaults for gate-ftp operation # @@ -19,7 +20,6 @@ CPPFLAGS+=-DNO_EDITCOMPLETE -DNO_ABOUT - LDADD+= -ledit -lterminfo DPADD+= ${LIBEDIT} ${LIBTERMINFO} CPPFLAGS+= -DWITH_SSL -SRCS+=ssl.c LDADD+= -lssl -lcrypto DPADD+= ${LIBSSL} ${LIBCRYPTO} .endif Index: src/usr.bin/ftp/ssl.c diff -u src/usr.bin/ftp/ssl.c:1.9 src/usr.bin/ftp/ssl.c:1.10 --- src/usr.bin/ftp/ssl.c:1.9 Wed Jan 6 04:43:14 2021 +++ src/usr.bin/ftp/ssl.c Thu Jun 3 10:23:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ssl.c,v 1.9 2021/01/06 04:43:14 lukem Exp $ */ +/* $NetBSD: ssl.c,v 1.10 2021/06/03 10:23:33 lukem Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav @@ -34,13 +34,17 @@ #include #ifndef lint -__RCSID("$NetBSD: ssl.c,v 1.9 2021/01/06 04:43:14 lukem Exp $"); +__RCSID("$NetBSD: ssl.c,v 1.10 2021/06/03 10:23:33 lukem Exp $"); #endif +#include +#include +#include +#include +#include +#include #include #include -#include -#include #include #include @@ -48,11 +52,14 @@ __RCSID("$NetBSD: ssl.c,v 1.9 2021/01/06 #include #include + +#ifdef WITH_SSL #include #include #include #include #include +#endif #include "ssl.h" @@ -75,7 +82,9 @@ struct fetch_connect { int issock; int iserr; int iseof; +#ifdef WITH_SSL SSL *ssl; /* SSL handle */ +#endif }; /* @@ -121,9 +130,11 @@ fetch_writev(struct fetch_connect *conn, } } errno = 0; +#ifdef WITH_SSL if (conn->ssl != NULL) len = SSL_write(conn->ssl, iov->iov_base, iov->iov_len); else +#endif len = writev(fd, iov, iovcnt); if (len == 0) { /* we consider a short write a failure */ @@ -275,7 +286,9 @@ fetch_close(struct fetch_connect *conn) return 0; fetch_flush(conn); +#ifdef WITH_SSL SSL_free(conn->ssl); +#endif close(conn->sd); free(conn->cache.buf); free(conn->buf); @@ -287,6 +300,7 @@ fetch_close(struct fetch_connect *conn) #define FETCH_READ_WAIT -2 #define FETCH_READ_ERROR -1 +#ifdef WITH_SSL static ssize_t fetch_ssl_read(SSL *ssl, void *buf, size_t len) { @@ -305,6 +319,7 @@ fetch_ssl_read(SSL *ssl, void *buf, size return FETCH_READ_ERROR; } } +#endif /* WITH_SSL */ static ssize_t fetch_nonssl_read(int sd, void *buf, size_t len) @@ -433,9 +448,11 @@ fetch_read(void *ptr, size_t size, size_ * In the non-SSL case, it may improve performance (very * slightly) when reading small amounts of data. */ +#ifdef WITH_SSL if (conn->ssl != NULL) rlen = fetch_ssl_read(conn->ssl, buf, len); else +#endif rlen = fetch_nonssl_read(conn->sd, buf, len); switch (rlen) { case 0: @@ -564,6 +581,7 @@ fetch_getline(struct fetch_connect *conn return len; } +#ifdef WITH_SSL void * fetch_start_ssl(int sock, const char *servername) { @@ -624,10 +642,13 @@ fetch_start_ssl(int sock, const char *se return ssl; } +#endif /* WITH_SSL */ void fetch_set_ssl(struct fetch_connect *conn, void *ssl) { +#ifdef WITH_SSL conn->ssl = ssl; +#endif } Index: src/usr.bin/ftp/ssl.h diff -u src/usr.bin/ftp/ssl.h:1.4 src/usr.bin/ftp/ssl.h:1.5 --- src/usr.bin/ftp/ssl.h:1.4 Thu Apr 4 00:36:09 2019 +++ src/usr.bin/ftp/ssl.h Thu Jun 3 10:23:33 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: ssl.h,v 1.4 2019/04/04 00:36:09 christos Exp $ */ +/* $NetBSD: ssl.h,v 1.5 2021/06/
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Thu Jun 3 10:11:00 UTC 2021 Modified Files: src/usr.bin/ftp: ftp.c Log Message: set SO_KEEPALIVE on control connection Attempt to prevent timeouts of the control connection by setting SO_KEEPALIVE. This matches the equivalent behaviour in ftpd. Note: This is a much simpler change than adding a background polling event to invoke "STAT" (or "NOOP") on the control connection during a transfer. (It's unclear from RFC 959 whether "NOOP" is even permitted during a transfer). PR bin/56129 To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/usr.bin/ftp/ftp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.c diff -u src/usr.bin/ftp/ftp.c:1.171 src/usr.bin/ftp/ftp.c:1.172 --- src/usr.bin/ftp/ftp.c:1.171 Wed Jan 6 04:43:14 2021 +++ src/usr.bin/ftp/ftp.c Thu Jun 3 10:11:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.171 2021/01/06 04:43:14 lukem Exp $ */ +/* $NetBSD: ftp.c,v 1.172 2021/06/03 10:11:00 lukem Exp $ */ /*- * Copyright (c) 1996-2021 The NetBSD Foundation, Inc. @@ -92,7 +92,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -__RCSID("$NetBSD: ftp.c,v 1.171 2021/01/06 04:43:14 lukem Exp $"); +__RCSID("$NetBSD: ftp.c,v 1.172 2021/06/03 10:11:00 lukem Exp $"); #endif #endif /* not lint */ @@ -280,6 +280,11 @@ hookup(const char *host, const char *por goto bad; } + if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, + (void *)&on, sizeof(on)) == -1) { + DWARN("setsockopt %s (ignored)", "SO_KEEPALIVE"); + } + if (setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (void *)&on, sizeof(on)) == -1) { DWARN("setsockopt %s (ignored)", "SO_OOBINLINE");
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun May 16 08:28:50 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: COPYING Log Message: copyright 2021 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 othersrc/usr.bin/tnftp/COPYING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/COPYING diff -u othersrc/usr.bin/tnftp/COPYING:1.8 othersrc/usr.bin/tnftp/COPYING:1.9 --- othersrc/usr.bin/tnftp/COPYING:1.8 Sun Jul 5 11:13:12 2020 +++ othersrc/usr.bin/tnftp/COPYING Sun May 16 08:28:50 2021 @@ -1,6 +1,6 @@ -$NetBSD: COPYING,v 1.8 2020/07/05 11:13:12 lukem Exp $ +$NetBSD: COPYING,v 1.9 2021/05/16 08:28:50 lukem Exp $ -Copyright (c) 2001-2020 The NetBSD Foundation, Inc. +Copyright (c) 2001-2021 The NetBSD Foundation, Inc. All rights reserved. This code is derived from software contributed to The NetBSD Foundation
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun May 16 08:28:01 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: ChangeLog INSTALL Log Message: update INSTALL notes To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 othersrc/usr.bin/tnftp/ChangeLog cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/tnftp/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.75 othersrc/usr.bin/tnftp/ChangeLog:1.76 --- othersrc/usr.bin/tnftp/ChangeLog:1.75 Sun Apr 25 09:29:43 2021 +++ othersrc/usr.bin/tnftp/ChangeLog Sun May 16 08:28:01 2021 @@ -1,4 +1,9 @@ -$NetBSD: ChangeLog,v 1.75 2021/04/25 09:29:43 lukem Exp $ +$NetBSD: ChangeLog,v 1.76 2021/05/16 08:28:01 lukem Exp $ + + +Sun May 16 08:25:55 UTC 2021 lukem + + * Update INSTALL notes to reflect current configure. Sun Apr 25 09:24:51 UTC 2021 lukem Index: othersrc/usr.bin/tnftp/INSTALL diff -u othersrc/usr.bin/tnftp/INSTALL:1.6 othersrc/usr.bin/tnftp/INSTALL:1.7 --- othersrc/usr.bin/tnftp/INSTALL:1.6 Mon Aug 6 01:58:04 2007 +++ othersrc/usr.bin/tnftp/INSTALL Sun May 16 08:28:01 2021 @@ -3,58 +3,48 @@ INSTALLATION INTRODUCTION This file describes how to compile and install tnftp on your system. - - = = - = NOTE: You will need an ANSI C compiler. = - = = - - +NOTE: You will need an ANSI C compiler. For most systems, execute the following to compile and install tnftp: ./configure make make install -A preformatted manual page (src/ftp.cat1) is also installed. -If you wish to install the source (src/ftp.1), ensure that your system -has up-to-date mandoc macros, such as those that are shipped with groff. - CONFIGURATION OPTIONS - -tnftp is configured using an `autoconf' generated `configure' -script. `configure' supports the following options: +tnftp is configured using an `autoconf' generated `configure' script. + +`configure' supports various options including: * The standard `autoconf configure' options, including: + -h, --help display this help and exit --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --srcdir=DIRfind the sources in DIR [configure dir or ..] - BSD or GNU make may be required for this to work. + [PREFIX] * Specific options: - --enable-editcomplete Turn on command line editing and completion. - (default: enabled) - --enable-ipv6 Enable IPv6 support (if your OS supports it). - (default: enabled) - --disable-largefile omit support for large files + --enable-editcomplete turn on command line editing and completion + (requires system or local libedit) [default=enabled] + --enable-ipv6 enable IPv6 support (if your OS supports it) + [default=enabled] + --enable-sslenable SSL support (requires --with-openssl) + [default=auto] + --with-local-libedituse local libedit instead of system library: yes; + auto (try system, fallback to local); no + [default=auto] --with-socksenable support for (Dante) SOCKS5 proxy + [default=auto] + --with-openssl=DIR root of the OpenSSL directory The following environment variables can be set to override various compiler related settings. - CC=compiler specify name of the C compiler (default: gcc or cc) - CFLAGS=flags specify flags to C compiler (default: -O -g or just -O) - LDFLAGS=flags specify flags to linker (default: none) + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory This can be achieved with: env CC="compiler" CFLAGS="flags" LDFLAGS="flags" ./configure - - - - = = - = NOTE: You will need an ANSI C compiler. = - = = - -
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 11:26:01 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: configure Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 othersrc/usr.bin/tnftp/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.55 othersrc/usr.bin/tnftp/configure:1.56 --- othersrc/usr.bin/tnftp/configure:1.55 Sun Apr 25 09:40:34 2021 +++ othersrc/usr.bin/tnftp/configure Sun Apr 25 11:26:01 2021 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.39 . +# From configure.ac Revision: 1.40 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for tnftp 20200705. #
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 09:40:34 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: configure configure.ac Log Message: configure: check all glob flags we use Also check GLOB_NOCHECK, even though it's standard. Makes the autoconf check consistent with the usage within src/*. Suggseted by Christos on 2020-07-05. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 othersrc/usr.bin/tnftp/configure cvs rdiff -u -r1.39 -r1.40 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.54 othersrc/usr.bin/tnftp/configure:1.55 --- othersrc/usr.bin/tnftp/configure:1.54 Fri Feb 12 12:43:04 2021 +++ othersrc/usr.bin/tnftp/configure Sun Apr 25 09:40:34 2021 @@ -14353,8 +14353,8 @@ fi use_local_glob=yes ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default" if test "x$ac_cv_header_glob_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking glob supports required extensions" >&5 -$as_echo_n "checking glob supports required extensions... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking glob supports required flags" >&5 +$as_echo_n "checking glob supports required flags... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14363,7 +14363,7 @@ int main () { -int f = GLOB_BRACE | GLOB_TILDE; +int f = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE; ; return 0; Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.39 othersrc/usr.bin/tnftp/configure.ac:1.40 --- othersrc/usr.bin/tnftp/configure.ac:1.39 Fri Feb 12 12:39:18 2021 +++ othersrc/usr.bin/tnftp/configure.ac Sun Apr 25 09:40:34 2021 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.39 2021/02/12 12:39:18 lukem Exp $ +# $NetBSD: configure.ac,v 1.40 2021/04/25 09:40:34 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -9,7 +9,7 @@ AC_COPYRIGHT([ Copyright (c) 1999-2021 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.39 $]) +AC_REVISION([$Revision: 1.40 $]) AS_SHELL_SANITIZE() @@ -338,10 +338,10 @@ AS_IF([test "$ac_cv_func_strptime" = yes # use_local_glob=yes AC_CHECK_HEADER([glob.h], -[AC_MSG_CHECKING([glob supports required extensions]) +[AC_MSG_CHECKING([glob supports required flags]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ -int f = GLOB_BRACE | GLOB_TILDE; +int f = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE; ]])], [AC_MSG_RESULT([yes]) use_local_glob=no],
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 09:29:43 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: ChangeLog othersrc/usr.bin/tnftp/src: Makefile.am Makefile.in Log Message: Change tnftp(1) to refer to "tnftp" instead of "ftp". To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 othersrc/usr.bin/tnftp/ChangeLog cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/tnftp/src/Makefile.am cvs rdiff -u -r1.16 -r1.17 othersrc/usr.bin/tnftp/src/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.74 othersrc/usr.bin/tnftp/ChangeLog:1.75 --- othersrc/usr.bin/tnftp/ChangeLog:1.74 Sun Apr 25 08:05:49 2021 +++ othersrc/usr.bin/tnftp/ChangeLog Sun Apr 25 09:29:43 2021 @@ -1,6 +1,8 @@ -$NetBSD: ChangeLog,v 1.74 2021/04/25 08:05:49 lukem Exp $ +$NetBSD: ChangeLog,v 1.75 2021/04/25 09:29:43 lukem Exp $ -Sun Apr 25 08:00:14 UTC 2021 lukem +Sun Apr 25 09:24:51 UTC 2021 lukem + + * Change tnftp(1) to refer to "tnftp" instead of "ftp". * Merge NetBSD ftp from 20200608 to 20210131: * Fix signal handler restoration. Avoids intermittent crash. Index: othersrc/usr.bin/tnftp/src/Makefile.am diff -u othersrc/usr.bin/tnftp/src/Makefile.am:1.5 othersrc/usr.bin/tnftp/src/Makefile.am:1.6 --- othersrc/usr.bin/tnftp/src/Makefile.am:1.5 Sun Jul 5 09:37:53 2020 +++ othersrc/usr.bin/tnftp/src/Makefile.am Sun Apr 25 09:29:43 2021 @@ -1,4 +1,4 @@ -## $NetBSD: Makefile.am,v 1.5 2020/07/05 09:37:53 lukem Exp $ +## $NetBSD: Makefile.am,v 1.6 2021/04/25 09:29:43 lukem Exp $ bin_PROGRAMS = tnftp @@ -56,7 +56,8 @@ man1_MANS = \ tnftp.1 tnftp.1: ftp.1 - cp $(srcdir)/ftp.1 tnftp.1 + sed -e 's/^.Dt FTP/.Dt TNFTP/' -e 's/^.Nm ftp/.Nm tnftp/' \ + $(srcdir)/ftp.1 > tnftp.1 CLEANFILES = \ tnftp.1 Index: othersrc/usr.bin/tnftp/src/Makefile.in diff -u othersrc/usr.bin/tnftp/src/Makefile.in:1.16 othersrc/usr.bin/tnftp/src/Makefile.in:1.17 --- othersrc/usr.bin/tnftp/src/Makefile.in:1.16 Sun Jul 5 10:19:32 2020 +++ othersrc/usr.bin/tnftp/src/Makefile.in Sun Apr 25 09:29:43 2021 @@ -859,7 +859,8 @@ uninstall-man: uninstall-man1 tnftp.1: ftp.1 - cp $(srcdir)/ftp.1 tnftp.1 + sed -e 's/^.Dt FTP/.Dt TNFTP/' -e 's/^.Nm ftp/.Nm tnftp/' \ + $(srcdir)/ftp.1 > tnftp.1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded.
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sun Apr 25 09:09:55 UTC 2021 Modified Files: src/usr.bin/ftp: ftp.1 Log Message: ftp(1): consistently use FTP for protocol use. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/usr.bin/ftp/ftp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.145 src/usr.bin/ftp/ftp.1:1.146 --- src/usr.bin/ftp/ftp.1:1.145 Sun Apr 25 08:46:19 2021 +++ src/usr.bin/ftp/ftp.1 Sun Apr 25 09:09:55 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.145 2021/04/25 08:46:19 lukem Exp $ +.\" $NetBSD: ftp.1,v 1.146 2021/04/25 09:09:55 lukem Exp $ .\" .\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -184,10 +184,13 @@ Forces .Nm to only use IPv6 addresses. .It Fl A -Force active mode ftp. +Force active mode +.Tn FTP . By default, .Nm -will try to use passive mode ftp and fall back to active mode +will try to use passive mode +.Tn FTP +and fall back to active mode if passive is not supported by the server. This option causes .Nm @@ -300,7 +303,9 @@ Upload files on the command line to .Ar url where .Ar url -is one of the ftp URL types as supported by auto-fetch +is one of the +.Sq Li ftp:// +URL types as supported by auto-fetch (with an optional target filename for single file uploads), and .Ar file is one or more local files to be uploaded. @@ -542,7 +547,9 @@ A synonym for .Ic open . .It Ic gate Op Ar host Op Ar port Toggle gate-ftp mode, which used to connect through the -TIS FWTK and Gauntlet ftp proxies. +TIS FWTK and Gauntlet +.Tn FTP +proxies. This will not be permitted if the gate-ftp server hasn't been set (either explicitly by the user, or from the .Ev FTPSERVER @@ -600,7 +607,9 @@ each remote file name is expanded separately on the remote machine and the lists are not merged. Expansion of a directory name is likely to be different from expansion of the name of an ordinary file: -the exact result depends on the foreign operating system and ftp server, +the exact result depends on the foreign operating system and +.Tn FTP +server, and can be previewed by doing .Sq Li mls remote-files \- . Note: @@ -1112,7 +1121,9 @@ Any other response will answer .Sq yes to the current file. .It Ic proxy Ar ftp-command -Execute an ftp command on a secondary control connection. +Execute an +.Tn FTP +command on a secondary control connection. This command allows simultaneous connection to two remote .Tn FTP servers for transferring files between the two servers.
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sun Apr 25 08:46:19 UTC 2021 Modified Files: src/usr.bin/ftp: ftp.1 Log Message: ftp(1): consistent Ic (not Nm) for commands To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/usr.bin/ftp/ftp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.144 src/usr.bin/ftp/ftp.1:1.145 --- src/usr.bin/ftp/ftp.1:1.144 Sun Jan 31 08:59:40 2021 +++ src/usr.bin/ftp/ftp.1 Sun Apr 25 08:46:19 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.144 2021/01/31 08:59:40 lukem Exp $ +.\" $NetBSD: ftp.1,v 1.145 2021/04/25 08:46:19 lukem Exp $ .\" .\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd January 31, 2021 +.Dd April 25, 2021 .Dt FTP 1 .Os .Sh NAME @@ -1886,9 +1886,9 @@ proxies will be restarted. For .Tn FTP , this is implemented by using -.Nm reget +.Ic reget instead of -.Nm get . +.Ic get . For .Tn HTTP , this is implemented by using the
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sun Apr 25 08:26:35 UTC 2021 Modified Files: src/usr.bin/ftp: util.c Log Message: better XXX comment for buggy ftp server To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/usr.bin/ftp/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/util.c diff -u src/usr.bin/ftp/util.c:1.161 src/usr.bin/ftp/util.c:1.162 --- src/usr.bin/ftp/util.c:1.161 Mon Jun 8 01:33:27 2020 +++ src/usr.bin/ftp/util.c Sun Apr 25 08:26:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.161 2020/06/08 01:33:27 lukem Exp $ */ +/* $NetBSD: util.c,v 1.162 2021/04/25 08:26:35 lukem Exp $ */ /*- * Copyright (c) 1997-2020 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #include #ifndef lint -__RCSID("$NetBSD: util.c,v 1.161 2020/06/08 01:33:27 lukem Exp $"); +__RCSID("$NetBSD: util.c,v 1.162 2021/04/25 08:26:35 lukem Exp $"); #endif /* not lint */ /* @@ -731,7 +731,7 @@ remotemodtime(const char *file, int nois *frac++ = '\0'; if (strlen(timestr) == 15 && strncmp(timestr, "191", 3) == 0) { /* - * XXX: Workaround for lame ftpd's that return + * XXX: Workaround for buggy ftp servers that return * `19100' instead of `2000' */ fprintf(ttyout,
CVS commit: othersrc/usr.bin/tnftp/src
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 08:23:22 UTC 2021 Modified Files: othersrc/usr.bin/tnftp/src: progressbar.c Log Message: nicer XXX comment To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 othersrc/usr.bin/tnftp/src/progressbar.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/src/progressbar.c diff -u othersrc/usr.bin/tnftp/src/progressbar.c:1.17 othersrc/usr.bin/tnftp/src/progressbar.c:1.18 --- othersrc/usr.bin/tnftp/src/progressbar.c:1.17 Sun Apr 25 07:50:37 2021 +++ othersrc/usr.bin/tnftp/src/progressbar.c Sun Apr 25 08:23:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: progressbar.c,v 1.17 2021/04/25 07:50:37 lukem Exp $ */ +/* $NetBSD: progressbar.c,v 1.18 2021/04/25 08:23:22 lukem Exp $ */ /* from NetBSD: progressbar.c,v 1.24 2021/01/06 04:43:14 lukem Exp */ /*- @@ -421,7 +421,7 @@ alarmtimer(int wait) sigfunc xsignal(int sig, sigfunc func) { -#ifdef ultrix /* XXX: this is lame - how do we test sigvec vs. sigaction? */ +#ifdef ultrix /* XXX: this is suboptimal - how do we test sigvec vs. sigaction? */ struct sigvec vec, ovec; vec.sv_handler = func;
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 08:05:49 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: ChangeLog Log Message: ChangeLog: previous va_copy fix. today's import To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 othersrc/usr.bin/tnftp/ChangeLog Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.73 othersrc/usr.bin/tnftp/ChangeLog:1.74 --- othersrc/usr.bin/tnftp/ChangeLog:1.73 Sun Jul 5 11:37:02 2020 +++ othersrc/usr.bin/tnftp/ChangeLog Sun Apr 25 08:05:49 2021 @@ -1,4 +1,22 @@ -$NetBSD: ChangeLog,v 1.73 2020/07/05 11:37:02 lukem Exp $ +$NetBSD: ChangeLog,v 1.74 2021/04/25 08:05:49 lukem Exp $ + +Sun Apr 25 08:00:14 UTC 2021 lukem + + * Merge NetBSD ftp from 20200608 to 20210131: + * Fix signal handler restoration. Avoids intermittent crash. + Bug class reported by Joyu Liao from Juniper Networks. + * Improve ftp(1) manual page formatting, "debug" command + description, and $https_proxy documentation. + NetBSD PR/51883. + * Add -? to display synopsis and usage to stdout. + * Don't use restartable signals (SA_RESTART). + Should fix intermittent failures with -q QUITTIME. + NetBSD PR/55857. + +Fri Feb 12 12:39:18 UTC 2021 lukem + + * configure: soft-fail (instead of hard fail) when cross-compile + checking for va_copy(). Sun Jul 5 11:18:52 UTC 2020 lukem
CVS commit: othersrc/usr.bin/tnftp/src
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 07:50:37 UTC 2021 Modified Files: othersrc/usr.bin/tnftp/src: cmds.c fetch.c ftp.1 ftp.c main.c progressbar.c progressbar.h ssl.c version.h Log Message: Merge differences between NetBSD-20200608 and NetBSD-2021-01-31 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 othersrc/usr.bin/tnftp/src/cmds.c cvs rdiff -u -r1.24 -r1.25 othersrc/usr.bin/tnftp/src/fetch.c cvs rdiff -u -r1.16 -r1.17 othersrc/usr.bin/tnftp/src/ftp.1 \ othersrc/usr.bin/tnftp/src/progressbar.c cvs rdiff -u -r1.22 -r1.23 othersrc/usr.bin/tnftp/src/ftp.c cvs rdiff -u -r1.21 -r1.22 othersrc/usr.bin/tnftp/src/main.c cvs rdiff -u -r1.9 -r1.10 othersrc/usr.bin/tnftp/src/progressbar.h cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/tnftp/src/ssl.c cvs rdiff -u -r1.8 -r1.9 othersrc/usr.bin/tnftp/src/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/src/cmds.c diff -u othersrc/usr.bin/tnftp/src/cmds.c:1.19 othersrc/usr.bin/tnftp/src/cmds.c:1.20 --- othersrc/usr.bin/tnftp/src/cmds.c:1.19 Sat Jul 4 09:59:07 2020 +++ othersrc/usr.bin/tnftp/src/cmds.c Sun Apr 25 07:50:37 2021 @@ -1,8 +1,8 @@ -/* $NetBSD: cmds.c,v 1.19 2020/07/04 09:59:07 lukem Exp $ */ -/* from NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp */ +/* $NetBSD: cmds.c,v 1.20 2021/04/25 07:50:37 lukem Exp $ */ +/* from NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp */ /*- - * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2021 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -101,7 +101,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID(" NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp "); +__RCSID(" NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp "); #endif #endif /* not lint */ @@ -1138,7 +1138,7 @@ setdebug(int argc, char *argv[]) options |= SO_DEBUG; else options &= ~SO_DEBUG; - fprintf(ttyout, "Debugging %s (ftp_debug=%d).\n", onoff(ftp_debug), ftp_debug); + fprintf(ttyout, "Debugging %s (debug=%d).\n", onoff(ftp_debug), ftp_debug); code = ftp_debug > 0; } Index: othersrc/usr.bin/tnftp/src/fetch.c diff -u othersrc/usr.bin/tnftp/src/fetch.c:1.24 othersrc/usr.bin/tnftp/src/fetch.c:1.25 --- othersrc/usr.bin/tnftp/src/fetch.c:1.24 Sat Jul 4 09:59:07 2020 +++ othersrc/usr.bin/tnftp/src/fetch.c Sun Apr 25 07:50:37 2021 @@ -1,5 +1,5 @@ -/* $NetBSD: fetch.c,v 1.24 2020/07/04 09:59:07 lukem Exp $ */ -/* from NetBSD: fetch.c,v 1.231 2019/04/04 00:36:09 christos Exp */ +/* $NetBSD: fetch.c,v 1.25 2021/04/25 07:50:37 lukem Exp $ */ +/* from NetBSD: fetch.c,v 1.232 2020/07/11 00:29:38 lukem Exp */ /*- * Copyright (c) 1997-2015 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID(" NetBSD: fetch.c,v 1.231 2019/04/04 00:36:09 christos Exp "); +__RCSID(" NetBSD: fetch.c,v 1.232 2020/07/11 00:29:38 lukem Exp "); #endif /* not lint */ /* @@ -1302,7 +1302,7 @@ fetch_url(const char *url, const char *p DPRINTF("%s: `%s' proxyenv `%s'\n", __func__, url, STRorNULL(penv)); - oldquit = oldalrm = oldint = oldpipe = NULL; + oldquit = oldalrm = oldint = oldpipe = SIG_ERR; closefunc = NULL; fin = NULL; fout = NULL; @@ -1579,9 +1579,9 @@ fetch_url(const char *url, const char *p bytes = 0; hashbytes = mark; - if (oldalrm) { + if (oldalrm != SIG_ERR) { (void)xsignal(SIGALRM, oldalrm); - oldalrm = NULL; + oldalrm = SIG_ERR; } progressmeter(-1); @@ -1743,14 +1743,14 @@ chunkerror: warnx("Improper response from `%s:%s'", ui.host, ui.port); cleanup_fetch_url: - if (oldint) + if (oldint != SIG_ERR) (void)xsignal(SIGINT, oldint); - if (oldpipe) + if (oldpipe != SIG_ERR) (void)xsignal(SIGPIPE, oldpipe); - if (oldalrm) + if (oldalrm != SIG_ERR) (void)xsignal(SIGALRM, oldalrm); - if (oldquit) - (void)xsignal(SIGQUIT, oldpipe); + if (oldquit != SIG_ERR) + (void)xsignal(SIGQUIT, oldquit); if (fin != NULL) fetch_close(fin); else if (s != -1) Index: othersrc/usr.bin/tnftp/src/ftp.1 diff -u othersrc/usr.bin/tnftp/src/ftp.1:1.16 othersrc/usr.bin/tnftp/src/ftp.1:1.17 --- othersrc/usr.bin/tnftp/src/ftp.1:1.16 Sat Jul 4 09:59:07 2020 +++ othersrc/usr.bin/tnftp/src/ftp.1 Sun Apr 25 07:50:37 2021 @@ -1,7 +1,7 @@ -.\" $NetBSD: ftp.1,v 1.16 2020/07/04 09:59:07 lukem Exp $ -.\" from NetBSD: ftp.1,v 1.136 2017/07/03 21:34:57 wiz Exp +.\" $NetBSD: ftp.1,v 1.17 2021/04/25 07:50:37 lukem Exp $ +.\" from NetBSD: ftp.1,v 1.144 2021/01/31 08:59:40 lukem Exp .\" -.\" Copyright (c) 1996-2015 The NetBSD Foundation, Inc. +.\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -58,7 +58,7 @@ .\" .\" @(#)ftp.1 8.3 (Berke
CVS import: othersrc/usr.bin/tnftp/src
Module Name:othersrc Committed By: lukem Date: Sun Apr 25 07:46:26 UTC 2021 Update of /cvsroot/othersrc/usr.bin/tnftp/src In directory ivanova.netbsd.org:/tmp/cvs-serv6414 Log Message: Import NetBSD ftp as at 2021-01-31 Changes since import tag NetBSD-20200608: * Fix signal handler restoration. Avoids intermittent crash. Bug class reported by Joyu Liao from Juniper Networks. * Improve ftp(1) manual page formatting, "debug" command description, and $https_proxy documentation. * Add -? to display synopsis and usage to stdout. * Don't use restartable signals (SA_RESTART). Should fix intermittent failures with -q QUITTIME. Status: Vendor Tag: NetBSD Release Tags: NetBSD-2021-01-31 U othersrc/usr.bin/tnftp/src/ruserpass.c C othersrc/usr.bin/tnftp/src/ftp.1 C othersrc/usr.bin/tnftp/src/fetch.c U othersrc/usr.bin/tnftp/src/util.c C othersrc/usr.bin/tnftp/src/ftp.c U othersrc/usr.bin/tnftp/src/cmdtab.c U othersrc/usr.bin/tnftp/src/ssl.h C othersrc/usr.bin/tnftp/src/main.c C othersrc/usr.bin/tnftp/src/ssl.c U othersrc/usr.bin/tnftp/src/extern.h C othersrc/usr.bin/tnftp/src/progressbar.h U othersrc/usr.bin/tnftp/src/ftp_var.h C othersrc/usr.bin/tnftp/src/version.h C othersrc/usr.bin/tnftp/src/progressbar.c C othersrc/usr.bin/tnftp/src/Makefile U othersrc/usr.bin/tnftp/src/complete.c U othersrc/usr.bin/tnftp/src/domacro.c C othersrc/usr.bin/tnftp/src/cmds.c 10 conflicts created by this import. Use the following command to help the merge: cvs checkout -jNetBSD:yesterday -jNetBSD othersrc/usr.bin/tnftp/src
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: lukem Date: Sun Apr 25 06:21:37 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: re-align list output To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.37 src/usr.sbin/postinstall/postinstall.in:1.38 --- src/usr.sbin/postinstall/postinstall.in:1.37 Sun Apr 25 01:44:55 2021 +++ src/usr.sbin/postinstall/postinstall.in Sun Apr 25 06:21:37 2021 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.37 2021/04/25 01:44:55 lukem Exp $ +# $NetBSD: postinstall.in,v 1.38 2021/04/25 06:21:37 lukem Exp $ # # Copyright (c) 2002-2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -2576,18 +2576,18 @@ _USAGE_ list() { echo "Default set of items (to apply if no items are provided by user):" - echo " Item Description" - echo " ---" + echo " Item Description" + echo " ---" for i in ${defaultitems}; do eval desc=\"\${desc_${i}}\" - printf " %-12s %s\n" "${i}" "${desc}" + printf " %-20s %s\n" "${i}" "${desc}" done echo "Items disabled by default (must be requested explicitly):" - echo " Item Description" - echo " ---" + echo " Item Description" + echo " ---" for i in ${otheritems}; do eval desc=\"\${desc_${i}}\" - printf " %-12s %s\n" "${i}" "${desc}" + printf " %-20s %s\n" "${i}" "${desc}" done }
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: lukem Date: Sun Apr 25 01:44:55 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: sort the items. keep obsolete* last Consistency and quality of life improvements to postinstall: Order all of the items (including disabled) alphabetically. Consistent comment style before each item block. Move other functions used by do_*() before rather than after do_*(). To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.36 src/usr.sbin/postinstall/postinstall.in:1.37 --- src/usr.sbin/postinstall/postinstall.in:1.36 Sun Apr 25 01:15:39 2021 +++ src/usr.sbin/postinstall/postinstall.in Sun Apr 25 01:44:55 2021 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.36 2021/04/25 01:15:39 lukem Exp $ +# $NetBSD: postinstall.in,v 1.37 2021/04/25 01:44:55 lukem Exp $ # # Copyright (c) 2002-2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -590,7 +590,8 @@ exclude() # find all the target symlinks of shared libaries and exclude them # from consideration for removal # -exclude_libs() { +exclude_libs() +{ local target="$(ls -l -d lib*.so.* 2> /dev/null \ | ${AWK} '{ print $11; }' \ | ${SED} -e 's@.*/@@' | ${SORT} -u)" @@ -808,43 +809,118 @@ find_makedev() # items # - # +# NOTE: Keep these items sorted, except for obsolete* which are listed last. +# # -# Bluetooth +# atf # -additem bluetooth "Bluetooth configuration is up to date" -do_bluetooth() +handle_atf_user() { - [ -n "$1" ] || err 3 "USAGE: do_bluetooth fix|check" + local op="$1" + local failed=0 + + local conf="${DEST_DIR}/etc/atf/common.conf" + if grep '[^#]*unprivileged-user[ \t]*=.*_atf' "${conf}" >/dev/null + then + if [ "$1" = "fix" ]; then + ${SED} -e \ + "/[^#]*unprivileged-user[\ t]*=/s/_atf/_tests/" \ + "${conf}" >"${conf}.new" + failed=$(( ${failed} + $? )) + mv "${conf}.new" "${conf}" + failed=$(( ${failed} + $? )) + msg "Set unprivileged-user=_tests in ${conf}" + else + msg "unprivileged-user=_atf in ${conf} should be" \ + "unprivileged-user=_tests" + failed=1 + fi + fi + + return ${failed} +} + +additem atf "install missing atf configuration files and validate them" +do_atf() +{ + [ -n "$1" ] || err 3 "USAGE: do_atf fix|check" op="$1" failed=0 - populate_dir "${op}" true \ - "${SRC_DIR}/etc/bluetooth" "${DEST_DIR}/etc/bluetooth" 644 \ - hosts protocols btattach.conf btdevctl.conf - failed=$(( ${failed} + $? )) - - move_file "${op}" "${DEST_DIR}/var/db/btdev.xml" \ - "${DEST_DIR}/var/db/btdevctl.plist" - failed=$(( ${failed} + $? )) + # Ensure atf configuration files are in place. + if find_file_in_dirlist NetBSD.conf "NetBSD.conf" \ + "${SRC_DIR}/external/bsd/atf/etc/atf" \ + "${SRC_DIR}/etc/atf"; then + # ${dir} is set by find_file_in_dirlist() + populate_dir "${op}" true "${dir}" "${DEST_DIR}/etc/atf" 644 \ + NetBSD.conf common.conf || failed=1 + else + failed=1 + fi + if find_file_in_dirlist atf-run.hooks "atf-run.hooks" \ + "${SRC_DIR}/external/bsd/atf/dist/tools/sample" \ + "${SRC_DIR}/etc/atf"; then + # ${dir} is set by find_file_in_dirlist() + populate_dir "${op}" true "${dir}" "${DEST_DIR}/etc/atf" 644 \ + atf-run.hooks || failed=1 + else + failed=1 + fi - notfixed="" - if [ "${op}" = "fix" ]; then - notfixed="${NOT_FIXED}" + # Validate the _atf to _tests user/group renaming. + if [ -f "${DEST_DIR}/etc/atf/common.conf" ]; then + handle_atf_user "${op}" || failed=1 + else + failed=1 fi - for _v in btattach btconfig btdevctl; do - if rcvar_is_enabled "${_v}"; then - msg \ -"${_v} is obsolete in rc.conf(5)${notfixed}: use bluetooth=YES" - failed=$(( ${failed} + 1 )) - fi - done return ${failed} } -fixblock() { + +# +# autofsconfig +# + +additem autofsconfig "automounter configuration files" +do_autofsconfig() +{ + [ -n "$1" ] || err 3 "USAGE: do_autofsconfig fix|check" + local autofs_files=" +include_ldap +include_nis +special_hosts +special_media +special_noauto +special_null +" + op="$1" + failed=0 + if [ "$op" = "fix" ]; then + mkdir -p "${DEST_DIR}/etc/autofs" + fi + failed=$(( ${failed} + $? )) + populate_dir "$op" false "${SRC_DIR}/etc" \ + "${DEST_DIR}/etc" \ + 644 \ + auto_master + failed=$(( ${failed} + $? )) + populate_dir "$op" false "${SRC_DIR}/etc/autofs" \ + "${DEST_DIR}/etc/autofs" \ + 644 \ + ${autofs_files} + return ${failed} +} + + +# +# blocklist +# + +fixblock() +{ local op="$1" local target="${DEST_DIR}$2" @@ -869,9 +945,6 @@ fixblock() { fi } -# -# blocklist update -# additem blocklist "rename old files to blocklist" do_blocklist() { @@ -897,9 +970,108 @@ do_blocklist() done
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: lukem Date: Sun Apr 25 01:15:40 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: comment and usage style Use NOTE: for comments to be aware of. Remove double space before "fix|check" in some items. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.35 src/usr.sbin/postinstall/postinstall.in:1.36 --- src/usr.sbin/postinstall/postinstall.in:1.35 Sun Apr 25 00:36:47 2021 +++ src/usr.sbin/postinstall/postinstall.in Sun Apr 25 01:15:39 2021 @@ -1,8 +1,8 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.35 2021/04/25 00:36:47 lukem Exp $ +# $NetBSD: postinstall.in,v 1.36 2021/04/25 01:15:39 lukem Exp $ # -# Copyright (c) 2002-2015 The NetBSD Foundation, Inc. +# Copyright (c) 2002-2021 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation @@ -35,7 +35,7 @@ # # -# XXX BE SURE TO USE ${DEST_DIR} PREFIX BEFORE ALL REAL FILE OPERATIONS XXX +# NOTE: Be sure to use ${DEST_DIR} prefix before all real file operations. # # @@ -517,7 +517,7 @@ file_exists_exact() # obsolete_paths() { - [ -n "$1" ] || err 3 "USAGE: obsolete_paths fix|check" + [ -n "$1" ] || err 3 "USAGE: obsolete_paths fix|check" op="$1" failed=0 @@ -875,7 +875,7 @@ fixblock() { additem blocklist "rename old files to blocklist" do_blocklist() { - [ -n "$1" ] || err 3 "USAGE: do_blocklist fix|check" + [ -n "$1" ] || err 3 "USAGE: do_blocklist fix|check" local op="$1" # if we are actually using blocklistd @@ -903,7 +903,7 @@ do_blocklist() additem ddbonpanic "verify ddb.onpanic is configured in sysctl.conf" do_ddbonpanic() { - [ -n "$1" ] || err 3 "USAGE: do_ddbonpanic fix|check" + [ -n "$1" ] || err 3 "USAGE: do_ddbonpanic fix|check" if ${GREP} -E '^#*[[:space:]]*ddb\.onpanic[[:space:]]*\??=[[:space:]]*[[:digit:]]+' \ "${DEST_DIR}/etc/sysctl.conf" >/dev/null 2>&1 @@ -932,7 +932,7 @@ do_ddbonpanic() additem defaults "/etc/defaults/ being up to date" do_defaults() { - [ -n "$1" ] || err 3 "USAGE: do_defaults fix|check" + [ -n "$1" ] || err 3 "USAGE: do_defaults fix|check" local op="$1" local failed=0 local etcsets=$(getetcsets) @@ -1256,7 +1256,7 @@ do_fontconfig() additem gid "required groups in /etc/group" do_gid() { - [ -n "$1" ] || err 3 "USAGE: do_gid fix|check" + [ -n "$1" ] || err 3 "USAGE: do_gid fix|check" check_ids "$1" groups "${DEST_DIR}/etc/group" \ "${SRC_DIR}/etc/group" 14 \ @@ -1288,7 +1288,7 @@ do_gpio() additem hosts "/etc/hosts being up to date" do_hosts() { - [ -n "$1" ] || err 3 "USAGE: do_hosts fix|check" + [ -n "$1" ] || err 3 "USAGE: do_hosts fix|check" modify_file "$1" "${DEST_DIR}/etc/hosts" "${SCRATCHDIR}/hosts" ' /^(127\.0\.0\.1|::1)[ ]+[^\.]*$/ { @@ -1306,7 +1306,7 @@ do_hosts() additem iscsi "/etc/iscsi is populated" do_iscsi() { - [ -n "$1" ] || err 3 "USAGE: do_iscsi fix|check" + [ -n "$1" ] || err 3 "USAGE: do_iscsi fix|check" populate_dir "${op}" true \ "${SRC_DIR}/etc/iscsi" "${DEST_DIR}/etc/iscsi" 600 auths @@ -1321,7 +1321,7 @@ do_iscsi() additem makedev "/dev/MAKEDEV being up to date" do_makedev() { - [ -n "$1" ] || err 3 "USAGE: do_makedev fix|check" + [ -n "$1" ] || err 3 "USAGE: do_makedev fix|check" failed=0 if [ -f "${SRC_DIR}/etc/MAKEDEV.tmpl" ]; then @@ -1357,7 +1357,7 @@ do_makedev() additem motd "contents of motd" do_motd() { - [ -n "$1" ] || err 3 "USAGE: do_motd fix|check" + [ -n "$1" ] || err 3 "USAGE: do_motd fix|check" if ${GREP} -i 'http://www.NetBSD.org/Misc/send-pr.html' \ "${DEST_DIR}/etc/motd" >/dev/null 2>&1 \ @@ -1397,7 +1397,7 @@ do_motd() additem mtree "/etc/mtree/ being up to date" do_mtree() { - [ -n "$1" ] || err 3 "USAGE: do_mtree fix|check" + [ -n "$1" ] || err 3 "USAGE: do_mtree fix|check" failed=0 compare_dir "$1" "${SRC_DIR}/etc/mtree" "${DEST_DIR}/etc/mtree" 444 special @@ -1426,7 +1426,7 @@ do_mtree() additem named "named configuration update" do_named() { - [ -n "$1" ] || err 3 "USAGE: do_named fix|check" + [ -n "$1" ] || err 3 "USAGE: do_named fix|check" op="$1" move_file "${op}" \ @@ -1444,7 +1444,7 @@ do_named() additem pam "/etc/pam.d is populated" do_pam() { - [ -n "$1" ] || err 3 "USAGE: do_pam fix|check" + [ -n "$1" ] || err 3 "USAGE: do_pam fix|check" op="$1" failed=0 @@ -1465,7 +1465,7 @@ do_pam() additem periodic "/etc/{daily,weekly,monthly,security} being up to date" do_periodic() { - [ -n "$1" ] || err 3 "USAGE: do_periodic fix|check" + [ -n "$1" ] || err 3 "USAGE: do_periodic fix|check" compare_dir "$1" "${SRC_DIR}/etc" "${DEST_DIR}/etc" 644 \ daily weekly monthly security @@ -1477
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: lukem Date: Sun Apr 25 00:36:47 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: ensure SRC_DIR and DEST_DIR are quoted To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.34 src/usr.sbin/postinstall/postinstall.in:1.35 --- src/usr.sbin/postinstall/postinstall.in:1.34 Sun Apr 25 00:29:52 2021 +++ src/usr.sbin/postinstall/postinstall.in Sun Apr 25 00:36:47 2021 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.34 2021/04/25 00:29:52 lukem Exp $ +# $NetBSD: postinstall.in,v 1.35 2021/04/25 00:36:47 lukem Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -1599,7 +1599,7 @@ select_obsolete_files() { if $SOURCEMODE; then ${SED} -n -e "/obsolete/s@\.$1$2[[:space:]].*@\1@p" \ - ${SRC_DIR}/distrib/sets/lists/$3/mi + "${SRC_DIR}/distrib/sets/lists/$3/mi" return fi @@ -1610,9 +1610,9 @@ select_obsolete_files() local obsolete_dir if [ $3 = "etc" ] ;then - obsolete_dir=${SRC_DIR}/var/db/obsolete + obsolete_dir="${SRC_DIR}/var/db/obsolete" else - obsolete_dir=${DEST_DIR}/var/db/obsolete + obsolete_dir="${DEST_DIR}/var/db/obsolete" fi ${SED} -n -e "s@\.$1$2\$@\1@p" "${obsolete_dir}/$3" } @@ -2397,7 +2397,7 @@ listarchsubdirs() { echo "@ARCHSUBDIRS@" else ${SED} -n -e '/ARCHDIR_SUBDIR/s/[[:space:]]//gp' \ - ${SRC_DIR}/compat/archdirs.mk + "${SRC_DIR}/compat/archdirs.mk" fi }
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: lukem Date: Sun Apr 25 00:29:52 UTC 2021 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: use correct DEST_DIR in obsolete_stand To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.33 src/usr.sbin/postinstall/postinstall.in:1.34 --- src/usr.sbin/postinstall/postinstall.in:1.33 Fri Aug 28 15:26:23 2020 +++ src/usr.sbin/postinstall/postinstall.in Sun Apr 25 00:29:52 2021 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.33 2020/08/28 15:26:23 christos Exp $ +# $NetBSD: postinstall.in,v 1.34 2021/04/25 00:29:52 lukem Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -2371,7 +2371,7 @@ obsolete_stand_internal() ${prefix}/stand/${MACHINE}-xen \ ${prefix}/stand/${MACHINE}pae-xen do - [ -d "${DESTDIR}${dir}" ] && obsolete_stand "${dir}" + [ -d "${DEST_DIR}${dir}" ] && obsolete_stand "${dir}" done | obsolete_paths "${op}" failed=$(( ${failed} + $? ))
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Fri Feb 12 12:43:04 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: configure Log Message: regen for va_copy() check cross-compile soft fail To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 othersrc/usr.bin/tnftp/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.53 othersrc/usr.bin/tnftp/configure:1.54 --- othersrc/usr.bin/tnftp/configure:1.53 Sun Jul 5 11:37:02 2020 +++ othersrc/usr.bin/tnftp/configure Fri Feb 12 12:43:04 2021 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.37 . +# From configure.ac Revision: 1.39 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for tnftp 20200705. # @@ -13,7 +13,7 @@ # gives unlimited permission to copy, distribute and modify it. # # -# Copyright (c) 1999-2020 The NetBSD Foundation, Inc. +# Copyright (c) 1999-2021 The NetBSD Foundation, Inc. # All rights reserved. # ## ## @@ -1534,7 +1534,7 @@ This configure script is free software; gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1999-2020 The NetBSD Foundation, Inc. +Copyright (c) 1999-2021 The NetBSD Foundation, Inc. All rights reserved. _ACEOF @@ -14533,10 +14533,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown - cross-compiling" >&5 +$as_echo "unknown - cross-compiling" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14572,10 +14570,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_va_copy" >&5 $as_echo_n "checking for __builtin_va_copy... " >&6; } if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown - cross-compiling" >&5 +$as_echo "unknown - cross-compiling" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Fri Feb 12 12:39:18 UTC 2021 Modified Files: othersrc/usr.bin/tnftp: configure.ac Log Message: configure: soft-fail cross-compile check for va_copy() Be consistent with other AC_RUN_IFELSE() checks and change the va_copy() checks to soft-fail (instead of hard fail) when cross-compiling. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.38 othersrc/usr.bin/tnftp/configure.ac:1.39 --- othersrc/usr.bin/tnftp/configure.ac:1.38 Sun Jul 5 11:37:02 2020 +++ othersrc/usr.bin/tnftp/configure.ac Fri Feb 12 12:39:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.38 2020/07/05 11:37:02 lukem Exp $ +# $NetBSD: configure.ac,v 1.39 2021/02/12 12:39:18 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -6,10 +6,10 @@ AC_INIT([tnftp], [20200705], [lukem@NetB AC_PREREQ([2.69]) AC_COPYRIGHT([ -Copyright (c) 1999-2020 The NetBSD Foundation, Inc. +Copyright (c) 1999-2021 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.38 $]) +AC_REVISION([$Revision: 1.39 $]) AS_SHELL_SANITIZE() @@ -412,7 +412,8 @@ return 0; ]])], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_VA_COPY], [1])], - [AC_MSG_RESULT([no])]) + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([unknown - cross-compiling])]) AC_MSG_CHECKING([for __builtin_va_copy]) AC_RUN_IFELSE([AC_LANG_PROGRAM([[ @@ -424,7 +425,8 @@ return 0; ]])], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE___BUILTIN_VA_COPY], [1])], - [AC_MSG_RESULT([no])]) + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([unknown - cross-compiling])]) AS_IF([test "$ac_cv_func_strptime" = yes], [AC_MSG_CHECKING([if strptime() needs separators between conversions])
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sun Jan 31 08:59:40 UTC 2021 Modified Files: src/usr.bin/ftp: ftp.1 Log Message: ftp(1): more $https_proxy documentation Document $https_proxy in ENVIRONMENT. (It was already documented elsewhere). Fixes PR bin/51883 To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/usr.bin/ftp/ftp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.143 src/usr.bin/ftp/ftp.1:1.144 --- src/usr.bin/ftp/ftp.1:1.143 Wed Jan 6 09:15:59 2021 +++ src/usr.bin/ftp/ftp.1 Sun Jan 31 08:59:40 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.143 2021/01/06 09:15:59 lukem Exp $ +.\" $NetBSD: ftp.1,v 1.144 2021/01/31 08:59:40 lukem Exp $ .\" .\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd January 6, 2021 +.Dd January 31, 2021 .Dt FTP 1 .Os .Sh NAME @@ -2362,6 +2362,16 @@ may be incompatible with other programs .Em NOTE : this is not used for interactive sessions, only for command-line fetches. +.It Ev https_proxy +URL of +.Tn HTTPS +proxy to use when making +.Tn HTTPS +URL requests. +.Pp +See +.Ev http_proxy +for further notes about proxy use. .It Ev no_proxy A space or comma separated list of hosts (or domains) for which proxying is not to be used.
CVS commit: src/usr.bin/progress
Module Name:src Committed By: lukem Date: Thu Jan 7 12:02:52 UTC 2021 Modified Files: src/usr.bin/progress: progress.c Log Message: progress: handle EINTR in writes. PR/55914 To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/progress/progress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/progress/progress.c diff -u src/usr.bin/progress/progress.c:1.22 src/usr.bin/progress/progress.c:1.23 --- src/usr.bin/progress/progress.c:1.22 Sat Apr 25 11:12:39 2020 +++ src/usr.bin/progress/progress.c Thu Jan 7 12:02:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: progress.c,v 1.22 2020/04/25 11:12:39 simonb Exp $ */ +/* $NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: progress.c,v 1.22 2020/04/25 11:12:39 simonb Exp $"); +__RCSID("$NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $"); #endif/* not lint */ #include @@ -236,6 +236,10 @@ main(int argc, char *argv[]) for (off = 0; nr; nr -= nw, off += nw, bytes += nw) if ((nw = write(outpipe[1], fb_buf + off, (size_t) nr)) < 0) { +if (errno == EINTR) { + nw = 0; + continue; +} progressmeter(1); err(1, "writing %u bytes to output pipe", (unsigned) nr);
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Wed Jan 6 09:15:59 UTC 2021 Modified Files: src/usr.bin/ftp: cmds.c ftp.1 Log Message: ftp(1): fix description of "debug" "debug" command and documentation got accidentally renamed to "ftp_debug" 13 years ago, and was only partially fixed. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/usr.bin/ftp/cmds.c cvs rdiff -u -r1.142 -r1.143 src/usr.bin/ftp/ftp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/cmds.c diff -u src/usr.bin/ftp/cmds.c:1.140 src/usr.bin/ftp/cmds.c:1.141 --- src/usr.bin/ftp/cmds.c:1.140 Wed Feb 6 07:56:42 2019 +++ src/usr.bin/ftp/cmds.c Wed Jan 6 09:15:59 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $ */ +/* $NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp $ */ /*- - * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2021 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -96,7 +96,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $"); +__RCSID("$NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp $"); #endif #endif /* not lint */ @@ -1131,7 +1131,7 @@ setdebug(int argc, char *argv[]) options |= SO_DEBUG; else options &= ~SO_DEBUG; - fprintf(ttyout, "Debugging %s (ftp_debug=%d).\n", onoff(ftp_debug), ftp_debug); + fprintf(ttyout, "Debugging %s (debug=%d).\n", onoff(ftp_debug), ftp_debug); code = ftp_debug > 0; } Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.142 src/usr.bin/ftp/ftp.1:1.143 --- src/usr.bin/ftp/ftp.1:1.142 Sat Jul 18 03:00:37 2020 +++ src/usr.bin/ftp/ftp.1 Wed Jan 6 09:15:59 2021 @@ -1,6 +1,6 @@ -.\" $NetBSD: ftp.1,v 1.142 2020/07/18 03:00:37 lukem Exp $ +.\" $NetBSD: ftp.1,v 1.143 2021/01/06 09:15:59 lukem Exp $ .\" -.\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. +.\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd July 18, 2020 +.Dd January 6, 2021 .Dt FTP 1 .Os .Sh NAME @@ -455,6 +455,16 @@ when an ascii type transfer is made, the distinguished from a record delimiter only when .Ic \&cr is off. +.It Ic debug Op Ar debug-value +Toggle debugging mode. +If an optional +.Ar debug-value +is specified it is used to set the debugging level. +When debugging is on, +.Nm +prints each command sent to the remote machine, preceded +by the string +.Ql \-\-> . .It Ic delete Ar remote-file Delete the file .Ar remote-file @@ -530,16 +540,6 @@ format is .It Ic ftp Ar host Op Ar port A synonym for .Ic open . -.It Ic ftp_debug Op Ar ftp_debug-value -Toggle debugging mode. -If an optional -.Ar ftp_debug-value -is specified it is used to set the debugging level. -When debugging is on, -.Nm -prints each command sent to the remote machine, preceded -by the string -.Ql \-\-> . .It Ic gate Op Ar host Op Ar port Toggle gate-ftp mode, which used to connect through the TIS FWTK and Gauntlet ftp proxies.
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Wed Jan 6 04:43:14 UTC 2021 Modified Files: src/usr.bin/ftp: ftp.c progressbar.c progressbar.h ssl.c version.h Log Message: ftp: don't use restartable signals Refactor to not rely upon restartable signals (SA_RESTART), possibly fixing intermittent failures with -q QUITTIME. ftp transfers: handle EINTR/EAGAIN in copy_bytes(), instead of relying upon restartable signals. http/https transfers: Explicitly print an error similar to progressmeter() when timing-out for -Q QUITTIME in fetch_wait(), and set errno to ETIMEDOUT so that the warn() in fetch_url() prints a more accurate error message. PR/55857 To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/usr.bin/ftp/ftp.c cvs rdiff -u -r1.23 -r1.24 src/usr.bin/ftp/progressbar.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/ftp/progressbar.h src/usr.bin/ftp/ssl.c cvs rdiff -u -r1.91 -r1.92 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.c diff -u src/usr.bin/ftp/ftp.c:1.170 src/usr.bin/ftp/ftp.c:1.171 --- src/usr.bin/ftp/ftp.c:1.170 Sat Jul 11 02:19:31 2020 +++ src/usr.bin/ftp/ftp.c Wed Jan 6 04:43:14 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: ftp.c,v 1.170 2020/07/11 02:19:31 lukem Exp $ */ +/* $NetBSD: ftp.c,v 1.171 2021/01/06 04:43:14 lukem Exp $ */ /*- - * Copyright (c) 1996-2020 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2021 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -92,7 +92,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -__RCSID("$NetBSD: ftp.c,v 1.170 2020/07/11 02:19:31 lukem Exp $"); +__RCSID("$NetBSD: ftp.c,v 1.171 2021/01/06 04:43:14 lukem Exp $"); #endif #endif /* not lint */ @@ -593,7 +593,7 @@ abortxfer(int notused) /* * Read data from infd & write to outfd, using buf/bufsize as the temporary - * buffer, dealing with short writes. + * buffer, dealing with short reads or writes. * If rate_limit != 0, rate-limit the transfer. * If hash_interval != 0, fputc('c', ttyout) every hash_interval bytes. * Updates global variables: bytes. @@ -627,15 +627,25 @@ copy_bytes(int infd, int outfd, char *bu bufrem = bufchunk; while (bufrem > 0) { inc = read(infd, buf, MIN((off_t)bufsize, bufrem)); - if (inc <= 0) + if (inc < 0) { +if (errno == EINTR || errno == EAGAIN) { + continue; +} +goto copy_done; + } else if (inc == 0) { goto copy_done; + } bytes += inc; bufrem -= inc; bufp = buf; while (inc > 0) { outc = write(outfd, bufp, inc); -if (outc < 0) +if (outc < 0) { + if (errno == EINTR || errno == EAGAIN) { + continue; + } goto copy_done; +} inc -= outc; bufp += outc; } Index: src/usr.bin/ftp/progressbar.c diff -u src/usr.bin/ftp/progressbar.c:1.23 src/usr.bin/ftp/progressbar.c:1.24 --- src/usr.bin/ftp/progressbar.c:1.23 Sat Jun 22 23:40:33 2019 +++ src/usr.bin/ftp/progressbar.c Wed Jan 6 04:43:14 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: progressbar.c,v 1.23 2019/06/22 23:40:33 christos Exp $ */ +/* $NetBSD: progressbar.c,v 1.24 2021/01/06 04:43:14 lukem Exp $ */ /*- - * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. + * Copyright (c) 1997-2021 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: progressbar.c,v 1.23 2019/06/22 23:40:33 christos Exp $"); +__RCSID("$NetBSD: progressbar.c,v 1.24 2021/01/06 04:43:14 lukem Exp $"); #endif /* not lint */ /* @@ -193,7 +193,7 @@ progressmeter(int flag) if (quit_time > 0 || progress) { #endif /* !STANDALONE_PROGRESS */ if (flag == -1) { - (void)xsignal_restart(SIGALRM, updateprogressmeter, 1); + (void)xsignal(SIGALRM, updateprogressmeter); alarmtimer(1); /* set alarm timer for 1 Hz */ } else if (flag == 1) { alarmtimer(0); @@ -404,73 +404,21 @@ alarmtimer(int wait) setitimer(ITIMER_REAL, &itv, NULL); } - /* - * Install a POSIX signal handler, allowing the invoker to set whether - * the signal should be restartable or not + * Install a non-restartable POSIX signal handler. */ sigfunc -xsignal_restart(int sig, sigfunc func, int restartable) +xsignal(int sig, sigfunc func) { struct sigaction act, oact; act.sa_handler = func; sigemptyset(&act.sa_mask); -#if defined(SA_RESTART) /* 4.4BSD, Posix(?), SVR4 */ - act.sa_flags = restartable ? SA_RESTART : 0; -#elif defined(SA_INTERRUPT) /* SunOS 4.x */ - act.sa_flags = restartable ? 0 : SA_INTERRUPT; -#else -#error "system must have SA_RESTART or SA_INTERRUPT" + act.sa_flags = 0; +#if defined(SA_INTERRUPT) /* SunOS 4.x */ + act.sa_flags = SA_INTERRUPT; #endif if (sigaction(sig, &act, &oact) < 0) return (SIG_ERR); return (oact
CVS commit: src/libexec/ftpd
Module Name:src Committed By: lukem Date: Sat Aug 22 08:08:48 UTC 2020 Modified Files: src/libexec/ftpd: ftpd.conf.5 Log Message: ftpd.conf(5): remove duplicate "be" Two be or not two be. Noted by SAITOH Masanobu in private mail. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/libexec/ftpd/ftpd.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/ftpd.conf.5 diff -u src/libexec/ftpd/ftpd.conf.5:1.37 src/libexec/ftpd/ftpd.conf.5:1.38 --- src/libexec/ftpd/ftpd.conf.5:1.37 Thu Apr 9 02:25:45 2009 +++ src/libexec/ftpd/ftpd.conf.5 Sat Aug 22 08:08:47 2020 @@ -1,6 +1,6 @@ -.\" $NetBSD: ftpd.conf.5,v 1.37 2009/04/09 02:25:45 joerg Exp $ +.\" $NetBSD: ftpd.conf.5,v 1.38 2020/08/22 08:08:47 lukem Exp $ .\" -.\" Copyright (c) 1997-2008 The NetBSD Foundation, Inc. +.\" Copyright (c) 1997-2020 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 13, 2007 +.Dd August 22, 2020 .Dt FTPD.CONF 5 .Os .Sh NAME @@ -476,7 +476,7 @@ Set the range of port number which will .Ar max must be greater than .Ar min , -and both numbers must be be between +and both numbers must be between .Dv IPPORT_RESERVED (1024) and 65535. If
CVS commit: src/share/misc
Module Name:src Committed By: lukem Date: Sun Aug 2 00:20:22 UTC 2020 Modified Files: src/share/misc: style Log Message: style: revert previous I misintepreted the consensus. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/style diff -u src/share/misc/style:1.56 src/share/misc/style:1.57 --- src/share/misc/style:1.56 Sat Aug 1 02:45:35 2020 +++ src/share/misc/style Sun Aug 2 00:20:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: style,v 1.56 2020/08/01 02:45:35 lukem Exp $ */ +/* $NetBSD: style,v 1.57 2020/08/02 00:20:21 lukem Exp $ */ /* * The revision control tag appears first, with a blank line after it. @@ -30,7 +30,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: style,v 1.56 2020/08/01 02:45:35 lukem Exp $"); +__RCSID("$NetBSD: style,v 1.57 2020/08/02 00:20:21 lukem Exp $"); /* * VERY important single-line comments look like this. @@ -241,9 +241,8 @@ main(int argc, char *argv[]) errno = 0; num = strtol(optarg, &ep, 10); if (num <= 0 || *ep != '\0' || (errno == ERANGE && - (num == LONG_MAX || num == LONG_MIN)) ) { + (num == LONG_MAX || num == LONG_MIN)) ) errx(1, "illegal number -- %s", optarg); - } break; case '?': default: @@ -255,18 +254,16 @@ main(int argc, char *argv[]) argv += optind; /* - * Space after keywords (while, for, return, switch). - * Braces are preferred for control statements - * with only a single statement. + * Space after keywords (while, for, return, switch). No braces are + * required for control statements with only a single statement, + * unless it's a long statement. * * Forever loops are done with for's, not while's. */ - for (p = buf; *p != '\0'; ++p) { + for (p = buf; *p != '\0'; ++p) continue; /* Explicit no-op */ - } - for (;;) { + for (;;) stmt; - } /* * Braces are required for control statements with a single statement @@ -291,14 +288,15 @@ main(int argc, char *argv[]) } /* Second level indents are four spaces. */ - while (cnt < 20) { + while (cnt < 20) z = a + really + long + statement + that + needs + two + lines + gets + indented + four + spaces + on + the + second + and + subsequent + lines; - } /* * Closing and opening braces go on the same line as the else. + * Don't add braces that aren't necessary except in cases where + * there are ambiguity or readability issues. */ if (test) { /* @@ -312,14 +310,12 @@ main(int argc, char *argv[]) } else if (bar) { stmt; stmt; - } else { + } else stmt; - } /* No spaces after function names. */ - if ((result = function(a1, a2, a3, a4)) == NULL) { + if ((result = function(a1, a2, a3, a4)) == NULL) exit(1); - } /* * Unary operators don't require spaces, binary operators do. @@ -397,12 +393,10 @@ function(int a1, int a2, float fl, int a * * Use err/warn(3), don't roll your own! */ - if ((four = malloc(sizeof(*four))) == NULL) { + if ((four = malloc(sizeof(*four))) == NULL) err(1, NULL); - } - if ((six = (int *)overflow()) == NULL) { + if ((six = (int *)overflow()) == NULL) errx(1, "Number overflowed."); - } /* No parentheses are needed around the return value. */ return eight; @@ -426,9 +420,8 @@ dirinfo(const char *p, struct stat *sb, _DIAGASSERT(p != NULL); _DIAGASSERT(filedesc != -1); - if (stat(p, sb) < 0) { + if (stat(p, sb) < 0) err(1, "Unable to stat %s", p); - } /* * To printf quantities that might be larger than "long", include
CVS commit: src/share/misc
Module Name:src Committed By: lukem Date: Sat Aug 1 02:45:36 UTC 2020 Modified Files: src/share/misc: style Log Message: style: prefer braces for single statement control statements Prefer to use { braces } around single statements after control statements, instead of discouraging them. Per discussion on tech-userlevel & tech-kern, where the significant majority of developers who responded (including current and former core members) prefer this new style. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/style diff -u src/share/misc/style:1.55 src/share/misc/style:1.56 --- src/share/misc/style:1.55 Sun Jul 26 09:22:15 2020 +++ src/share/misc/style Sat Aug 1 02:45:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: style,v 1.55 2020/07/26 09:22:15 rillig Exp $ */ +/* $NetBSD: style,v 1.56 2020/08/01 02:45:35 lukem Exp $ */ /* * The revision control tag appears first, with a blank line after it. @@ -30,7 +30,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: style,v 1.55 2020/07/26 09:22:15 rillig Exp $"); +__RCSID("$NetBSD: style,v 1.56 2020/08/01 02:45:35 lukem Exp $"); /* * VERY important single-line comments look like this. @@ -241,8 +241,9 @@ main(int argc, char *argv[]) errno = 0; num = strtol(optarg, &ep, 10); if (num <= 0 || *ep != '\0' || (errno == ERANGE && - (num == LONG_MAX || num == LONG_MIN)) ) + (num == LONG_MAX || num == LONG_MIN)) ) { errx(1, "illegal number -- %s", optarg); + } break; case '?': default: @@ -254,16 +255,18 @@ main(int argc, char *argv[]) argv += optind; /* - * Space after keywords (while, for, return, switch). No braces are - * required for control statements with only a single statement, - * unless it's a long statement. + * Space after keywords (while, for, return, switch). + * Braces are preferred for control statements + * with only a single statement. * * Forever loops are done with for's, not while's. */ - for (p = buf; *p != '\0'; ++p) + for (p = buf; *p != '\0'; ++p) { continue; /* Explicit no-op */ - for (;;) + } + for (;;) { stmt; + } /* * Braces are required for control statements with a single statement @@ -288,15 +291,14 @@ main(int argc, char *argv[]) } /* Second level indents are four spaces. */ - while (cnt < 20) + while (cnt < 20) { z = a + really + long + statement + that + needs + two + lines + gets + indented + four + spaces + on + the + second + and + subsequent + lines; + } /* * Closing and opening braces go on the same line as the else. - * Don't add braces that aren't necessary except in cases where - * there are ambiguity or readability issues. */ if (test) { /* @@ -310,12 +312,14 @@ main(int argc, char *argv[]) } else if (bar) { stmt; stmt; - } else + } else { stmt; + } /* No spaces after function names. */ - if ((result = function(a1, a2, a3, a4)) == NULL) + if ((result = function(a1, a2, a3, a4)) == NULL) { exit(1); + } /* * Unary operators don't require spaces, binary operators do. @@ -393,10 +397,12 @@ function(int a1, int a2, float fl, int a * * Use err/warn(3), don't roll your own! */ - if ((four = malloc(sizeof(*four))) == NULL) + if ((four = malloc(sizeof(*four))) == NULL) { err(1, NULL); - if ((six = (int *)overflow()) == NULL) + } + if ((six = (int *)overflow()) == NULL) { errx(1, "Number overflowed."); + } /* No parentheses are needed around the return value. */ return eight; @@ -420,8 +426,9 @@ dirinfo(const char *p, struct stat *sb, _DIAGASSERT(p != NULL); _DIAGASSERT(filedesc != -1); - if (stat(p, sb) < 0) + if (stat(p, sb) < 0) { err(1, "Unable to stat %s", p); + } /* * To printf quantities that might be larger than "long", include
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sat Jul 18 03:00:38 UTC 2020 Modified Files: src/usr.bin/ftp: ftp.1 main.c version.h Log Message: ftp: add -? for help. improve synopsis Add -? to display usage synopsis and help to stdout. This allows for "ftp -? | less", which is more user friendly. Errors still show usage to stderr. Consistency improvements in some usage text. To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/usr.bin/ftp/ftp.1 cvs rdiff -u -r1.126 -r1.127 src/usr.bin/ftp/main.c cvs rdiff -u -r1.90 -r1.91 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.141 src/usr.bin/ftp/ftp.1:1.142 --- src/usr.bin/ftp/ftp.1:1.141 Wed Jul 15 19:23:44 2020 +++ src/usr.bin/ftp/ftp.1 Sat Jul 18 03:00:37 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.141 2020/07/15 19:23:44 uwe Exp $ +.\" $NetBSD: ftp.1,v 1.142 2020/07/18 03:00:37 lukem Exp $ .\" .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd July 15, 2020 +.Dd July 18, 2020 .Dt FTP 1 .Os .Sh NAME @@ -65,7 +65,7 @@ .Nd Internet file transfer program .Sh SYNOPSIS .Nm -.Op Fl 46AadefginpRtVv +.Op Fl 46AadefginpRtVv? .Op Fl N Ar netrc .Op Fl o Ar output .Op Fl P Ar port @@ -121,7 +121,7 @@ .Ar host Oo Li \&: Ar port Oc .Li / Ar path .Op Li / -.Op Li ;type= Ar X +.Op Li ;type= Ar type .Oc .Sm on .Ek @@ -138,6 +138,19 @@ .Oc .Sm on .Ek +.Bk -words +.\" [https://[user[:password]@]host[:port]/path] +.Sm off +.Oo +.Li https:// +.Oo Ar user +.Op Li \&: Ar password +.Li \&@ Oc +.Ar host Oo Li \&: Ar port Oc +.Li / Ar path +.Oc +.Sm on +.Ek .Ar \&... .Nm .Bk -words @@ -316,6 +329,8 @@ Set the size of the socket send and rece Refer to .Ic xferbuf for more information. +.It Fl ? +Display help to stdout, and exit. .El .Pp The client host with which @@ -1581,10 +1596,10 @@ of in the current directory. Otherwise, the full remote name is used as the local name, relative to the local root directory. -.\" ftp://[user[:password]@]host[:port]/path[/][;type=X] +.\" ftp://[user[:password]@]host[:port]/path[/][;type=type] .It Li ftp:// Ns Oo Ar user Ns Oo Ns Li \&: Ns Ar password Oc Ns Li \&@ Oc \ Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns Li / Ns Ar path Ns Oo Li / Oc \ -Ns Oo Li ;type= Ns Ar X Oc +Ns Oo Li ;type= Ns Ar type Oc An .Tn FTP URL, retrieved using the Index: src/usr.bin/ftp/main.c diff -u src/usr.bin/ftp/main.c:1.126 src/usr.bin/ftp/main.c:1.127 --- src/usr.bin/ftp/main.c:1.126 Mon Feb 4 04:09:13 2019 +++ src/usr.bin/ftp/main.c Sat Jul 18 03:00:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.126 2019/02/04 04:09:13 mrg Exp $ */ +/* $NetBSD: main.c,v 1.127 2020/07/18 03:00:37 lukem Exp $ */ /*- * Copyright (c) 1996-2015 The NetBSD Foundation, Inc. @@ -98,7 +98,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: main.c,v 1.126 2019/02/04 04:09:13 mrg Exp $"); +__RCSID("$NetBSD: main.c,v 1.127 2020/07/18 03:00:37 lukem Exp $"); #endif #endif /* not lint */ @@ -130,7 +130,8 @@ __RCSID("$NetBSD: main.c,v 1.126 2019/02 #define NO_PROXY "no_proxy" /* env var with list of non-proxied * hosts, comma or space separated */ -__dead static void usage(void); +static int usage(void); +static int usage_help(void); static void setupoption(const char *, const char *, const char *); int @@ -266,7 +267,7 @@ main(int volatile argc, char **volatile } } - while ((ch = getopt(argc, argv, "46AadefginN:o:pP:q:r:Rs:tT:u:vVx:")) != -1) { + while ((ch = getopt(argc, argv, "?46AadefginN:o:pP:q:r:Rs:tT:u:vVx:")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -378,15 +379,15 @@ main(int volatile argc, char **volatile if (*cp == '\0') { warnx("Bad throttle value `%s'", optarg); - usage(); - /* NOTREACHED */ + return usage(); } targv[targc++] = cp; if (targc >= 5) break; } - if (parserate(targc, targv, 1) == -1) -usage(); + if (parserate(targc, targv, 1) == -1) { +return usage(); + } free(oac); break; } @@ -415,8 +416,14 @@ main(int volatile argc, char **volatile rcvbuf_size = sndbuf_size; break; + case '?': + if (optopt == '?') { +return usage_help(); + } + return usage(); + default: - usage(); + errx(1, "unimplemented option -%c", ch); } } /* set line buffering on ttyout */ @@ -572,8 +579,9 @@ main(int volatile argc, char **volatile retry_connect = 0; /* connected, stop hiding msgs */ } } - if (isupload) - usage(); + if (isupload) { + return usage(); + } #ifndef NO_EDITCOMPLETE controlediting(); @@ -836,7 +844,6 @@ slurpstring(void) slrflag++; INC_CHKCURSOR(stringbase); r
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Wed Jul 15 08:56:06 UTC 2020 Modified Files: src/usr.bin/ftp: ftp.1 Log Message: ftp.1: don't wrap "[[user@]host [port]]" To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/usr.bin/ftp/ftp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.137 src/usr.bin/ftp/ftp.1:1.138 --- src/usr.bin/ftp/ftp.1:1.137 Mon Jul 13 11:17:14 2020 +++ src/usr.bin/ftp/ftp.1 Wed Jul 15 08:56:05 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.137 2020/07/13 11:17:14 lukem Exp $ +.\" $NetBSD: ftp.1,v 1.138 2020/07/15 08:56:05 lukem Exp $ .\" .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd July 13, 2020 +.Dd July 15, 2020 .Dt FTP 1 .Os .Sh NAME @@ -88,8 +88,7 @@ .Bk -words .\" [[user@]host [port]] .Oo -.Oo Ar user Ns Li \&@ Oc Ns Ar host -.Op Ar port +.Oo Ar user Ns Li \&@ Oc Ns Ar host Oo Op Ar port Oc .Oc .Ek .Bk -words
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Mon Jul 13 11:17:14 UTC 2020 Modified Files: src/usr.bin/ftp: ftp.1 Log Message: ftp(1): consistency tweaks To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/usr.bin/ftp/ftp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.136 src/usr.bin/ftp/ftp.1:1.137 --- src/usr.bin/ftp/ftp.1:1.136 Mon Jul 3 21:34:57 2017 +++ src/usr.bin/ftp/ftp.1 Mon Jul 13 11:17:14 2020 @@ -1,6 +1,6 @@ -.\" $NetBSD: ftp.1,v 1.136 2017/07/03 21:34:57 wiz Exp $ +.\" $NetBSD: ftp.1,v 1.137 2020/07/13 11:17:14 lukem Exp $ .\" -.\" Copyright (c) 1996-2015 The NetBSD Foundation, Inc. +.\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd April 24, 2015 +.Dd July 13, 2020 .Dt FTP 1 .Os .Sh NAME @@ -84,7 +84,7 @@ .Xc .Oc .Ek -.Op Fl x Ar xferbufsize +.Op Fl x Ar xfersize .Bk -words .\" [[user@]host [port]] .Oo @@ -142,7 +142,7 @@ .Op Ar \&.\&.\&. .Nm .Bk -words -.Fl u Ar URL Ar file +.Fl u Ar url Ar file .Ek .Op Ar \&.\&.\&. .Sh DESCRIPTION @@ -284,11 +284,11 @@ bytes/second. Refer to .Ic rate for more information. -.It Fl u Ar URL file Op \&.\&.\&. +.It Fl u Ar url file Op \&.\&.\&. Upload files on the command line to -.Ar URL +.Ar url where -.Ar URL +.Ar url is one of the ftp URL types as supported by auto-fetch (with an optional target filename for single file uploads), and .Ar file @@ -312,9 +312,9 @@ Forces .Nm to show all responses from the remote server, as well as report on data transfer statistics. -.It Fl x Ar xferbufsize +.It Fl x Ar xfersize Set the size of the socket send and receive buffers to -.Ar xferbufsize . +.Ar xfersize . Refer to .Ic xferbuf for more information.
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sat Jul 11 02:19:32 UTC 2020 Modified Files: src/usr.bin/ftp: ftp.c version.h Log Message: ftp.c: improve signal handler restoration Only invoke the old signal handler if it's a real signal handler and not SIG_IGN, SIG_DFL, SIG_HOLD, or SIG_ERR, using new static function issighandler(). Avoids an intermittent race condition with a null pointer dereference via (*SIG_DFL)(). Bug class reported by Joyu Liao from Juniper Networks. Use SIG_ERR instead of NULL as the indicator that a signal handler hasn't been changed, so that SIG_DFL (equivalent to NULL) will be restored. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/usr.bin/ftp/ftp.c cvs rdiff -u -r1.89 -r1.90 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.c diff -u src/usr.bin/ftp/ftp.c:1.169 src/usr.bin/ftp/ftp.c:1.170 --- src/usr.bin/ftp/ftp.c:1.169 Mon Jun 8 01:33:27 2020 +++ src/usr.bin/ftp/ftp.c Sat Jul 11 02:19:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.169 2020/06/08 01:33:27 lukem Exp $ */ +/* $NetBSD: ftp.c,v 1.170 2020/07/11 02:19:31 lukem Exp $ */ /*- * Copyright (c) 1996-2020 The NetBSD Foundation, Inc. @@ -92,7 +92,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -__RCSID("$NetBSD: ftp.c,v 1.169 2020/06/08 01:33:27 lukem Exp $"); +__RCSID("$NetBSD: ftp.c,v 1.170 2020/07/11 02:19:31 lukem Exp $"); #endif #endif /* not lint */ @@ -320,6 +320,17 @@ cmdtimeout(int notused) errno = oerrno; } +static int +issighandler(sigfunc func) +{ + return (func != SIG_IGN && + func != SIG_DFL && +#ifdef SIG_HOLD + func != SIG_HOLD && +#endif + func != SIG_ERR); +} + /*VARARGS*/ int command(const char *fmt, ...) @@ -359,8 +370,9 @@ command(const char *fmt, ...) (void)fflush(cout); cpend = 1; r = getreply(!strcmp(fmt, "QUIT")); - if (abrtflag && oldsigint != SIG_IGN) + if (abrtflag && issighandler(oldsigint)) { (*oldsigint)(SIGINT); + } (void)xsignal(SIGINT, oldsigint); return (r); } @@ -510,11 +522,14 @@ getreply(int expecteof) (void)xsignal(SIGALRM, oldsigalrm); if (code == 421 || originalcode == 421) lostpeer(0); - if (abrtflag && oldsigint != cmdabort && oldsigint != SIG_IGN) + if (abrtflag && oldsigint != cmdabort && + issighandler(oldsigint)) { (*oldsigint)(SIGINT); + } if (timeoutflag && oldsigalrm != cmdtimeout && - oldsigalrm != SIG_IGN) + issighandler(oldsigalrm)) { (*oldsigalrm)(SIGINT); + } return (n - '0'); } } @@ -670,7 +685,7 @@ sendrequest(const char *cmd, const char FILE *volatile dout; int (*volatile closefunc)(FILE *); sigfunc volatile oldintr; - sigfunc volatile oldintp; + sigfunc volatile oldpipe; off_t volatile hashbytes; int hash_interval; const char *lmode; @@ -697,8 +712,8 @@ sendrequest(const char *cmd, const char if (curtype != type) changetype(type, 0); closefunc = NULL; - oldintr = NULL; - oldintp = NULL; + oldintr = SIG_ERR; + oldpipe = SIG_ERR; lmode = "w"; if (sigsetjmp(xferabort, 1)) { while (cpend) @@ -712,7 +727,7 @@ sendrequest(const char *cmd, const char fin = stdin; progress = 0; } else if (*local == '|') { - oldintp = xsignal(SIGPIPE, SIG_IGN); + oldpipe = xsignal(SIGPIPE, SIG_IGN); fin = popen(local + 1, "r"); if (fin == NULL) { warn("Can't execute `%s'", local + 1); @@ -786,7 +801,9 @@ sendrequest(const char *cmd, const char } progressmeter(-1); - oldintp = xsignal(SIGPIPE, SIG_IGN); + if (oldpipe == SIG_ERR) { + oldpipe = xsignal(SIGPIPE, SIG_IGN); + } hash_interval = (hash && (!progress || filesize < 0)) ? mark : 0; switch (curtype) { @@ -855,7 +872,7 @@ sendrequest(const char *cmd, const char abort: (void)xsignal(SIGINT, oldintr); - oldintr = NULL; + oldintr = SIG_ERR; if (!cpend) { code = -1; goto cleanupsend; @@ -874,10 +891,10 @@ sendrequest(const char *cmd, const char ptransfer(0); cleanupsend: - if (oldintr) + if (oldintr != SIG_ERR) (void)xsignal(SIGINT, oldintr); - if (oldintp) - (void)xsignal(SIGPIPE, oldintp); + if (oldpipe != SIG_ERR) + (void)xsignal(SIGPIPE, oldpipe); if (data >= 0) { (void)close(data); data = -1; @@ -899,7 +916,7 @@ recvrequest(const char *cmd, const char FILE *volatile din; int (*volatile closefunc)(FILE *); sigfunc volatile oldintr; - sigfunc volatile oldintp; + sigfunc volatile oldpipe; int c, d; int volatile is_retr; int volatile tcrflag; @@ -935,8 +952,8 @@ recvrequest(const char *cmd, const char return; } closefunc = NULL; - oldintr = NULL; - oldintp = NULL; + oldintr = SIG_ERR; + oldpipe = SIG_ERR; tcrflag = !crflag && is_retr; if (sigsetjmp(xferabort, 1)) { while (cpend) @@ -1017,7 +1034,7 @@ recvrequest(const char *cmd, const char progress = 0; preserve = 0; } else if (!ignorespecial && *local == '|') { - oldint
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sat Jul 11 00:29:38 UTC 2020 Modified Files: src/usr.bin/ftp: fetch.c Log Message: fetch_url: improve signal handler restoration Use SIG_ERR not NULL as the indicator that a signal handler hasn't been changed, so that SIG_DFL (equivalent to NULL) will be restored. Fix restoration of SIGQUIT; use the old handler not SIGPIPE's. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/usr.bin/ftp/fetch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/fetch.c diff -u src/usr.bin/ftp/fetch.c:1.231 src/usr.bin/ftp/fetch.c:1.232 --- src/usr.bin/ftp/fetch.c:1.231 Thu Apr 4 00:36:09 2019 +++ src/usr.bin/ftp/fetch.c Sat Jul 11 00:29:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.231 2019/04/04 00:36:09 christos Exp $ */ +/* $NetBSD: fetch.c,v 1.232 2020/07/11 00:29:38 lukem Exp $ */ /*- * Copyright (c) 1997-2015 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fetch.c,v 1.231 2019/04/04 00:36:09 christos Exp $"); +__RCSID("$NetBSD: fetch.c,v 1.232 2020/07/11 00:29:38 lukem Exp $"); #endif /* not lint */ /* @@ -1295,7 +1295,7 @@ fetch_url(const char *url, const char *p DPRINTF("%s: `%s' proxyenv `%s'\n", __func__, url, STRorNULL(penv)); - oldquit = oldalrm = oldint = oldpipe = NULL; + oldquit = oldalrm = oldint = oldpipe = SIG_ERR; closefunc = NULL; fin = NULL; fout = NULL; @@ -1572,9 +1572,9 @@ fetch_url(const char *url, const char *p bytes = 0; hashbytes = mark; - if (oldalrm) { + if (oldalrm != SIG_ERR) { (void)xsignal(SIGALRM, oldalrm); - oldalrm = NULL; + oldalrm = SIG_ERR; } progressmeter(-1); @@ -1736,14 +1736,14 @@ chunkerror: warnx("Improper response from `%s:%s'", ui.host, ui.port); cleanup_fetch_url: - if (oldint) + if (oldint != SIG_ERR) (void)xsignal(SIGINT, oldint); - if (oldpipe) + if (oldpipe != SIG_ERR) (void)xsignal(SIGPIPE, oldpipe); - if (oldalrm) + if (oldalrm != SIG_ERR) (void)xsignal(SIGALRM, oldalrm); - if (oldquit) - (void)xsignal(SIGQUIT, oldpipe); + if (oldquit != SIG_ERR) + (void)xsignal(SIGQUIT, oldquit); if (fin != NULL) fetch_close(fin); else if (s != -1)
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 11:37:02 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: ChangeLog NEWS configure configure.ac Log Message: tnftp 20200705 release Changes since tnftp 20151004: * Avoid crashes by exiting if lostpeer due to a signal (e.g., remote server disconnection). * Issue PWD commands to the server only when we actually need the results, not speculatively, just in case we might. Works around broken servers, and is quicker too. * Use "anonymous" instead of the local username for anonymous ftp. Avoids unnecesary information leak. * Use the first name we requested the http/https URL for, not any name we ended up with after random redirects. * Support using CONNECT for https:// via proxy. * Improve SSL error reporting, and IPv6 endpoint reporting. * Use the system glob() if required extensions are supported. * Use the system libedit library by default, instead of the local (embedded) libedit. * Update to NetBSD-ftp 20200608. * Update local (embedded) libedit to NetBSD as at 2020-07-04. Fixes various crashes. * Portability improvements. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 othersrc/usr.bin/tnftp/ChangeLog cvs rdiff -u -r1.14 -r1.15 othersrc/usr.bin/tnftp/NEWS cvs rdiff -u -r1.52 -r1.53 othersrc/usr.bin/tnftp/configure cvs rdiff -u -r1.37 -r1.38 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.72 othersrc/usr.bin/tnftp/ChangeLog:1.73 --- othersrc/usr.bin/tnftp/ChangeLog:1.72 Sun Jul 5 10:55:11 2020 +++ othersrc/usr.bin/tnftp/ChangeLog Sun Jul 5 11:37:02 2020 @@ -1,6 +1,11 @@ -$NetBSD: ChangeLog,v 1.72 2020/07/05 10:55:11 lukem Exp $ +$NetBSD: ChangeLog,v 1.73 2020/07/05 11:37:02 lukem Exp $ -Sun Jul 5 10:51:50 UTC 2020 lukem +Sun Jul 5 11:18:52 UTC 2020 lukem + + * Release as "tnftp 20200705". + + * Provide dummy source in libnetbsd to avoid linker errors + if no functions are replaced. * Only replace glob if GLOB_BRACE and GLOB_TILDE aren't available. Index: othersrc/usr.bin/tnftp/NEWS diff -u othersrc/usr.bin/tnftp/NEWS:1.14 othersrc/usr.bin/tnftp/NEWS:1.15 --- othersrc/usr.bin/tnftp/NEWS:1.14 Sun Jul 5 10:55:11 2020 +++ othersrc/usr.bin/tnftp/NEWS Sun Jul 5 11:37:02 2020 @@ -1,8 +1,8 @@ -$NetBSD: NEWS,v 1.14 2020/07/05 10:55:11 lukem Exp $ +$NetBSD: NEWS,v 1.15 2020/07/05 11:37:02 lukem Exp $ -This is tnftp version (unreleased). +This is tnftp version 20200705. -Changes in tnftp 20151004 to (unreleased): +Changes in tnftp 20151004 to 20200705: Avoid crashes by exiting if lostpeer due to a signal (e.g., remote server disconnection). Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.52 othersrc/usr.bin/tnftp/configure:1.53 --- othersrc/usr.bin/tnftp/configure:1.52 Sun Jul 5 11:14:57 2020 +++ othersrc/usr.bin/tnftp/configure Sun Jul 5 11:37:02 2020 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 1.37 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftp 20151004. +# Generated by GNU Autoconf 2.69 for tnftp 20200705. # # Report bugs to . # @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftp' PACKAGE_TARNAME='tnftp' -PACKAGE_VERSION='20151004' -PACKAGE_STRING='tnftp 20151004' +PACKAGE_VERSION='20200705' +PACKAGE_STRING='tnftp 20200705' PACKAGE_BUGREPORT='lu...@netbsd.org' PACKAGE_URL='' @@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tnftp 20151004 to adapt to many kinds of systems. +\`configure' configures tnftp 20200705 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1408,7 +1408,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tnftp 20151004:";; + short | recursive ) echo "Configuration of tnftp 20200705:";; esac cat <<\_ACEOF @@ -1526,7 +1526,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tnftp configure 20151004 +tnftp configure 20200705 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2111,7 +2111,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftp $as_me 20151004, which was +It was created by tnftp $as_me 20200705, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3102,7 +3102,7 @@ fi # Define the identity of the package. PACKAGE='tnftp' - VERSION='20151004' + VER
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 11:14:57 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: configure othersrc/usr.bin/tnftp/libnetbsd: Makefile.in Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 othersrc/usr.bin/tnftp/configure cvs rdiff -u -r1.12 -r1.13 othersrc/usr.bin/tnftp/libnetbsd/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.51 othersrc/usr.bin/tnftp/configure:1.52 --- othersrc/usr.bin/tnftp/configure:1.51 Sun Jul 5 10:55:48 2020 +++ othersrc/usr.bin/tnftp/configure Sun Jul 5 11:14:57 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.35 . +# From configure.ac Revision: 1.37 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for tnftp 20151004. # @@ -13,7 +13,7 @@ # gives unlimited permission to copy, distribute and modify it. # # -# Copyright (c) 1999-2016 The NetBSD Foundation, Inc. +# Copyright (c) 1999-2020 The NetBSD Foundation, Inc. # All rights reserved. # ## ## @@ -1534,7 +1534,7 @@ This configure script is free software; gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1999-2016 The NetBSD Foundation, Inc. +Copyright (c) 1999-2020 The NetBSD Foundation, Inc. All rights reserved. _ACEOF Index: othersrc/usr.bin/tnftp/libnetbsd/Makefile.in diff -u othersrc/usr.bin/tnftp/libnetbsd/Makefile.in:1.12 othersrc/usr.bin/tnftp/libnetbsd/Makefile.in:1.13 --- othersrc/usr.bin/tnftp/libnetbsd/Makefile.in:1.12 Sat Jul 4 14:59:16 2020 +++ othersrc/usr.bin/tnftp/libnetbsd/Makefile.in Sun Jul 5 11:14:57 2020 @@ -74,7 +74,7 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnetbsd_la_DEPENDENCIES = $(LTLIBOBJS) -am_libnetbsd_la_OBJECTS = +am_libnetbsd_la_OBJECTS = libnetbsd.lo libnetbsd_la_OBJECTS = $(am_libnetbsd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -239,7 +239,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libnetbsd.la -libnetbsd_la_SOURCES = +libnetbsd_la_SOURCES = libnetbsd.c libnetbsd_la_LIBADD = $(LTLIBOBJS) EXTRA_DIST = \ fseeko.c \ @@ -323,6 +323,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/usleep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utimes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnetbsd.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -473,7 +474,7 @@ clean-am: clean-generic clean-libtool cl mostlyclean-am distclean: distclean-am - -rm -rf $(DEPDIR) + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -519,7 +520,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf $(DEPDIR) + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 11:13:12 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: COPYING configure.ac Log Message: copyright up to 2020 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/tnftp/COPYING cvs rdiff -u -r1.36 -r1.37 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/COPYING diff -u othersrc/usr.bin/tnftp/COPYING:1.7 othersrc/usr.bin/tnftp/COPYING:1.8 --- othersrc/usr.bin/tnftp/COPYING:1.7 Tue Jan 12 07:01:01 2010 +++ othersrc/usr.bin/tnftp/COPYING Sun Jul 5 11:13:12 2020 @@ -1,6 +1,6 @@ -$NetBSD: COPYING,v 1.7 2010/01/12 07:01:01 lukem Exp $ +$NetBSD: COPYING,v 1.8 2020/07/05 11:13:12 lukem Exp $ -Copyright (c) 2001-2010 The NetBSD Foundation, Inc. +Copyright (c) 2001-2020 The NetBSD Foundation, Inc. All rights reserved. This code is derived from software contributed to The NetBSD Foundation Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.36 othersrc/usr.bin/tnftp/configure.ac:1.37 --- othersrc/usr.bin/tnftp/configure.ac:1.36 Sun Jul 5 10:55:11 2020 +++ othersrc/usr.bin/tnftp/configure.ac Sun Jul 5 11:13:12 2020 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.36 2020/07/05 10:55:11 lukem Exp $ +# $NetBSD: configure.ac,v 1.37 2020/07/05 11:13:12 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -6,10 +6,10 @@ AC_INIT([tnftp], [20151004], [lukem@NetB AC_PREREQ([2.69]) AC_COPYRIGHT([ -Copyright (c) 1999-2016 The NetBSD Foundation, Inc. +Copyright (c) 1999-2020 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.36 $]) +AC_REVISION([$Revision: 1.37 $]) AS_SHELL_SANITIZE()
CVS commit: othersrc/usr.bin/tnftp/libnetbsd
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 11:11:10 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libnetbsd: Makefile.am Added Files: othersrc/usr.bin/tnftp/libnetbsd: libnetbsd.c Log Message: libnetbsd: add dummy source to avoid an empty library To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/usr.bin/tnftp/libnetbsd/Makefile.am cvs rdiff -u -r0 -r1.1 othersrc/usr.bin/tnftp/libnetbsd/libnetbsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libnetbsd/Makefile.am diff -u othersrc/usr.bin/tnftp/libnetbsd/Makefile.am:1.2 othersrc/usr.bin/tnftp/libnetbsd/Makefile.am:1.3 --- othersrc/usr.bin/tnftp/libnetbsd/Makefile.am:1.2 Mon Jan 4 06:24:20 2010 +++ othersrc/usr.bin/tnftp/libnetbsd/Makefile.am Sun Jul 5 11:11:10 2020 @@ -1,9 +1,8 @@ -## $NetBSD: Makefile.am,v 1.2 2010/01/04 06:24:20 lukem Exp $ +## $NetBSD: Makefile.am,v 1.3 2020/07/05 11:11:10 lukem Exp $ noinst_LTLIBRARIES = libnetbsd.la -libnetbsd_la_SOURCES = - +libnetbsd_la_SOURCES = libnetbsd.c CPPFLAGS = \ -I$(srcdir) \ Added files: Index: othersrc/usr.bin/tnftp/libnetbsd/libnetbsd.c diff -u /dev/null othersrc/usr.bin/tnftp/libnetbsd/libnetbsd.c:1.1 --- /dev/null Sun Jul 5 11:11:10 2020 +++ othersrc/usr.bin/tnftp/libnetbsd/libnetbsd.c Sun Jul 5 11:11:10 2020 @@ -0,0 +1,3 @@ +/* $NetBSD: libnetbsd.c,v 1.1 2020/07/05 11:11:10 lukem Exp $ */ + +const char libnetbsd_dummy[] = "Ensure libnetbsd.la is not empty";
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:55:48 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: configure tnftp_config.h.in Log Message: regen for conditional glob replacement To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 othersrc/usr.bin/tnftp/configure cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/tnftp/tnftp_config.h.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.50 othersrc/usr.bin/tnftp/configure:1.51 --- othersrc/usr.bin/tnftp/configure:1.50 Sun Jul 5 10:19:31 2020 +++ othersrc/usr.bin/tnftp/configure Sun Jul 5 10:55:48 2020 @@ -3220,6 +3220,7 @@ fi + # # Checks for programs. # @@ -14347,14 +14348,50 @@ _ACEOF fi -# Always replace glob(); the vendor's may not be secure. +# Use system glob if GLOB_BRACE and GLOB_TILDE are available. # -case " $LIBOBJS " in +use_local_glob=yes +ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default" +if test "x$ac_cv_header_glob_h" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking glob supports required extensions" >&5 +$as_echo_n "checking glob supports required extensions... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int +main () +{ + +int f = GLOB_BRACE | GLOB_TILDE; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + use_local_glob=no +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using local version" >&5 +$as_echo "no - using local version" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + +if test "$use_local_glob" = yes; then : + case " $LIBOBJS " in *" glob.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS glob.$ac_objext" ;; esac +else + $as_echo "#define USE_GLOB_H 1" >>confdefs.h + +fi # We assume that if sprintf() supports %lld or %qd, # then all of *printf() does. If not, disable long long Index: othersrc/usr.bin/tnftp/tnftp_config.h.in diff -u othersrc/usr.bin/tnftp/tnftp_config.h.in:1.7 othersrc/usr.bin/tnftp/tnftp_config.h.in:1.8 --- othersrc/usr.bin/tnftp/tnftp_config.h.in:1.7 Sun Jul 5 10:19:31 2020 +++ othersrc/usr.bin/tnftp/tnftp_config.h.in Sun Jul 5 10:55:48 2020 @@ -470,6 +470,9 @@ /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME +/* Define if using system instead of local glob. */ +#undef USE_GLOB_H + /* Define if using IPv6 support. */ #undef USE_INET6
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:55:11 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: ChangeLog NEWS configure.ac Log Message: Only replace glob if GLOB_BRACE and GLOB_TILDE aren't available. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 othersrc/usr.bin/tnftp/ChangeLog cvs rdiff -u -r1.13 -r1.14 othersrc/usr.bin/tnftp/NEWS cvs rdiff -u -r1.35 -r1.36 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.71 othersrc/usr.bin/tnftp/ChangeLog:1.72 --- othersrc/usr.bin/tnftp/ChangeLog:1.71 Sun Jul 5 10:18:19 2020 +++ othersrc/usr.bin/tnftp/ChangeLog Sun Jul 5 10:55:11 2020 @@ -1,6 +1,8 @@ -$NetBSD: ChangeLog,v 1.71 2020/07/05 10:18:19 lukem Exp $ +$NetBSD: ChangeLog,v 1.72 2020/07/05 10:55:11 lukem Exp $ -Sun Jul 5 10:17:44 UTC 2020 lukem +Sun Jul 5 10:51:50 UTC 2020 lukem + + * Only replace glob if GLOB_BRACE and GLOB_TILDE aren't available. * libnetbsd/snprintf.c: Rename static functions to avoid conflicts with standard names. Index: othersrc/usr.bin/tnftp/NEWS diff -u othersrc/usr.bin/tnftp/NEWS:1.13 othersrc/usr.bin/tnftp/NEWS:1.14 --- othersrc/usr.bin/tnftp/NEWS:1.13 Sun Jul 5 10:29:08 2020 +++ othersrc/usr.bin/tnftp/NEWS Sun Jul 5 10:55:11 2020 @@ -1,4 +1,4 @@ -$NetBSD: NEWS,v 1.13 2020/07/05 10:29:08 lukem Exp $ +$NetBSD: NEWS,v 1.14 2020/07/05 10:55:11 lukem Exp $ This is tnftp version (unreleased). @@ -21,6 +21,8 @@ Changes in tnftp 20151004 to (unreleased Improve SSL error reporting, and IPv6 endpoint reporting. + Use the system glob() if required extensions are supported. + Use the system libedit library by default, instead of the local (embedded) libedit. Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.35 othersrc/usr.bin/tnftp/configure.ac:1.36 --- othersrc/usr.bin/tnftp/configure.ac:1.35 Sun Jul 5 09:37:53 2020 +++ othersrc/usr.bin/tnftp/configure.ac Sun Jul 5 10:55:11 2020 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.35 2020/07/05 09:37:53 lukem Exp $ +# $NetBSD: configure.ac,v 1.36 2020/07/05 10:55:11 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -9,7 +9,7 @@ AC_COPYRIGHT([ Copyright (c) 1999-2016 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.35 $]) +AC_REVISION([$Revision: 1.36 $]) AS_SHELL_SANITIZE() @@ -75,6 +75,8 @@ AH_TEMPLATE([HAVE___BUILTIN_VA_COPY], [Define to 1 if the '__builtin_va_copy' function is supported.]) AH_TEMPLATE([NO_EDITCOMPLETE], [Define if disabling command-line editing and completion.]) +AH_TEMPLATE([USE_GLOB_H], +[Define if using system instead of local glob.]) AH_TEMPLATE([USE_INET6], [Define if using IPv6 support.]) AH_TEMPLATE([USE_SOCKS], @@ -332,9 +334,22 @@ AC_CHECK_FUNCS([getcwd gethostbyaddr get AS_IF([test "$ac_cv_func_getpgrp" = yes], [AC_FUNC_GETPGRP]) AS_IF([test "$ac_cv_func_strptime" = yes], [AC_CHECK_DECLS([strptime])]) -# Always replace glob(); the vendor's may not be secure. +# Use system glob if GLOB_BRACE and GLOB_TILDE are available. # -AC_LIBOBJ([glob]) +use_local_glob=yes +AC_CHECK_HEADER([glob.h], +[AC_MSG_CHECKING([glob supports required extensions]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include ]], [[ +int f = GLOB_BRACE | GLOB_TILDE; +]])], + [AC_MSG_RESULT([yes]) + use_local_glob=no], + [AC_MSG_RESULT([no - using local version])], + [AC_MSG_RESULT([unknown - cross-compiling])])]) +AS_IF([test "$use_local_glob" = yes], + [AC_LIBOBJ([glob])], + [AC_DEFINE([USE_GLOB_H], [1])]) # We assume that if sprintf() supports %lld or %qd, # then all of *printf() does. If not, disable long long
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:29:08 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: NEWS Log Message: NEWS: prepare for next release To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 othersrc/usr.bin/tnftp/NEWS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/NEWS diff -u othersrc/usr.bin/tnftp/NEWS:1.12 othersrc/usr.bin/tnftp/NEWS:1.13 --- othersrc/usr.bin/tnftp/NEWS:1.12 Sun Oct 4 06:20:58 2015 +++ othersrc/usr.bin/tnftp/NEWS Sun Jul 5 10:29:08 2020 @@ -1,6 +1,35 @@ -$NetBSD: NEWS,v 1.12 2015/10/04 06:20:58 lukem Exp $ +$NetBSD: NEWS,v 1.13 2020/07/05 10:29:08 lukem Exp $ -This is tnftp version 20151004. +This is tnftp version (unreleased). + +Changes in tnftp 20151004 to (unreleased): + + Avoid crashes by exiting if lostpeer due to a signal + (e.g., remote server disconnection). + + Issue PWD commands to the server only when we actually + need the results, not speculatively, just in case we might. + Works around broken servers, and is quicker too. + + Use "anonymous" instead of the local username for anonymous + ftp. Avoids unnecesary information leak. + + Use the first name we requested the http/https URL for, + not any name we ended up with after random redirects. + + Support using CONNECT for https:// via proxy. + + Improve SSL error reporting, and IPv6 endpoint reporting. + + Use the system libedit library by default, instead of + the local (embedded) libedit. + + Update to NetBSD-ftp 20200608. + + Update local (embedded) libedit to NetBSD as at 2020-07-04. + Fixes various crashes. + + Portability improvements. Changes in tnftp 20141104 to 20151004:
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:19:32 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: Makefile.in configure tnftp_config.h.in othersrc/usr.bin/tnftp/libedit: Makefile.in othersrc/usr.bin/tnftp/src: Makefile.in Log Message: regen for --with-local-libedit To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 othersrc/usr.bin/tnftp/Makefile.in cvs rdiff -u -r1.49 -r1.50 othersrc/usr.bin/tnftp/configure cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/tnftp/tnftp_config.h.in cvs rdiff -u -r1.11 -r1.12 othersrc/usr.bin/tnftp/libedit/Makefile.in cvs rdiff -u -r1.15 -r1.16 othersrc/usr.bin/tnftp/src/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/Makefile.in diff -u othersrc/usr.bin/tnftp/Makefile.in:1.11 othersrc/usr.bin/tnftp/Makefile.in:1.12 --- othersrc/usr.bin/tnftp/Makefile.in:1.11 Sat Jul 4 14:59:16 2020 +++ othersrc/usr.bin/tnftp/Makefile.in Sun Jul 5 10:19:31 2020 @@ -50,7 +50,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@USE_LIBEDIT_TRUE@am__append_1 = libedit +@WITH_LOCAL_LIBEDIT_TRUE@am__append_1 = libedit subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/tnftp_config.h.in \ Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.49 othersrc/usr.bin/tnftp/configure:1.50 --- othersrc/usr.bin/tnftp/configure:1.49 Sat Jul 4 14:59:16 2020 +++ othersrc/usr.bin/tnftp/configure Sun Jul 5 10:19:31 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.34 . +# From configure.ac Revision: 1.35 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for tnftp 20151004. # @@ -642,11 +642,13 @@ ac_includes_default="\ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS -USE_LIBEDIT_FALSE -USE_LIBEDIT_TRUE -LIBOBJS +WITH_LOCAL_LIBEDIT_FALSE +WITH_LOCAL_LIBEDIT_TRUE +OPT_EDITCOMPLETE_FALSE +OPT_EDITCOMPLETE_TRUE WITH_SSL_FALSE WITH_SSL_TRUE +LIBOBJS OPENSSL_LDFLAGS OPENSSL_LIBS OPENSSL_INCLUDES @@ -774,6 +776,7 @@ enable_maintainer_mode enable_editcomplete enable_ipv6 enable_ssl +with_local_libedit with_socks enable_dependency_tracking enable_shared @@ -1418,7 +1421,7 @@ Optional Features: --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-editcomplete turn on command line editing and completion - [default=enabled] + (requires system or local libedit) [default=enabled] --enable-ipv6 enable IPv6 support (if your OS supports it) [default=enabled] --enable-sslenable SSL support (requires --with-openssl) @@ -1435,6 +1438,9 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG]use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-local-libedituse local libedit instead of system library: yes; + auto (try system, fallback to local); no + [default=auto] --with-socksenable support for (Dante) SOCKS5 proxy [default=auto] --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use @@ -3185,6 +3191,14 @@ else fi +# Check whether --with-local-libedit was given. +if test "${with_local_libedit+set}" = set; then : + withval=$with_local_libedit; +else + with_local_libedit=auto +fi + + # Check whether --with-socks was given. if test "${with_socks+set}" = set; then : withval=$with_socks; @@ -3205,6 +3219,7 @@ fi + # # Checks for programs. # @@ -11853,8 +11868,13 @@ esac # # Checks for libraries. # + +# Check if libedit is required, and which implementation. +# if test "$opt_editcomplete" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: --enable-editcomplete; checking for required features" >&5 +$as_echo "$as_me: --enable-editcomplete; checking for required features" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 $as_echo_n "checking for library containing tgetent... " >&6; } if ${ac_cv_search_tgetent+:} false; then : $as_echo_n "(cached) " >&6 @@ -11912,9 +11932,70 @@ else as_fn_error $? "no relevant library found containing tgetent" "$LINENO" 5 fi + if test "$with_local_libedit" != yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5 +$as_echo_n "checking for el_init in -ledit... " >&6; } +if ${ac_cv_lib_edit_el_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ledit $LIBS"
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:18:19 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: ChangeLog Log Message: today's changelog To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 othersrc/usr.bin/tnftp/ChangeLog Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.70 othersrc/usr.bin/tnftp/ChangeLog:1.71 --- othersrc/usr.bin/tnftp/ChangeLog:1.70 Sat Jul 4 14:55:18 2020 +++ othersrc/usr.bin/tnftp/ChangeLog Sun Jul 5 10:18:19 2020 @@ -1,4 +1,27 @@ -$NetBSD: ChangeLog,v 1.70 2020/07/04 14:55:18 lukem Exp $ +$NetBSD: ChangeLog,v 1.71 2020/07/05 10:18:19 lukem Exp $ + +Sun Jul 5 10:17:44 UTC 2020 lukem + + * libnetbsd/snprintf.c: Rename static functions to avoid conflicts + with standard names. + + * libnetbsd/glob.c: Improve glob(): + * Update to NetBSD glob.c 1.38. + * Switch from a recursive pattern matching algorithm to handle + '*' to a backtracking one. Avoids DoS attacks with patterns + "a*a*a*a*a*...b" matching against "...". + See https://research.swtch.com/glob + * Bump the glob limits to 512KB for total string size and 64KB + path entries. The old limits were too small for some + important FTP use cases like a pkgsrc repository. + + * Remove 3rd (endorsement) clause from my BSD-derived licenses. + + * configure.ac: Add --with-local-libedit=(yes|auto|no) to control + which libedit implementation to use [default auto]: + * yes - force local implementation + * auto - try system library, fallback to local implementation + * no - force system library and fail if not found Sat Jul 4 14:51:41 UTC 2020 lukem
CVS commit: othersrc/usr.bin/tnftp/libnetbsd
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:08:59 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libnetbsd: snprintf.c Log Message: rename some static functions to avoid conflicts with standard names (based on othersrc/libexec/tnftpd/libnetbsd/snprintf.c rev 1.6) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/tnftp/libnetbsd/snprintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libnetbsd/snprintf.c diff -u othersrc/usr.bin/tnftp/libnetbsd/snprintf.c:1.6 othersrc/usr.bin/tnftp/libnetbsd/snprintf.c:1.7 --- othersrc/usr.bin/tnftp/libnetbsd/snprintf.c:1.6 Sun Jul 22 05:19:02 2007 +++ othersrc/usr.bin/tnftp/libnetbsd/snprintf.c Sun Jul 5 10:08:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: snprintf.c,v 1.6 2007/07/22 05:19:02 lukem Exp $ */ +/* $NetBSD: snprintf.c,v 1.7 2020/07/05 10:08:59 lukem Exp $ */ /* * Copyright Patrick Powell 1995 @@ -500,7 +500,7 @@ abs_val(LDOUBLE value) } static LDOUBLE -pow10(int exp) +sn_pow10(int exp) { LDOUBLE result = 1; @@ -513,7 +513,7 @@ pow10(int exp) } static long -round(LDOUBLE value) +sn_round(LDOUBLE value) { long intpart; @@ -569,11 +569,11 @@ fmtfp(char *buffer, size_t *currlen, siz /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ - fracpart = round((pow10(max)) * (ufvalue - intpart)); + fracpart = sn_round((sn_pow10(max)) * (ufvalue - intpart)); - if (fracpart >= pow10(max)) { + if (fracpart >= sn_pow10(max)) { intpart++; - fracpart -= pow10(max); + fracpart -= sn_pow10(max); } #ifdef DEBUG_SNPRINTF printf("fmtfp: %g %d.%d min=%d max=%d\n",
CVS commit: othersrc/usr.bin/tnftp/libnetbsd
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 10:03:09 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libnetbsd: glob.c Log Message: sync to NetBSD glob.c 1.38 (via tnftpd) Update from NetBSD src/lib/libc/gen/glob.c 1.34 to 1.38 (using the version from othersrc/libexec/tnftpd/libnetbsd/glob.c): - Minimize changes from upstream NetBSD source. - 1.35: Use unsigned foo not u_FOO. [Already done] - 1.36: Bump the glob limits to 512KB for total string size and 64K path entries. The old limits were too small for some important FTP use cases like a pkgsrc repository. - 1.37: Switch from a recursive pattern matching algorithm to handle '*' to a backtracking one. Avoids DoS attacks with patterns "a*a*a*a*a*...b" matching against "..." https://research.swtch.com/glob - 1.38: Use the symbolic M_ALL and trim with M_MASK. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 othersrc/usr.bin/tnftp/libnetbsd/glob.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libnetbsd/glob.c diff -u othersrc/usr.bin/tnftp/libnetbsd/glob.c:1.12 othersrc/usr.bin/tnftp/libnetbsd/glob.c:1.13 --- othersrc/usr.bin/tnftp/libnetbsd/glob.c:1.12 Mon May 5 00:20:45 2014 +++ othersrc/usr.bin/tnftp/libnetbsd/glob.c Sun Jul 5 10:03:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: glob.c,v 1.12 2014/05/05 00:20:45 lukem Exp $ */ +/* $NetBSD: glob.c,v 1.13 2020/07/05 10:03:09 lukem Exp $ */ /* from: NetBSD: glob.c,v 1.34 2013/02/21 18:17:43 christos Exp */ /* @@ -33,6 +33,19 @@ * SUCH DAMAGE. */ +#if 0 + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; +#else +__RCSID(" NetBSD: glob.c,v 1.38 2017/05/08 14:42:16 christos Exp "); +#endif +#endif /* LIBC_SCCS and not lint */ + +#endif + /* * glob(3) -- a superset of the one defined in POSIX 1003.2. * @@ -61,8 +74,17 @@ #include "tnftp.h" +#define NO_GETPW_R + +#undef TILDE /* XXX: AIX 4.1.5 has this in */ + +#ifndef __UNCONST +#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) +#endif + #if 0 +#include "namespace.h" #include #include @@ -70,6 +92,7 @@ #include #include #include +#include #include #include #include @@ -77,13 +100,15 @@ #include #include +#ifdef HAVE_NBTOOL_CONFIG_H +#define NO_GETPW_R #endif -#define NO_GETPW_R +#endif -#define GLOB_LIMIT_STRING 65536 /* number of readdirs */ +#define GLOB_LIMIT_STRING 524288 /* number of readdirs */ #define GLOB_LIMIT_STAT 128 /* number of stat system calls */ -#define GLOB_LIMIT_READDIR 16384 /* total buffer size of path strings */ +#define GLOB_LIMIT_READDIR 65536 /* total buffer size of path strings */ #define GLOB_LIMIT_PATH 1024 /* number of path elements */ #define GLOB_LIMIT_BRACE 128 /* Number of brace calls */ @@ -94,8 +119,6 @@ struct glob_limit { size_t l_brace; }; -#undef TILDE /* XXX: AIX 4.1.5 has this in */ - /* * XXX: For NetBSD 1.4.x compatibility. (kill me l8r) */ @@ -176,8 +199,8 @@ static void qprintf(const char *, Char #endif int -glob(const char * pattern, int flags, int (*errfunc)(const char *, -int), glob_t * pglob) +glob(const char * __restrict pattern, int flags, int (*errfunc)(const char *, +int), glob_t * __restrict pglob) { const unsigned char *patnext; int c; @@ -932,39 +955,45 @@ nospace: /* - * pattern matching function for filenames. Each occurrence of the * - * pattern causes a recursion level. + * pattern matching function for filenames. */ static int match(const Char *name, const Char *pat, const Char *patend) { int ok, negate_range; Char c, k; + const Char *patNext, *nameNext, *nameStart, *nameEnd; _DIAGASSERT(name != NULL); _DIAGASSERT(pat != NULL); _DIAGASSERT(patend != NULL); - - while (pat < patend) { - c = *pat++; + patNext = pat; + nameStart = nameNext = name; + nameEnd = NULL; + + while (pat < patend || *name) { + c = *pat; + if (*name == EOS) + nameEnd = name; switch (c & M_MASK) { case M_ALL: - while (pat < patend && (*pat & M_MASK) == M_ALL) -pat++; /* eat consecutive '*' */ - if (pat == patend) -return 1; - for (; !match(name, pat, patend); name++) -if (*name == EOS) - return 0; - return 1; + while ((pat[1] & M_MASK) == M_ALL) pat++; + patNext = pat; + nameNext = name + 1; + pat++; + continue; case M_ONE: - if (*name++ == EOS) -return 0; - break; + if (*name == EOS) +break; + pat++; + name++; + continue; case M_SET: ok = 0; - if ((k = *name++) == EOS) -return 0; + if ((k = *name) == EOS) +break; + pat++; + name++; if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) ++pat; while (((c = *pat++) & M_MASK) != M_END) @@ -975,15 +1004,24 @@ match(const Char *name, const Char *pat, } else if (c == k) ok = 1; if (ok == nega
CVS commit: othersrc/usr.bin/tnftp/libnetbsd
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 09:54:26 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libnetbsd: err.c fseeko.c Log Message: Remove the 3rd clause from my BSD-derived license. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/tnftp/libnetbsd/err.c cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/tnftp/libnetbsd/fseeko.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libnetbsd/err.c diff -u othersrc/usr.bin/tnftp/libnetbsd/err.c:1.5 othersrc/usr.bin/tnftp/libnetbsd/err.c:1.6 --- othersrc/usr.bin/tnftp/libnetbsd/err.c:1.5 Sun Jul 5 09:53:01 2020 +++ othersrc/usr.bin/tnftp/libnetbsd/err.c Sun Jul 5 09:54:26 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: err.c,v 1.5 2020/07/05 09:53:01 lukem Exp $ */ +/* $NetBSD: err.c,v 1.6 2020/07/05 09:54:26 lukem Exp $ */ /* - * Copyright 1997-2000 Luke Mewburn . + * Copyright 1997-2000,2020 Luke Mewburn . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Index: othersrc/usr.bin/tnftp/libnetbsd/fseeko.c diff -u othersrc/usr.bin/tnftp/libnetbsd/fseeko.c:1.4 othersrc/usr.bin/tnftp/libnetbsd/fseeko.c:1.5 --- othersrc/usr.bin/tnftp/libnetbsd/fseeko.c:1.4 Wed May 11 01:01:56 2005 +++ othersrc/usr.bin/tnftp/libnetbsd/fseeko.c Sun Jul 5 09:54:26 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: fseeko.c,v 1.4 2005/05/11 01:01:56 lukem Exp $ */ +/* $NetBSD: fseeko.c,v 1.5 2020/07/05 09:54:26 lukem Exp $ */ /* - * Copyright 2002 Luke Mewburn . + * Copyright 2002,2020 Luke Mewburn . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
CVS commit: othersrc/usr.bin/tnftp/libnetbsd
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 09:53:01 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libnetbsd: err.c Log Message: consistent tab indenting, not a mix of spaces and tabs To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/tnftp/libnetbsd/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libnetbsd/err.c diff -u othersrc/usr.bin/tnftp/libnetbsd/err.c:1.4 othersrc/usr.bin/tnftp/libnetbsd/err.c:1.5 --- othersrc/usr.bin/tnftp/libnetbsd/err.c:1.4 Wed May 11 01:01:56 2005 +++ othersrc/usr.bin/tnftp/libnetbsd/err.c Sun Jul 5 09:53:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.4 2005/05/11 01:01:56 lukem Exp $ */ +/* $NetBSD: err.c,v 1.5 2020/07/05 09:53:01 lukem Exp $ */ /* * Copyright 1997-2000 Luke Mewburn . @@ -32,61 +32,61 @@ void err(int eval, const char *fmt, ...) { - va_list ap; -int sverrno; + va_list ap; + int sverrno; sverrno = errno; -(void)fprintf(stderr, "%s: ", getprogname()); + (void)fprintf(stderr, "%s: ", getprogname()); va_start(ap, fmt); -if (fmt != NULL) { -(void)vfprintf(stderr, fmt, ap); -(void)fprintf(stderr, ": "); -} + if (fmt != NULL) { + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, ": "); + } va_end(ap); -(void)fprintf(stderr, "%s\n", strerror(sverrno)); -exit(eval); + (void)fprintf(stderr, "%s\n", strerror(sverrno)); + exit(eval); } void errx(int eval, const char *fmt, ...) { - va_list ap; + va_list ap; -(void)fprintf(stderr, "%s: ", getprogname()); + (void)fprintf(stderr, "%s: ", getprogname()); va_start(ap, fmt); -if (fmt != NULL) -(void)vfprintf(stderr, fmt, ap); + if (fmt != NULL) + (void)vfprintf(stderr, fmt, ap); va_end(ap); -(void)fprintf(stderr, "\n"); -exit(eval); + (void)fprintf(stderr, "\n"); + exit(eval); } void warn(const char *fmt, ...) { - va_list ap; -int sverrno; + va_list ap; + int sverrno; sverrno = errno; -(void)fprintf(stderr, "%s: ", getprogname()); + (void)fprintf(stderr, "%s: ", getprogname()); va_start(ap, fmt); -if (fmt != NULL) { -(void)vfprintf(stderr, fmt, ap); -(void)fprintf(stderr, ": "); -} + if (fmt != NULL) { + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, ": "); + } va_end(ap); -(void)fprintf(stderr, "%s\n", strerror(sverrno)); + (void)fprintf(stderr, "%s\n", strerror(sverrno)); } void warnx(const char *fmt, ...) { - va_list ap; + va_list ap; -(void)fprintf(stderr, "%s: ", getprogname()); + (void)fprintf(stderr, "%s: ", getprogname()); va_start(ap, fmt); -if (fmt != NULL) -(void)vfprintf(stderr, fmt, ap); + if (fmt != NULL) + (void)vfprintf(stderr, fmt, ap); va_end(ap); -(void)fprintf(stderr, "\n"); + (void)fprintf(stderr, "\n"); }
CVS commit: othersrc/usr.bin/tnftp/libedit
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 09:43:42 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libedit: Makefile.am Log Message: libedit: distribute makelist Need makelist in the distribution (tar file). Style; explicitly list all files in TEST/ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/usr.bin/tnftp/libedit/Makefile.am Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libedit/Makefile.am diff -u othersrc/usr.bin/tnftp/libedit/Makefile.am:1.5 othersrc/usr.bin/tnftp/libedit/Makefile.am:1.6 --- othersrc/usr.bin/tnftp/libedit/Makefile.am:1.5 Sat Jul 4 14:34:28 2020 +++ othersrc/usr.bin/tnftp/libedit/Makefile.am Sun Jul 5 09:43:42 2020 @@ -1,4 +1,4 @@ -## $NetBSD: Makefile.am,v 1.5 2020/07/04 14:34:28 lukem Exp $ +## $NetBSD: Makefile.am,v 1.6 2020/07/05 09:43:42 lukem Exp $ noinst_LTLIBRARIES = libedit.la @@ -78,7 +78,10 @@ help.h: vi.c emacs.c common.c $(AM_V_GEN)$(MAKELIST) -bh $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c > $@ EXTRA_DIST = \ - TEST \ + TEST/rl1.c \ + TEST/tc1.c \ + TEST/test_filecompletion.c \ + TEST/wtc1.c \ chared.h \ chartype.h \ config.h \ @@ -91,6 +94,7 @@ EXTRA_DIST = \ histedit.h \ keymacro.h \ literal.h \ + makelist \ map.h \ parse.h \ prompt.h \
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sun Jul 5 09:37:53 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: Makefile.am configure.ac todo othersrc/usr.bin/tnftp/src: Makefile.am Log Message: implement --with-local-libedit Add --with-local-libedit=(yes|auto|no) to control which libedit implementation to use: - yes - force local implementation - auto - try system library, fallback to local implementation. Default - no - force system library and fail if not found Define NO_EDITCOMPLETE as AH_TEMPLATE() instead of adding to CFLAGS. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/tnftp/Makefile.am cvs rdiff -u -r1.34 -r1.35 othersrc/usr.bin/tnftp/configure.ac cvs rdiff -u -r1.14 -r1.15 othersrc/usr.bin/tnftp/todo cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/tnftp/src/Makefile.am Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/Makefile.am diff -u othersrc/usr.bin/tnftp/Makefile.am:1.3 othersrc/usr.bin/tnftp/Makefile.am:1.4 --- othersrc/usr.bin/tnftp/Makefile.am:1.3 Sun May 5 13:06:37 2013 +++ othersrc/usr.bin/tnftp/Makefile.am Sun Jul 5 09:37:53 2020 @@ -1,10 +1,10 @@ -## $NetBSD: Makefile.am,v 1.3 2013/05/05 13:06:37 lukem Exp $ +## $NetBSD: Makefile.am,v 1.4 2020/07/05 09:37:53 lukem Exp $ ACLOCAL_AMFLAGS = -I buildaux SUBDIRS = libnetbsd -if USE_LIBEDIT +if WITH_LOCAL_LIBEDIT SUBDIRS += libedit endif Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.34 othersrc/usr.bin/tnftp/configure.ac:1.35 --- othersrc/usr.bin/tnftp/configure.ac:1.34 Sun Jan 31 22:23:59 2016 +++ othersrc/usr.bin/tnftp/configure.ac Sun Jul 5 09:37:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.34 2016/01/31 22:23:59 lukem Exp $ +# $NetBSD: configure.ac,v 1.35 2020/07/05 09:37:53 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -9,7 +9,7 @@ AC_COPYRIGHT([ Copyright (c) 1999-2016 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.34 $]) +AC_REVISION([$Revision: 1.35 $]) AS_SHELL_SANITIZE() @@ -28,6 +28,7 @@ AM_MAINTAINER_MODE() AC_ARG_ENABLE([editcomplete], [AS_HELP_STRING([--enable-editcomplete], [turn on command line editing and completion + (requires system or local libedit) [default=enabled]])], [opt_editcomplete=$enableval], [opt_editcomplete=yes]) @@ -43,6 +44,13 @@ AC_ARG_ENABLE([ssl], [default=auto]])], [with_ssl=$enableval], [with_ssl=auto]) +AC_ARG_WITH([local-libedit], +[AS_HELP_STRING([--with-local-libedit], +[use local libedit instead of system library: + yes; auto (try system, fallback to local); no + [default=auto]])], +[], +[with_local_libedit=auto]) AC_ARG_WITH([socks], [AS_HELP_STRING([--with-socks], [enable support for (Dante) SOCKS5 proxy @@ -65,6 +73,8 @@ AH_TEMPLATE([HAVE_VA_COPY], [Define to 1 if the 'va_copy' function is supported.]) AH_TEMPLATE([HAVE___BUILTIN_VA_COPY], [Define to 1 if the '__builtin_va_copy' function is supported.]) +AH_TEMPLATE([NO_EDITCOMPLETE], +[Define if disabling command-line editing and completion.]) AH_TEMPLATE([USE_INET6], [Define if using IPv6 support.]) AH_TEMPLATE([USE_SOCKS], @@ -99,14 +109,31 @@ AS_CASE([$target_os], # # Checks for libraries. # + +# Check if libedit is required, and which implementation. +# AS_IF([test "$opt_editcomplete" = yes], - [AC_SEARCH_LIBS([tgetent], + [AC_MSG_NOTICE([--enable-editcomplete; checking for required features]) + AC_SEARCH_LIBS([tgetent], [termcap termlib curses ncurses tinfo], [], - [AC_MSG_ERROR( - [no relevant library found containing tgetent])]) - ]) + [AC_MSG_ERROR([no relevant library found containing tgetent])]) + AS_IF([test "$with_local_libedit" != yes], + [AC_CHECK_LIB([edit], + [el_init], + [AC_MSG_NOTICE([using system libedit]) +with_local_libedit=no], + [AS_IF([test "$with_local_libedit" = no], + [AC_MSG_ERROR([--without-local-libedit was given, but system libedit was not found])]) +AC_MSG_NOTICE([using local libedit]) +with_local_libedit=yes])], + [AC_MSG_NOTICE([using local libedit])])], + [AC_MSG_NOTICE([--disable-editcomplete; disabling
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 14:55:18 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: ChangeLog Log Message: ChangeLog: ftp and libedit imports To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 othersrc/usr.bin/tnftp/ChangeLog Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.69 othersrc/usr.bin/tnftp/ChangeLog:1.70 --- othersrc/usr.bin/tnftp/ChangeLog:1.69 Mon Feb 1 10:33:26 2016 +++ othersrc/usr.bin/tnftp/ChangeLog Sat Jul 4 14:55:18 2020 @@ -1,4 +1,58 @@ -$NetBSD: ChangeLog,v 1.69 2016/02/01 10:33:26 lukem Exp $ +$NetBSD: ChangeLog,v 1.70 2020/07/04 14:55:18 lukem Exp $ + +Sat Jul 4 14:51:41 UTC 2020 lukem + + * Merge NetBSD libedit from 20160131 to 20200704: + * Fix uninitialized memory access in libedit history. PR/54399 + * Fix out-of-bounds read in libedit c_delbefore. PR/54400 + * Avoid segmentation fault in bad history file. PR/53597 + * Fix crash in history saving. PR/52849 + * Fix crash in c_gets(). + * Fix crash in re_fastputc(). + * Fix crash with backspacing on a long line. + * Fix patbuf updating. + * Save and restore errno in signal handler. + * Fix cursor movement. PR/54654, PR/54329 + * Fix cursor after resize. PR/52359 + * Fix terminal restoration if piped. PR/50863 + * Fix memory leaks. + * Various UTF-8 fixes. + * Implementation improvements. + * Readline compatibility improvements (not used by ftp). + * and chartype portability improvements. + * Remove 4 clause BSD licenses. + * Default editrc is $EDITRC, falling back to $HOME/.editrc. + * Add literal escape sequence support, patterned after the + tcsh ones. + * Support pasting multiline buffers. + * Fix errno / el_errno handling. + * Improve directory completion in subdirs with only one match. + * Add support for escaping special characters when doing + filename completion. + * Only quote the completion matches if we are doing filename + completion. + * Don't escape strings with user-supplied completion functions. + * Grow the buffer for event search if there was not enough + space. + * Use strncpy() or strlcpy() instead of memcpy(). + * (Many fixes were from Ingo Schwarze.) + + * Merge NetBSD ftp from 20151003 to 20200608: + * Avoid crashes by exiting if lostpeer due to a signal + (e.g., remote server disconnection). + * Issue PWD commands to the server only when we actually + need the results, not speculatively, just in case we might. + Works around broken servers, and is quicker too. + * Fix error reporting when handling TLS connections. + * Use "anonymous" instead of the local username for anonymous + ftp. Avoids unnecesary information leak. + * Correct format of IPv6 endpoint reporting. + * Refactoring and build fixes. + * Support using CONNECT for https:// via proxy. + NetBSD PR/50438, PR/51043. + * Fix downloads of local files using file:// URLs + * Use the first name we requested the http/https URL for, + not any name we ended up with after random redirects. Mon Feb 1 10:29:47 UTC 2016 lukem
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 14:51:16 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: todo Log Message: TODO: autoconf option to use system libedit instead of internal To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 othersrc/usr.bin/tnftp/todo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/todo diff -u othersrc/usr.bin/tnftp/todo:1.13 othersrc/usr.bin/tnftp/todo:1.14 --- othersrc/usr.bin/tnftp/todo:1.13 Sun May 5 13:23:03 2013 +++ othersrc/usr.bin/tnftp/todo Sat Jul 4 14:51:15 2020 @@ -1,8 +1,10 @@ -$NetBSD: todo,v 1.13 2013/05/05 13:23:03 lukem Exp $ +$NetBSD: todo,v 1.14 2020/07/04 14:51:15 lukem Exp $ Current Items - +add autoconf control to use system libedit instead of internal libedit + autoconf test for HAVE_DECL_GETADDRINFO if providing getaddrinfo() override. (required for UnixWare 7.1.1)
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 14:47:35 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: tnftp.h Log Message: tnftp.h: add __UNVOLATILE. reformat __UNCONST To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 othersrc/usr.bin/tnftp/tnftp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/tnftp.h diff -u othersrc/usr.bin/tnftp/tnftp.h:1.38 othersrc/usr.bin/tnftp/tnftp.h:1.39 --- othersrc/usr.bin/tnftp/tnftp.h:1.38 Sat Jul 4 14:31:04 2020 +++ othersrc/usr.bin/tnftp/tnftp.h Sat Jul 4 14:47:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tnftp.h,v 1.38 2020/07/04 14:31:04 lukem Exp $ */ +/* $NetBSD: tnftp.h,v 1.39 2020/07/04 14:47:35 lukem Exp $ */ #ifndef TNFTP_H #define TNFTP_H 1 @@ -521,6 +521,11 @@ int vasprintf(char **, const char *, va_ #ifdef __UNCONST #undef __UNCONST #endif -#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) +#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) + +#ifdef __UNVOLATILE +#undef __UNVOLATILE +#endif +#define __UNVOLATILE(a) ((void *)(unsigned long)(volatile void *)(a)) #endif /* TNFTP_H */
CVS commit: othersrc/usr.bin/tnftp/libedit
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 14:34:28 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/libedit: Makefile.am literal.c vi.c Log Message: fix libedit build after 20200704 merge adapt the build of libedit for the changes in upstream; - generate appropriate headers - tnftp-ify literal.c and vi.c To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/tnftp/libedit/Makefile.am cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/tnftp/libedit/literal.c cvs rdiff -u -r1.9 -r1.10 othersrc/usr.bin/tnftp/libedit/vi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/libedit/Makefile.am diff -u othersrc/usr.bin/tnftp/libedit/Makefile.am:1.4 othersrc/usr.bin/tnftp/libedit/Makefile.am:1.5 --- othersrc/usr.bin/tnftp/libedit/Makefile.am:1.4 Sun Jan 31 22:18:35 2016 +++ othersrc/usr.bin/tnftp/libedit/Makefile.am Sat Jul 4 14:34:28 2020 @@ -1,4 +1,4 @@ -## $NetBSD: Makefile.am,v 1.4 2016/01/31 22:18:35 lukem Exp $ +## $NetBSD: Makefile.am,v 1.5 2020/07/04 14:34:28 lukem Exp $ noinst_LTLIBRARIES = libedit.la @@ -7,19 +7,25 @@ libedit_la_SOURCES = \ chartype.c \ common.c \ el.c \ + eln.c \ emacs.c \ + filecomplete.c \ hist.c \ history.c \ + historyn.c \ keymacro.c \ + literal.c \ map.c \ parse.c \ prompt.c \ read.c \ + readline.c \ refresh.c \ search.c \ sig.c \ terminal.c \ tokenizer.c \ + tokenizern.c \ tty.c \ vi.c @@ -36,9 +42,8 @@ libedit_la_LIBADD = \ generated_files = \ common.h \ emacs.h \ - fcns.c \ fcns.h \ - help.c \ + func.h \ help.h\ vi.h @@ -66,31 +71,30 @@ common.h: common.c fcns.h: vi.h emacs.h common.h $(AM_V_GEN)$(MAKELIST) -fh vi.h emacs.h common.h > $@ -fcns.c: vi.h emacs.h common.h fcns.h help.h +func.h: vi.h emacs.h common.h $(AM_V_GEN)$(MAKELIST) -fc vi.h emacs.h common.h > $@ -help.c: vi.c emacs.c common.c - $(AM_V_GEN)$(MAKELIST) -bc $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c > $@ - help.h: vi.c emacs.c common.c $(AM_V_GEN)$(MAKELIST) -bh $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c > $@ EXTRA_DIST = \ + TEST \ chared.h \ chartype.h \ + config.h \ editline.3 \ + editline.7 \ editrc.5 \ el.h \ - filecomplete.c \ filecomplete.h \ hist.h \ histedit.h \ keymacro.h \ + literal.h \ map.h \ parse.h \ prompt.h \ read.h \ - readline.c \ readline/readline.h \ refresh.h \ search.h \ Index: othersrc/usr.bin/tnftp/libedit/literal.c diff -u othersrc/usr.bin/tnftp/libedit/literal.c:1.1.1.1 othersrc/usr.bin/tnftp/libedit/literal.c:1.2 --- othersrc/usr.bin/tnftp/libedit/literal.c:1.1.1.1 Sat Jul 4 12:41:18 2020 +++ othersrc/usr.bin/tnftp/libedit/literal.c Sat Jul 4 14:34:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: literal.c,v 1.1.1.1 2020/07/04 12:41:18 lukem Exp $ */ +/* $NetBSD: literal.c,v 1.2 2020/07/04 14:34:28 lukem Exp $ */ /* from NetBSD: literal.c,v 1.5 2019/07/23 13:10:11 christos Exp */ /*- @@ -31,17 +31,23 @@ */ #include "config.h" + +#if 0 /* tnftp */ #if !defined(lint) && !defined(SCCSID) __RCSID(" NetBSD: literal.c,v 1.5 2019/07/23 13:10:11 christos Exp "); #endif /* not lint && not SCCSID */ +#endif /* tnftp */ /* * literal.c: Literal sequences handling. */ +#if 0 /* tnftp */ #include #include #include #include +#endif /* tnftp */ + #include "el.h" libedit_private void Index: othersrc/usr.bin/tnftp/libedit/vi.c diff -u othersrc/usr.bin/tnftp/libedit/vi.c:1.9 othersrc/usr.bin/tnftp/libedit/vi.c:1.10 --- othersrc/usr.bin/tnftp/libedit/vi.c:1.9 Sat Jul 4 13:43:21 2020 +++ othersrc/usr.bin/tnftp/libedit/vi.c Sat Jul 4 14:34:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.9 2020/07/04 13:43:21 lukem Exp $ */ +/* $NetBSD: vi.c,v 1.10 2020/07/04 14:34:28 lukem Exp $ */ /* from NetBSD: vi.c,v 1.63 2019/07/23 10:18:52 christos Exp */ /*- @@ -35,6 +35,7 @@ #include "config.h" +#if 0 /* tnftp */ #if !defined(lint) && !defined(SCCSID) #if 0 static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93"; @@ -42,6 +43,7 @@ static char sccsid[] = "@(#)vi.c 8.1 (Be __RCSID(" NetBSD: vi.c,v 1.63 2019/07/23 10:18:52 christos Exp "); #endif #endif /* not lint && not SCCSID */ +#endif /* tnftp */ /* * vi.c: Vi mode commands.
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 14:31:04 UTC 2020 Modified Files: othersrc/usr.bin/tnftp: tnftp.h Log Message: tnftp.h: multiple-include protection To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 othersrc/usr.bin/tnftp/tnftp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/tnftp.h diff -u othersrc/usr.bin/tnftp/tnftp.h:1.37 othersrc/usr.bin/tnftp/tnftp.h:1.38 --- othersrc/usr.bin/tnftp/tnftp.h:1.37 Sun Jan 31 06:10:20 2016 +++ othersrc/usr.bin/tnftp/tnftp.h Sat Jul 4 14:31:04 2020 @@ -1,4 +1,7 @@ -/* $NetBSD: tnftp.h,v 1.37 2016/01/31 06:10:20 lukem Exp $ */ +/* $NetBSD: tnftp.h,v 1.38 2020/07/04 14:31:04 lukem Exp $ */ + +#ifndef TNFTP_H +#define TNFTP_H 1 #define FTP_PRODUCT PACKAGE_NAME #define FTP_VERSION PACKAGE_VERSION @@ -519,3 +522,5 @@ int vasprintf(char **, const char *, va_ #undef __UNCONST #endif #define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) + +#endif /* TNFTP_H */
CVS import: othersrc/usr.bin/tnftp/libedit
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 12:52:56 UTC 2020 Update of /cvsroot/othersrc/usr.bin/tnftp/libedit In directory ivanova.netbsd.org:/tmp/cvs-serv19987 Log Message: Update libedit from NetBSD-current 20200704 Notable changes since import on 20160131: * Fix uninitialized memory access in libedit history. PR/54399 * Fix out-of-bounds read in libedit c_delbefore. PR/54400 * Avoid segmentation fault in bad history file. PR/53597 * Fix crash in history saving. PR/52849 * Fix crash in c_gets(). * Fix crash in re_fastputc(). * Fix crash with backspacing on a long line. * Fix patbuf updating. * Save and restore errno in signal handler. * Fix cursor movement. PR/54654, PR/54329 * Fix cursor after resize. PR/52359 * Fix terminal restoration if piped. PR/50863 * Fix memory leaks. * Various UTF-8 fixes. * Implementation improvements. * Readline compatibility improvements (not used by ftp). * and chartype portability improvements. * Remove 4 clause BSD licenses. * Default editrc is $EDITRC, falling back to $HOME/.editrc. * Add literal escape sequence support, patterned after the tcsh ones. * Support pasting multiline buffers. * Fix errno / el_errno handling. * Improve directory completion in subdirs with only one match. * Add support for escaping special characters when doing filename completion. * Only quote the completion matches if we are doing filename completion. * Don't escape strings with user-supplied completion functions. * Grow the buffer for event search if there was not enough space. * Use strncpy() or strlcpy() instead of memcpy(). * (Many fixes were from Ingo Schwarze.) Status: Vendor Tag: NetBSD Release Tags: NetBSD-libedit-20200704 C othersrc/usr.bin/tnftp/libedit/histedit.h C othersrc/usr.bin/tnftp/libedit/hist.h C othersrc/usr.bin/tnftp/libedit/sig.h C othersrc/usr.bin/tnftp/libedit/terminal.c U othersrc/usr.bin/tnftp/libedit/chartype.h C othersrc/usr.bin/tnftp/libedit/chared.h C othersrc/usr.bin/tnftp/libedit/parse.h U othersrc/usr.bin/tnftp/libedit/keymacro.h C othersrc/usr.bin/tnftp/libedit/editline.3 C othersrc/usr.bin/tnftp/libedit/prompt.c U othersrc/usr.bin/tnftp/libedit/shlib_version C othersrc/usr.bin/tnftp/libedit/filecomplete.c C othersrc/usr.bin/tnftp/libedit/read.c C othersrc/usr.bin/tnftp/libedit/emacs.c N othersrc/usr.bin/tnftp/libedit/literal.h U othersrc/usr.bin/tnftp/libedit/terminal.h C othersrc/usr.bin/tnftp/libedit/search.c C othersrc/usr.bin/tnftp/libedit/map.h C othersrc/usr.bin/tnftp/libedit/parse.c C othersrc/usr.bin/tnftp/libedit/read.h C othersrc/usr.bin/tnftp/libedit/vi.c C othersrc/usr.bin/tnftp/libedit/readline.c C othersrc/usr.bin/tnftp/libedit/el.c C othersrc/usr.bin/tnftp/libedit/filecomplete.h C othersrc/usr.bin/tnftp/libedit/makelist N othersrc/usr.bin/tnftp/libedit/tokenizern.c C othersrc/usr.bin/tnftp/libedit/prompt.h C othersrc/usr.bin/tnftp/libedit/common.c C othersrc/usr.bin/tnftp/libedit/hist.c C othersrc/usr.bin/tnftp/libedit/tty.h C othersrc/usr.bin/tnftp/libedit/tokenizer.c N othersrc/usr.bin/tnftp/libedit/historyn.c C othersrc/usr.bin/tnftp/libedit/editrc.5 C othersrc/usr.bin/tnftp/libedit/el.h N othersrc/usr.bin/tnftp/libedit/literal.c C othersrc/usr.bin/tnftp/libedit/map.c C othersrc/usr.bin/tnftp/libedit/history.c C othersrc/usr.bin/tnftp/libedit/search.h C othersrc/usr.bin/tnftp/libedit/keymacro.c C othersrc/usr.bin/tnftp/libedit/Makefile C othersrc/usr.bin/tnftp/libedit/chared.c C othersrc/usr.bin/tnftp/libedit/refresh.h C othersrc/usr.bin/tnftp/libedit/sig.c C othersrc/usr.bin/tnftp/libedit/refresh.c C othersrc/usr.bin/tnftp/libedit/sys.h C othersrc/usr.bin/tnftp/libedit/tty.c C othersrc/usr.bin/tnftp/libedit/config.h C othersrc/usr.bin/tnftp/libedit/chartype.c U othersrc/usr.bin/tnftp/libedit/eln.c N othersrc/usr.bin/tnftp/libedit/editline.7 C othersrc/usr.bin/tnftp/libedit/readline/readline.h C othersrc/usr.bin/tnftp/libedit/readline/Makefile N othersrc/usr.bin/tnftp/libedit/TEST/test_filecompletion.c U othersrc/usr.bin/tnftp/libedit/TEST/tc1.c U othersrc/usr.bin/tnftp/libedit/TEST/wtc1.c C othersrc/usr.bin/tnftp/libedit/TEST/Makefile U othersrc/usr.bin/tnftp/libedit/TEST/rl1.c 43 conflicts created by this import. Use the following command to help the merge: cvs checkout -jNetBSD:yesterday -jNetBSD othersrc/usr.bin/tnftp/libedit
CVS commit: othersrc/usr.bin/tnftp/src
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 09:59:07 UTC 2020 Modified Files: othersrc/usr.bin/tnftp/src: cmds.c complete.c domacro.c extern.h fetch.c ftp.1 ftp.c ftp_var.h main.c progressbar.c ssl.c ssl.h util.c version.h Log Message: Merge NetBSD-ftp 20200608 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 othersrc/usr.bin/tnftp/src/cmds.c cvs rdiff -u -r1.10 -r1.11 othersrc/usr.bin/tnftp/src/complete.c cvs rdiff -u -r1.8 -r1.9 othersrc/usr.bin/tnftp/src/domacro.c cvs rdiff -u -r1.13 -r1.14 othersrc/usr.bin/tnftp/src/extern.h cvs rdiff -u -r1.23 -r1.24 othersrc/usr.bin/tnftp/src/fetch.c \ othersrc/usr.bin/tnftp/src/util.c cvs rdiff -u -r1.15 -r1.16 othersrc/usr.bin/tnftp/src/ftp.1 \ othersrc/usr.bin/tnftp/src/progressbar.c cvs rdiff -u -r1.21 -r1.22 othersrc/usr.bin/tnftp/src/ftp.c cvs rdiff -u -r1.12 -r1.13 othersrc/usr.bin/tnftp/src/ftp_var.h cvs rdiff -u -r1.20 -r1.21 othersrc/usr.bin/tnftp/src/main.c cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/tnftp/src/ssl.c \ othersrc/usr.bin/tnftp/src/ssl.h cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/tnftp/src/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/src/cmds.c diff -u othersrc/usr.bin/tnftp/src/cmds.c:1.18 othersrc/usr.bin/tnftp/src/cmds.c:1.19 --- othersrc/usr.bin/tnftp/src/cmds.c:1.18 Sun May 5 11:17:30 2013 +++ othersrc/usr.bin/tnftp/src/cmds.c Sat Jul 4 09:59:07 2020 @@ -1,5 +1,5 @@ -/* $NetBSD: cmds.c,v 1.18 2013/05/05 11:17:30 lukem Exp $ */ -/* from NetBSD: cmds.c,v 1.135 2012/12/22 16:57:09 christos Exp */ +/* $NetBSD: cmds.c,v 1.19 2020/07/04 09:59:07 lukem Exp $ */ +/* from NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp */ /*- * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID(" NetBSD: cmds.c,v 1.135 2012/12/22 16:57:09 christos Exp "); +__RCSID(" NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp "); #endif #endif /* not lint */ @@ -1165,7 +1165,8 @@ cd(int argc, char *argv[]) } if (r == COMPLETE) { dirchange = 1; - updateremotecwd(); + remotecwd[0] = '\0'; + remcwdvalid = 0; } } @@ -1551,9 +1552,9 @@ pwd(int argc, char *argv[]) UPRINTF("usage: %s\n", argv[0]); return; } - if (! remotecwd[0]) + if (!remcwdvalid || remotecwd[0] == '\0') updateremotecwd(); - if (! remotecwd[0]) + if (remotecwd[0] == '\0') fprintf(ttyout, "Unable to determine remote directory\n"); else { fprintf(ttyout, "Remote directory: %s\n", remotecwd); @@ -1782,6 +1783,18 @@ quit(int argc, char *argv[]) exit(0); } +void __dead +justquit(void) +{ + + quit(0, NULL); + /* + * quit is not __dead, but for our invocation it never will return, + * but some compilers are not smart enough to find this out. + */ + exit(0); +} + /* * Terminate session, but don't exit. * May be called with 0, NULL. @@ -1974,15 +1987,15 @@ dotrans(char *dst, size_t dlen, const ch char *cp2 = dst; size_t i, ostop; - for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++) + for (ostop = 0; ntout[ostop] && ostop < sizeof(ntout); ostop++) continue; for (cp1 = src; *cp1; cp1++) { int found = 0; - for (i = 0; *(ntin + i) && i < 16; i++) { - if (*cp1 == *(ntin + i)) { + for (i = 0; i < sizeof(ntin) && ntin[i]; i++) { + if (*cp1 == ntin[i]) { found++; if (i < ostop) { - *cp2++ = *(ntout + i); + *cp2++ = ntout[i]; if (cp2 - dst >= (ptrdiff_t)(dlen - 1)) goto out; } @@ -2191,7 +2204,7 @@ LOOP: } break; } -/* intentional drop through */ +/* FALLTHROUGH */ default: *cp2++ = *cp1; break; @@ -2366,7 +2379,8 @@ cdup(int argc, char *argv[]) } if (r == COMPLETE) { dirchange = 1; - updateremotecwd(); + remotecwd[0] = '\0'; + remcwdvalid = 0; } } Index: othersrc/usr.bin/tnftp/src/complete.c diff -u othersrc/usr.bin/tnftp/src/complete.c:1.10 othersrc/usr.bin/tnftp/src/complete.c:1.11 --- othersrc/usr.bin/tnftp/src/complete.c:1.10 Wed May 20 12:53:47 2009 +++ othersrc/usr.bin/tnftp/src/complete.c Sat Jul 4 09:59:07 2020 @@ -1,5 +1,5 @@ -/* $NetBSD: complete.c,v 1.10 2009/05/20 12:53:47 lukem Exp $ */ -/* from NetBSD: complete.c,v 1.46 2009/04/12 10:18:52 lukem Exp */ +/* $NetBSD: complete.c,v 1.11 2020/07/04 09:59:07 lukem Exp $ */ +/* from NetBSD: complete.c,v 1.47 2019/01/28 12:04:16 christos Exp */ /*- * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID(" NetBSD: complete.c,v 1.46 2009/04/12 10:18:52 lukem Exp "); +__RCSID(" NetBSD: complete.c,v 1.47 2019/01/28 12:04:16 christos Exp "); #endif /* not lint */ /* @@ -106,11 +106,10 @@ complete_ambiguous(char *word, int list, } if (!list) { - matchlen = 0; lastmatch = words->sl_str[0]; matchlen = strlen(las
CVS import: othersrc/usr.bin/tnftp/src
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 09:48:28 UTC 2020 Update of /cvsroot/othersrc/usr.bin/tnftp/src In directory ivanova.netbsd.org:/tmp/cvs-serv25717 Log Message: Import NetBSD-ftp 20200608 Notable changes since NetBSD-ftp 20151003: * Avoid crashies by exit if lostpeer due to a signal (e.g., remote server disconnection). * Issue PWD commands to the server only when we actually need the results, not speculatively, just in case we might. Works around broken servers, and is quicker too. * Fix error reporting when handling TLS connections. * Use "anonymous" instead of the local username for anonymous ftp. Avoids unnecesary information leak. * Correct format of IPv6 endpoint reporting. * Refactoring and build fixes. * Support using CONNECT for https:// via proxy. PR/50438, PR/51043. * Fix downloads of local files using file:// URLs * Use the first name we requested the http/https URL for, not any name we ended up with after random redirects. Status: Vendor Tag: NetBSD Release Tags: NetBSD-20200608 U othersrc/usr.bin/tnftp/src/ruserpass.c C othersrc/usr.bin/tnftp/src/ftp.1 C othersrc/usr.bin/tnftp/src/fetch.c C othersrc/usr.bin/tnftp/src/util.c C othersrc/usr.bin/tnftp/src/ftp.c U othersrc/usr.bin/tnftp/src/cmdtab.c C othersrc/usr.bin/tnftp/src/ssl.h C othersrc/usr.bin/tnftp/src/main.c C othersrc/usr.bin/tnftp/src/ssl.c C othersrc/usr.bin/tnftp/src/extern.h U othersrc/usr.bin/tnftp/src/progressbar.h C othersrc/usr.bin/tnftp/src/ftp_var.h C othersrc/usr.bin/tnftp/src/version.h C othersrc/usr.bin/tnftp/src/progressbar.c C othersrc/usr.bin/tnftp/src/Makefile C othersrc/usr.bin/tnftp/src/complete.c C othersrc/usr.bin/tnftp/src/domacro.c C othersrc/usr.bin/tnftp/src/cmds.c 15 conflicts created by this import. Use the following command to help the merge: cvs checkout -jNetBSD:yesterday -jNetBSD othersrc/usr.bin/tnftp/src
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 06:57:46 UTC 2020 Modified Files: othersrc/libexec/tnftpd: configure Log Message: regen for tnftpd 20200704 To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 othersrc/libexec/tnftpd/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/configure diff -u othersrc/libexec/tnftpd/configure:1.51 othersrc/libexec/tnftpd/configure:1.52 --- othersrc/libexec/tnftpd/configure:1.51 Sat Jul 4 04:55:03 2020 +++ othersrc/libexec/tnftpd/configure Sat Jul 4 06:57:46 2020 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 1.45 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftpd 20190602. +# Generated by GNU Autoconf 2.69 for tnftpd 20200704. # # Report bugs to . # @@ -13,7 +13,7 @@ # gives unlimited permission to copy, distribute and modify it. # # -# Copyright (c) 2001-2019 The NetBSD Foundation, Inc. +# Copyright (c) 2001-2020 The NetBSD Foundation, Inc. # All rights reserved. # ## ## @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftpd' PACKAGE_TARNAME='tnftpd' -PACKAGE_VERSION='20190602' -PACKAGE_STRING='tnftpd 20190602' +PACKAGE_VERSION='20200704' +PACKAGE_STRING='tnftpd 20200704' PACKAGE_BUGREPORT='lu...@netbsd.org' PACKAGE_URL='' @@ -1335,7 +1335,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tnftpd 20190602 to adapt to many kinds of systems. +\`configure' configures tnftpd 20200704 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1405,7 +1405,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tnftpd 20190602:";; + short | recursive ) echo "Configuration of tnftpd 20200704:";; esac cat <<\_ACEOF @@ -1528,7 +1528,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tnftpd configure 20190602 +tnftpd configure 20200704 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1536,7 +1536,7 @@ This configure script is free software; gives unlimited permission to copy, distribute and modify it. -Copyright (c) 2001-2019 The NetBSD Foundation, Inc. +Copyright (c) 2001-2020 The NetBSD Foundation, Inc. All rights reserved. _ACEOF @@ -2113,7 +2113,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftpd $as_me 20190602, which was +It was created by tnftpd $as_me 20200704, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3104,7 +3104,7 @@ fi # Define the identity of the package. PACKAGE='tnftpd' - VERSION='20190602' + VERSION='20200704' cat >>confdefs.h <<_ACEOF @@ -16242,7 +16242,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tnftpd $as_me 20190602, which was +This file was extended by tnftpd $as_me 20200704, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -16308,7 +16308,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/&/g'`" ac_cs_version="\\ -tnftpd config.status 20190602 +tnftpd config.status 20200704 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\"
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 06:49:19 UTC 2020 Modified Files: othersrc/libexec/tnftpd: ChangeLog NEWS configure.ac Log Message: tnftpd 20200704 release Changes since tnftpd 20200704: - Adapt to NetBSD blocklistd(8) service rename. - Increase some buffer sizes. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 othersrc/libexec/tnftpd/ChangeLog cvs rdiff -u -r1.14 -r1.15 othersrc/libexec/tnftpd/NEWS cvs rdiff -u -r1.45 -r1.46 othersrc/libexec/tnftpd/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/ChangeLog diff -u othersrc/libexec/tnftpd/ChangeLog:1.63 othersrc/libexec/tnftpd/ChangeLog:1.64 --- othersrc/libexec/tnftpd/ChangeLog:1.63 Sun Jun 2 06:54:55 2019 +++ othersrc/libexec/tnftpd/ChangeLog Sat Jul 4 06:49:19 2020 @@ -1,4 +1,15 @@ -$NetBSD: ChangeLog,v 1.63 2019/06/02 06:54:55 lukem Exp $ +$NetBSD: ChangeLog,v 1.64 2020/07/04 06:49:19 lukem Exp $ + +Sat Jul 4 06:40:38 UTC 2020 lukem + + * Release as "tnftpd 20200704". + + * Change --with-blacklist to --with-blocklist and search for + libblocklist first, falling back to the legacy libblacklist. + + * Update to NetBSD-ftpd 20200615: + * Increase some buffer sizes. + * Rename blacklist to blocklist. Sun Jun 2 05:56:12 UTC 2019 lukem @@ -89,7 +100,7 @@ Mon Jan 4 05:51:15 UTC 2010 lukem Wed Dec 30 01:48:57 UTC 2009 lukem - * Release as "tnftpd 20091122" + * Release as "tnftpd 20091122" Sat Nov 7 11:13:38 UTC 2009 lukem Index: othersrc/libexec/tnftpd/NEWS diff -u othersrc/libexec/tnftpd/NEWS:1.14 othersrc/libexec/tnftpd/NEWS:1.15 --- othersrc/libexec/tnftpd/NEWS:1.14 Sun Jun 2 06:54:55 2019 +++ othersrc/libexec/tnftpd/NEWS Sat Jul 4 06:49:19 2020 @@ -1,6 +1,12 @@ -$NetBSD: NEWS,v 1.14 2019/06/02 06:54:55 lukem Exp $ +$NetBSD: NEWS,v 1.15 2020/07/04 06:49:19 lukem Exp $ -This is tnftpd version 20190602. +This is tnftpd version 20200704. + +Changes in tnftpd from 20190602 to 20200704: + + Adapt to NetBSD blocklistd(8) service rename. + + Increase some buffer sizes. Changes in tnftpd from 20130325 to 20190602: Index: othersrc/libexec/tnftpd/configure.ac diff -u othersrc/libexec/tnftpd/configure.ac:1.45 othersrc/libexec/tnftpd/configure.ac:1.46 --- othersrc/libexec/tnftpd/configure.ac:1.45 Sat Jul 4 04:39:59 2020 +++ othersrc/libexec/tnftpd/configure.ac Sat Jul 4 06:49:19 2020 @@ -1,15 +1,15 @@ -# $NetBSD: configure.ac,v 1.45 2020/07/04 04:39:59 lukem Exp $ +# $NetBSD: configure.ac,v 1.46 2020/07/04 06:49:19 lukem Exp $ # # Process this file with autoconf to produce a configure script. -AC_INIT([tnftpd], [20190602], [lu...@netbsd.org]) +AC_INIT([tnftpd], [20200704], [lu...@netbsd.org]) AC_PREREQ([2.69]) AC_COPYRIGHT([ -Copyright (c) 2001-2019 The NetBSD Foundation, Inc. +Copyright (c) 2001-2020 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.45 $]) +AC_REVISION([$Revision: 1.46 $]) AS_SHELL_SANITIZE()
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 05:43:30 UTC 2020 Modified Files: othersrc/libexec/tnftpd: INSTALL Log Message: INSTALL: update for --with-blocklist, --with-sia To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 othersrc/libexec/tnftpd/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/INSTALL diff -u othersrc/libexec/tnftpd/INSTALL:1.10 othersrc/libexec/tnftpd/INSTALL:1.11 --- othersrc/libexec/tnftpd/INSTALL:1.10 Sun Sep 21 16:35:24 2008 +++ othersrc/libexec/tnftpd/INSTALL Sat Jul 4 05:43:29 2020 @@ -1,4 +1,4 @@ -$NetBSD: INSTALL,v 1.10 2008/09/21 16:35:24 lukem Exp $ +$NetBSD: INSTALL,v 1.11 2020/07/04 05:43:29 lukem Exp $ INSTALLATION INTRODUCTION - @@ -44,26 +44,37 @@ tnftpd is configured using an `autoconf' * Specific options: --enable-ipv6 Enable IPv6 support (if your OS supports it). + [default=enabled] --disable-ipv6 Disable IPv6 support (even if your OS supports it). - [default: enabled] - --enable-builtinls Enable built-in /bin/ls. [default: enabled] + --enable-builtinls Enable built-in /bin/ls. [default=enabled] --disable-builtinls Disable built-in /bin/ls. - --with-pam Enable support for Pluggable Authentication Modules. - --with-skey Enable support for S/Key authentication. --disable-largefile Omit support for large files. + --with-blocklistenable support for NetBSD blocklist daemon + [default=auto] + --with-pam enable support for Pluggable Authentication Modules + (PAM) authentication [default=auto] + --with-sia enable support for Tru64 Security Integration + Architecture (SIA) authentication [default=auto] + --with-skey enable support for S/Key authentication (not + compatible with --with-pam) [default=no] The following environment variables can be set to override various compiler related settings. - CC=compiler specify name of the C compiler (default: gcc or cc) - CFLAGS=flags specify flags to C compiler (default: -O -g or just -O) - LDFLAGS=flags specify flags to linker (default: none) + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBSlibraries to pass to the linker, e.g. -l + CPPFLAGS(Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + YACCThe `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. This can be achieved with: env CC="compiler" CFLAGS="cflags" LDFLAGS="ldflags" ./configure - - - = = - = NOTE: You will need an ANSI C compiler. = - = = -
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 05:38:28 UTC 2020 Modified Files: othersrc/libexec/tnftpd: todo Log Message: TODO: more stuff To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 othersrc/libexec/tnftpd/todo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/todo diff -u othersrc/libexec/tnftpd/todo:1.21 othersrc/libexec/tnftpd/todo:1.22 --- othersrc/libexec/tnftpd/todo:1.21 Sun Mar 21 10:49:16 2010 +++ othersrc/libexec/tnftpd/todo Sat Jul 4 05:38:28 2020 @@ -1,4 +1,4 @@ -$NetBSD: todo,v 1.21 2010/03/21 10:49:16 lukem Exp $ +$NetBSD: todo,v 1.22 2020/07/04 05:38:28 lukem Exp $ check for pidfile returning void (old netbsd such as 1.6) ? @@ -28,3 +28,12 @@ enable kerberos support once its fixed? enable socks once functional autoconf tests are available. add setenv(3) to replace putenv(3) cruft? + +convert to tools/compat/fgetln.c for inline NUL handling? + +autoconf check for FNM_NORES for detection of recursion attack. +less like to be a problem since it's only parsed from ftpd.conf + +tools/compat/configure.ac BROKEN_FPARSELN + +allow glob override to be optional?
CVS commit: src/libexec/ftpd
Module Name:src Committed By: lukem Date: Sat Jul 4 05:18:37 UTC 2020 Modified Files: src/libexec/ftpd: pfilter.c pfilter.h Log Message: add missing RCSIDs (copyrights could be added too - that's up to christos@) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/libexec/ftpd/pfilter.c cvs rdiff -u -r1.1 -r1.2 src/libexec/ftpd/pfilter.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/pfilter.c diff -u src/libexec/ftpd/pfilter.c:1.3 src/libexec/ftpd/pfilter.c:1.4 --- src/libexec/ftpd/pfilter.c:1.3 Mon Jun 15 01:57:31 2020 +++ src/libexec/ftpd/pfilter.c Sat Jul 4 05:18:37 2020 @@ -1,3 +1,5 @@ +/* $NetBSD: pfilter.c,v 1.4 2020/07/04 05:18:37 lukem Exp $ */ + #include #include #include Index: src/libexec/ftpd/pfilter.h diff -u src/libexec/ftpd/pfilter.h:1.1 src/libexec/ftpd/pfilter.h:1.2 --- src/libexec/ftpd/pfilter.h:1.1 Sun Jan 25 15:53:49 2015 +++ src/libexec/ftpd/pfilter.h Sat Jul 4 05:18:37 2020 @@ -1,2 +1,4 @@ +/* $NetBSD: pfilter.h,v 1.2 2020/07/04 05:18:37 lukem Exp $ */ + void pfilter_open(void); void pfilter_notify(int, const char *);
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 04:55:03 UTC 2020 Modified Files: othersrc/libexec/tnftpd: configure tnftpd_config.h.in Log Message: regen for --with-blocklist To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 othersrc/libexec/tnftpd/configure cvs rdiff -u -r1.5 -r1.6 othersrc/libexec/tnftpd/tnftpd_config.h.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/configure diff -u othersrc/libexec/tnftpd/configure:1.50 othersrc/libexec/tnftpd/configure:1.51 --- othersrc/libexec/tnftpd/configure:1.50 Sun Jun 2 06:54:55 2019 +++ othersrc/libexec/tnftpd/configure Sat Jul 4 04:55:03 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.43 . +# From configure.ac Revision: 1.45 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for tnftpd 20190602. # @@ -778,7 +778,7 @@ with_sysroot enable_libtool_lock enable_ipv6 enable_builtinls -with_blacklist +with_blocklist with_pam with_sia with_skey @@ -1437,7 +1437,7 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-blacklistenable support for NetBSD blacklist daemon + --with-blocklistenable support for NetBSD blocklist daemon [default=auto] --with-pam enable support for Pluggable Authentication Modules (PAM) authentication [default=auto] @@ -11913,11 +11913,11 @@ fi -# Check whether --with-blacklist was given. -if test "${with_blacklist+set}" = set; then : - withval=$with_blacklist; +# Check whether --with-blocklist was given. +if test "${with_blocklist+set}" = set; then : + withval=$with_blocklist; else - with_blacklist=auto + with_blocklist=auto fi @@ -11962,6 +11962,7 @@ fi + # # Checks for programs. # @@ -15341,12 +15342,56 @@ $as_echo "using local version" >&6; } fi fi -# Check for blacklist. +# Check for blocklist, falling back to legacy blacklist name # -if test "$with_blacklist" != no; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: --with-blacklist=$with_blacklist; checking for required blacklist features" >&5 -$as_echo "$as_me: --with-blacklist=$with_blacklist; checking for required blacklist features" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blacklist_open in -lblacklist" >&5 +if test "$with_blocklist" != no; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: --with-blocklist=$with_blocklist; checking for required blocklist features" >&5 +$as_echo "$as_me: --with-blocklist=$with_blocklist; checking for required blocklist features" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blocklist_open in -lblocklist" >&5 +$as_echo_n "checking for blocklist_open in -lblocklist... " >&6; } +if ${ac_cv_lib_blocklist_blocklist_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblocklist $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char blocklist_open (); +int +main () +{ +return blocklist_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_blocklist_blocklist_open=yes +else + ac_cv_lib_blocklist_blocklist_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ +conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blocklist_blocklist_open" >&5 +$as_echo "$ac_cv_lib_blocklist_blocklist_open" >&6; } +if test "x$ac_cv_lib_blocklist_blocklist_open" = xyes; then : + LIBS="-lblocklist $LIBS" + $as_echo "#define USE_BLOCKLIST 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: enabling blocklist support" >&5 +$as_echo "$as_me: enabling blocklist support" >&6;} + with_blocklist=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blacklist_open in -lblacklist" >&5 $as_echo_n "checking for blacklist_open in -lblacklist... " >&6; } if ${ac_cv_lib_blacklist_blacklist_open+:} false; then : $as_echo_n "(cached) " >&6 @@ -15384,21 +15429,23 @@ fi $as_echo "$ac_cv_lib_blacklist_blacklist_open" >&6; } if test "x$ac_cv_lib_blacklist_blacklist_open" = xyes; then : LIBS="-lblacklist $LIBS" - $as_echo "#define USE_BLACKLIST 1" >>confdefs.h + $as_echo "#define USE_BLACKLIST 1" >>confdefs.h - { $as_echo "$a
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 04:40:00 UTC 2020 Modified Files: othersrc/libexec/tnftpd: configure.ac Log Message: configure: rename to --with-blocklist Change --with-blacklist to --with-blocklist and search for libblocklist first, falling back to the legacy libblacklist. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 othersrc/libexec/tnftpd/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/configure.ac diff -u othersrc/libexec/tnftpd/configure.ac:1.44 othersrc/libexec/tnftpd/configure.ac:1.45 --- othersrc/libexec/tnftpd/configure.ac:1.44 Sun Jun 2 06:54:55 2019 +++ othersrc/libexec/tnftpd/configure.ac Sat Jul 4 04:39:59 2020 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.44 2019/06/02 06:54:55 lukem Exp $ +# $NetBSD: configure.ac,v 1.45 2020/07/04 04:39:59 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -9,7 +9,7 @@ AC_COPYRIGHT([ Copyright (c) 2001-2019 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.44 $]) +AC_REVISION([$Revision: 1.45 $]) AS_SHELL_SANITIZE() @@ -44,12 +44,12 @@ AC_ARG_ENABLE([builtinls], [opt_builtinls=$enableval], [opt_builtinls=yes]) -AC_ARG_WITH([blacklist], -[AS_HELP_STRING([--with-blacklist], -[enable support for NetBSD blacklist daemon +AC_ARG_WITH([blocklist], +[AS_HELP_STRING([--with-blocklist], +[enable support for NetBSD blocklist daemon [default=auto]])], [], -[with_blacklist=auto]) +[with_blocklist=auto]) AC_ARG_WITH([pam], [AS_HELP_STRING([--with-pam], @@ -90,6 +90,8 @@ AH_TEMPLATE([HAVE_PRINTF_LONG_LONG], *printf() supports %lld or %qd to print them.]) AH_TEMPLATE([NO_INTERNAL_LS], [Define if not using in-built /bin/ls code.]) +AH_TEMPLATE([USE_BLOCKLIST], +[Define if using blocklist.]) AH_TEMPLATE([USE_BLACKLIST], [Define if using blacklist.]) AH_TEMPLATE([USE_INET6], @@ -385,21 +387,27 @@ AS_IF([test "$ac_cv_have_decl_AI_NUMERIC AC_MSG_RESULT([no - using local version])], [AC_MSG_RESULT([using local version])])]) -# Check for blacklist. +# Check for blocklist, falling back to legacy blacklist name # -AS_IF([test "$with_blacklist" != no], - [AC_MSG_NOTICE([--with-blacklist=$with_blacklist; checking for required blacklist features]) - AC_CHECK_LIB([blacklist], -[blacklist_open], -[LIBS="-lblacklist $LIBS" - AC_DEFINE([USE_BLACKLIST], [1]) - AC_MSG_NOTICE([enabling blacklist support]) - with_blacklist=yes], -[AS_IF([test "$with_blacklist" != auto], - [AC_MSG_FAILURE( -[--with-blacklist was given, but blacklist_open() was not found])]) - AC_MSG_NOTICE([disabling --with-blacklist]) - with_blacklist=no])]) +AS_IF([test "$with_blocklist" != no], + [AC_MSG_NOTICE([--with-blocklist=$with_blocklist; checking for required blocklist features]) + AC_CHECK_LIB([blocklist], +[blocklist_open], +[LIBS="-lblocklist $LIBS" + AC_DEFINE([USE_BLOCKLIST], [1]) + AC_MSG_NOTICE([enabling blocklist support]) + with_blocklist=yes], +[AC_CHECK_LIB([blacklist], + [blacklist_open], + [LIBS="-lblacklist $LIBS" + AC_DEFINE([USE_BLACKLIST], [1]) + AC_MSG_NOTICE([enabling blocklist legacy support]) + with_blocklist=yes], + [AS_IF([test "$with_blocklist" != auto], + [AC_MSG_FAILURE( + [--with-blocklist was given, but blocklist_open() was not found])]) + AC_MSG_NOTICE([disabling --with-blocklist]) + with_blocklist=no])])]) # Check for PAM. # @@ -490,7 +498,7 @@ AC_MSG_NOTICE([Package: $P AC_MSG_NOTICE([Prefix:$prefix]) AC_MSG_NOTICE([IPv6 support: $opt_ipv6]) AC_MSG_NOTICE([Built-in /bin/ls: $opt_builtinls]) -AC_MSG_NOTICE([blacklist support: $with_blacklist]) +AC_MSG_NOTICE([blocklist support: $with_blocklist]) AC_MSG_NOTICE([PAM authentication:$with_pam]) AC_MSG_NOTICE([SIA authentication:$with_sia]) AC_MSG_NOTICE([S/Key authentication: $with_skey])
CVS commit: othersrc/libexec/tnftpd/src
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 04:00:53 UTC 2020 Modified Files: othersrc/libexec/tnftpd/src: extern.h ftpd.c pfilter.c version.h Log Message: Merge NetBSD-20190129 Prepare pfilter.c for future USE_BLOCKLIST check. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 othersrc/libexec/tnftpd/src/extern.h cvs rdiff -u -r1.36 -r1.37 othersrc/libexec/tnftpd/src/ftpd.c cvs rdiff -u -r1.2 -r1.3 othersrc/libexec/tnftpd/src/pfilter.c cvs rdiff -u -r1.9 -r1.10 othersrc/libexec/tnftpd/src/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/src/extern.h diff -u othersrc/libexec/tnftpd/src/extern.h:1.18 othersrc/libexec/tnftpd/src/extern.h:1.19 --- othersrc/libexec/tnftpd/src/extern.h:1.18 Tue Jan 29 12:26:47 2019 +++ othersrc/libexec/tnftpd/src/extern.h Sat Jul 4 04:00:53 2020 @@ -1,5 +1,5 @@ -/* $NetBSD: extern.h,v 1.18 2019/01/29 12:26:47 lukem Exp $ */ -/* from NetBSD: extern.h,v 1.64 2018/06/23 07:21:00 gson Exp */ +/* $NetBSD: extern.h,v 1.19 2020/07/04 04:00:53 lukem Exp $ */ +/* from NetBSD: extern.h,v 1.65 2019/10/15 18:29:32 christos Exp */ /*- * Copyright (c) 1992, 1993 @@ -339,7 +339,7 @@ GLOBAL char proctitle[BUFSIZ]; /* initi GLOBAL struct passwd *pw; GLOBAL int quietmessages; GLOBAL char remotehost[MAXHOSTNAMELEN+1]; -GLOBAL char remoteloghost[2 * MAXHOSTNAMELEN+1]; +GLOBAL char remoteloghost[2 * MAXHOSTNAMELEN + 4]; GLOBAL off_t restart_point; GLOBAL char tmpline[FTP_BUFLEN]; GLOBAL int type; Index: othersrc/libexec/tnftpd/src/ftpd.c diff -u othersrc/libexec/tnftpd/src/ftpd.c:1.36 othersrc/libexec/tnftpd/src/ftpd.c:1.37 --- othersrc/libexec/tnftpd/src/ftpd.c:1.36 Tue Jan 29 13:30:32 2019 +++ othersrc/libexec/tnftpd/src/ftpd.c Sat Jul 4 04:00:53 2020 @@ -1,5 +1,5 @@ -/* $NetBSD: ftpd.c,v 1.36 2019/01/29 13:30:32 lukem Exp $ */ -/* from NetBSD: ftpd.c,v 1.204 2018/04/28 13:38:00 riastradh Exp */ +/* $NetBSD: ftpd.c,v 1.37 2020/07/04 04:00:53 lukem Exp $ */ +/* from NetBSD: ftpd.c,v 1.205 2019/10/15 18:29:32 christos Exp */ /* * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. @@ -108,7 +108,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95"; #else -__RCSID(" NetBSD: ftpd.c,v 1.204 2018/04/28 13:38:00 riastradh Exp "); +__RCSID(" NetBSD: ftpd.c,v 1.205 2019/10/15 18:29:32 christos Exp "); #endif #endif /* not lint */ @@ -3003,7 +3003,7 @@ logremotehost(struct sockinet *who) { #if defined(HAVE_SOCKADDR_SNPRINTF) - char abuf[BUFSIZ]; + char abuf[MAXHOSTNAMELEN]; #endif struct sockaddr *sa = (struct sockaddr *)&who->si_su; Index: othersrc/libexec/tnftpd/src/pfilter.c diff -u othersrc/libexec/tnftpd/src/pfilter.c:1.2 othersrc/libexec/tnftpd/src/pfilter.c:1.3 --- othersrc/libexec/tnftpd/src/pfilter.c:1.2 Tue Jan 29 12:51:38 2019 +++ othersrc/libexec/tnftpd/src/pfilter.c Sat Jul 4 04:00:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pfilter.c,v 1.2 2019/01/29 12:51:38 lukem Exp $ */ +/* $NetBSD: pfilter.c,v 1.3 2020/07/04 04:00:53 lukem Exp $ */ #if defined(HAVE_TNFTPD_H) #include "tnftpd.h" @@ -6,20 +6,27 @@ #include -#if USE_BLACKLIST +#if USE_BLOCKLIST +#include +#elif USE_BLACKLIST #include #endif #include "pfilter.h" -#if USE_BLACKLIST +#if USE_BLOCKLIST +static struct blocklist *blstate; +#elif USE_BLACKLIST static struct blacklist *blstate; #endif void pfilter_open(void) { -#if USE_BLACKLIST +#if USE_BLOCKLIST + if (blstate == NULL) + blstate = blocklist_open(); +#elif USE_BLACKLIST if (blstate == NULL) blstate = blacklist_open(); #endif @@ -28,12 +35,17 @@ pfilter_open(void) void pfilter_notify(int what, const char *msg) { -#if USE_BLACKLIST +#if USE_BLOCKLIST || USE_BLACKLIST pfilter_open(); if (blstate == NULL) return; - blacklist_r(blstate, what, 0, msg); + +#if USE_BLOCKLIST + blocklist_r(blstate, what, STDIN_FILENO, msg); +#elif USE_BLOCKLIST + blacklist_r(blstate, what, STDIN_FILENO, msg); #endif +#endif /* USE_BLOCKLIST || USE_BLACKLIST */ } Index: othersrc/libexec/tnftpd/src/version.h diff -u othersrc/libexec/tnftpd/src/version.h:1.9 othersrc/libexec/tnftpd/src/version.h:1.10 --- othersrc/libexec/tnftpd/src/version.h:1.9 Tue Jan 29 12:14:46 2019 +++ othersrc/libexec/tnftpd/src/version.h Sat Jul 4 04:00:53 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: version.h,v 1.9 2019/01/29 12:14:46 lukem Exp $ */ -/* from NetBSD: version.h,v 1.76 2019/01/29 11:51:05 lukem Exp */ +/* $NetBSD: version.h,v 1.10 2020/07/04 04:00:53 lukem Exp $ */ +/* from NetBSD: version.h,v 1.77 2020/07/04 01:20:42 lukem Exp */ /*- - * Copyright (c) 1999-2019 The NetBSD Foundation, Inc. + * Copyright (c) 1999-2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -30,5 +30,5 @@ */ #ifndef FTPD_VERSION -#define FTPD_VERS
CVS import: othersrc/libexec/tnftpd/src
Module Name:othersrc Committed By: lukem Date: Sat Jul 4 03:42:15 UTC 2020 Update of /cvsroot/othersrc/libexec/tnftpd/src In directory ivanova.netbsd.org:/tmp/cvs-serv17961 Log Message: Import NetBSD ftpd as at 20200615 Notable changes since NetBSD-20190129: - Increase some buffer sizes. - Rename blacklist to blocklist. Status: Vendor Tag: NetBSD Release Tags: NetBSD-20200615 U othersrc/libexec/tnftpd/src/ftpd.conf.5 U othersrc/libexec/tnftpd/src/popen.c U othersrc/libexec/tnftpd/src/ftpcmd.y C othersrc/libexec/tnftpd/src/ftpd.c C othersrc/libexec/tnftpd/src/extern.h U othersrc/libexec/tnftpd/src/ftpusers.5 C othersrc/libexec/tnftpd/src/pfilter.c C othersrc/libexec/tnftpd/src/version.h U othersrc/libexec/tnftpd/src/pathnames.h U othersrc/libexec/tnftpd/src/logutmp.c U othersrc/libexec/tnftpd/src/pfilter.h U othersrc/libexec/tnftpd/src/ftpd.8 C othersrc/libexec/tnftpd/src/Makefile U othersrc/libexec/tnftpd/src/conf.c U othersrc/libexec/tnftpd/src/logwtmp.c U othersrc/libexec/tnftpd/src/cmds.c 5 conflicts created by this import. Use the following command to help the merge: cvs checkout -jNetBSD:yesterday -jNetBSD othersrc/libexec/tnftpd/src
CVS commit: src/usr.bin/make
Module Name:src Committed By: lukem Date: Sat Jul 4 03:08:20 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make: fix sign-compare warning Fix -Wsign-compare warning on amd64, introduced in rev 1.239 To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.246 src/usr.bin/make/var.c:1.247 --- src/usr.bin/make/var.c:1.246 Fri Jul 3 22:40:55 2020 +++ src/usr.bin/make/var.c Sat Jul 4 03:08:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.246 2020/07/03 22:40:55 rillig Exp $ */ +/* $NetBSD: var.c,v 1.247 2020/07/04 03:08:20 lukem Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.246 2020/07/03 22:40:55 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.247 2020/07/04 03:08:20 lukem Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.246 2020/07/03 22:40:55 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.247 2020/07/04 03:08:20 lukem Exp $"); #endif #endif /* not lint */ #endif @@ -1242,7 +1242,7 @@ VarRoot(GNode *ctx MAKE_ATTR_UNUSED, Var void *dummy MAKE_ATTR_UNUSED) { char *dot = strrchr(word, '.'); -size_t len = dot != NULL ? dot - word : strlen(word); +size_t len = dot != NULL ? (size_t)(dot - word) : strlen(word); if (addSpace && vpstate->varSpace) Buf_AddByte(buf, vpstate->varSpace);
CVS commit: src/libexec/ftpd
Module Name:src Committed By: lukem Date: Sat Jul 4 01:20:42 UTC 2020 Modified Files: src/libexec/ftpd: version.h Log Message: NetBSD-ftpd 20200615 Update version to "NetBSD-ftpd 20200615" for changes: - Increase some buffer sizes. - Rename blacklist to blocklist. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/libexec/ftpd/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/version.h diff -u src/libexec/ftpd/version.h:1.76 src/libexec/ftpd/version.h:1.77 --- src/libexec/ftpd/version.h:1.76 Tue Jan 29 11:51:05 2019 +++ src/libexec/ftpd/version.h Sat Jul 4 01:20:42 2020 @@ -1,6 +1,6 @@ -/* $NetBSD: version.h,v 1.76 2019/01/29 11:51:05 lukem Exp $ */ +/* $NetBSD: version.h,v 1.77 2020/07/04 01:20:42 lukem Exp $ */ /*- - * Copyright (c) 1999-2019 The NetBSD Foundation, Inc. + * Copyright (c) 1999-2020 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 20180428" +#define FTPD_VERSION "NetBSD-ftpd 20200615" #endif
CVS commit: src/external/bsd/kyua-cli
Module Name:src Committed By: lukem Date: Thu Jul 2 14:04:01 UTC 2020 Modified Files: src/external/bsd/kyua-cli: Makefile.inc src/external/bsd/kyua-cli/dist/cli: cmd_report.hpp common.hpp main.cpp src/external/bsd/kyua-cli/dist/engine: config.cpp metadata.cpp metadata.hpp testers.cpp src/external/bsd/kyua-cli/dist/utils/cmdline: commands_map.hpp src/external/bsd/kyua-cli/dist/utils/config: lua_module_test.cpp nodes.cpp parser.hpp tree_test.cpp src/external/bsd/kyua-cli/dist/utils/format: formatter.cpp src/external/bsd/kyua-cli/dist/utils/logging: operations.cpp src/external/bsd/kyua-cli/dist/utils/process: child.cpp child.hpp child.ipp child_test.cpp fdstream.hpp systembuf.hpp src/external/bsd/kyua-cli/dist/utils/signals: interrupts.cpp interrupts_test.cpp misc_test.cpp programmer.hpp Log Message: kyua-cli: convert auto_ptr to unique_ptr Update kyua-cli to C++11 and use unique_ptr instead of auto_ptr, (with std::move() where appropriate), to avoid deprecated warning by g++ 8. (I didn't change some of the code that could arguably be refactored to use unique_ptr or shared_ptr instead of raw pointers and therefore remove the special case destructor handling). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/kyua-cli/Makefile.inc cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp \ src/external/bsd/kyua-cli/dist/cli/main.cpp cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/kyua-cli/dist/cli/common.hpp cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/kyua-cli/dist/engine/config.cpp \ src/external/bsd/kyua-cli/dist/engine/metadata.cpp cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/kyua-cli/dist/engine/metadata.hpp \ src/external/bsd/kyua-cli/dist/engine/testers.cpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/cmdline/commands_map.hpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/config/lua_module_test.cpp \ src/external/bsd/kyua-cli/dist/utils/config/nodes.cpp \ src/external/bsd/kyua-cli/dist/utils/config/parser.hpp \ src/external/bsd/kyua-cli/dist/utils/config/tree_test.cpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/format/formatter.cpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/logging/operations.cpp cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/process/child.cpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/process/child.hpp \ src/external/bsd/kyua-cli/dist/utils/process/child.ipp \ src/external/bsd/kyua-cli/dist/utils/process/child_test.cpp \ src/external/bsd/kyua-cli/dist/utils/process/fdstream.hpp \ src/external/bsd/kyua-cli/dist/utils/process/systembuf.hpp cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/signals/interrupts.cpp \ src/external/bsd/kyua-cli/dist/utils/signals/interrupts_test.cpp \ src/external/bsd/kyua-cli/dist/utils/signals/programmer.hpp cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/kyua-cli/dist/utils/signals/misc_test.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/kyua-cli/Makefile.inc diff -u src/external/bsd/kyua-cli/Makefile.inc:1.5 src/external/bsd/kyua-cli/Makefile.inc:1.6 --- src/external/bsd/kyua-cli/Makefile.inc:1.5 Sun Jun 21 14:26:16 2020 +++ src/external/bsd/kyua-cli/Makefile.inc Thu Jul 2 14:04:00 2020 @@ -1,13 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.5 2020/06/21 14:26:16 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.6 2020/07/02 14:04:00 lukem Exp $ .include TOPDIR= ${NETBSDSRCDIR}/external/bsd/kyua-cli SRCDIR= ${TOPDIR}/dist -# Kyua uses auto_ptr; g++ 8 complains about it -CXXFLAGS+= -Wno-deprecated-declarations - # Name of the private libraries (without their lib prefix) to depend on. KYUA_LIBS?= Index: src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp diff -u src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp:1.1.1.1 src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp:1.2 --- src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp:1.1.1.1 Sat Feb 23 12:34:04 2013 +++ src/external/bsd/kyua-cli/dist/cli/cmd_report.hpp Thu Jul 2 14:04:00 2020 @@ -63,7 +63,7 @@ class file_writer : utils::noncopyable { const utils::fs::path _output_path; /// The output file, if not stdout nor stderr. -std::auto_ptr< std::ofstream > _output_file; +std::unique_ptr< std::ofstream > _output_file; /// Constant that represents the path to stdout. static const utils::fs::path _stdout_path; Index: src/external/bsd/kyua-cli/dist/cli/main.cpp diff -u src/external/bsd/kyua-cli/dist/cli/main.cpp:1.1.1.1 src/external/bsd/kyua-cli/dist/cli/main.cpp:1.2 --- src/external/bsd/kyua-cli/dist/cli/main.cpp:1.1.1.1 Sat Feb 23 12:34:04 2
CVS commit: src/external/bsd/lutok/tests/lib/liblutok
Module Name:src Committed By: lukem Date: Thu Jul 2 13:56:10 UTC 2020 Modified Files: src/external/bsd/lutok/tests/lib/liblutok: Makefile Log Message: lutok: auto_ptr replaced; remove build workaround To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/lutok/tests/lib/liblutok/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/lutok/tests/lib/liblutok/Makefile diff -u src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.3 src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.4 --- src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.3 Sun Jun 21 14:12:50 2020 +++ src/external/bsd/lutok/tests/lib/liblutok/Makefile Thu Jul 2 13:56:10 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2020/06/21 14:12:50 lukem Exp $ +# $NetBSD: Makefile,v 1.4 2020/07/02 13:56:10 lukem Exp $ .include @@ -10,9 +10,6 @@ SRCDIR= ${NETBSDSRCDIR}/external/bsd/lu CPPFLAGS+= -DHAVE_CONFIG_H CPPFLAGS+= -I${NETBSDSRCDIR}/lib/liblutok -# lutok uses auto_ptr; g++ 8 complains about it -CXXFLAGS+= -Wno-deprecated-declarations - FILESDIR= ${TESTSDIR} TESTS_CXX=
CVS commit: src/external/bsd/lutok/dist
Module Name:src Committed By: lukem Date: Thu Jul 2 13:54:19 UTC 2020 Modified Files: src/external/bsd/lutok/dist: stack_cleaner.hpp Log Message: lutok: use unique_ptr not auto_ptr To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/lutok/dist/stack_cleaner.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/lutok/dist/stack_cleaner.hpp diff -u src/external/bsd/lutok/dist/stack_cleaner.hpp:1.1.1.1 src/external/bsd/lutok/dist/stack_cleaner.hpp:1.2 --- src/external/bsd/lutok/dist/stack_cleaner.hpp:1.1.1.1 Sat Feb 16 15:06:52 2013 +++ src/external/bsd/lutok/dist/stack_cleaner.hpp Thu Jul 2 13:54:19 2020 @@ -72,7 +72,7 @@ class stack_cleaner { struct impl; /// Pointer to the shared internal implementation. -std::auto_ptr< impl > _pimpl; +std::unique_ptr< impl > _pimpl; /// Disallow copies. stack_cleaner(const stack_cleaner&);
CVS commit: src/sys/arch/ia64/stand/ia64/efi
Module Name:src Committed By: lukem Date: Thu Jul 2 09:07:25 UTC 2020 Modified Files: src/sys/arch/ia64/stand/ia64/efi: Makefile Log Message: loader.efi doesn't have source (Untested fix) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/efi/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/stand/ia64/efi/Makefile diff -u src/sys/arch/ia64/stand/ia64/efi/Makefile:1.6 src/sys/arch/ia64/stand/ia64/efi/Makefile:1.7 --- src/sys/arch/ia64/stand/ia64/efi/Makefile:1.6 Sun Apr 9 22:50:02 2017 +++ src/sys/arch/ia64/stand/ia64/efi/Makefile Thu Jul 2 09:07:24 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2017/04/09 22:50:02 christos Exp $ +# $NetBSD: Makefile,v 1.7 2020/07/02 09:07:24 lukem Exp $ S= ${.CURDIR}/../../../../.. @@ -9,6 +9,8 @@ PROGS= loader.sym loader.efi MAN.loader.sym= # no man MAN.loader.efi= # no man +SRCS.loader.efi= # no SRCS + CPPFLAGS+= -I${IA64_STAND_DIR}/efi/libefi/ CPPFLAGS+= -I${IA64_STAND_DIR}/common/ CPPFLAGS+= -I${S}
CVS commit: src/distrib/common
Module Name:src Committed By: lukem Date: Thu Jul 2 08:48:11 UTC 2020 Modified Files: src/distrib/common: Makefile.minirootkmod Log Message: Makefile.minirootkmod don't have SRCS To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/common/Makefile.minirootkmod Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/Makefile.minirootkmod diff -u src/distrib/common/Makefile.minirootkmod:1.4 src/distrib/common/Makefile.minirootkmod:1.5 --- src/distrib/common/Makefile.minirootkmod:1.4 Sat Apr 4 19:50:53 2020 +++ src/distrib/common/Makefile.minirootkmod Thu Jul 2 08:48:10 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.minirootkmod,v 1.4 2020/04/04 19:50:53 christos Exp $ +# $NetBSD: Makefile.minirootkmod,v 1.5 2020/07/02 08:48:10 lukem Exp $ # # Makefile snippet to build a miniroot kernel module (e.g. miniroot.kmod) # @@ -25,6 +25,9 @@ RAMDISK?= ramdisk MKMAN= no PROG= ${MINIROOT}.kmod +# Not a real PROG; doesn't actually have source +SRCS.${PROG}= + # SRCMOD is a skeleton version of miniroot.kmod, without an embedded ramdisk. # It should already have been created by "make install" in # .../sys/modules/miniroot, and its name includes literal "miniroot",
CVS commit: src/external/gpl3/gcc.old/usr.bin/cc1plus
Module Name:src Committed By: lukem Date: Wed Jul 1 08:25:44 UTC 2020 Modified Files: src/external/gpl3/gcc.old/usr.bin/cc1plus: Makefile Log Message: Fix addition of C++ .cc source to SRCS Fix assumption that all of the source files are .c, as some are .cc. Not tested, based on similar change to external/gpl3/gcc/usr.bin/cc1plus/Makefile To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile diff -u src/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile:1.8 src/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile:1.9 --- src/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile:1.8 Thu Sep 26 08:03:59 2019 +++ src/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile Wed Jul 1 08:25:44 2020 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2019/09/26 08:03:59 mrg Exp $ +# $NetBSD: Makefile,v 1.9 2020/07/01 08:25:44 lukem Exp $ PROG= cc1plus -SRCS= ${G_CXX_OBJS:S,c-family/,,:S,cp/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c +SRCS= ${G_CXX_OBJS:S,c-family/,,:S,cp/,,:S,constraint.o,constraint.cc,:S,logic.o,logic.cc,:Nlibcpp.a:.o=.c} +SRCS+= main.c ${PROG}-checksum.c # XXX NOMAN= 1
CVS commit: src/external/gpl3/gcc.old/usr.bin/lto-wrapper
Module Name:src Committed By: lukem Date: Wed Jul 1 07:54:24 UTC 2020 Modified Files: src/external/gpl3/gcc.old/usr.bin/lto-wrapper: Makefile Log Message: use ggc-none.c not ggc-none.o in SRCS not tested, based on similar change to external/gpl3/gcc/usr.bin/lto-wrapper/Makefile To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc.old/usr.bin/lto-wrapper/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/usr.bin/lto-wrapper/Makefile diff -u src/external/gpl3/gcc.old/usr.bin/lto-wrapper/Makefile:1.6 src/external/gpl3/gcc.old/usr.bin/lto-wrapper/Makefile:1.7 --- src/external/gpl3/gcc.old/usr.bin/lto-wrapper/Makefile:1.6 Thu Sep 26 08:04:17 2019 +++ src/external/gpl3/gcc.old/usr.bin/lto-wrapper/Makefile Wed Jul 1 07:54:24 2020 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.6 2019/09/26 08:04:17 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2020/07/01 07:54:24 lukem Exp $ NOMAN=1 PROG= lto-wrapper # XXX pullout from LTO_WRAPPER_OBJS SRCS= lto-wrapper.c \ collect-utils.c \ - ggc-none.o + ggc-none.c BINDIR= /usr/libexec
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Wed Jul 1 07:38:29 UTC 2020 Modified Files: src/share/mk: bsd.dep.mk Log Message: bsd.dep.mk: fix "make tags" (again) [repeat revision 1.85] Fix "make tags" to actually build a tags file: - Use !commands() instead of !target(), so that the rule actually works - Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET} isn't sufficient). - Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures because of ${targ}: subdir-${targ} in bsd.subdir.mk. Thanks to uwe@ for assistance. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.86 src/share/mk/bsd.dep.mk:1.87 --- src/share/mk/bsd.dep.mk:1.86 Mon Jun 22 01:04:26 2020 +++ src/share/mk/bsd.dep.mk Wed Jul 1 07:38:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.86 2020/06/22 01:04:26 lukem Exp $ +# $NetBSD: bsd.dep.mk,v 1.87 2020/07/01 07:38:29 lukem Exp $ # Basic targets realdepend: beforedepend .depend afterdepend @@ -94,16 +94,16 @@ _MKDEP_FILEFLAGS= # Clean rules .if defined(SRCS) && !empty(SRCS) -CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} ${.CURDIR}/tags ${CLEANDEPEND} +CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} tags ${CLEANDEPEND} .endif # Custom rules -.if !target(tags) +.if !commands(tags) tags: ${SRCS} .if defined(SRCS) && !empty(SRCS) ${_MKTARGET_CREATE} - -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ - ${TOOL_SED} "s;\${.CURDIR}/;;" > tags + -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:M*.[cly]} | \ + ${TOOL_SED} "s;\${.CURDIR}/;;" > ${.OBJDIR}/tags .endif .endif
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: lukem Date: Tue Jun 30 23:51:47 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi Log Message: fix sets for MKKYUA To generate a diff of this commit: cvs rdiff -u -r1.867 -r1.868 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.867 src/distrib/sets/lists/tests/mi:1.868 --- src/distrib/sets/lists/tests/mi:1.867 Tue Jun 30 20:32:10 2020 +++ src/distrib/sets/lists/tests/mi Tue Jun 30 23:51:47 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.867 2020/06/30 20:32:10 riastradh Exp $ +# $NetBSD: mi,v 1.868 2020/06/30 23:51:47 lukem Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2446,6 +2446,7 @@ ./usr/tests/lib/csu/t_ifunc_static tests-lib-tests compattestfile,atf ./usr/tests/lib/libarchive tests-lib-tests compattestfile,atf ./usr/tests/lib/libarchive/Atffile tests-lib-tests compattestfile,atf +./usr/tests/lib/libarchive/Kyuafile tests-lib-tests compattestfile,atf,kyua ./usr/tests/lib/libarchive/h_libarchive tests-lib-tests compattestfile,atf ./usr/tests/lib/libarchive/t_libarchive tests-lib-tests compattestfile,atf ./usr/tests/lib/libarchive/test_acl_pax_nfs4.tar.uu tests-lib-tests compattestfile,atf @@ -2764,6 +2765,7 @@ ./usr/tests/lib/libc/Kyuafile tests-lib-tests compattestfile,atf,kyua ./usr/tests/lib/libc/atomic tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/atomic/Atffile tests-lib-tests compattestfile,atf +./usr/tests/lib/libc/atomic/Kyuafile tests-lib-tests compattestfile,atf,kyua ./usr/tests/lib/libc/atomic/t___sync_add tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/atomic/t___sync_and tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/atomic/t___sync_compare_and_swap tests-lib-tests compattestfile,atf @@ -3552,6 +3554,7 @@ ./usr/tests/lib/libppath/t_ppath tests-lib-tests compattestfile,atf ./usr/tests/lib/libproctests-lib-debug compattestfile,atf ./usr/tests/lib/libproc/Atffile tests-lib-debug compattestfile,atf,dtrace +./usr/tests/lib/libproc/Kyuafile tests-lib-debug compattestfile,atf,dtrace,kyua ./usr/tests/lib/libproc/proc_test tests-lib-debug compattestfile,atf,dtrace ./usr/tests/lib/libproc/target_prog tests-lib-debug compattestfile,atf,dtrace ./usr/tests/lib/libproptests-lib-tests compattestfile,atf @@ -3615,6 +3618,7 @@ ./usr/tests/lib/libpthread_dbg/t_threads tests-obsolete obsolete ./usr/tests/lib/librefuse tests-lib-tests compattestfile,atf ./usr/tests/lib/librefuse/Atffile tests-lib-tests compattestfile,atf +./usr/tests/lib/librefuse/Kyuafile tests-lib-tests compattestfile,atf,kyua ./usr/tests/lib/librefuse/t_refuse_opt tests-lib-tests compattestfile,atf ./usr/tests/lib/librttests-lib-tests compattestfile,atf ./usr/tests/lib/librt/Atffile tests-lib-tests compattestfile,atf @@ -3692,6 +3696,7 @@ ./usr/tests/lib/libtre/t_regex_att tests-lib-tests compattestfile,atf ./usr/tests/lib/libusbhid tests-lib-tests compattestfile,atf ./usr/tests/lib/libusbhid/Atffile tests-lib-tests compattestfile,atf +./usr/tests/lib/libusbhid/Kyuafile tests-lib-tests compattestfile,atf,kyua ./usr/tests/lib/libusbhid/t_usbhid tests-lib-tests compattestfile,atf ./usr/tests/lib/libusbhid/test_usb_hid_usages tests-lib-tests compattestfile,atf ./usr/tests/lib/libutiltests-lib-tests compattestfile,atf @@ -3781,6 +3786,7 @@ ./usr/tests/net/bpfjit/t_mbuf tests-net-tests atf,rump,sljit ./usr/tests/net/cantests-net-tests compattestfile,atf ./usr/tests/net/can/Atffile tests-net-tests atf,rump +./usr/tests/net/can/Kyuafile tests-net-tests atf,rump,kyua ./usr/tests/net/can/t_can tests-net-tests atf,rump ./usr/tests/net/can/t_canfilter tests-net-tests atf,rump ./usr/tests/net/carptests-net-tests compattestfile,atf @@ -4285,6 +4291,7 @@ ./usr/tests/usr.bin/config/t_config tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cpio tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cpio/Atffile tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/cpio/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua ./usr/tests/usr.bin/cpio/h_cpio tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cpio/t_cpio tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cpio/test_extract.cpio.Z.uu tests-usr.bin-tests compattestfile,atf @@ -4583,6 +4590,7 @@ ./usr/tests/usr.bin/make/unit-tests/varshell.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/mixerctl tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/mixerctl/Atffile tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/mixerctl/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua ./usr/tests/usr.bin/mixerctl/t_mixerctl tests-usr.bin-tests compattestfile,at
CVS commit: src/external/bsd/kyua-cli/tests/kyua-cli
Module Name:src Committed By: lukem Date: Mon Jun 29 08:55:00 UTC 2020 Modified Files: src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/cli: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/engine: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/engine/drivers: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/examples: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/integration/helpers: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/store: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/cmdline: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/config: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/format: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/fs: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/logging: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/process: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/signals: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/sqlite: Makefile src/external/bsd/kyua-cli/tests/kyua-cli/utils/text: Makefile Log Message: kyua-cli: fix build of .cpp files Fix assignment of SRCS for C++ sources that use .cpp instead of .cc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/cli/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/engine/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/engine/drivers/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/examples/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/integration/helpers/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/store/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/cmdline/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/config/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/format/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/fs/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/logging/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/process/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/signals/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/sqlite/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/kyua-cli/tests/kyua-cli/utils/text/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap/Makefile diff -u src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap/Makefile:1.1 src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap/Makefile:1.2 --- src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap/Makefile:1.1 Sat Feb 23 14:16:55 2013 +++ src/external/bsd/kyua-cli/tests/kyua-cli/bootstrap/Makefile Mon Jun 29 08:54:58 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2020/06/29 08:54:58 lukem Exp $ .include @@ -12,12 +12,14 @@ FILESDIR= ${TESTSDIR} FILESMODE= ${BINMODE} PROGS_CXX= atf_helpers +SRCS.atf_helpers= atf_helpers.cpp BINDIR.atf_helpers= ${TESTSDIR} MAN.atf_helpers= # none LDADD.atf_helpers= -latf-c++ -latf-c DPADD.atf_helpers= ${LIBATF_CXX} ${LIBATF_C} PROGS_CXX+= plain_helpers +SRCS.plain_helpers= plain_helpers.cpp BINDIR.plain_helpers= ${TESTSDIR} MAN.plain_helpers= # none Index: src/external/bsd/kyua-cli/tests/kyua-cli/cli/Makefile diff -u src/external/bsd/kyua-cli/tests/kyua-cli/cli/Makefile:1.1 src/external/bsd/kyua-cli/tests/kyua-cli/cli/Makefile:1.2 --- src/external/bsd/kyua-cli/tests/kyua-cli/cli/Makefile:1.1 Sat Feb 23 14:16:55 2013 +++ src/external/bsd/kyua-cli/tests/kyua-cli/cli/Makefile Mon Jun 29 08:54:58 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2020/06/29 08:54:58 lukem Exp $ KYUA_LIBS= cli engine store engine utils @@ -8,7 +8,9 @@ TESTSDIR= ${TESTSBASE}/kyua-cli/cli .PATH: ${SRCDIR}/cli -TESTS_CXX= cmd_about_test \ +TESTS_CXX= +.for test in \ + cmd_about_test \ cmd_config_test \ cmd_db_exec_test \ cmd_db_migrate_test \ @@ -21,5 +23,8 @@ TESTS_CXX= cmd_about_test \ common_test \ config_test \ main_test +TESTS_CXX+= ${test} +SRCS.${test}= ${test}.cpp +.endfor
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: lukem Date: Mon Jun 29 08:34:17 UTC 2020 Modified Files: src/external/gpl3/gcc/usr.bin/cc1: Makefile src/external/gpl3/gcc/usr.bin/cc1obj: Makefile src/external/gpl3/gcc/usr.bin/cc1plus: Makefile Log Message: Fix addition of C++ .cc source to SRCS Fix assumption that all of the source files are .c, as some are .cc. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/usr.bin/cc1/Makefile cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/cc1/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.17 src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.18 --- src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.17 Tue Apr 28 05:45:15 2020 +++ src/external/gpl3/gcc/usr.bin/cc1/Makefile Mon Jun 29 08:34:17 2020 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.17 2020/04/28 05:45:15 mrg Exp $ +# $NetBSD: Makefile,v 1.18 2020/06/29 08:34:17 lukem Exp $ PROG= cc1 -SRCS= ${G_C_OBJS:S,c-family/,,:S,c/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c +SRCS= ${G_C_OBJS:S,c-family/,,:S,c/,,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:Nlibcpp.a:.o=.c} +SRCS+= main.c ${PROG}-checksum.c CPPFLAGS+= -DPREFIX=\"/usr\" .include "../Makefile.backend" Index: src/external/gpl3/gcc/usr.bin/cc1obj/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.15 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.16 --- src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.15 Tue Apr 28 07:47:54 2020 +++ src/external/gpl3/gcc/usr.bin/cc1obj/Makefile Mon Jun 29 08:34:17 2020 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.15 2020/04/28 07:47:54 mrg Exp $ +# $NetBSD: Makefile,v 1.16 2020/06/29 08:34:17 lukem Exp $ MYOBJS= ${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} PROG= cc1obj -SRCS= ${MYOBJS:S,objc/,,:S,c-family/,,:S,c/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c +SRCS= ${MYOBJS:S,objc/,,:S,c-family/,,:S,c/,,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:Nlibcpp.a:.o=.c} +SRCS+= main.c ${PROG}-checksum.c CPPFLAGS+= -I${DIST}/gcc/objc CPPFLAGS.prefix.c+= -DPREFIX=\"/usr\" Index: src/external/gpl3/gcc/usr.bin/cc1plus/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.12 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.13 --- src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.12 Tue Apr 28 07:47:54 2020 +++ src/external/gpl3/gcc/usr.bin/cc1plus/Makefile Mon Jun 29 08:34:17 2020 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.12 2020/04/28 07:47:54 mrg Exp $ +# $NetBSD: Makefile,v 1.13 2020/06/29 08:34:17 lukem Exp $ PROG= cc1plus -SRCS= ${G_CXX_OBJS:S,c-family/,,:S,cp/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c +SRCS= ${G_CXX_OBJS:S,c-family/,,:S,cp/,,:S,constraint.o,constraint.cc,:S,logic.o,logic.cc,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:Nlibcpp.a:.o=.c} +SRCS+= main.c ${PROG}-checksum.c # XXX NOMAN= 1
CVS commit: src/external/gpl3/gcc/usr.bin/lto-wrapper
Module Name:src Committed By: lukem Date: Mon Jun 29 08:30:42 UTC 2020 Modified Files: src/external/gpl3/gcc/usr.bin/lto-wrapper: Makefile Log Message: use ggc-none.c not ggc-none.o in SRCS To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile diff -u src/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile:1.4 src/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile:1.5 --- src/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile:1.4 Fri Feb 1 10:34:19 2019 +++ src/external/gpl3/gcc/usr.bin/lto-wrapper/Makefile Mon Jun 29 08:30:42 2020 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.4 2019/02/01 10:34:19 mrg Exp $ +# $NetBSD: Makefile,v 1.5 2020/06/29 08:30:42 lukem Exp $ NOMAN=1 PROG= lto-wrapper # XXX pullout from LTO_WRAPPER_OBJS SRCS= lto-wrapper.c \ collect-utils.c \ - ggc-none.o + ggc-none.c BINDIR= /usr/libexec
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Mon Jun 22 01:04:26 UTC 2020 Modified Files: src/share/mk: bsd.dep.mk Log Message: bsd.dep.mk: revert 1.85 (for now) Revert my recent 1.85 revision that fixed "make tags". It causes too much build breakage elsewhere in the tree that needs to be resolved first. Issues include: - Directories using TESTS_CXX with .cpp and .cxx extension instead of the default .cc extension (see bsd.prog.mk). Most of these have been fixed. - external/gpl3/gcc build of .cc files. (No idea what's wrong there). To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.85 src/share/mk/bsd.dep.mk:1.86 --- src/share/mk/bsd.dep.mk:1.85 Sun Jun 21 03:39:21 2020 +++ src/share/mk/bsd.dep.mk Mon Jun 22 01:04:26 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.85 2020/06/21 03:39:21 lukem Exp $ +# $NetBSD: bsd.dep.mk,v 1.86 2020/06/22 01:04:26 lukem Exp $ # Basic targets realdepend: beforedepend .depend afterdepend @@ -94,16 +94,16 @@ _MKDEP_FILEFLAGS= # Clean rules .if defined(SRCS) && !empty(SRCS) -CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} tags ${CLEANDEPEND} +CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} ${.CURDIR}/tags ${CLEANDEPEND} .endif # Custom rules -.if !commands(tags) +.if !target(tags) tags: ${SRCS} .if defined(SRCS) && !empty(SRCS) ${_MKTARGET_CREATE} - -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:M*.[cly]} | \ - ${TOOL_SED} "s;\${.CURDIR}/;;" > ${.OBJDIR}/tags + -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ + ${TOOL_SED} "s;\${.CURDIR}/;;" > tags .endif .endif
CVS commit: src/external/bsd/kyua-cli
Module Name:src Committed By: lukem Date: Sun Jun 21 14:26:16 UTC 2020 Modified Files: src/external/bsd/kyua-cli: Makefile.inc Log Message: kyua-cli: avoid warning about deprecated auto_ptr To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/kyua-cli/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/kyua-cli/Makefile.inc diff -u src/external/bsd/kyua-cli/Makefile.inc:1.4 src/external/bsd/kyua-cli/Makefile.inc:1.5 --- src/external/bsd/kyua-cli/Makefile.inc:1.4 Sat Jul 5 19:22:41 2014 +++ src/external/bsd/kyua-cli/Makefile.inc Sun Jun 21 14:26:16 2020 @@ -1,10 +1,13 @@ -# $NetBSD: Makefile.inc,v 1.4 2014/07/05 19:22:41 dholland Exp $ +# $NetBSD: Makefile.inc,v 1.5 2020/06/21 14:26:16 lukem Exp $ .include TOPDIR= ${NETBSDSRCDIR}/external/bsd/kyua-cli SRCDIR= ${TOPDIR}/dist +# Kyua uses auto_ptr; g++ 8 complains about it +CXXFLAGS+= -Wno-deprecated-declarations + # Name of the private libraries (without their lib prefix) to depend on. KYUA_LIBS?=
CVS commit: src/external/bsd/lutok/tests/lib/liblutok
Module Name:src Committed By: lukem Date: Sun Jun 21 14:12:50 UTC 2020 Modified Files: src/external/bsd/lutok/tests/lib/liblutok: Makefile Log Message: lutok; fix build of c++ tests To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/lutok/tests/lib/liblutok/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/lutok/tests/lib/liblutok/Makefile diff -u src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.2 src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.3 --- src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.2 Fri Oct 18 23:36:10 2013 +++ src/external/bsd/lutok/tests/lib/liblutok/Makefile Sun Jun 21 14:12:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/10/18 23:36:10 jmmv Exp $ +# $NetBSD: Makefile,v 1.3 2020/06/21 14:12:50 lukem Exp $ .include @@ -10,14 +10,22 @@ SRCDIR= ${NETBSDSRCDIR}/external/bsd/lu CPPFLAGS+= -DHAVE_CONFIG_H CPPFLAGS+= -I${NETBSDSRCDIR}/lib/liblutok +# lutok uses auto_ptr; g++ 8 complains about it +CXXFLAGS+= -Wno-deprecated-declarations + FILESDIR= ${TESTSDIR} -TESTS_CXX= c_gate_test \ +TESTS_CXX= +.for test in \ + c_gate_test \ debug_test \ exceptions_test \ operations_test \ stack_cleaner_test \ state_test +TESTS_CXX+= ${test} +SRCS.${test}= ${test}.cpp +.endfor LDADD+= -llutok -llua DPADD+= ${LIBLUTOK} ${LIBLUA}
CVS commit: src/external/bsd/lutok/dist
Module Name:src Committed By: lukem Date: Sun Jun 21 14:11:54 UTC 2020 Modified Files: src/external/bsd/lutok/dist: state.cpp Log Message: lutok; fix strncpy -Wstringop-truncation warning To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/lutok/dist/state.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/lutok/dist/state.cpp diff -u src/external/bsd/lutok/dist/state.cpp:1.1.1.2 src/external/bsd/lutok/dist/state.cpp:1.2 --- src/external/bsd/lutok/dist/state.cpp:1.1.1.2 Fri Oct 18 23:35:24 2013 +++ src/external/bsd/lutok/dist/state.cpp Sun Jun 21 14:11:54 2020 @@ -145,7 +145,7 @@ call_cxx_function_from_c(lutok::cxx_func lutok::state state = lutok::state_c_gate::connect(raw_state); return function(state); } catch (const std::exception& e) { -std::strncpy(error_buf, e.what(), sizeof(error_buf)); +std::strncpy(error_buf, e.what(), sizeof(error_buf)-1); } catch (...) { std::strncpy(error_buf, "Unhandled exception in Lua C++ hook", sizeof(error_buf));
CVS commit: src/external/bsd/atf/tests/atf
Module Name:src Committed By: lukem Date: Sun Jun 21 13:59:56 UTC 2020 Modified Files: src/external/bsd/atf/tests/atf/test-programs: Makefile src/external/bsd/atf/tests/atf/tools: Makefile Log Message: fix build of atf .cpp files To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/atf/tests/atf/test-programs/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/tests/atf/tools/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/tests/atf/test-programs/Makefile diff -u src/external/bsd/atf/tests/atf/test-programs/Makefile:1.6 src/external/bsd/atf/tests/atf/test-programs/Makefile:1.7 --- src/external/bsd/atf/tests/atf/test-programs/Makefile:1.6 Sat Feb 15 04:15:20 2014 +++ src/external/bsd/atf/tests/atf/test-programs/Makefile Sun Jun 21 13:59:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2014/02/15 04:15:20 jmmv Exp $ +# $NetBSD: Makefile,v 1.7 2020/06/21 13:59:56 lukem Exp $ .include @@ -11,6 +11,7 @@ KYUAFILE= yes TESTS_C= c_helpers TESTS_CXX= cpp_helpers +SRCS.cpp_helpers=cpp_helpers.cpp TESTS_SH= sh_helpers .for t in config_test expect_test meta_data_test result_test srcdir_test Index: src/external/bsd/atf/tests/atf/tools/Makefile diff -u src/external/bsd/atf/tests/atf/tools/Makefile:1.7 src/external/bsd/atf/tests/atf/tools/Makefile:1.8 --- src/external/bsd/atf/tests/atf/tools/Makefile:1.7 Sat Feb 15 22:32:26 2014 +++ src/external/bsd/atf/tests/atf/tools/Makefile Sun Jun 21 13:59:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2014/02/15 22:32:26 jmmv Exp $ +# $NetBSD: Makefile,v 1.8 2020/06/21 13:59:56 lukem Exp $ USE_ATF_LIBTOOLS= yes @@ -23,7 +23,9 @@ TESTS_C= expect_helpers \ several_tcs_helper \ zero_tcs_helper -TESTS_CXX= application_test \ +TESTS_CXX= +.for test in \ + application_test \ atffile_test \ auto_array_test \ config_file_test \ @@ -44,6 +46,9 @@ TESTS_CXX= application_test \ text_test \ ui_test \ user_test +TESTS_CXX+= ${test} +SRCS.${test}= ${test}.cpp +.endfor TESTS_SH= atf-config_test \ atf-report_test \
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jun 21 13:29:05 UTC 2020 Modified Files: src/share/mk: bsd.README Log Message: document PROGS and PROGS_CXX, and default c++ SRCS To generate a diff of this commit: cvs rdiff -u -r1.407 -r1.408 src/share/mk/bsd.README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.407 src/share/mk/bsd.README:1.408 --- src/share/mk/bsd.README:1.407 Mon Jun 15 01:57:31 2020 +++ src/share/mk/bsd.README Sun Jun 21 13:29:05 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.407 2020/06/15 01:57:31 christos Exp $ +# $NetBSD: bsd.README,v 1.408 2020/06/21 13:29:05 lukem Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -1645,8 +1645,16 @@ PROG_CXX If defined, the name of the pro PROGNAME The name that the above program will be installed as, if different from ${PROG}. +PROGS Multiple programs to build from a single directory. + Defaults to PROG. For each program ${_P} in ${PROGS}, + uses SRCS.${_P}, defaulting to ${_P}.c. + +PROGS_CXX Multiple C++ programs to build from a single directory. + Defaults to PROG_CXX. For each program ${_P} in ${PROGS_CXX}, + uses SRCS.${_P}, defaulting to ${_P}.cc. + SRCS List of source files to build the program. If SRCS is not - defined, it's assumed to be ${PROG}.c. + defined, it's assumed to be ${PROG}.c or ${PROG_CXX}.cc. DPSRCS List of source files which are needed for generating dependencies, but are not needed in ${SRCS}.
CVS commit: src/tests/lib/libpthread
Module Name:src Committed By: lukem Date: Sun Jun 21 07:06:05 UTC 2020 Modified Files: src/tests/lib/libpthread: Makefile Log Message: fix build of h_thread_local_dtor.cpp To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libpthread/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libpthread/Makefile diff -u src/tests/lib/libpthread/Makefile:1.14 src/tests/lib/libpthread/Makefile:1.15 --- src/tests/lib/libpthread/Makefile:1.14 Wed Apr 24 11:43:19 2019 +++ src/tests/lib/libpthread/Makefile Sun Jun 21 07:06:05 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2019/04/24 11:43:19 kamil Exp $ +# $NetBSD: Makefile,v 1.15 2020/06/21 07:06:05 lukem Exp $ NOMAN= # defined @@ -55,6 +55,7 @@ TESTS_C+= t_call_once t_cnd t_mtx t_thrd COPTS.h_thread_local_dtor.cpp+= -std=c++11 # Deal with questionable warning and header quality in libstdc++. COPTS.h_thread_local_dtor.cpp+= ${${ACTIVE_CC} == "gcc" :? -Wno-ctor-dtor-privacy -Wno-sign-compare -Wno-shadow :} +SRCS.h_thread_local_dtor= h_thread_local_dtor.cpp FILESDIR= ${TESTSDIR} FILES= d_mach
CVS commit: src/tests/lib/libm
Module Name:src Committed By: lukem Date: Sun Jun 21 06:58:16 UTC 2020 Modified Files: src/tests/lib/libm: Makefile Log Message: fix build of t_cabsl from t_cabsl.cxx t_cabsl source is in t_cabsl.cxx not t_cabsl.cc - the latter is what bsd.tests.mk defaults to. This only broke after my commit of share/mk/bsd.dep.mk rev 1.85 but I don't know why it didn't cause a problem previously. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/tests/lib/libm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/Makefile diff -u src/tests/lib/libm/Makefile:1.46 src/tests/lib/libm/Makefile:1.47 --- src/tests/lib/libm/Makefile:1.46 Fri Apr 26 08:52:16 2019 +++ src/tests/lib/libm/Makefile Sun Jun 21 06:58:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2019/04/26 08:52:16 maya Exp $ +# $NetBSD: Makefile,v 1.47 2020/06/21 06:58:16 lukem Exp $ .include @@ -46,6 +46,8 @@ TESTS_C+= t_tan TESTS_C+= t_tanh TESTS_CXX+= t_cabsl +SRCS.t_cabsl= t_cabsl.cxx + LDADD+= -lm #COPTS+= -Wfloat-equal
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jun 21 03:39:21 UTC 2020 Modified Files: src/share/mk: bsd.dep.mk Log Message: bsd.dep.mk: fix "make tags" Fix "make tags" to actually build a tags file: - Use !commands() instead of !target(), so that the rule actually works - Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET} isn't sufficient). - Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures because of ${targ}: subdir-${targ} in bsd.subdir.mk. Thanks to uwe@ for assistance. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.84 src/share/mk/bsd.dep.mk:1.85 --- src/share/mk/bsd.dep.mk:1.84 Mon Jan 21 21:11:54 2019 +++ src/share/mk/bsd.dep.mk Sun Jun 21 03:39:21 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.84 2019/01/21 21:11:54 christos Exp $ +# $NetBSD: bsd.dep.mk,v 1.85 2020/06/21 03:39:21 lukem Exp $ # Basic targets realdepend: beforedepend .depend afterdepend @@ -94,16 +94,16 @@ _MKDEP_FILEFLAGS= # Clean rules .if defined(SRCS) && !empty(SRCS) -CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} ${.CURDIR}/tags ${CLEANDEPEND} +CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} tags ${CLEANDEPEND} .endif # Custom rules -.if !target(tags) +.if !commands(tags) tags: ${SRCS} .if defined(SRCS) && !empty(SRCS) ${_MKTARGET_CREATE} - -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ - ${TOOL_SED} "s;\${.CURDIR}/;;" > tags + -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:M*.[cly]} | \ + ${TOOL_SED} "s;\${.CURDIR}/;;" > ${.OBJDIR}/tags .endif .endif
CVS commit: src
Module Name:src Committed By: lukem Date: Sat Jun 13 11:42:47 UTC 2020 Modified Files: src: build.sh Log Message: nbmake bootstrap: silent configure if MAKEVERBOSE==0 Be consistent with the silencing of configure in tools/ and suppress the output in build.sh configure of nbmake To generate a diff of this commit: cvs rdiff -u -r1.339 -r1.340 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.339 src/build.sh:1.340 --- src/build.sh:1.339 Sun May 24 04:55:53 2020 +++ src/build.sh Sat Jun 13 11:42:47 2020 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.339 2020/05/24 04:55:53 rin Exp $ +# $NetBSD: build.sh,v 1.340 2020/06/13 11:42:47 lukem Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -1662,12 +1662,17 @@ rebuildmake() if ! ${do_rebuildmake}; then return fi + + # Silent configure with MAKEVERBOSE==0 + if [ ${MAKEVERBOSE:-2} -eq 0 ]; then + configure_args=--silent + fi statusmsg "Bootstrapping ${toolprefix}make" ${runcmd} cd "${tmpdir}" ${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \ CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \ - ${HOST_SH} "${TOP}/tools/make/configure" || + ${HOST_SH} "${TOP}/tools/make/configure" ${configure_args} || ( cp ${tmpdir}/config.log ${tmpdir}-config.log bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" ) ${runcmd} ${HOST_SH} buildmake.sh || @@ -1937,7 +1942,7 @@ createmakewrapper() eval cat <
CVS commit: src/tools/make
Module Name:src Committed By: lukem Date: Sat Jun 13 11:39:43 UTC 2020 Modified Files: src/tools/make: buildmake.sh.in Log Message: nbmake bootstrap: be quieter if MAKEVERBOSE==0 More accurately simulate and don't even print the "compile" lines with MAKEVERBOSE=0 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tools/make/buildmake.sh.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/make/buildmake.sh.in diff -u src/tools/make/buildmake.sh.in:1.14 src/tools/make/buildmake.sh.in:1.15 --- src/tools/make/buildmake.sh.in:1.14 Sat Jun 13 11:32:52 2020 +++ src/tools/make/buildmake.sh.in Sat Jun 13 11:39:43 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: buildmake.sh.in,v 1.14 2020/06/13 11:32:52 lukem Exp $ +# $NetBSD: buildmake.sh.in,v 1.15 2020/06/13 11:39:43 lukem Exp $ # # buildmake.sh.in - Autoconf-processed shell script for building make(1). # @@ -17,11 +17,14 @@ _CFLAGS="${_CFLAGS} @CFLAGS@" _LDFLAGS="@LDFLAGS@ @LIBS@" docmd () { - if [ ${MAKEVERBOSE:-2} -lt 2 ]; then - echo "$1 ${2##*/}" - else - echo "$3" - fi + case "${MAKEVERBOSE:-2}" in + 0) + ;; + 1) + echo "$1 ${2##*/}" ;; + *) + echo "$3" ;; + esac $3 || exit 1 }
CVS commit: src/tools/make
Module Name:src Committed By: lukem Date: Sat Jun 13 11:32:52 UTC 2020 Modified Files: src/tools/make: buildmake.sh.in Log Message: nbmake bootstrap: consistency fix in MAKEVERBOSE<2 support To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tools/make/buildmake.sh.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/make/buildmake.sh.in diff -u src/tools/make/buildmake.sh.in:1.13 src/tools/make/buildmake.sh.in:1.14 --- src/tools/make/buildmake.sh.in:1.13 Sat Jun 13 11:28:24 2020 +++ src/tools/make/buildmake.sh.in Sat Jun 13 11:32:52 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: buildmake.sh.in,v 1.13 2020/06/13 11:28:24 lukem Exp $ +# $NetBSD: buildmake.sh.in,v 1.14 2020/06/13 11:32:52 lukem Exp $ # # buildmake.sh.in - Autoconf-processed shell script for building make(1). # @@ -18,7 +18,7 @@ _LDFLAGS="@LDFLAGS@ @LIBS@" docmd () { if [ ${MAKEVERBOSE:-2} -lt 2 ]; then - echo " $1 ${2##*/}" + echo "$1 ${2##*/}" else echo "$3" fi
CVS commit: src/tools/make
Module Name:src Committed By: lukem Date: Sat Jun 13 11:28:24 UTC 2020 Modified Files: src/tools/make: buildmake.sh.in Log Message: nbmake bootstrap: if MAKEVERBOSE < 2, output similar to To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tools/make/buildmake.sh.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/make/buildmake.sh.in diff -u src/tools/make/buildmake.sh.in:1.12 src/tools/make/buildmake.sh.in:1.13 --- src/tools/make/buildmake.sh.in:1.12 Tue Jan 16 08:53:51 2018 +++ src/tools/make/buildmake.sh.in Sat Jun 13 11:28:24 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: buildmake.sh.in,v 1.12 2018/01/16 08:53:51 uwe Exp $ +# $NetBSD: buildmake.sh.in,v 1.13 2020/06/13 11:28:24 lukem Exp $ # # buildmake.sh.in - Autoconf-processed shell script for building make(1). # @@ -17,12 +17,17 @@ _CFLAGS="${_CFLAGS} @CFLAGS@" _LDFLAGS="@LDFLAGS@ @LIBS@" docmd () { - echo "$1" - $1 || exit 1 + if [ ${MAKEVERBOSE:-2} -lt 2 ]; then + echo " $1 ${2##*/}" + else + echo "$3" + fi + $3 || exit 1 } for f in $MKSRCDIR/*.c $MKSRCDIR/lst.lib/*.c; do - docmd "${_CC} ${_CFLAGS} -c $f" + docmd "compile " "$f" "${_CC} ${_CFLAGS} -c $f" done -docmd "${_CC} -o ${_TOOL_PREFIX:-nb}make *.o ${_LDFLAGS}" +docmd " link " "${_TOOL_PREFIX:-nb}make" \ + "${_CC} -o ${_TOOL_PREFIX:-nb}make *.o ${_LDFLAGS}"
CVS commit: src/tools
Module Name:src Committed By: lukem Date: Sat Jun 13 10:49:17 UTC 2020 Modified Files: src/tools: Makefile.gnuhost src/tools/compat: Makefile src/tools/host-mkdep: Makefile src/tools/xz-include: Makefile Log Message: tools: configure --silent if MAKEVERBOSE == 0 To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/tools/Makefile.gnuhost cvs rdiff -u -r1.87 -r1.88 src/tools/compat/Makefile cvs rdiff -u -r1.15 -r1.16 src/tools/host-mkdep/Makefile cvs rdiff -u -r1.2 -r1.3 src/tools/xz-include/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile.gnuhost diff -u src/tools/Makefile.gnuhost:1.52 src/tools/Makefile.gnuhost:1.53 --- src/tools/Makefile.gnuhost:1.52 Sat Jun 13 08:12:16 2020 +++ src/tools/Makefile.gnuhost Sat Jun 13 10:49:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.52 2020/06/13 08:12:16 lukem Exp $ +# $NetBSD: Makefile.gnuhost,v 1.53 2020/06/13 10:49:17 lukem Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # @@ -77,6 +77,11 @@ CONFIGURE_ARGS+=--prefix=${TOOLDIR} CONFIGURE_ARGS+=--disable-shared .endif +.if ${MAKEVERBOSE} == 0 +CONFIGURE_ARGS+=--silent +.endif + + .if ${MAKE_PROGRAM} == ${MAKE} .ifndef _NOWRAPPER # Some systems have a small ARG_MAX. On such systems, prevent Make Index: src/tools/compat/Makefile diff -u src/tools/compat/Makefile:1.87 src/tools/compat/Makefile:1.88 --- src/tools/compat/Makefile:1.87 Wed May 8 02:25:50 2019 +++ src/tools/compat/Makefile Sat Jun 13 10:49:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.87 2019/05/08 02:25:50 thorpej Exp $ +# $NetBSD: Makefile,v 1.88 2020/06/13 10:49:17 lukem Exp $ HOSTLIB= nbcompat @@ -76,10 +76,15 @@ _CURDIR:= ${.CURDIR} SRCS:= ${SRCS:M*.c} +CONFIGURE_ARGS= --cache-file=config.cache +.if ${MAKEVERBOSE} == 0 +CONFIGURE_ARGS+=--silent +.endif + config.cache: include/.stamp configure nbtool_config.h.in defs.mk.in rm -f ${.TARGET} CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \ - ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache + ${HOST_SH} ${.CURDIR}/configure ${CONFIGURE_ARGS} defs.mk: config.cache @touch ${.TARGET} Index: src/tools/host-mkdep/Makefile diff -u src/tools/host-mkdep/Makefile:1.15 src/tools/host-mkdep/Makefile:1.16 --- src/tools/host-mkdep/Makefile:1.15 Sun Jan 27 05:16:10 2019 +++ src/tools/host-mkdep/Makefile Sat Jun 13 10:49:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2019/01/27 05:16:10 dholland Exp $ +# $NetBSD: Makefile,v 1.16 2020/06/13 10:49:17 lukem Exp $ .include @@ -19,11 +19,15 @@ CLEANFILES+= config.cache config.log con # CONFIGURE_ENV= CC=${HOST_CC:Q} +CONFIGURE_ARGS= --cache-file=config.cache +.if ${MAKEVERBOSE} == 0 +CONFIGURE_ARGS+=--silent +.endif + realall: host-mkdep host-mkdep: configure host-mkdep.in -rm -f $@ - ${CONFIGURE_ENV} \ - ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache + ${CONFIGURE_ENV} ${HOST_SH} ${.CURDIR}/configure ${CONFIGURE_ARGS} chmod +x $@ # Use uninstalled copy of the install program Index: src/tools/xz-include/Makefile diff -u src/tools/xz-include/Makefile:1.2 src/tools/xz-include/Makefile:1.3 --- src/tools/xz-include/Makefile:1.2 Tue Sep 25 11:41:35 2018 +++ src/tools/xz-include/Makefile Sat Jun 13 10:49:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2018/09/25 11:41:35 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2020/06/13 10:49:17 lukem Exp $ .include @@ -9,6 +9,9 @@ .include "Makefile.inc" CONFIGURE_ARGS+= --enable-threads=no --disable-nls +.if ${MAKEVERBOSE} == 0 +CONFIGURE_ARGS+= --silent +.endif config.status: ${XZSRCDIR}/configure ${HOST_SH} ${XZSRCDIR}/configure ${CONFIGURE_ARGS} \
CVS commit: src/tools
Module Name:src Committed By: lukem Date: Sat Jun 13 08:12:16 UTC 2020 Modified Files: src/tools: Makefile.gnuhost Log Message: tools: if MAKEVERBOSE < 2, quieten automake builds To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/tools/Makefile.gnuhost Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile.gnuhost diff -u src/tools/Makefile.gnuhost:1.51 src/tools/Makefile.gnuhost:1.52 --- src/tools/Makefile.gnuhost:1.51 Mon Oct 22 13:19:42 2018 +++ src/tools/Makefile.gnuhost Sat Jun 13 08:12:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.51 2018/10/22 13:19:42 maya Exp $ +# $NetBSD: Makefile.gnuhost,v 1.52 2020/06/13 08:12:16 lukem Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # @@ -102,6 +102,10 @@ BUILD_COMMAND= /usr/bin/env -i ${BUILD_E MAKE_ARGS+= BISON=true DESTDIR= INSTALL=${HOST_INSTALL_FILE:Q} +.if ${MAKEVERBOSE} < 2 +MAKE_ARGS+= V=0 +.endif + ALL_TARGET?= all INSTALL_TARGET?=install
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Mon Jun 8 01:33:27 UTC 2020 Modified Files: src/usr.bin/ftp: ftp.c util.c version.h Log Message: ftp: exit if lostpeer invoked by a signal lostpeer() calls too many async-unsafe functions (both directly and indirectly) to close and cleanup the remote connections, so just exit after the cleanup if invoked by a signal. Reported in private mail by Qi Hou. May also resolve a crash reported by Thomas Klausner. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/usr.bin/ftp/ftp.c cvs rdiff -u -r1.160 -r1.161 src/usr.bin/ftp/util.c cvs rdiff -u -r1.88 -r1.89 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/ftp.c diff -u src/usr.bin/ftp/ftp.c:1.168 src/usr.bin/ftp/ftp.c:1.169 --- src/usr.bin/ftp/ftp.c:1.168 Mon Feb 4 04:09:13 2019 +++ src/usr.bin/ftp/ftp.c Mon Jun 8 01:33:27 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: ftp.c,v 1.168 2019/02/04 04:09:13 mrg Exp $ */ +/* $NetBSD: ftp.c,v 1.169 2020/06/08 01:33:27 lukem Exp $ */ /*- - * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -92,7 +92,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -__RCSID("$NetBSD: ftp.c,v 1.168 2019/02/04 04:09:13 mrg Exp $"); +__RCSID("$NetBSD: ftp.c,v 1.169 2020/06/08 01:33:27 lukem Exp $"); #endif #endif /* not lint */ @@ -2047,7 +2047,7 @@ gunique(const char *local) * needs to get back to a known state. */ static void -abort_squared(int dummy) +abort_squared(int signo) { char msgbuf[100]; size_t len; @@ -2057,7 +2057,7 @@ abort_squared(int dummy) len = strlcpy(msgbuf, "\nremote abort aborted; closing connection.\n", sizeof(msgbuf)); write(fileno(ttyout), msgbuf, len); - lostpeer(0); + lostpeer(signo); siglongjmp(xferabort, 1); } Index: src/usr.bin/ftp/util.c diff -u src/usr.bin/ftp/util.c:1.160 src/usr.bin/ftp/util.c:1.161 --- src/usr.bin/ftp/util.c:1.160 Sat Jun 22 23:40:53 2019 +++ src/usr.bin/ftp/util.c Mon Jun 8 01:33:27 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: util.c,v 1.160 2019/06/22 23:40:53 christos Exp $ */ +/* $NetBSD: util.c,v 1.161 2020/06/08 01:33:27 lukem Exp $ */ /*- - * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. + * Copyright (c) 1997-2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -64,7 +64,7 @@ #include #ifndef lint -__RCSID("$NetBSD: util.c,v 1.160 2019/06/22 23:40:53 christos Exp $"); +__RCSID("$NetBSD: util.c,v 1.161 2020/06/08 01:33:27 lukem Exp $"); #endif /* not lint */ /* @@ -324,9 +324,10 @@ intr(int signo) /* * Signal handler for lost connections; cleanup various elements of * the connection state, and call cleanuppeer() to finish it off. + * This function is not signal safe, so exit if called by a signal. */ void -lostpeer(int dummy) +lostpeer(int signo) { int oerrno = errno; @@ -356,6 +357,9 @@ lostpeer(int dummy) proxflag = 0; pswitch(0); cleanuppeer(); + if (signo) { + errx(1, "lostpeer due to signal %d", signo); + } errno = oerrno; } Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.88 src/usr.bin/ftp/version.h:1.89 --- src/usr.bin/ftp/version.h:1.88 Wed Feb 26 05:55:27 2020 +++ src/usr.bin/ftp/version.h Mon Jun 8 01:33:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.88 2020/02/26 05:55:27 lukem Exp $ */ +/* $NetBSD: version.h,v 1.89 2020/06/08 01:33:27 lukem Exp $ */ /*- * Copyright (c) 1999-2020 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION "20190622" +#define FTP_VERSION "20200608" #endif
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Wed Feb 26 05:55:27 UTC 2020 Modified Files: src/usr.bin/ftp: version.h Log Message: update ftp version to 20190622 To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.87 src/usr.bin/ftp/version.h:1.88 --- src/usr.bin/ftp/version.h:1.87 Sat Sep 12 20:18:52 2015 +++ src/usr.bin/ftp/version.h Wed Feb 26 05:55:27 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: version.h,v 1.87 2015/09/12 20:18:52 wiz Exp $ */ +/* $NetBSD: version.h,v 1.88 2020/02/26 05:55:27 lukem Exp $ */ /*- - * Copyright (c) 1999-2015 The NetBSD Foundation, Inc. + * Copyright (c) 1999-2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION "20150912" +#define FTP_VERSION "20190622" #endif
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Sun Feb 3 06:25:58 UTC 2019 Modified Files: othersrc/libexec/tnftpd: ChangeLog Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 othersrc/libexec/tnftpd/ChangeLog Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/ChangeLog diff -u othersrc/libexec/tnftpd/ChangeLog:1.61 othersrc/libexec/tnftpd/ChangeLog:1.62 --- othersrc/libexec/tnftpd/ChangeLog:1.61 Tue Jan 29 23:14:48 2019 +++ othersrc/libexec/tnftpd/ChangeLog Sun Feb 3 06:25:58 2019 @@ -1,4 +1,4 @@ -$NetBSD: ChangeLog,v 1.61 2019/01/29 23:14:48 lukem Exp $ +$NetBSD: ChangeLog,v 1.62 2019/02/03 06:25:58 lukem Exp $ Tue Jan 29 23:12:52 UTC 2019 lukem @@ -40,7 +40,7 @@ Tue Jan 29 23:12:52 UTC 2019 lukem * Add -f option to ftpd to stay in foreground with -D. PR/53221. * Update version to "NetBSD-ftpd 20180428". - * Remove endorsment clause from some of my licenses. + * Remove endorsement clause from some of my licenses. Mon Mar 25 03:51:20 UTC 2013 lukem
CVS commit: src/libexec/ftpd
Module Name:src Committed By: lukem Date: Tue Jan 29 23:19:31 UTC 2019 Modified Files: src/libexec/ftpd: pfilter.c Log Message: clarify the fd used for blacklisting. Use STDIN_FILENO instead of 0 as the fd to blacklist_r(), since we use the former in ftpd.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/libexec/ftpd/pfilter.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ftpd/pfilter.c diff -u src/libexec/ftpd/pfilter.c:1.1 src/libexec/ftpd/pfilter.c:1.2 --- src/libexec/ftpd/pfilter.c:1.1 Sun Jan 25 15:53:49 2015 +++ src/libexec/ftpd/pfilter.c Tue Jan 29 23:19:30 2019 @@ -1,4 +1,5 @@ #include +#include #include #include "pfilter.h" @@ -20,5 +21,5 @@ pfilter_notify(int what, const char *msg if (blstate == NULL) return; - blacklist_r(blstate, what, 0, msg); + blacklist_r(blstate, what, STDIN_FILENO, msg); }
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Tue Jan 29 23:14:48 UTC 2019 Modified Files: othersrc/libexec/tnftpd: ChangeLog Log Message: changes so far this year To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 othersrc/libexec/tnftpd/ChangeLog Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/ChangeLog diff -u othersrc/libexec/tnftpd/ChangeLog:1.60 othersrc/libexec/tnftpd/ChangeLog:1.61 --- othersrc/libexec/tnftpd/ChangeLog:1.60 Mon Mar 25 04:29:01 2013 +++ othersrc/libexec/tnftpd/ChangeLog Tue Jan 29 23:14:48 2019 @@ -1,4 +1,46 @@ -$NetBSD: ChangeLog,v 1.60 2013/03/25 04:29:01 lukem Exp $ +$NetBSD: ChangeLog,v 1.61 2019/01/29 23:14:48 lukem Exp $ + + +Tue Jan 29 23:12:52 UTC 2019 lukem + + * Limit fnmatch(), fts(), strsuftollx() recursion to avoid + DoS attacks. From Maksymilian Arciemowicz. + + * Improve glob(): + * Switch from a recursive pattern matching algorithm to handle + '*' to a backtracking one. Avoids DoS attacks with patterns + "a*a*a*a*a*...b" matching against "...". + See https://research.swtch.com/glob + * Bump the glob limits to 512KB for total string size and 64KB + path entries. The old limits were too small for some + important FTP use cases like a pkgsrc repository. + + * Add --with-blacklist to enable support for NetBSD blacklist daemon. + + * Save struct passwd.pw_class if it exists. Inspired by FreeBSD. + + * Sync libnetbsd replacements with NetBSD: + * ANSI C, coding, style, copyright improvements. + * Fix fparseln() parsing issues. + * Fix fts() error handling issues. + * Improve strmode() to support S_IFDOOR. + * Fix strsuftollx() error message and base 10 handling. + * Provide explicit_memset() replacement. + + * Update to NetBSD-ftpd as at 20190129: + * Fix violations of the sequence point rule. + * Add volatile for gcc 5. + * Check that stat and fstat succeed. + * Support blacklistd(8) hooks. + * Clear utmpx struct before writing it to wtmpx files. + * Fix directory stream leaks. + * Use explicit_memset(3) instead of memset(3) to clear password. + * Fix scope of variable. PR/50665. + * Ensure that closing socket exists. CID 603440. + * Add -f option to ftpd to stay in foreground with -D. PR/53221. + * Update version to "NetBSD-ftpd 20180428". + + * Remove endorsment clause from some of my licenses. Mon Mar 25 03:51:20 UTC 2013 lukem
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Tue Jan 29 22:39:11 UTC 2019 Modified Files: othersrc/libexec/tnftpd: configure.ac Log Message: configure: AM_PROG_AR is needed by newer automake To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 othersrc/libexec/tnftpd/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/configure.ac diff -u othersrc/libexec/tnftpd/configure.ac:1.42 othersrc/libexec/tnftpd/configure.ac:1.43 --- othersrc/libexec/tnftpd/configure.ac:1.42 Tue Jan 29 13:30:32 2019 +++ othersrc/libexec/tnftpd/configure.ac Tue Jan 29 22:39:11 2019 @@ -1,4 +1,4 @@ -# $NetBSD: configure.ac,v 1.42 2019/01/29 13:30:32 lukem Exp $ +# $NetBSD: configure.ac,v 1.43 2019/01/29 22:39:11 lukem Exp $ # # Process this file with autoconf to produce a configure script. @@ -9,7 +9,7 @@ AC_COPYRIGHT([ Copyright (c) 2001-2019 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.42 $]) +AC_REVISION([$Revision: 1.43 $]) AS_SHELL_SANITIZE() @@ -21,6 +21,7 @@ AC_CONFIG_LIBOBJ_DIR([libnetbsd]) AM_INIT_AUTOMAKE([-Wall -Werror foreign nostdinc silent-rules]) AM_MAINTAINER_MODE() +AM_PROG_AR() LT_PREREQ([2.4]) LT_INIT()