CVS commit: src/share/man/man9

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:03:47 UTC 2024

Modified Files:
src/share/man/man9: imax.9

Log Message:
imax(9): Belatedly catch up with min/max --> uimin/uimax renaming

done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130

Thanks asahi at iij for pointing this out :)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/imax.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:03:47 UTC 2024

Modified Files:
src/share/man/man9: imax.9

Log Message:
imax(9): Belatedly catch up with min/max --> uimin/uimax renaming

done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130

Thanks asahi at iij for pointing this out :)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/imax.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/imax.9
diff -u src/share/man/man9/imax.9:1.6 src/share/man/man9/imax.9:1.7
--- src/share/man/man9/imax.9:1.6	Tue Jun  8 08:55:46 2010
+++ src/share/man/man9/imax.9	Wed Jul 10 07:03:47 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: imax.9,v 1.6 2010/06/08 08:55:46 jruoho Exp $
+.\" $NetBSD: imax.9,v 1.7 2024/07/10 07:03:47 rin Exp $
 .\"
 .\" Copyright (c) 2006 Igor Sobrado
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 8, 2010
+.Dd July 10, 2024
 .Dt IMAX 9
 .Os
 .Sh NAME
@@ -47,9 +47,9 @@
 .Ft long
 .Fn lmin "long a" "long b"
 .Ft u_int
-.Fn max "u_int a" "u_int b"
+.Fn uimax "u_int a" "u_int b"
 .Ft u_int
-.Fn min "u_int a" "u_int b"
+.Fn uimin "u_int a" "u_int b"
 .Ft u_long
 .Fn ulmax "u_long a" "u_long b"
 .Ft u_long



CVS commit: src/share/man/man9

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:08:37 UTC 2024

Modified Files:
src/share/man/man9: imax.9

Log Message:
imax.9: Additional fixes for previous...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/imax.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/imax.9
diff -u src/share/man/man9/imax.9:1.7 src/share/man/man9/imax.9:1.8
--- src/share/man/man9/imax.9:1.7	Wed Jul 10 07:03:47 2024
+++ src/share/man/man9/imax.9	Wed Jul 10 07:08:37 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: imax.9,v 1.7 2024/07/10 07:03:47 rin Exp $
+.\" $NetBSD: imax.9,v 1.8 2024/07/10 07:08:37 rin Exp $
 .\"
 .\" Copyright (c) 2006 Igor Sobrado
 .\" All rights reserved.
@@ -32,8 +32,8 @@
 .Nm imin ,
 .Nm lmax ,
 .Nm lmin ,
-.Nm max ,
-.Nm min ,
+.Nm uimax ,
+.Nm uimin ,
 .Nm ulmax ,
 .Nm ulmin
 .Nd compare integers
@@ -58,7 +58,7 @@
 The
 .Fn imin ,
 .Fn lmin ,
-.Fn min ,
+.Fn uimin ,
 and
 .Fn ulmin
 functions return whichever argument is algebraically smaller, differing only
@@ -68,7 +68,7 @@ natural size, long, unsigned and unsigne
 The
 .Fn imax ,
 .Fn lmax ,
-.Fn max ,
+.Fn uimax ,
 and
 .Fn ulmax
 functions are identical except that they return the algebraically larger



CVS commit: src/share/man/man9

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:08:37 UTC 2024

Modified Files:
src/share/man/man9: imax.9

Log Message:
imax.9: Additional fixes for previous...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/imax.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:20:01 UTC 2024

Modified Files:
src/share/man/man9: Makefile

Log Message:
man9: Provide all combinations of {,u}{i,l}{max,min}(9)


To generate a diff of this commit:
cvs rdiff -u -r1.470 -r1.471 src/share/man/man9/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:20:01 UTC 2024

Modified Files:
src/share/man/man9: Makefile

Log Message:
man9: Provide all combinations of {,u}{i,l}{max,min}(9)


To generate a diff of this commit:
cvs rdiff -u -r1.470 -r1.471 src/share/man/man9/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.470 src/share/man/man9/Makefile:1.471
--- src/share/man/man9/Makefile:1.470	Fri Jun 14 13:19:35 2024
+++ src/share/man/man9/Makefile	Wed Jul 10 07:20:01 2024
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.470 2024/06/14 13:19:35 riastradh Exp $
+#   $NetBSD: Makefile,v 1.471 2024/07/10 07:20:01 rin Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -413,7 +413,13 @@ MLINKS+=iic.9 iic_acquire_bus.9 \
 	iic.9 iic_smbus_write_byte.9 \
 	iic.9 iic_smbus_read_byte.9 \
 	iic.9 iic_smbus_receive_byte.9
-MLINKS+=imax.9 imin.9
+MLINKS+=imax.9 imin.9 \
+	imax.9 lmax.9 \
+	imax.9 lmin.9 \
+	imax.9 uimax.9 \
+	imax.9 uimin.9 \
+	imax.9 ulmax.9 \
+	imax.9 ulmin.9
 MLINKS+=in4_cksum.9 in_cksum.9 \
 	in4_cksum.9 in6_cksum.9
 MLINKS+=ioasic.9 ioasic_intr_establish.9 \



CVS commit: src/distrib/sets/lists/comp

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:20:53 UTC 2024

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
sets/lists: Add all combinations of {,u}{i,l}{max,min}(9)

XXX XXX
This should definitely be auto-generated!!


To generate a diff of this commit:
cvs rdiff -u -r1.2462 -r1.2463 src/distrib/sets/lists/comp/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/comp

2024-07-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jul 10 07:20:53 UTC 2024

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
sets/lists: Add all combinations of {,u}{i,l}{max,min}(9)

XXX XXX
This should definitely be auto-generated!!


To generate a diff of this commit:
cvs rdiff -u -r1.2462 -r1.2463 src/distrib/sets/lists/comp/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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2462 src/distrib/sets/lists/comp/mi:1.2463
--- src/distrib/sets/lists/comp/mi:1.2462	Mon Jul  8 22:14:30 2024
+++ src/distrib/sets/lists/comp/mi	Wed Jul 10 07:20:52 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2462 2024/07/08 22:14:30 christos Exp $
+#	$NetBSD: mi,v 1.2463 2024/07/10 07:20:52 rin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -12293,6 +12293,8 @@
 ./usr/share/man/cat9/le64enc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/le64toh.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/linedisc.0			comp-sys-catman		.cat
+./usr/share/man/cat9/lmax.0			comp-sys-catman		.cat
+./usr/share/man/cat9/lmin.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/localcount.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/lock.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/locking.0			comp-sys-catman		.cat
@@ -12987,7 +12989,11 @@
 ./usr/share/man/cat9/ufetch_long.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/ufetch_ptr.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/ufetch_short.0		comp-sys-catman		.cat
+./usr/share/man/cat9/uimax.0			comp-sys-catman		.cat
+./usr/share/man/cat9/uimin.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/uiomove.0			comp-sys-catman		.cat
+./usr/share/man/cat9/ulmax.0			comp-sys-catman		.cat
+./usr/share/man/cat9/ulmin.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/ungetnewvnode.0		comp-obsolete		obsolete
 ./usr/share/man/cat9/untimeout.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/uprintf.0			comp-sys-catman		.cat
@@ -20706,6 +20712,8 @@
 ./usr/share/man/html9/le64enc.html		comp-sys-htmlman	html
 ./usr/share/man/html9/le64toh.html		comp-sys-htmlman	html
 ./usr/share/man/html9/linedisc.html		comp-sys-htmlman	html
+./usr/share/man/html9/lmax.html			comp-sys-htmlman	html
+./usr/share/man/html9/lmin.html			comp-sys-htmlman	html
 ./usr/share/man/html9/localcount.html		comp-sys-htmlman	html
 ./usr/share/man/html9/lock.html			comp-sys-htmlman	html
 ./usr/share/man/html9/locking.html		comp-sys-htmlman	html
@@ -21373,7 +21381,11 @@
 ./usr/share/man/html9/ufetch_long.html		comp-sys-htmlman	html
 ./usr/share/man/html9/ufetch_ptr.html		comp-sys-htmlman	html
 ./usr/share/man/html9/ufetch_short.html		comp-sys-htmlman	html
+./usr/share/man/html9/uimax.html		comp-sys-htmlman	html
+./usr/share/man/html9/uimin.html		comp-sys-htmlman	html
 ./usr/share/man/html9/uiomove.html		comp-sys-htmlman	html
+./usr/share/man/html9/ulmax.html		comp-sys-htmlman	html
+./usr/share/man/html9/ulmin.html		comp-sys-htmlman	html
 ./usr/share/man/html9/ungetnewvnode.html	comp-obsolete		obsolete
 ./usr/share/man/html9/untimeout.html		comp-sys-htmlman	html
 ./usr/share/man/html9/uprintf.html		comp-sys-htmlman	html
@@ -29270,6 +29282,8 @@
 ./usr/share/man/man9/le64enc.9			comp-sys-man		.man
 ./usr/share/man/man9/le64toh.9			comp-sys-man		.man
 ./usr/share/man/man9/linedisc.9			comp-sys-man		.man
+./usr/share/man/man9/lmax.9			comp-sys-man		.man
+./usr/share/man/man9/lmin.9			comp-sys-man		.man
 ./usr/share/man/man9/localcount.9		comp-sys-man		.man
 ./usr/share/man/man9/lock.9			comp-sys-man		.man
 ./usr/share/man/man9/locking.9			comp-sys-man		.man
@@ -29964,7 +29978,11 @@
 ./usr/share/man/man9/ufetch_long.9		comp-sys-man		.man
 ./usr/share/man/man9/ufetch_ptr.9		comp-sys-man		.man
 ./usr/share/man/man9/ufetch_short.9		comp-sys-man		.man
+./usr/share/man/man9/uimax.9			comp-sys-man		.man
+./usr/share/man/man9/uimin.9			comp-sys-man		.man
 ./usr/share/man/man9/uiomove.9			comp-sys-man		.man
+./usr/share/man/man9/ulmax.9			comp-sys-man		.man
+./usr/share/man/man9/ulmin.9			comp-sys-man		.man
 ./usr/share/man/man9/ungetnewvnode.9		comp-obsolete		obsolete
 ./usr/share/man/man9/untimeout.9		comp-sys-man		.man
 ./usr/share/man/man9/uprintf.9			comp-sys-man		.man



CVS commit: src/etc/rc.d

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 07:27:10 UTC 2024

Modified Files:
src/etc/rc.d: named

Log Message:
account for filter-.so rename and move


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/etc/rc.d/named

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/named
diff -u src/etc/rc.d/named:1.28 src/etc/rc.d/named:1.29
--- src/etc/rc.d/named:1.28	Mon Dec 25 03:35:07 2023
+++ src/etc/rc.d/named	Wed Jul 10 03:27:10 2024
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: named,v 1.28 2023/12/25 08:35:07 kre Exp $
+# $NetBSD: named,v 1.29 2024/07/10 07:27:10 christos Exp $
 #
 
 # PROVIDE: named
@@ -97,12 +97,12 @@ named_precmd()
 	#
 	case "$($command -v)" in
 	BIND*)	# 9 no group, named-xfer, or ndc
-		named_plugindir="/usr/libexec/named"
+		named_plugindir="/usr/lib/named"
 		if ! [ -d "${named_chrootdir}${named_plugindir}" ]; then
 		mkdir -p -m 755 "${named_chrootdir}${named_plugindir}"
 		chown root:wheel "${named_chrootdir}${named_plugindir}"
 		fi
-		for p in filter-.so; do
+		for p in filter-.so.0; do
 			copy_if_newer "${named_chrootdir}" \
 			"${named_plugindir}" "$p"
 		done



CVS commit: src/etc/rc.d

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 07:27:10 UTC 2024

Modified Files:
src/etc/rc.d: named

Log Message:
account for filter-.so rename and move


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/etc/rc.d/named

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Christos Zoulas
In article ,
Roland Illig   wrote:
>Am 10.07.2024 um 03:12 schrieb Christos Zoulas:
>
>src/tests/lib/libc/c063/t_fchmodat.c
>> -ATF_REQUIRE(st.st_mode = 0600);
>> +ATF_REQUIRE(st.st_mode == 0600);
>
>Should we do something to detect bugs like these mechanically?
>
>ATF_REQUIRE(cond) currently expands to "if (!(cond))", and I guess due
>to the parentheses around "cond", GCC does not warn about the assignment
>in the condition.
>
>One idea is to rewrite ATF_REQUIRE to be "if (cond) {} else", which
>would make GCC complain directly.
>
>Another idea is to make lint warn about the pattern "!(a = b)", even
>though its output is not looked upon by many people.

Yes, I was thinking along the same lines. If the gcc construct does not
produce warnings, I would go with that.

christos



CVS commit: src/share/mk

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 07:46:16 UTC 2024

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch amd64 to binutils-2.42


To generate a diff of this commit:
cvs rdiff -u -r1.1386 -r1.1387 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 07:46:16 UTC 2024

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
switch amd64 to binutils-2.42


To generate a diff of this commit:
cvs rdiff -u -r1.1386 -r1.1387 src/share/mk/bsd.own.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.own.mk
diff -u src/share/mk/bsd.own.mk:1.1386 src/share/mk/bsd.own.mk:1.1387
--- src/share/mk/bsd.own.mk:1.1386	Tue Jul  9 04:20:34 2024
+++ src/share/mk/bsd.own.mk	Wed Jul 10 03:46:16 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1386 2024/07/09 08:20:34 rin Exp $
+#	$NetBSD: bsd.own.mk,v 1.1387 2024/07/10 07:46:16 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -117,7 +117,12 @@ MKGCCCMDS?=	no
 #
 # What binutils is used?
 #
+.if \
+${MACHINE_ARCH} == "x86_64"
+HAVE_BINUTILS?= 242
+.else
 HAVE_BINUTILS?=	239
+.endif
 
 .if ${HAVE_BINUTILS} == 242
 EXTERNAL_BINUTILS_SUBDIR=	binutils



CVS commit: src/crypto/external/bsd/openssh/dist

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 14:42:01 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist: servconf.c

Log Message:
PR/58412: Martin Husemann: sync with the portable version, adds default
PAMServiceName handling.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/crypto/external/bsd/openssh/dist/servconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/openssh/dist

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 14:42:01 UTC 2024

Modified Files:
src/crypto/external/bsd/openssh/dist: servconf.c

Log Message:
PR/58412: Martin Husemann: sync with the portable version, adds default
PAMServiceName handling.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/crypto/external/bsd/openssh/dist/servconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/dist/servconf.c
diff -u src/crypto/external/bsd/openssh/dist/servconf.c:1.46 src/crypto/external/bsd/openssh/dist/servconf.c:1.47
--- src/crypto/external/bsd/openssh/dist/servconf.c:1.46	Mon Jul  8 18:33:44 2024
+++ src/crypto/external/bsd/openssh/dist/servconf.c	Wed Jul 10 10:42:01 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: servconf.c,v 1.46 2024/07/08 22:33:44 christos Exp $	*/
+/*	$NetBSD: servconf.c,v 1.47 2024/07/10 14:42:01 christos Exp $	*/
 /* $OpenBSD: servconf.c,v 1.411 2024/06/12 22:36:00 djm Exp $ */
 
 /*
@@ -13,7 +13,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: servconf.c,v 1.46 2024/07/08 22:33:44 christos Exp $");
+__RCSID("$NetBSD: servconf.c,v 1.47 2024/07/10 14:42:01 christos Exp $");
 #include 
 #include 
 #include 
@@ -68,6 +68,9 @@ __RCSID("$NetBSD: servconf.c,v 1.46 2024
 #include "auth.h"
 #include "fmt_scaled.h"
 
+#if !defined(SSHD_PAM_SERVICE)
+# define SSHD_PAM_SERVICE		"sshd"
+#endif
 #ifdef WITH_LDAP_PUBKEY
 #include "ldapauth.h"
 #endif
@@ -93,6 +96,7 @@ initialize_server_options(ServerOptions 
 
 	/* Portable-specific options */
 	options->use_pam = -1;
+	options->pam_service_name = NULL;
 
 	/* Standard Options */
 	options->num_ports = 0;
@@ -329,12 +333,14 @@ fill_default_server_options(ServerOption
 	/* Portable-specific options */
 	if (options->use_pam == -1)
 		options->use_pam = 0;
+	if (options->pam_service_name == NULL)
+		options->pam_service_name = xstrdup(SSHD_PAM_SERVICE);
 
 	/* Standard Options */
 	u_int i;
 
 	if (options->num_host_key_files == 0) {
-		/* fill default hostkeys */
+		/* fill default hostkeys for protocols */
 		servconf_add_hostkey("[default]", 0, options,
 		_PATH_HOST_RSA_KEY_FILE, 0);
 		servconf_add_hostkey("[default]", 0, options,
@@ -643,7 +649,9 @@ fill_default_server_options(ServerOption
 /* Keyword tokens. */
 typedef enum {
 	sBadOption,		/* == unknown option */
+	/* Portable-specific options */
 	sUsePAM, sPAMServiceName,
+	/* Standard Options */
 	sPort, sHostKeyFile, sLoginGraceTime,
 	sPermitRootLogin, sLogFacility, sLogLevel, sLogVerbose,
 	sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup,
@@ -702,6 +710,7 @@ static struct {
 	ServerOpCodes opcode;
 	u_int flags;
 } keywords[] = {
+	/* Portable-specific options */
 #ifdef USE_PAM
 	{ "usepam", sUsePAM, SSHCFG_GLOBAL },
 	{ "pamservicename", sPAMServiceName, SSHCFG_ALL },
@@ -709,6 +718,7 @@ static struct {
 	{ "usepam", sUnsupported, SSHCFG_GLOBAL },
 	{ "pamservicename", sUnsupported, SSHCFG_ALL },
 #endif
+	/* Standard Options */
 	{ "port", sPort, SSHCFG_GLOBAL },
 	{ "hostkey", sHostKeyFile, SSHCFG_GLOBAL },
 	{ "hostdsakey", sHostKeyFile, SSHCFG_GLOBAL },		/* alias */
@@ -1457,6 +1467,16 @@ process_server_config_line_depth(ServerO
 	case sUsePAM:
 		intptr = &options->use_pam;
 		goto parse_flag;
+	case sPAMServiceName:
+		charptr = &options->pam_service_name;
+		arg = argv_next(&ac, &av);
+		if (!arg || *arg == '\0') {
+			fatal("%s line %d: missing argument.",
+			filename, linenum);
+		}
+		if (*activep && *charptr == NULL)
+			*charptr = xstrdup(arg);
+		break;
 
 	/* Standard Options */
 	case sBadOption:
@@ -2735,6 +2755,10 @@ process_server_config_line_depth(ServerO
 		goto parse_flag;
 
 	case sRDomain:
+#if !defined(__OpenBSD__) && !defined(HAVE_SYS_SET_PROCESS_RDOMAIN)
+		fatal("%s line %d: setting RDomain not supported on this "
+		"platform.", filename, linenum);
+#endif
 		charptr = &options->routing_domain;
 		arg = argv_next(&ac, &av);
 		if (!arg || *arg == '\0')
@@ -3486,7 +3510,9 @@ dump_config(ServerOptions *o)
 	dump_cfg_string(sHostbasedAcceptedAlgorithms, o->hostbased_accepted_algos);
 	dump_cfg_string(sHostKeyAlgorithms, o->hostkeyalgorithms);
 	dump_cfg_string(sPubkeyAcceptedAlgorithms, o->pubkey_accepted_algos);
+#if defined(__OpenBSD__) || defined(HAVE_SYS_SET_PROCESS_RDOMAIN)
 	dump_cfg_string(sRDomain, o->routing_domain);
+#endif
 	dump_cfg_string(sSshdSessionPath, o->sshd_session_path);
 	dump_cfg_string(sPerSourcePenaltyExemptList, o->per_source_penalty_exempt);
 



CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 19:23:56 UTC 2024

Modified Files:
src/tests/lib/libc/c063: t_fchmodat.c t_utimensat.c

Log Message:
tests/libc: replace some more '=' with the intended '=='


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/c063/t_fchmodat.c
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/c063/t_utimensat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 19:23:56 UTC 2024

Modified Files:
src/tests/lib/libc/c063: t_fchmodat.c t_utimensat.c

Log Message:
tests/libc: replace some more '=' with the intended '=='


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/c063/t_fchmodat.c
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/c063/t_utimensat.c

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/libc/c063/t_fchmodat.c
diff -u src/tests/lib/libc/c063/t_fchmodat.c:1.4 src/tests/lib/libc/c063/t_fchmodat.c:1.5
--- src/tests/lib/libc/c063/t_fchmodat.c:1.4	Wed Jul 10 01:12:18 2024
+++ src/tests/lib/libc/c063/t_fchmodat.c	Wed Jul 10 19:23:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fchmodat.c,v 1.4 2024/07/10 01:12:18 christos Exp $ */
+/*	$NetBSD: t_fchmodat.c,v 1.5 2024/07/10 19:23:56 rillig Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchmodat.c,v 1.4 2024/07/10 01:12:18 christos Exp $");
+__RCSID("$NetBSD: t_fchmodat.c,v 1.5 2024/07/10 19:23:56 rillig Exp $");
 
 #include 
 #include 
@@ -173,7 +173,7 @@ ATF_TC_BODY(fchmodat_fdlink, tc)
 	ATF_REQUIRE((dfdlink = open(DIR, O_RDONLY, 0)) != -1);
 
 	ATF_REQUIRE(fchmodat(dfdlink, BASELINK, 0600, 0) == -1);
-	ATF_REQUIRE(errno = ENOENT);
+	ATF_REQUIRE(errno == ENOENT);
 
 	ATF_REQUIRE(fchmodat(dfdlink, BASELINK, 0600, AT_SYMLINK_NOFOLLOW) == 0);
 

Index: src/tests/lib/libc/c063/t_utimensat.c
diff -u src/tests/lib/libc/c063/t_utimensat.c:1.6 src/tests/lib/libc/c063/t_utimensat.c:1.7
--- src/tests/lib/libc/c063/t_utimensat.c:1.6	Tue Jan 10 15:13:56 2017
+++ src/tests/lib/libc/c063/t_utimensat.c	Wed Jul 10 19:23:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $ */
+/*	$NetBSD: t_utimensat.c,v 1.7 2024/07/10 19:23:56 rillig Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $");
+__RCSID("$NetBSD: t_utimensat.c,v 1.7 2024/07/10 19:23:56 rillig Exp $");
 
 #include 
 #include 
@@ -185,7 +185,7 @@ ATF_TC_BODY(utimensat_fdlink, tc)
 	ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
 
 	ATF_REQUIRE(utimensat(dfd, BASELINK, tptr, 0) == -1);
-	ATF_REQUIRE(errno = ENOENT);
+	ATF_REQUIRE(errno == ENOENT);
 
 	ATF_REQUIRE(utimensat(dfd, BASELINK, tptr, AT_SYMLINK_NOFOLLOW) == 0);
 



CVS commit: src/external/bsd/atf/dist/atf-c

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 19:37:41 UTC 2024

Modified Files:
src/external/bsd/atf/dist/atf-c: macros.h

Log Message:
atf-c: detect accidental '=' in assertion condition

Seen several times in tests/libc/c063.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/bsd/atf/dist/atf-c/macros.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/atf/dist/atf-c

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 19:37:41 UTC 2024

Modified Files:
src/external/bsd/atf/dist/atf-c: macros.h

Log Message:
atf-c: detect accidental '=' in assertion condition

Seen several times in tests/libc/c063.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/bsd/atf/dist/atf-c/macros.h

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/dist/atf-c/macros.h
diff -u src/external/bsd/atf/dist/atf-c/macros.h:1.1.1.8 src/external/bsd/atf/dist/atf-c/macros.h:1.2
--- src/external/bsd/atf/dist/atf-c/macros.h:1.1.1.8	Fri Feb 15 17:04:15 2013
+++ src/external/bsd/atf/dist/atf-c/macros.h	Wed Jul 10 19:37:41 2024
@@ -133,25 +133,25 @@
 
 #define ATF_REQUIRE_MSG(x, fmt, ...) \
 do { \
-if (!(x)) \
+if (x) {} else \
 atf_tc_fail_requirement(__FILE__, __LINE__, fmt, ##__VA_ARGS__); \
 } while(0)
 
 #define ATF_CHECK_MSG(x, fmt, ...) \
 do { \
-if (!(x)) \
+if (x) {} else \
 atf_tc_fail_check(__FILE__, __LINE__, fmt, ##__VA_ARGS__); \
 } while(0)
 
 #define ATF_REQUIRE(x) \
 do { \
-if (!(x)) \
+if (x) {} else \
 atf_tc_fail_requirement(__FILE__, __LINE__, "%s", #x " not met"); \
 } while(0)
 
 #define ATF_CHECK(x) \
 do { \
-if (!(x)) \
+if (x) {} else \
 atf_tc_fail_check(__FILE__, __LINE__, "%s", #x " not met"); \
 } while(0)
 



CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 20:19:51 UTC 2024

Modified Files:
src/tests/lib/libc/c063: t_fchmodat.c

Log Message:
correct test conditions.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/c063/t_fchmodat.c

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/libc/c063/t_fchmodat.c
diff -u src/tests/lib/libc/c063/t_fchmodat.c:1.5 src/tests/lib/libc/c063/t_fchmodat.c:1.6
--- src/tests/lib/libc/c063/t_fchmodat.c:1.5	Wed Jul 10 15:23:56 2024
+++ src/tests/lib/libc/c063/t_fchmodat.c	Wed Jul 10 16:19:51 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fchmodat.c,v 1.5 2024/07/10 19:23:56 rillig Exp $ */
+/*	$NetBSD: t_fchmodat.c,v 1.6 2024/07/10 20:19:51 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchmodat.c,v 1.5 2024/07/10 19:23:56 rillig Exp $");
+__RCSID("$NetBSD: t_fchmodat.c,v 1.6 2024/07/10 20:19:51 christos Exp $");
 
 #include 
 #include 
@@ -49,6 +49,11 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.5 202
 #define BASELINK "symlink"
 #define FILEERR "dir/fchmodaterr"
 
+#define modecheck(a, b) \
+	ATF_REQUIRE_MSG(((a) & ALLPERMS) == (b), \
+	"Incorrect mode found %#o != expected%#o", \
+	((a) & ALLPERMS), (b));
+
 ATF_TC(fchmodat_fd);
 ATF_TC_HEAD(fchmodat_fd, tc)
 {
@@ -69,7 +74,7 @@ ATF_TC_BODY(fchmodat_fd, tc)
 	ATF_REQUIRE(close(dfd) == 0);
 
 	ATF_REQUIRE(stat(FILE, &st) == 0);
-	ATF_REQUIRE(st.st_mode == 0600);
+	modecheck(st.st_mode, 0600);
 }
 
 ATF_TC(fchmodat_fdcwd);
@@ -91,7 +96,7 @@ ATF_TC_BODY(fchmodat_fdcwd, tc)
 	ATF_REQUIRE(fchmodat(AT_FDCWD, BASEFILE, 0600, 0) == 0);
 
 	ATF_REQUIRE(stat(BASEFILE, &st) == 0);
-	ATF_REQUIRE(st.st_mode == 0600);
+	modecheck(st.st_mode, 0600);
 }
 
 ATF_TC(fchmodat_fdcwderr);
@@ -180,7 +185,7 @@ ATF_TC_BODY(fchmodat_fdlink, tc)
 	ATF_REQUIRE(close(dfdlink) == 0);
 
 	ATF_REQUIRE(lstat(LINK, &st) == 0);
-	ATF_REQUIRE(st.st_mode == 0600);
+	modecheck(st.st_mode, 0600);
 }
 
 ATF_TP_ADD_TCS(tp)



CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 10 20:19:51 UTC 2024

Modified Files:
src/tests/lib/libc/c063: t_fchmodat.c

Log Message:
correct test conditions.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/c063/t_fchmodat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/tests

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:29:32 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
distrib/lists: format list of test files


To generate a diff of this commit:
cvs rdiff -u -r1.1326 -r1.1327 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.



CVS commit: src/distrib/sets/lists/tests

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:29:32 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
distrib/lists: format list of test files


To generate a diff of this commit:
cvs rdiff -u -r1.1326 -r1.1327 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.1326 src/distrib/sets/lists/tests/mi:1.1327
--- src/distrib/sets/lists/tests/mi:1.1326	Sun Jul  7 17:37:33 2024
+++ src/distrib/sets/lists/tests/mi	Wed Jul 10 20:29:32 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1326 2024/07/07 17:37:33 riastradh Exp $
+# $NetBSD: mi,v 1.1327 2024/07/10 20:29:32 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2576,327 +2576,327 @@
 ./usr/tests/lib/csu/t_crt0tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/csu/t_ifunc_static			tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libarchivetests-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
-./usr/tests/lib/libarchive/test_acl_pax_posix1e.tar.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_archive_string_conversion.txt.Z.uu			tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_bzip2_1.tbz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_bzip2_2.tbz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_cpio_1.cpio.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_gtar_1.tar.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_gtar_2.tar.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_gzip_1.tgz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_gzip_2.tgz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_1.tar.lz4.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_2.tar.lz4.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_3.tar.lz4.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B4.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B4BD.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B4BDBX.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B5.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B5BD.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B6.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B6BD.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B7.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lz4_B7BD.tar.lz4.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzip_1.tlz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzip_2.tlz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzip_3.lz.uu			tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzip_4.tlz.uu			tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzma_1.tlz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzma_2.tlz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzma_3.tlz.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzop_1.tar.lzo.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzop_2.tar.lzo.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_lzop_3.tar.lzo.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_mac-1.tar.Z.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_mac-2.tar.Z.uu	tests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_pax_libarchive_2x.tar.Z.uu			tests-obsolete		obsolete
-./usr/tests/lib/libarchive/test_compat_perl_archive_tar.tar.uutests-lib-tests		compattestfile,atf
-./usr/tests/lib/libarchive/test_compat_plexus_archiver_tar.tar.uu			tests-

CVS commit: src

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:33:38 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: t_usage.sh
src/usr.bin/xlint/lint1: err.c tree.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_382.c

Log Message:
lint: add warning for '!(var = constant)'

This catches expressions like 'ATF_CHECK(errno = ENOENT)', which was
intended to use '==' instead of '='.


To generate a diff of this commit:
cvs rdiff -u -r1.1327 -r1.1328 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_382.c
cvs rdiff -u -r1.22 -r1.23 src/tests/usr.bin/xlint/lint1/t_usage.sh
cvs rdiff -u -r1.246 -r1.247 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.648 -r1.649 src/usr.bin/xlint/lint1/tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:33:38 UTC 2024

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: t_usage.sh
src/usr.bin/xlint/lint1: err.c tree.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_382.c

Log Message:
lint: add warning for '!(var = constant)'

This catches expressions like 'ATF_CHECK(errno = ENOENT)', which was
intended to use '==' instead of '='.


To generate a diff of this commit:
cvs rdiff -u -r1.1327 -r1.1328 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_382.c
cvs rdiff -u -r1.22 -r1.23 src/tests/usr.bin/xlint/lint1/t_usage.sh
cvs rdiff -u -r1.246 -r1.247 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.648 -r1.649 src/usr.bin/xlint/lint1/tree.c

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.1327 src/distrib/sets/lists/tests/mi:1.1328
--- src/distrib/sets/lists/tests/mi:1.1327	Wed Jul 10 20:29:32 2024
+++ src/distrib/sets/lists/tests/mi	Wed Jul 10 20:33:37 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1327 2024/07/10 20:29:32 rillig Exp $
+# $NetBSD: mi,v 1.1328 2024/07/10 20:33:37 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7544,6 +7544,7 @@
 ./usr/tests/usr.bin/xlint/lint1/msg_379.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_380.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_381.c			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/msg_382.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/op_colon.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/op_colon.exp			tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/op_shl_lp64.c			tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/xlint/lint1/t_usage.sh
diff -u src/tests/usr.bin/xlint/lint1/t_usage.sh:1.22 src/tests/usr.bin/xlint/lint1/t_usage.sh:1.23
--- src/tests/usr.bin/xlint/lint1/t_usage.sh:1.22	Sun Jun  9 10:27:39 2024
+++ src/tests/usr.bin/xlint/lint1/t_usage.sh	Wed Jul 10 20:33:38 2024
@@ -1,4 +1,4 @@
-# $NetBSD: t_usage.sh,v 1.22 2024/06/09 10:27:39 rillig Exp $
+# $NetBSD: t_usage.sh,v 1.23 2024/07/10 20:33:38 rillig Exp $
 #
 # Copyright (c) 2023 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,13 +39,13 @@ suppress_messages_body()
 
 	# The largest known message.
 	atf_check \
-	"$lint1" -X 381 code.c /dev/null
+	"$lint1" -X 382 code.c /dev/null
 
 	# Larger than the largest known message.
 	atf_check \
 	-s 'exit:1' \
-	-e "inline:lint1: invalid message ID '382'\n" \
-	"$lint1" -X 382 code.c /dev/null
+	-e "inline:lint1: invalid message ID '383'\n" \
+	"$lint1" -X 383 code.c /dev/null
 
 	# Whitespace is not allowed before a message ID.
 	atf_check \

Index: src/usr.bin/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.246 src/usr.bin/xlint/lint1/err.c:1.247
--- src/usr.bin/xlint/lint1/err.c:1.246	Sun Jun  9 10:27:39 2024
+++ src/usr.bin/xlint/lint1/err.c	Wed Jul 10 20:33:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: err.c,v 1.246 2024/06/09 10:27:39 rillig Exp $	*/
+/*	$NetBSD: err.c,v 1.247 2024/07/10 20:33:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: err.c,v 1.246 2024/06/09 10:27:39 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.247 2024/07/10 20:33:37 rillig Exp $");
 #endif
 
 #include 
@@ -437,6 +437,7 @@ static const char *const msgs[] = {
 	"comparing integer '%s' to floating point constant %Lg",	// 379
 	"lossy conversion of %Lg to '%s', arg #%d",			// 380
 	"lossy conversion of %Lg to '%s'",// 381
+	"constant assignment of type '%s' in operand of '!' always evaluates to '%s'", 	// 382
 };
 
 static bool is_suppressed[sizeof(msgs) / sizeof(msgs[0])];

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.648 src/usr.bin/xlint/lint1/tree.c:1.649
--- src/usr.bin/xlint/lint1/tree.c:1.648	Mon Jun 17 17:06:47 2024
+++ src/usr.bin/xlint/lint1/tree.c	Wed Jul 10 20:33:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.648 2024/06/17 17:06:47 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.649 2024/07/10 20:33:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.648 2024/06/17 17:06:47 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.649 2024/07/10 20:33:37 rillig Exp $");
 #endif
 
 #include 
@@ -1809,6 +1809,15 @@ build_binary(tnode_t *ln, op_t op, bool 
 	case ARROW:
 		ntn = build_struct_access(op, sys, ln, rn);
 		break;
+	case NOT:
+		if (ln->tn_op == ASSIGN && ln->u.ops.right->tn_op == CON) {
+			/* constant assignment of type '%s' in operand ... */
+			warning(382, type_

CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:44:06 UTC 2024

Modified Files:
src/tests/lib/libc/c063: t_fchmodat.c

Log Message:
tests/fchmodat: add missing space in test failure message


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/c063/t_fchmodat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libc/c063

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:44:06 UTC 2024

Modified Files:
src/tests/lib/libc/c063: t_fchmodat.c

Log Message:
tests/fchmodat: add missing space in test failure message


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/c063/t_fchmodat.c

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/libc/c063/t_fchmodat.c
diff -u src/tests/lib/libc/c063/t_fchmodat.c:1.6 src/tests/lib/libc/c063/t_fchmodat.c:1.7
--- src/tests/lib/libc/c063/t_fchmodat.c:1.6	Wed Jul 10 20:19:51 2024
+++ src/tests/lib/libc/c063/t_fchmodat.c	Wed Jul 10 20:44:06 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fchmodat.c,v 1.6 2024/07/10 20:19:51 christos Exp $ */
+/*	$NetBSD: t_fchmodat.c,v 1.7 2024/07/10 20:44:06 rillig Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_fchmodat.c,v 1.6 2024/07/10 20:19:51 christos Exp $");
+__RCSID("$NetBSD: t_fchmodat.c,v 1.7 2024/07/10 20:44:06 rillig Exp $");
 
 #include 
 #include 
@@ -51,7 +51,7 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.6 202
 
 #define modecheck(a, b) \
 	ATF_REQUIRE_MSG(((a) & ALLPERMS) == (b), \
-	"Incorrect mode found %#o != expected%#o", \
+	"Incorrect mode found %#o != expected %#o", \
 	((a) & ALLPERMS), (b));
 
 ATF_TC(fchmodat_fd);



CVS commit: src/tests/include/sys

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:52:33 UTC 2024

Modified Files:
src/tests/include/sys: t_list.c

Log Message:
tests/sys/queue.h: fix mismatch between '=' and '=='


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/include/sys/t_list.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/include/sys

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 20:52:33 UTC 2024

Modified Files:
src/tests/include/sys: t_list.c

Log Message:
tests/sys/queue.h: fix mismatch between '=' and '=='


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/include/sys/t_list.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/include/sys/t_list.c
diff -u src/tests/include/sys/t_list.c:1.2 src/tests/include/sys/t_list.c:1.3
--- src/tests/include/sys/t_list.c:1.2	Mon Oct  2 05:14:29 2017
+++ src/tests/include/sys/t_list.c	Wed Jul 10 20:52:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_list.c,v 1.2 2017/10/02 05:14:29 pgoyette Exp $	*/
+/*	$NetBSD: t_list.c,v 1.3 2024/07/10 20:52:32 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ ATF_TC_BODY(list_move, tc)
 	memcpy(&old_copy, &old_head, sizeof(old_head));
 
 	n3 = LIST_FIRST(&new_head);
-	ATF_CHECK_MSG(n3->value = 2, "Unexpected value for LIST_FIRST");
+	ATF_CHECK_MSG(n3->value == 2, "Unexpected value for LIST_FIRST");
 
 	LIST_REMOVE(n3, entries);
 	ATF_CHECK_MSG(memcmp(&old_copy, &old_head, sizeof(old_head)) == 0,



CVS commit: src/tests/kernel/kqueue

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 22:03:59 UTC 2024

Modified Files:
src/tests/kernel/kqueue: t_sig.c

Log Message:
tests/kqueue: fix mismatch between '=' and '=='


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/kernel/kqueue/t_sig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/kernel/kqueue/t_sig.c
diff -u src/tests/kernel/kqueue/t_sig.c:1.4 src/tests/kernel/kqueue/t_sig.c:1.5
--- src/tests/kernel/kqueue/t_sig.c:1.4	Sun Oct 10 18:11:31 2021
+++ src/tests/kernel/kqueue/t_sig.c	Wed Jul 10 22:03:59 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sig.c,v 1.4 2021/10/10 18:11:31 thorpej Exp $ */
+/* $NetBSD: t_sig.c,v 1.5 2024/07/10 22:03:59 rillig Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008, 2021 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sig.c,v 1.4 2021/10/10 18:11:31 thorpej Exp $");
+__RCSID("$NetBSD: t_sig.c,v 1.5 2024/07/10 22:03:59 rillig Exp $");
 
 #include 
 #include 
@@ -199,7 +199,7 @@ ATF_TC_BODY(sig_and_proc, tc)
 	ATF_REQUIRE(kevent(kq, NULL, 0, events, 1, NULL) == 1);
 	ATF_REQUIRE(events[0].filter == EVFILT_PROC);
 	ATF_REQUIRE(events[0].ident == (uintptr_t)pid);
-	ATF_REQUIRE(events[0].fflags = NOTE_EXIT);
+	ATF_REQUIRE(events[0].fflags == NOTE_EXIT);
 }
 
 ATF_TP_ADD_TCS(tp)



CVS commit: src/tests/kernel/kqueue

2024-07-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jul 10 22:03:59 UTC 2024

Modified Files:
src/tests/kernel/kqueue: t_sig.c

Log Message:
tests/kqueue: fix mismatch between '=' and '=='


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/kernel/kqueue/t_sig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/libexec/ld.elf_so

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 01:58:15 UTC 2024

Modified Files:
src/tests/libexec/ld.elf_so: t_tls_extern.c

Log Message:
Compensate for change in ATF_REQUIRE_MSG

ATF_REQUIRE_MSG() was recently changed so that ATF_REQUIRE_MSG(x = y, ..)
would generate a warning message, as it probably intended to be x == y.

In ATF_REQUIRE_DL() the use is always ATF_REQUIRE_DL(var = dlopen(...), ...)
where the '=' is certainly not intended to be ==, but is instead checking
that the result of dlopen() is not NULL (while also saving it for later).

Alter the definition of ATF_REQUIRE_DL() to make that explicit.

(The s/\t/ / is just for 80 column police avoidance)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/libexec/ld.elf_so/t_tls_extern.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/libexec/ld.elf_so

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 01:58:15 UTC 2024

Modified Files:
src/tests/libexec/ld.elf_so: t_tls_extern.c

Log Message:
Compensate for change in ATF_REQUIRE_MSG

ATF_REQUIRE_MSG() was recently changed so that ATF_REQUIRE_MSG(x = y, ..)
would generate a warning message, as it probably intended to be x == y.

In ATF_REQUIRE_DL() the use is always ATF_REQUIRE_DL(var = dlopen(...), ...)
where the '=' is certainly not intended to be ==, but is instead checking
that the result of dlopen() is not NULL (while also saving it for later).

Alter the definition of ATF_REQUIRE_DL() to make that explicit.

(The s/\t/ / is just for 80 column police avoidance)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/libexec/ld.elf_so/t_tls_extern.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_tls_extern.c
diff -u src/tests/libexec/ld.elf_so/t_tls_extern.c:1.12 src/tests/libexec/ld.elf_so/t_tls_extern.c:1.13
--- src/tests/libexec/ld.elf_so/t_tls_extern.c:1.12	Sun Jun  4 01:24:58 2023
+++ src/tests/libexec/ld.elf_so/t_tls_extern.c	Thu Jul 11 01:58:15 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_tls_extern.c,v 1.12 2023/06/04 01:24:58 joerg Exp $	*/
+/*	$NetBSD: t_tls_extern.c,v 1.13 2024/07/11 01:58:15 kre Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 #include 
 #include 
 
-#define	ATF_REQUIRE_DL(x)	ATF_REQUIRE_MSG(x, "%s: %s", #x, dlerror())
+#define	ATF_REQUIRE_DL(x) ATF_REQUIRE_MSG((x) != NULL, "%s: %s", #x, dlerror())
 
 enum order {
 	DEF_USE_EAGER,



CVS commit: src/tests/libexec/ld.elf_so

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 02:10:42 UTC 2024

Modified Files:
src/tests/libexec/ld.elf_so: t_tls_extern.c

Log Message:
Alter prev to just explicitly use 0 instead of NULL, so there's no
need to ensure NULL is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/libexec/ld.elf_so/t_tls_extern.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/libexec/ld.elf_so

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 02:10:42 UTC 2024

Modified Files:
src/tests/libexec/ld.elf_so: t_tls_extern.c

Log Message:
Alter prev to just explicitly use 0 instead of NULL, so there's no
need to ensure NULL is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/libexec/ld.elf_so/t_tls_extern.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_tls_extern.c
diff -u src/tests/libexec/ld.elf_so/t_tls_extern.c:1.13 src/tests/libexec/ld.elf_so/t_tls_extern.c:1.14
--- src/tests/libexec/ld.elf_so/t_tls_extern.c:1.13	Thu Jul 11 01:58:15 2024
+++ src/tests/libexec/ld.elf_so/t_tls_extern.c	Thu Jul 11 02:10:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_tls_extern.c,v 1.13 2024/07/11 01:58:15 kre Exp $	*/
+/*	$NetBSD: t_tls_extern.c,v 1.14 2024/07/11 02:10:42 kre Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 #include 
 #include 
 
-#define	ATF_REQUIRE_DL(x) ATF_REQUIRE_MSG((x) != NULL, "%s: %s", #x, dlerror())
+#define	ATF_REQUIRE_DL(x) ATF_REQUIRE_MSG((x) != 0, "%s: %s", #x, dlerror())
 
 enum order {
 	DEF_USE_EAGER,



CVS commit: src/tests/lib/libc/string

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 03:51:18 UTC 2024

Modified Files:
src/tests/lib/libc/string: t_bm.c

Log Message:
More ATF_CHECK() (etc) change fallout.

Really, developers making infrastructure changes like this should do
a full build before committing the change, and handle any fallout from
the change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_bm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libc/string

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 03:51:18 UTC 2024

Modified Files:
src/tests/lib/libc/string: t_bm.c

Log Message:
More ATF_CHECK() (etc) change fallout.

Really, developers making infrastructure changes like this should do
a full build before committing the change, and handle any fallout from
the change.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/string/t_bm.c

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/libc/string/t_bm.c
diff -u src/tests/lib/libc/string/t_bm.c:1.1 src/tests/lib/libc/string/t_bm.c:1.2
--- src/tests/lib/libc/string/t_bm.c:1.1	Mon Jun 23 10:53:20 2014
+++ src/tests/lib/libc/string/t_bm.c	Thu Jul 11 03:51:18 2024
@@ -1,4 +1,4 @@
-/* $Id: t_bm.c,v 1.1 2014/06/23 10:53:20 shm Exp $ */
+/* $Id: t_bm.c,v 1.2 2024/07/11 03:51:18 kre Exp $ */
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$Id: t_bm.c,v 1.1 2014/06/23 10:53:20 shm Exp $");
+__RCSID("$Id: t_bm.c,v 1.2 2024/07/11 03:51:18 kre Exp $");
 
 #include 
 #include 
@@ -77,10 +77,10 @@ ATF_TC_BODY(bm, tc)
 	bm_pat *pattern;
 	
 	for (ts = 0; ts < sizeof(testcases)/sizeof(t_testcase); ts++) {
-		ATF_CHECK(pattern = bm_comp((const u_char *)testcases[ts].pattern,
+		ATF_CHECK((pattern = bm_comp((const u_char *)testcases[ts].pattern),
 		  strlen(testcases[ts].pattern), (const u_char *)testcases[ts].freq));
 
-		ATF_REQUIRE(text = strdup(testcases[ts].text));
+		ATF_REQUIRE((text = strdup(testcases[ts].text)));
 		off = bm_exec(pattern, (u_char *)text, strlen(text));
 
 		if (testcases[ts].match == -1)



CVS commit: src/tests/lib/libc/string

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 03:55:58 UTC 2024

Modified Files:
src/tests/lib/libc/string: t_bm.c

Log Message:
Correct a thinko in previous...


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_bm.c

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/libc/string/t_bm.c
diff -u src/tests/lib/libc/string/t_bm.c:1.2 src/tests/lib/libc/string/t_bm.c:1.3
--- src/tests/lib/libc/string/t_bm.c:1.2	Thu Jul 11 03:51:18 2024
+++ src/tests/lib/libc/string/t_bm.c	Thu Jul 11 03:55:58 2024
@@ -1,4 +1,4 @@
-/* $Id: t_bm.c,v 1.2 2024/07/11 03:51:18 kre Exp $ */
+/* $Id: t_bm.c,v 1.3 2024/07/11 03:55:58 kre Exp $ */
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$Id: t_bm.c,v 1.2 2024/07/11 03:51:18 kre Exp $");
+__RCSID("$Id: t_bm.c,v 1.3 2024/07/11 03:55:58 kre Exp $");
 
 #include 
 #include 
@@ -77,8 +77,8 @@ ATF_TC_BODY(bm, tc)
 	bm_pat *pattern;
 	
 	for (ts = 0; ts < sizeof(testcases)/sizeof(t_testcase); ts++) {
-		ATF_CHECK((pattern = bm_comp((const u_char *)testcases[ts].pattern),
-		  strlen(testcases[ts].pattern), (const u_char *)testcases[ts].freq));
+		ATF_CHECK((pattern = bm_comp((const u_char *)testcases[ts].pattern,
+		  strlen(testcases[ts].pattern), (const u_char *)testcases[ts].freq)));
 
 		ATF_REQUIRE((text = strdup(testcases[ts].text)));
 		off = bm_exec(pattern, (u_char *)text, strlen(text));



CVS commit: src/tests/lib/libc/string

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 03:55:58 UTC 2024

Modified Files:
src/tests/lib/libc/string: t_bm.c

Log Message:
Correct a thinko in previous...


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_bm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2024-07-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jul 11 03:58:07 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Realtek RTL8126.


To generate a diff of this commit:
cvs rdiff -u -r1.1507 -r1.1508 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2024-07-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jul 11 03:58:07 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Realtek RTL8126.


To generate a diff of this commit:
cvs rdiff -u -r1.1507 -r1.1508 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1507 src/sys/dev/pci/pcidevs:1.1508
--- src/sys/dev/pci/pcidevs:1.1507	Sun Jun 23 17:22:51 2024
+++ src/sys/dev/pci/pcidevs	Thu Jul 11 03:58:07 2024
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1507 2024/06/23 17:22:51 jakllsch Exp $
+$NetBSD: pcidevs,v 1.1508 2024/07/11 03:58:07 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -9266,6 +9266,7 @@ product REALTEK RT8029		0x8029	8029 Ethe
 product REALTEK RT8139D		0x8039	8139D 10/100 Ethernet
 product REALTEK RT8100		0x8100	8100 10/100 Ethernet
 product REALTEK RT8125		0x8125	8125 10/100/1G/2.5G Ethernet
+product REALTEK RT8126		0x8126	8126 10/100/1G/2.5G/5G Ethernet
 product REALTEK RT8129		0x8129	8129 10/100 Ethernet
 product REALTEK RT8101E		0x8136	8100E/8101E/8102E 10/100 Ethernet
 product REALTEK RT8138		0x8138	8138 10/100 Ethernet



CVS commit: src/sys/dev/pci

2024-07-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jul 11 04:47:10 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1486 -r1.1487 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1485 -r1.1486 src/sys/dev/pci/pcidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libedit

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 05:41:24 UTC 2024

Modified Files:
src/lib/libedit: history.c

Log Message:
Don't fchmod(fileno(fp), ...) in history_save_fp().

There are two reasons for this, first, the permissions of the history
file should be able to be set by the user, not forced to 0600 every
time the history file is overwritten (or appended to).

And more importantly, the fp used for fileno(fp) might have come
from fmemopen() or funopen() (etc) - none of which put a file
descriptor in the "fd" field (ie: fileno(fp) == -1).

To compensate for that, when a history file is opened (in history_save())
set the default permissions then - if the file is actually created.
As fopen() cannot do that (it simply uses 0666&~umask) create the
(normal type) of fp using (approximately) fdopen(open(...), ...)
where the open supplies the 0600 default permissions that are
desired here (which might still be restricted even more by the
umask).   Callers using history(...,H_SAVE_FP,...) or
history(...,H_NSAVE_FP,...) now need to look after any permission
setting required themselves (but as the doc says absolutely
nothing about that, one way or the other, what happens in this
area has always been unspecified, and still is)

One "feature" of the fchmod() method is lost here - apart from forcing
the 0600 permissions (which isn't really desirable) that fchmod()
would also have failed if the current (effective) uid is not the owner of
the history file (or root).If that is required, a test for it could
be added later - the effect would be as it has always been, the file
named must have been writable (or its directory writable if the file
did not exist) the open would occur (potentially truncating the file)
after which the fchmod() would be attempted, possibly failing, and if
so, never writing anything.   Any new uid test would work the same way.

OK christos@


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libedit/history.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libedit/history.c
diff -u src/lib/libedit/history.c:1.63 src/lib/libedit/history.c:1.64
--- src/lib/libedit/history.c:1.63	Tue Oct  8 19:17:57 2019
+++ src/lib/libedit/history.c	Thu Jul 11 05:41:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: history.c,v 1.63 2019/10/08 19:17:57 christos Exp $	*/
+/*	$NetBSD: history.c,v 1.64 2024/07/11 05:41:24 kre Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)history.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: history.c,v 1.63 2019/10/08 19:17:57 christos Exp $");
+__RCSID("$NetBSD: history.c,v 1.64 2024/07/11 05:41:24 kre Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -45,6 +45,7 @@ __RCSID("$NetBSD: history.c,v 1.63 2019/
  * hist.c: TYPE(History) access functions
  */
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -842,8 +843,6 @@ history_save_fp(TYPE(History) *h, size_t
 	static ct_buffer_t conv;
 #endif
 
-	if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1)
-		goto done;
 	if (ftell(fp) == 0 && fputs(hist_cookie, fp) == EOF)
 		goto done;
 	ptr = h_malloc((max_size = 1024) * sizeof(*ptr));
@@ -891,7 +890,11 @@ history_save(TYPE(History) *h, const cha
 FILE *fp;
 int i;
 
-if ((fp = fopen(fname, "w")) == NULL)
+if ((i = open(fname, O_WRONLY|O_CREAT|O_TRUNC,
+		S_IRUSR|S_IWUSR)) == -1)
+	return -1;
+
+if ((fp = fdopen(i, "w")) == NULL)
 	return -1;
 
 i = history_save_fp(h, (size_t)-1, fp);



CVS commit: src/lib/libedit

2024-07-10 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Jul 11 05:41:24 UTC 2024

Modified Files:
src/lib/libedit: history.c

Log Message:
Don't fchmod(fileno(fp), ...) in history_save_fp().

There are two reasons for this, first, the permissions of the history
file should be able to be set by the user, not forced to 0600 every
time the history file is overwritten (or appended to).

And more importantly, the fp used for fileno(fp) might have come
from fmemopen() or funopen() (etc) - none of which put a file
descriptor in the "fd" field (ie: fileno(fp) == -1).

To compensate for that, when a history file is opened (in history_save())
set the default permissions then - if the file is actually created.
As fopen() cannot do that (it simply uses 0666&~umask) create the
(normal type) of fp using (approximately) fdopen(open(...), ...)
where the open supplies the 0600 default permissions that are
desired here (which might still be restricted even more by the
umask).   Callers using history(...,H_SAVE_FP,...) or
history(...,H_NSAVE_FP,...) now need to look after any permission
setting required themselves (but as the doc says absolutely
nothing about that, one way or the other, what happens in this
area has always been unspecified, and still is)

One "feature" of the fchmod() method is lost here - apart from forcing
the 0600 permissions (which isn't really desirable) that fchmod()
would also have failed if the current (effective) uid is not the owner of
the history file (or root).If that is required, a test for it could
be added later - the effect would be as it has always been, the file
named must have been writable (or its directory writable if the file
did not exist) the open would occur (potentially truncating the file)
after which the fchmod() would be attempted, possibly failing, and if
so, never writing anything.   Any new uid test would work the same way.

OK christos@


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libedit/history.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/gen

2024-07-10 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 11 06:04:13 UTC 2024

Modified Files:
src/lib/libc/gen: syslog.3

Log Message:
syslog(3): Nix trailing whitespace in man page.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/gen/syslog.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/syslog.3
diff -u src/lib/libc/gen/syslog.3:1.34 src/lib/libc/gen/syslog.3:1.35
--- src/lib/libc/gen/syslog.3:1.34	Mon Jul  8 22:14:31 2024
+++ src/lib/libc/gen/syslog.3	Thu Jul 11 06:04:13 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: syslog.3,v 1.34 2024/07/08 22:14:31 christos Exp $
+.\"	$NetBSD: syslog.3,v 1.35 2024/07/11 06:04:13 riastradh Exp $
 .\"	$OpenBSD: syslog.3,v 1.25 2005/07/22 03:16:58 jaredy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
@@ -210,7 +210,7 @@ Similarly
 .Fn vsyslog_ss
 is the async-signal-safe version of
 .Fn vsyslog_r .
-Same for 
+Same for
 .Fn syslogp_ss
 and
 .Fn syslogp_r ,



CVS commit: src/lib/libc/gen

2024-07-10 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 11 06:04:13 UTC 2024

Modified Files:
src/lib/libc/gen: syslog.3

Log Message:
syslog(3): Nix trailing whitespace in man page.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/gen/syslog.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-07-10 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 11 06:05:59 UTC 2024

Modified Files:
src/sys/sys: syslog.h

Log Message:
sys/syslog.h: Nix trailing whitespace.

No functional change intended.

PR 58391


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/sys/syslog.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2024-07-10 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 11 06:05:59 UTC 2024

Modified Files:
src/sys/sys: syslog.h

Log Message:
sys/syslog.h: Nix trailing whitespace.

No functional change intended.

PR 58391


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/sys/syslog.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/syslog.h
diff -u src/sys/sys/syslog.h:1.42 src/sys/sys/syslog.h:1.43
--- src/sys/sys/syslog.h:1.42	Mon Jul  8 22:14:31 2024
+++ src/sys/sys/syslog.h	Thu Jul 11 06:05:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslog.h,v 1.42 2024/07/08 22:14:31 christos Exp $	*/
+/*	$NetBSD: syslog.h,v 1.43 2024/07/11 06:05:58 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -222,11 +222,11 @@ void	vsyslogp_r(int, struct syslog_data 
 const char *, __va_list) __RENAME(__vsyslogp_r60) __sysloglike(5, 0);
 void	syslog_ss(int, struct syslog_data *, const char *, ...)
 __RENAME(__syslog_ss60) __sysloglike(3, 4);
-voidvsyslog_ss(int, struct syslog_data *, const char *, va_list) 
-__RENAME(__vsyslog_ss60) __sysloglike(3, 0); 
-void	syslogp_ss(int, struct syslog_data *, const char *, const char *, 
+voidvsyslog_ss(int, struct syslog_data *, const char *, va_list)
+__RENAME(__vsyslog_ss60) __sysloglike(3, 0);
+void	syslogp_ss(int, struct syslog_data *, const char *, const char *,
 const char *, ...) __RENAME(__syslogp_ss60) __sysloglike(5, 0);
-void	vsyslogp_ss(int, struct syslog_data *, const char *, const char *, 
+void	vsyslogp_ss(int, struct syslog_data *, const char *, const char *,
 const char *, va_list) __RENAME(__vsyslogp_ss60) __sysloglike(5, 0);
 #endif
 void	syslogp(int, const char *, const char *, const char *, ...)