CVS commit: src/share/man/man5

2020-11-23 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Tue Nov 24 07:46:46 UTC 2020

Modified Files:
src/share/man/man5: boot.cfg.5

Log Message:
Add a comment to clarify the selected drivers to disable in the example


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man5/boot.cfg.5

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/man5/boot.cfg.5
diff -u src/share/man/man5/boot.cfg.5:1.30 src/share/man/man5/boot.cfg.5:1.31
--- src/share/man/man5/boot.cfg.5:1.30	Sat Nov 21 12:26:41 2020
+++ src/share/man/man5/boot.cfg.5	Tue Nov 24 07:46:46 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.cfg.5,v 1.30 2020/11/21 12:26:41 wiz Exp $
+.\"	$NetBSD: boot.cfg.5,v 1.31 2020/11/24 07:46:46 kim Exp $
 .\"
 .\" Copyright (c) 2007 Stephen Borrill
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 21, 2020
+.Dd November 24, 2020
 .Dt BOOT.CFG 5
 .Os
 .Sh NAME
@@ -188,6 +188,7 @@ menu=Go to command line (advanced users 
 clear=1
 timeout=-1
 default=1
+# Disable Direct Rendering Manager (DRM) drivers
 userconf=disable i915drmkms*
 userconf=disable nouveau*
 userconf=disable radeon*



CVS commit: src/share/man/man5

2020-11-21 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Nov 21 11:41:54 UTC 2020

Modified Files:
src/share/man/man5: boot.cfg.5

Log Message:
boot.cfg.5: Note that userconf can be used multiple times

Additionally:
- Make it easier for the reader to learn which keywords can be used
  multiple times
- Use multiple "userconf" lines in the EXAMPLES section, conveniently
  listing the current DRM drivers that a user might need to disable to
  troubleshoot "blank screen after boot" issues.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/man/man5/boot.cfg.5

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/man5/boot.cfg.5
diff -u src/share/man/man5/boot.cfg.5:1.28 src/share/man/man5/boot.cfg.5:1.29
--- src/share/man/man5/boot.cfg.5:1.28	Mon Jul  3 21:30:59 2017
+++ src/share/man/man5/boot.cfg.5	Sat Nov 21 11:41:54 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.cfg.5,v 1.28 2017/07/03 21:30:59 wiz Exp $
+.\"	$NetBSD: boot.cfg.5,v 1.29 2020/11/21 11:41:54 kim Exp $
 .\"
 .\" Copyright (c) 2007 Stephen Borrill
 .\" All rights reserved.
@@ -51,12 +51,18 @@ Lines beginning with a hash
 .Pq Sq #
 are comments and will be ignored.
 .Pp
-Some keywords can be present multiple times in the file to define additional
+The
+.Dq Ic banner ,
+.Dq Ic load ,
+.Dq Ic menu ,
+and
+.Dq Ic userconf
+keywords can be present multiple times in the file to define additional
 items.
-Such keywords are noted below.
+See the description for each keyword for guidance and limitations on
+using multiple entries.
 .Bl -tag -width timeout
 .It Sy banner
-(may be present multiple times)
 The text from banner lines is displayed instead of the standard welcome text
 by the boot loader.
 Up to 10 lines can be defined.
@@ -101,7 +107,6 @@ If that file does not exist, it will the
 .Pa / .
 May be used as many times as needed.
 .It Sy menu
-(may be present multiple times)
 Used to define a menu item to be displayed to the end-user at boot time
 which allows a series of boot commands to be run without further typing.
 The value consists of the required menu text, followed by a colon
@@ -160,6 +165,7 @@ time limit for the user to choose an opt
 Passes a
 .Xr userconf 4
 command to the kernel at boot time.
+May be used as many times as needed.
 .El
 .Sh EXAMPLES
 Here is an example
@@ -182,7 +188,9 @@ menu=Go to command line (advanced users 
 clear=1
 timeout=-1
 default=1
-userconf=disable ehci*
+userconf=disable i915drmkms*
+userconf=disable nouveau*
+userconf=disable radeon*
 # Always load ramdisk module
 load=/miniroot.kmod
 .Ed



CVS commit: src/share/man/man4

2020-11-04 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed Nov  4 15:24:56 UTC 2020

Modified Files:
src/share/man/man4: ixl.4 ure.4 viornd.4 wpi.4

Log Message:
Allow line breaks inside author names in prose paragraphs


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/ixl.4
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/ure.4
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/viornd.4
cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/wpi.4

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/man4/ixl.4
diff -u src/share/man/man4/ixl.4:1.3 src/share/man/man4/ixl.4:1.4
--- src/share/man/man4/ixl.4:1.3	Fri Dec 20 14:09:23 2019
+++ src/share/man/man4/ixl.4	Wed Nov  4 15:24:56 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ixl.4,v 1.3 2019/12/20 14:09:23 wiz Exp $
+.\"	$NetBSD: ixl.4,v 1.4 2020/11/04 15:24:56 kim Exp $
 .\"
 .\" Copyright (c) 2019 Internet Initiative Japan, Inc.
 .\" All rights reserved.
@@ -51,6 +51,7 @@ driver comes from
 It first appeared in
 .Nx 10.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by

Index: src/share/man/man4/ure.4
diff -u src/share/man/man4/ure.4:1.5 src/share/man/man4/ure.4:1.6
--- src/share/man/man4/ure.4:1.5	Fri Aug 30 09:22:17 2019
+++ src/share/man/man4/ure.4	Wed Nov  4 15:24:56 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: ure.4,v 1.5 2019/08/30 09:22:17 wiz Exp $
+.\" $NetBSD: ure.4,v 1.6 2020/11/04 15:24:56 kim Exp $
 .\" $OpenBSD: ure.4,v 1.5 2017/04/16 20:26:34 jmc Exp $
 .\"
 .\" Copyright (c) 2015 Kevin Lo 
@@ -83,6 +83,7 @@ device driver first appeared in
 and
 .Nx 9.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by

Index: src/share/man/man4/viornd.4
diff -u src/share/man/man4/viornd.4:1.2 src/share/man/man4/viornd.4:1.3
--- src/share/man/man4/viornd.4:1.2	Sun Oct 26 22:07:47 2014
+++ src/share/man/man4/viornd.4	Wed Nov  4 15:24:56 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: viornd.4,v 1.2 2014/10/26 22:07:47 wiz Exp $
+.\" $NetBSD: viornd.4,v 1.3 2020/11/04 15:24:56 kim Exp $
 .\"
 .\" Copyright (c) 2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -51,6 +51,7 @@ The
 driver appeared in
 .Ox 5.5 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by

Index: src/share/man/man4/wpi.4
diff -u src/share/man/man4/wpi.4:1.16 src/share/man/man4/wpi.4:1.17
--- src/share/man/man4/wpi.4:1.16	Tue Mar 18 18:20:39 2014
+++ src/share/man/man4/wpi.4	Wed Nov  4 15:24:56 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wpi.4,v 1.16 2014/03/18 18:20:39 riastradh Exp $
+.\" $NetBSD: wpi.4,v 1.17 2020/11/04 15:24:56 kim Exp $
 .\"
 .\" Copyright (c) 2006
 .\"	Damien Bergamini . All rights reserved.
@@ -232,6 +232,7 @@ when the interface will be set to up
 .%U http://damien.bergamini.free.fr/ipw/
 .Re
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was originally written by



CVS commit: src/usr.bin/find

2020-11-01 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Nov  1 21:11:49 UTC 2020

Modified Files:
src/usr.bin/find: find.1

Log Message:
Bump date (for "-not")


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/usr.bin/find/find.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/find/find.1
diff -u src/usr.bin/find/find.1:1.91 src/usr.bin/find/find.1:1.92
--- src/usr.bin/find/find.1:1.91	Sun Nov  1 16:47:29 2020
+++ src/usr.bin/find/find.1	Sun Nov  1 21:11:49 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: find.1,v 1.91 2020/11/01 16:47:29 wiz Exp $
+.\"	$NetBSD: find.1,v 1.92 2020/11/01 21:11:49 kim Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	from: @(#)find.1	8.7 (Berkeley) 5/9/95
 .\"
-.Dd June 13, 2016
+.Dd November 1, 2020
 .Dt FIND 1
 .Os
 .Sh NAME



CVS commit: src/usr.bin/find

2020-11-01 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Nov  1 16:34:02 UTC 2020

Modified Files:
src/usr.bin/find: find.1

Log Message:
Document the -not operator


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/find/find.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/find/find.1
diff -u src/usr.bin/find/find.1:1.89 src/usr.bin/find/find.1:1.90
--- src/usr.bin/find/find.1:1.89	Mon Jul  3 21:34:57 2017
+++ src/usr.bin/find/find.1	Sun Nov  1 16:34:02 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: find.1,v 1.89 2017/07/03 21:34:57 wiz Exp $
+.\"	$NetBSD: find.1,v 1.90 2020/11/01 16:34:02 kim Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -739,6 +739,7 @@ The operators are listed in order of dec
 This evaluates to true if the parenthesized expression evaluates to
 true.
 .It Cm \&! Ar expression
+.It Cm -not Ar expression
 This is the unary
 .Tn NOT
 operator.
@@ -846,7 +847,7 @@ utility syntax is a superset of the synt
 .St -p1003.2
 standard.
 .Pp
-The options and the
+The options, the
 .Ic -amin ,
 .Ic -anewer ,
 .Ic -asince ,
@@ -873,7 +874,9 @@ The options and the
 .Ic -rm ,
 and
 .Ic -since
-primaries are extensions to
+primaries, and the
+.Ic -not
+operator are extensions to
 .St -p1003.2 .
 .Pp
 Historically, the



CVS commit: src/etc/rc.d

2020-10-16 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Oct 16 15:31:04 UTC 2020

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

Log Message:
network: Update rtsol options

- Use "-6" instead of "--noipv4" as it seems more appropriate based on
  the dhcpcd(8) manual page.
- Remove "-f /dev/null" as it seems unnecessary with "-6".
- Remove "--persistent" as it is in the default /etc/dhcpcd.conf,
  and this way the user can change it, if they would like to (either
  through dhcpcd_flags or by editing /etc/dhcpcd.conf).

The "-b" (or "--background") option is needed to avoid a timeout error
message (and a delay in booting), so it is still left in place.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/etc/rc.d/network

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/network
diff -u src/etc/rc.d/network:1.84 src/etc/rc.d/network:1.85
--- src/etc/rc.d/network:1.84	Thu Oct 15 07:05:27 2020
+++ src/etc/rc.d/network	Fri Oct 16 15:31:04 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.84 2020/10/15 07:05:27 kim Exp $
+# $NetBSD: network,v 1.85 2020/10/16 15:31:04 kim Exp $
 #
 
 # PROVIDE: network
@@ -325,9 +325,7 @@ network_start_interfaces()
 ;;
 			rtsol)
 if ! checkyesno dhcpcd; then
-	/sbin/dhcpcd -n -f /dev/null \
-		--background --persistent \
-		--noipv4 \
+	/sbin/dhcpcd -n6b \
 		${dhcpcd_flags} $int
 fi
 ;;



CVS commit: src/etc/rc.d

2020-10-15 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Thu Oct 15 07:05:27 UTC 2020

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

Log Message:
Update "rtsol" keyword: leave IPv6 autoconf on

There is no need to turn off ipv6_autoconf or dhcp6 in dhcpcd to match
the previous behaviour with in-kernel RA processing.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/etc/rc.d/network

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/network
diff -u src/etc/rc.d/network:1.83 src/etc/rc.d/network:1.84
--- src/etc/rc.d/network:1.83	Sun Oct 11 22:38:48 2020
+++ src/etc/rc.d/network	Thu Oct 15 07:05:27 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.83 2020/10/11 22:38:48 kim Exp $
+# $NetBSD: network,v 1.84 2020/10/15 07:05:27 kim Exp $
 #
 
 # PROVIDE: network
@@ -327,8 +327,7 @@ network_start_interfaces()
 if ! checkyesno dhcpcd; then
 	/sbin/dhcpcd -n -f /dev/null \
 		--background --persistent \
-		--noipv4 --nodhcp6 \
-		--ipv6ra_noautoconf \
+		--noipv4 \
 		${dhcpcd_flags} $int
 fi
 ;;



CVS commit: src/share/man/man5

2020-10-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Oct 11 22:46:25 UTC 2020

Modified Files:
src/share/man/man5: ifconfig.if.5

Log Message:
Bump date


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/man/man5/ifconfig.if.5

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/man5/ifconfig.if.5
diff -u src/share/man/man5/ifconfig.if.5:1.21 src/share/man/man5/ifconfig.if.5:1.22
--- src/share/man/man5/ifconfig.if.5:1.21	Sun Oct 11 22:38:48 2020
+++ src/share/man/man5/ifconfig.if.5	Sun Oct 11 22:46:24 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ifconfig.if.5,v 1.21 2020/10/11 22:38:48 kim Exp $
+.\"	$NetBSD: ifconfig.if.5,v 1.22 2020/10/11 22:46:24 kim Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 15, 2020
+.Dd October 12, 2020
 .Dt IFCONFIG.IF 5
 .Os
 .Sh NAME



CVS commit: src

2020-10-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Oct 11 22:38:48 UTC 2020

Modified Files:
src/etc/rc.d: network
src/share/man/man5: ifconfig.if.5

Log Message:
Make "rtsol" functional again.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/etc/rc.d/network
cvs rdiff -u -r1.20 -r1.21 src/share/man/man5/ifconfig.if.5

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/network
diff -u src/etc/rc.d/network:1.82 src/etc/rc.d/network:1.83
--- src/etc/rc.d/network:1.82	Tue Sep  8 12:52:18 2020
+++ src/etc/rc.d/network	Sun Oct 11 22:38:48 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.82 2020/09/08 12:52:18 martin Exp $
+# $NetBSD: network,v 1.83 2020/10/11 22:38:48 kim Exp $
 #
 
 # PROVIDE: network
@@ -325,7 +325,10 @@ network_start_interfaces()
 ;;
 			rtsol)
 if ! checkyesno dhcpcd; then
-	/sbin/dhcpcd -n --ipv6rs \
+	/sbin/dhcpcd -n -f /dev/null \
+		--background --persistent \
+		--noipv4 --nodhcp6 \
+		--ipv6ra_noautoconf \
 		${dhcpcd_flags} $int
 fi
 ;;

Index: src/share/man/man5/ifconfig.if.5
diff -u src/share/man/man5/ifconfig.if.5:1.20 src/share/man/man5/ifconfig.if.5:1.21
--- src/share/man/man5/ifconfig.if.5:1.20	Fri Apr 17 13:36:48 2020
+++ src/share/man/man5/ifconfig.if.5	Sun Oct 11 22:38:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ifconfig.if.5,v 1.20 2020/04/17 13:36:48 kim Exp $
+.\"	$NetBSD: ifconfig.if.5,v 1.21 2020/10/11 22:38:48 kim Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -96,20 +96,21 @@ and any per interface configuration or r
 .Pp
 If the line is equal to
 .Dq rtsol ,
-kernel processing of router advertisements will be enabled and an IPv6
-router solicitation message will be sent out on the interface.
+a dedicated
+.Xr dhcpcd 8
+process will be started for processing received router advertisements
+and sending out IPv6 router solicitation messages on the interface.
 This is useful on networks where default routes can best be learned
 from router advertisements.
 However, if
 .Sy dhcpcd
 has been set to true in
 .Xr rc.conf 5 ,
-it is assumed that
+it is assumed that that
 .Xr dhcpcd 8
-will take care of sending any necessary router solicitation messages and
-processing received router advertisements through its configuration in
-.Xr dhcpcd.conf 5
-instead.
+process will take care of sending any necessary router solicitation
+messages and processing received router advertisements on all
+interfaces, and therefore no per-interface process is started.
 .Pp
 If a line is empty, or starts with
 .Sq # ,



CVS commit: src/etc

2020-10-05 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Oct  5 06:45:40 UTC 2020

Modified Files:
src/etc: ntp.conf

Log Message:
Add iburst to peer and server.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.21 src/etc/ntp.conf:1.22
--- src/etc/ntp.conf:1.21	Sun Oct  4 13:50:44 2020
+++ src/etc/ntp.conf	Mon Oct  5 06:45:40 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.21 2020/10/04 13:50:44 kim Exp $
+# $NetBSD: ntp.conf,v 1.22 2020/10/05 06:45:40 kim Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -117,8 +117,8 @@ restrict ::1
 # Ideally, you should select at least three other systems to talk NTP
 # with, for an "what I tell you three times is true" effect.
 
-#peer an.ntp.peer.goes.here
-#server an.ntp.server.goes.here
+#peer an.ntp.peer.goes.here iburst
+#server an.ntp.server.goes.here iburst
 
 # The pool.ntp.org project coordinates public time servers provided by
 # volunteers.  See .  The *.netbsd.pool.ntp.org



CVS commit: src/etc

2020-10-04 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Oct  4 13:50:44 UTC 2020

Modified Files:
src/etc: ntp.conf

Log Message:
Use "pool" for the pool.ntp.org servers. Add some new hints.

- Use the "pool" keyword for obtaining servers from ntp.pool.org.
  - Add "tos minclock" and "tos maxclock" to limit the number of servers.
  - Add "restrict source" to apply appropriate restrictions to servers.
(Specifically "nopeer" cannot be applied to "pool" servers.)
  - A single "pool" entry suffices -- using "2.netbsd.pool.ntp.org" so
that we get both IPv4 and IPv6 addresses. (No addresses are returned
for just "netbsd.pool.ntp.org.")
- Add a comment about "tinker panic 0" -- useful for VMs and laptops.
- Add a comment about "discard minimum" -- useful for some SNTP clients.
- Add an explanation for the "limited" restriction keyword.
- Unify whitespace and comment formatting.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/etc/ntp.conf

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

Modified files:

Index: src/etc/ntp.conf
diff -u src/etc/ntp.conf:1.20 src/etc/ntp.conf:1.21
--- src/etc/ntp.conf:1.20	Mon Jan  9 20:05:29 2017
+++ src/etc/ntp.conf	Sun Oct  4 13:50:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ntp.conf,v 1.20 2017/01/09 20:05:29 christos Exp $
+# $NetBSD: ntp.conf,v 1.21 2020/10/04 13:50:44 kim Exp $
 #
 # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
 
@@ -8,34 +8,52 @@
 # other guides, may be found on the official NTP web site, in particular
 #
 #	http://www.ntp.org/documentation.html
-#
 
 # Process ID file, so that the daemon can be signalled from scripts
 
-pidfile		/var/run/ntpd.pid
+pidfile /var/run/ntpd.pid
+
+# Don't give up even if the reference time is hugely different. This can
+# happen if the system was suspended and resumed.
+
+#tinker panic 0
 
 # The correction calculated by ntpd(8) for the local system clock's
 # drift is stored here.
 
-driftfile	/var/db/ntp.drift
+driftfile /var/db/ntp.drift
 
 # Suppress the syslog(3) message for each peer synchronization change.
 
-logconfig	-syncstatus
+logconfig -syncstatus
 
 # Refuse to set the local clock if there are too few good peers or servers.
 # This may help minimize disruptions due to network congestion. Don't
 # do this if you configure only one server!
 
-tos		minsane 2
+tos minsane 2
+
+# Set the target and limit for adding servers configured via pool statements
+# or discovered dynamically via mechanisms such as broadcast and manycast.
+# Ntpd automatically adds maxclock-1 servers from configured pools, and may
+# add as many as maxclock*2 if necessary to ensure that at least minclock
+# servers are providing good consistent time.
+
+tos minclock 3 maxclock 6
 
 # Set the number of tries to register with mdns. 0 means never
-#
-mdnstries	0
+
+mdnstries 0
 
 # New ntpd disables the ntpdc protocol by default, to re-enable uncomment
 # the following line
-# enable mode7
+
+#enable mode7
+
+# Allow hasty ntpdate clients to avoid rate limiting / kod responses.
+# The default is 2 seconds between packets from the client.
+
+#discard minimum 1
 
 # Access control restrictions.
 # See /usr/share/doc/html/ntp/accopt.html for syntax.
@@ -44,10 +62,13 @@ mdnstries	0
 #
 # Some of the more common keywords are:
 #   ignore  Deny packets of all kinds.
-#   kod Send "kiss-o'-death" packets if clients exceed rate
-#   limits.
-#   nomodifyDeny attempts to modify the state of the server via
-#   ntpq or ntpdc queries.
+#   limited Deny time service if the packet violates the rate limits
+#   established by the discard command. Does not affect ntpq or
+#   ntpdc queries.
+#   kod Send "kiss-o'-death" packets if clients exceed rate limits.
+#   No affect without the limited flag.
+#   nomodifyDeny attempts to modify the state of the server via ntpq or
+#   ntpdc queries.
 #   noquery Deny all ntpq and ntpdc queries.  Does not affect time
 #   synchronisation.
 #   nopeer  Prevent establishing new peer associations.
@@ -61,22 +82,26 @@ mdnstries	0
 # By default, allow client/server time exchange without prior
 # arrangement, but deny configuration changes, queries, and peer
 # associations that were not explicitly configured.
-#
-restrict default kod limited nopeer noquery
+
+restrict default limited kod nomodify notrap nopeer noquery
+
+# Restrictions used for associations (peer, server, pool).
+
+restrict source nomodify notrap noquery
 
 # Fewer restrictions for the local subnet.
 # (Uncomment and adjust as appropriate.)
-#
-#restrict 192.0.2.0 mask 255.255.255.0 kod limited nomodify notrap nopeer
-#restrict 2001:db8:: mask :::  kod limited nomodify notrap nopeer
+
+#restrict 192.0.2.0 mask 255.255.255.0 limited kod nomodify notrap nopeer
+#restrict 2001:db8:: mask :::  limited kod 

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

2020-09-21 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Sep 21 14:03:16 UTC 2020

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

Log Message:
Add MLINKS for empb.4


To generate a diff of this commit:
cvs rdiff -u -r1.1702 -r1.1703 src/distrib/sets/lists/man/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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1702 src/distrib/sets/lists/man/mi:1.1703
--- src/distrib/sets/lists/man/mi:1.1702	Tue Sep  8 19:06:49 2020
+++ src/distrib/sets/lists/man/mi	Mon Sep 21 14:03:15 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1702 2020/09/08 19:06:49 rillig Exp $
+# $NetBSD: mi,v 1.1703 2020/09/21 14:03:15 kim Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -831,7 +831,9 @@
 ./usr/share/man/cat4/amiga/ed.0			man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/efa.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/em4k.0		man-sys-catman		.cat
+./usr/share/man/cat4/amiga/emmem.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/empb.0		man-sys-catman		.cat
+./usr/share/man/cat4/amiga/empm.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/es.0			man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/fdc.0		man-sys-catman		.cat
 ./usr/share/man/cat4/amiga/grf.0		man-sys-catman		.cat
@@ -4086,7 +4088,9 @@
 ./usr/share/man/html4/amiga/ed.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/efa.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/em4k.html		man-sys-htmlman		html
+./usr/share/man/html4/amiga/emmem.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/empb.html		man-sys-htmlman		html
+./usr/share/man/html4/amiga/empm.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/es.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/fdc.html		man-sys-htmlman		html
 ./usr/share/man/html4/amiga/grf.html		man-sys-htmlman		html
@@ -7035,7 +7039,9 @@
 ./usr/share/man/man4/amiga/ed.4			man-sys-man		.man
 ./usr/share/man/man4/amiga/efa.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/em4k.4		man-sys-man		.man
+./usr/share/man/man4/amiga/emmem.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/empb.4		man-sys-man		.man
+./usr/share/man/man4/amiga/empm.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/es.4			man-sys-man		.man
 ./usr/share/man/man4/amiga/fdc.4		man-sys-man		.man
 ./usr/share/man/man4/amiga/grf.4		man-sys-man		.man



CVS commit: src/share/man/man4/man4.amiga

2020-09-21 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Sep 21 08:46:07 UTC 2020

Modified Files:
src/share/man/man4/man4.amiga: Makefile

Log Message:
Add MLINKS for empb.4


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/share/man/man4/man4.amiga/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/man4/man4.amiga/Makefile
diff -u src/share/man/man4/man4.amiga/Makefile:1.32 src/share/man/man4/man4.amiga/Makefile:1.33
--- src/share/man/man4/man4.amiga/Makefile:1.32	Wed May  1 06:47:45 2019
+++ src/share/man/man4/man4.amiga/Makefile	Mon Sep 21 08:46:07 2020
@@ -1,5 +1,5 @@
 # 	from: @(#)Makefile	8.2 (Berkeley) 2/16/94
-#	$NetBSD: Makefile,v 1.32 2019/05/01 06:47:45 mlelstv Exp $
+#	$NetBSD: Makefile,v 1.33 2020/09/21 08:46:07 kim Exp $
 
 MAN=a1k2cp.4 a2kbbc.4 a34kbbc.4 acafh.4 afsc.4 ahsc.4 amidisplaycc.4 \
 	atzsc.4 autoconf.4 console.4 bah.4 bppcsc.4 clockport.4 cv3dpb.4 \
@@ -7,7 +7,9 @@ MAN=a1k2cp.4 a2kbbc.4 a34kbbc.4 acaf
 	grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \
 	gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mntva.4 mppb.4 p5membar.4 \
 	p5pb.4 qn.4 ser.4 wesc.4 xsh.4 xsurf.4 z3rambd.4 zssc.4
-MLINKS=	mem.4 kmem.4
+MLINKS=	empb.4 emmem.4 \
+	empb.4 empm.4 \
+	mem.4 kmem.4
 MANSUBDIR=/amiga
 
 .include 



CVS commit: src/sys/dev/pci

2020-09-19 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Sep 19 07:30:32 UTC 2020

Modified Files:
src/sys/dev/pci: vioscsi.c

Log Message:
Update the Proxmox comment with link to their bugzilla


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/vioscsi.c

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/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.23 src/sys/dev/pci/vioscsi.c:1.24
--- src/sys/dev/pci/vioscsi.c:1.23	Fri Sep 18 14:55:28 2020
+++ src/sys/dev/pci/vioscsi.c	Sat Sep 19 07:30:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vioscsi.c,v 1.23 2020/09/18 14:55:28 jakllsch Exp $	*/
+/*	$NetBSD: vioscsi.c,v 1.24 2020/09/19 07:30:32 kim Exp $	*/
 /*	$OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.23 2020/09/18 14:55:28 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.24 2020/09/19 07:30:32 kim Exp $");
 
 #include 
 #include 
@@ -199,8 +199,16 @@ vioscsi_attach(device_t parent, device_t
 	/*
 	 * XXX Remove this when scsipi is REPORT LUNS-aware.
 	 * scsipi(4) insists that LUNs must be contiguous starting from 0.
-	 * This is not true on Linode (circa 2020) and Proxmox 6 hosts
-	 * with more than one disk exported to guest.
+	 * This is not true on Linode (circa 2020).
+	 *
+	 * Also if explicitly selecting the 'Virtio SCSI Single'
+	 * controller (which is not the default SCSI controller) on
+	 * Proxmox hosts, each disk will be on its own scsi bus at
+	 * target 0 but unexpectedly on a LUN matching the drive number
+	 * on the system (i.e. drive 0 will be bus 0, target 0, lun
+	 * 0; drive 1 will be bus 1, target 0, lun 1, drive 2 will be
+	 * bus 2, target 0, lun 2 -- which is where the gaps start
+	 * happening). https://bugzilla.proxmox.com/show_bug.cgi?id=2985
 	 */
 	chan->chan_defquirks = PQUIRK_FORCELUNS;
 



CVS commit: src

2020-09-14 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Sep 14 09:02:11 UTC 2020

Modified Files:
src: build.sh

Log Message:
Fix typo in usage


To generate a diff of this commit:
cvs rdiff -u -r1.343 -r1.344 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.343 src/build.sh:1.344
--- src/build.sh:1.343	Sun Jul 26 09:17:24 2020
+++ src/build.sh	Mon Sep 14 09:02:11 2020
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.343 2020/07/26 09:17:24 rillig Exp $
+#	$NetBSD: build.sh,v 1.344 2020/09/14 09:02:11 kim Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1028,7 +1028,7 @@ usage()
 	cat <<_usage_
 
 Usage: ${progname} [-EhnoPRrUuxy] [-a arch] [-B buildid] [-C cdextras]
-[-c compiler>] [-D dest] [-j njob] [-M obj] [-m mach]
+[-c compiler] [-D dest] [-j njob] [-M obj] [-m mach]
 [-N noisy] [-O obj] [-R release] [-S seed] [-T tools]
 [-V var=[value]] [-w wrapper] [-X x11src] [-Y extsrcsrc]
 [-Z var]
@@ -1961,7 +1961,7 @@ createmakewrapper()
 	eval cat <

CVS commit: src/etc/rc.d

2020-09-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Sep 11 12:50:14 UTC 2020

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

Log Message:
Make a ": " suffix a fixed part of the release info tag

This results in correct updates to /etc/motd even when the value of
motd_release_tag is changed (a likely event).

Add safe quoting to outputting the read kernel version.

Thanks to kre@ for the feedback.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/etc/rc.d/motd

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/motd
diff -u src/etc/rc.d/motd:1.10 src/etc/rc.d/motd:1.11
--- src/etc/rc.d/motd:1.10	Fri Sep 11 09:59:35 2020
+++ src/etc/rc.d/motd	Fri Sep 11 12:50:14 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: motd,v 1.10 2020/09/11 09:59:35 kim Exp $
+# $NetBSD: motd,v 1.11 2020/09/11 12:50:14 kim Exp $
 #
 
 # PROVIDE: motd
@@ -26,13 +26,13 @@ motd_start()
 	fi
 	( umask 022
 	T=/etc/_motd
-	sysctl -n kern.version | while read i; do echo $i; break; done > $T
+	sysctl -n kern.version | while read i; do echo "$i"; break; done > $T
 	if checkyesno update_motd_release; then
-		local t="${motd_release_tag}"
-		sed -En '1{/^NetBSD/{s/^/'"$t"'/;h;d;};q;}
+		local t=$(echo "${motd_release_tag%%:*}" | tr -d /)
+		sed -En '1{/^NetBSD/{'"${t:+s/^/${t}: /;}"'h;d;};q;}
 		/^ *Build ID */{s//(/;s/$/)/;H;g;y/\n/ /;p;q;}
 		${g;p;}' < /etc/release >> $T
-		sed -E '1,2{/^'"${t+(${t})?}"'NetBSD/{d;};};' \
+		sed -E '1,2{/^([^:]*: )?NetBSD/{d;};};' \
 		< /etc/motd >> $T
 	else
 		sed '1{/^NetBSD.*/{d;};};' < /etc/motd >> $T



CVS commit: src/share/man/man5

2020-09-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Sep 11 12:01:59 UTC 2020

Modified Files:
src/share/man/man5: rc.conf.5

Log Message:
Document update_motd_release and motd_release_tag


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/share/man/man5/rc.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/share/man/man5/rc.conf.5
diff -u src/share/man/man5/rc.conf.5:1.185 src/share/man/man5/rc.conf.5:1.186
--- src/share/man/man5/rc.conf.5:1.185	Wed Jul 15 17:55:34 2020
+++ src/share/man/man5/rc.conf.5	Fri Sep 11 12:01:59 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rc.conf.5,v 1.185 2020/07/15 17:55:34 leot Exp $
+.\"	$NetBSD: rc.conf.5,v 1.186 2020/09/11 12:01:59 kim Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -55,7 +55,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 15, 2020
+.Dd September 11, 2020
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -607,6 +607,18 @@ version string in the
 file to reflect the version of the running kernel.
 See
 .Xr motd 5 .
+.It Sy update_motd_release
+Boolean value.
+If enabled in addition to
+.Sy update_motd ,
+updates a second
+.Nx
+version string in the
+.Pa /etc/motd
+file to reflect the version, architecture, and Build ID of
+the installed userland. An optional prefix can be provided
+for this version string in
+.Sy motd_release_tag .
 .It Sy virecover
 Boolean value.
 Send notification mail to users if any recoverable files exist in



CVS commit: src/etc

2020-09-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Sep 11 09:59:36 UTC 2020

Modified Files:
src/etc/defaults: rc.conf
src/etc/rc.d: motd

Log Message:
Add optional release info in /etc/motd

My personal preferencese for /etc/rc.conf:

update_motd_release=YES
motd_release_tag='Binaries: '

This provides an explanation to users about the second version in motd.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/etc/defaults/rc.conf
cvs rdiff -u -r1.9 -r1.10 src/etc/rc.d/motd

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.158 src/etc/defaults/rc.conf:1.159
--- src/etc/defaults/rc.conf:1.158	Mon Jun 15 01:57:30 2020
+++ src/etc/defaults/rc.conf	Fri Sep 11 09:59:35 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.158 2020/06/15 01:57:30 christos Exp $
+#	$NetBSD: rc.conf,v 1.159 2020/09/11 09:59:35 kim Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -133,6 +133,7 @@ per_user_tmp=NO	# per-user /tmp dire
 per_user_tmp_dir="/private/tmp"			# real storage for /tmp
 clear_tmp=YES	# clear /tmp after reboot
 update_motd=YES	# updates /etc/motd
+update_motd_release=NO	motd_release_tag=""	# release info in /etc/motd
 dmesg=YES		dmesg_flags="-t"	# write /var/run/dmesg.boot
 accounting=NO	# uses /var/account/acct
 newsyslog=NO		newsyslog_flags=""	# trim log files

Index: src/etc/rc.d/motd
diff -u src/etc/rc.d/motd:1.9 src/etc/rc.d/motd:1.10
--- src/etc/rc.d/motd:1.9	Fri Aug 13 18:08:03 2004
+++ src/etc/rc.d/motd	Fri Sep 11 09:59:35 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: motd,v 1.9 2004/08/13 18:08:03 mycroft Exp $
+# $NetBSD: motd,v 1.10 2020/09/11 09:59:35 kim Exp $
 #
 
 # PROVIDE: motd
@@ -16,7 +16,7 @@ stop_cmd=":"
 
 motd_start()
 {
-	#	Update kernel info in /etc/motd
+	#	Update kernel and release info in /etc/motd
 	#	Must be done *before* interactive logins are possible
 	#	to prevent possible race conditions.
 	#
@@ -27,7 +27,16 @@ motd_start()
 	( umask 022
 	T=/etc/_motd
 	sysctl -n kern.version | while read i; do echo $i; break; done > $T
-	sed '1{/^NetBSD.*/{d;};};' < /etc/motd >> $T
+	if checkyesno update_motd_release; then
+		local t="${motd_release_tag}"
+		sed -En '1{/^NetBSD/{s/^/'"$t"'/;h;d;};q;}
+		/^ *Build ID */{s//(/;s/$/)/;H;g;y/\n/ /;p;q;}
+		${g;p;}' < /etc/release >> $T
+		sed -E '1,2{/^'"${t+(${t})?}"'NetBSD/{d;};};' \
+		< /etc/motd >> $T
+	else
+		sed '1{/^NetBSD.*/{d;};};' < /etc/motd >> $T
+	fi
 	cmp -s $T /etc/motd || cp $T /etc/motd
 	rm -f $T
 	)



CVS commit: src/external/gpl2/groff/tmac

2020-09-02 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed Sep  2 09:28:25 UTC 2020

Modified Files:
src/external/gpl2/groff/tmac: mdoc.local

Log Message:
Reflect that this is current by using ".99" in the Os version

This helps distinguising NetBSD-current pages from NetBSD-9.0 pages better
on man.netbsd.org, which is still using nroff. (Using mandoc needs more
tweaking to avoid all page footers reflecting the uname release of the
web server.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/groff/tmac/mdoc.local

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

Modified files:

Index: src/external/gpl2/groff/tmac/mdoc.local
diff -u src/external/gpl2/groff/tmac/mdoc.local:1.6 src/external/gpl2/groff/tmac/mdoc.local:1.7
--- src/external/gpl2/groff/tmac/mdoc.local:1.6	Tue Jul 30 15:56:53 2019
+++ src/external/gpl2/groff/tmac/mdoc.local	Wed Sep  2 09:28:25 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.6 2019/07/30 15:56:53 martin Exp $
+.\" $NetBSD: mdoc.local,v 1.7 2020/09/02 09:28:25 kim Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~9.0
+.ds doc-operating-system NetBSD\~9.99
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~9.0
+.ds doc-default-operating-system NetBSD\~9.99
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3



CVS commit: src/share/man/man8/man8.x86

2020-08-09 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Aug  9 18:54:59 UTC 2020

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Fix cross-refs to x86/mbr that were still missing x86

Additionally made some typo fixes, and added some vertical whitespace
to lists that felt crowded. Unified markup for displaying commands.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/man/man8/man8.x86/boot.8

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/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.21 src/share/man/man8/man8.x86/boot.8:1.22
--- src/share/man/man8/man8.x86/boot.8:1.21	Wed Jul 15 12:38:30 2020
+++ src/share/man/man8/man8.x86/boot.8	Sun Aug  9 18:54:59 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.8,v 1.21 2020/07/15 12:38:30 kim Exp $
+.\"	$NetBSD: boot.8,v 1.22 2020/08/09 18:54:59 kim Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -178,7 +178,7 @@ The default
 .Va device
 will be set to the disk from which the boot loader was loaded.
 The partition is set to the first match in this list:
-.Bl -enum -compact
+.Bl -enum
 .It
 The first
 .Xr gpt 8
@@ -193,6 +193,7 @@ The first partition with a file system t
 .It
 The first partition.
 .El
+.Pp
 To boot from an alternate disk, the full name of the device should
 be given at the prompt.
 .Va device
@@ -213,10 +214,9 @@ is the unit number, and
 .Va x
 is the partition letter.
 .Pp
-In the later case, the following list of supported devices may
+In the latter case, the following list of supported devices may
 vary from installation to installation:
-.Pp
-.Bl -hang -compact
+.Bl -hang
 .It hd
 Hard disks as numbered by the BIOS.
 This includes ST506, IDE, ESDI, RLL disks on a WD100[2367] or
@@ -767,7 +767,7 @@ directory in a
 formatted partition of type
 .Tn EFI
 (Either
-.Xr mbr 8
+.Xr x86/mbr 8
 and
 .Xr gpt 8 ,
 see the
@@ -839,10 +839,10 @@ disklabel (if it is a hard disk).
 .Pp
 .Tn UEFI
 implementation are supposed to support either
-.Xr mbr 8
+.Xr x86/mbr 8
 or
 .Xr gpt 8
-partitionning, but some do not handle the later.
+partitioning, but some do not handle the latter.
 .Tn UEFI
 Booting
 from a
@@ -851,17 +851,20 @@ partitioned disk is still possible in th
 an overlapping
 .Tn EFI
 partition in the protective
-.Xr mbr 8
+.Xr x86/mbr 8
 block.
 This can be achieved using the following commands
 (you must adapt the hard disk and
 .Tn EFI
 partition start end size to fit your setup):
-.Dl Ic dd if=/dev/rwd0d bs=512 count=1 of=mbr
-.Dl Ic fdisk -FIfaui1s 4/34/32768 -c /usr/mdec/mbr mbr
-.Dl Ic dd if=mbr bs=512 count=1 of=/dev/rwd0d conv=notrunc
+.Bd -unfilled -offset indent
+.Cm dd if=/dev/rwd0d bs=512 count=1 of=mbr
+.Cm fdisk -FIfaui1s 4/34/32768 -c /usr/mdec/mbr mbr
+.Cm dd if=mbr bs=512 count=1 of=/dev/rwd0d conv=notrunc
+.Ed
+.Pp
 The resulting
-.Xr mbr 8
+.Xr x86/mbr 8
 partition table will look like this:
 .Bd -unfilled -offset indent
 0: GPT Protective MBR (sysid 238)



CVS commit: src/usr.bin/w

2020-08-01 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Aug  1 17:53:38 UTC 2020

Modified Files:
src/usr.bin/w: w.c

Log Message:
Skip bracket processing if -n is used.

XXX: This could be improved to skip even more processing.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/w/w.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/w/w.c
diff -u src/usr.bin/w/w.c:1.89 src/usr.bin/w/w.c:1.90
--- src/usr.bin/w/w.c:1.89	Sat Aug  1 17:25:57 2020
+++ src/usr.bin/w/w.c	Sat Aug  1 17:53:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.89 2020/08/01 17:25:57 kim Exp $	*/
+/*	$NetBSD: w.c,v 1.90 2020/08/01 17:53:38 kim Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)w.c	8.6 (Berkeley) 6/30/94";
 #else
-__RCSID("$NetBSD: w.c,v 1.89 2020/08/01 17:25:57 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.90 2020/08/01 17:53:38 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -654,7 +654,7 @@ fixhost(struct entry *ep)
 	 * Leading '[' indicates an IP address inside brackets.
 	 */
 	b = NULL;
-	if (*p == '[') {
+	if (!nflag && (*p == '[')) {
 		for (b = p++; b < _buf[sizeof(host_buf)]; b++)
 			if (*b == '\0' || *b == ']')
 break;



CVS commit: src/usr.bin/w

2020-08-01 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Aug  1 17:25:57 UTC 2020

Modified Files:
src/usr.bin/w: w.c

Log Message:
Restore ']' if not using a result from an address lookup.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/usr.bin/w/w.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/w/w.c
diff -u src/usr.bin/w/w.c:1.88 src/usr.bin/w/w.c:1.89
--- src/usr.bin/w/w.c:1.88	Sat Aug  1 15:52:50 2020
+++ src/usr.bin/w/w.c	Sat Aug  1 17:25:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.88 2020/08/01 15:52:50 kim Exp $	*/
+/*	$NetBSD: w.c,v 1.89 2020/08/01 17:25:57 kim Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)w.c	8.6 (Berkeley) 6/30/94";
 #else
-__RCSID("$NetBSD: w.c,v 1.88 2020/08/01 15:52:50 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.89 2020/08/01 17:25:57 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -621,7 +621,7 @@ static void
 fixhost(struct entry *ep)
 {
 	char host_buf[sizeof(ep->host)];
-	char *p, *r, *x, *m;
+	char *b, *m, *p, *r, *x;
 	struct hostent *hp;
 	union {
 		struct in_addr l4;
@@ -653,19 +653,20 @@ fixhost(struct entry *ep)
 	/*
 	 * Leading '[' indicates an IP address inside brackets.
 	 */
+	b = NULL;
 	if (*p == '[') {
-		for (p++; p < _buf[sizeof(host_buf)]; p++)
-			if (*p == '\0' || *p == ']')
+		for (b = p++; b < _buf[sizeof(host_buf)]; b++)
+			if (*b == '\0' || *b == ']')
 break;
-		if (p < _buf[sizeof(host_buf)] && *p == ']') {
-			*p = '\0';
-			for (x = ++p; x < _buf[sizeof(host_buf)]; x++)
+		if (b < _buf[sizeof(host_buf)] && *b == ']') {
+			*b = '\0';
+			for (x = b + 1; x < _buf[sizeof(host_buf)]; x++)
 if (*x == '\0' || *x == ':')
 	break;
 			if (x < _buf[sizeof(host_buf)] && *x == ':')
 *x++ = '\0';
-		}
-		p = host_buf + 1;
+		} else
+			b = NULL;
 	}
 
 	int af = m ? AF_INET6 : AF_INET;
@@ -673,8 +674,11 @@ fixhost(struct entry *ep)
 	if (!nflag && inet_pton(af, p, ) &&
 	(hp = gethostbyaddr((char *), alen, af)))
 		r = hp->h_name;
-	else
+	else {
+		if (b)
+			*b = ']';
 		r = host_buf;
+	}
 
 	if (domain[0] != '\0') {
 		p = r;



CVS commit: src/usr.bin/w

2020-08-01 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Aug  1 15:52:50 UTC 2020

Modified Files:
src/usr.bin/w: w.c

Log Message:
Handle hostname from DISPLAY="[2001:db8::dead:beef]:0" or similar.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/w/w.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/w/w.c
diff -u src/usr.bin/w/w.c:1.87 src/usr.bin/w/w.c:1.88
--- src/usr.bin/w/w.c:1.87	Sat Jul  4 23:30:31 2020
+++ src/usr.bin/w/w.c	Sat Aug  1 15:52:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.87 2020/07/04 23:30:31 kim Exp $	*/
+/*	$NetBSD: w.c,v 1.88 2020/08/01 15:52:50 kim Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)w.c	8.6 (Berkeley) 6/30/94";
 #else
-__RCSID("$NetBSD: w.c,v 1.87 2020/07/04 23:30:31 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.88 2020/08/01 15:52:50 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -650,6 +650,24 @@ fixhost(struct entry *ep)
 			x = NULL;
 	}
 
+	/*
+	 * Leading '[' indicates an IP address inside brackets.
+	 */
+	if (*p == '[') {
+		for (p++; p < _buf[sizeof(host_buf)]; p++)
+			if (*p == '\0' || *p == ']')
+break;
+		if (p < _buf[sizeof(host_buf)] && *p == ']') {
+			*p = '\0';
+			for (x = ++p; x < _buf[sizeof(host_buf)]; x++)
+if (*x == '\0' || *x == ':')
+	break;
+			if (x < _buf[sizeof(host_buf)] && *x == ':')
+*x++ = '\0';
+		}
+		p = host_buf + 1;
+	}
+
 	int af = m ? AF_INET6 : AF_INET;
 	size_t alen = m ? sizeof(l.l6) : sizeof(l.l4);
 	if (!nflag && inet_pton(af, p, ) &&



CVS commit: src/share/man/man8/man8.x86

2020-07-15 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed Jul 15 12:38:30 UTC 2020

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Document optional speed argument to consdev


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man8/man8.x86/boot.8

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/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.20 src/share/man/man8/man8.x86/boot.8:1.21
--- src/share/man/man8/man8.x86/boot.8:1.20	Mon Sep 16 01:57:58 2019
+++ src/share/man/man8/man8.x86/boot.8	Wed Jul 15 12:38:30 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.8,v 1.20 2019/09/16 01:57:58 manu Exp $
+.\"	$NetBSD: boot.8,v 1.21 2020/07/15 12:38:30 kim Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\"
-.Dd September 13, 2019
+.Dd July 15, 2020
 .Dt BOOT 8 x86
 .Os
 .Sh NAME
@@ -363,7 +363,7 @@ flag in
 .Va boothowto .
 Boot the system in silent mode.
 .El
-.It Ic consdev Va dev
+.It Ic consdev Va dev Ns Oo Ns , Ns Va speed Oc
 Immediately switch the console to the specified device
 .Va dev
 and reprint the banner.
@@ -379,6 +379,17 @@ See
 .Sx Console Selection Policy
 in
 .Xr x86/boot_console 8 .
+.Pp
+A
+.Va speed
+for the serial port is optional and defaults to 9600.
+If a value of zero is specified, then the current baud rate (set by the
+BIOS) will be used.
+Setting the
+.Va speed
+with the
+.Ar pc
+device is not possible.
 .It Ic dev Op Va device
 Set the default drive and partition for subsequent file system
 operations.



CVS commit: src/sys/arch/i386/stand/boot

2020-07-15 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed Jul 15 12:36:30 UTC 2020

Modified Files:
src/sys/arch/i386/stand/boot: boot2.c

Log Message:
Let consdev command also set speed

Adapted from PR install/55490 by Sunil Nimmagadda


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/i386/stand/boot/boot2.c

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/i386/stand/boot/boot2.c
diff -u src/sys/arch/i386/stand/boot/boot2.c:1.73 src/sys/arch/i386/stand/boot/boot2.c:1.74
--- src/sys/arch/i386/stand/boot/boot2.c:1.73	Sat Apr  4 19:50:54 2020
+++ src/sys/arch/i386/stand/boot/boot2.c	Wed Jul 15 12:36:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot2.c,v 1.73 2020/04/04 19:50:54 christos Exp $	*/
+/*	$NetBSD: boot2.c,v 1.74 2020/07/15 12:36:30 kim Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -449,7 +449,7 @@ command_help(char *arg)
 	   "ls [dev:][path]\n"
 #endif
 	   "dev [dev:]\n"
-	   "consdev {pc|com[0123]|com[0123]kbd|auto}\n"
+	   "consdev {pc|{com[0123]|com[0123]kbd|auto}[,{speed}]}\n"
 	   "vesa {modenum|on|off|enabled|disabled|list}\n"
 #ifndef SMALL
 	   "menu (reenters boot menu, if defined in boot.cfg)\n"
@@ -581,14 +581,32 @@ void
 command_consdev(char *arg)
 {
 	const struct cons_devs *cdp;
+	char *sep;
+	int speed;
+
+	sep = strchr(arg, ',');
+	if (sep != NULL)
+		*sep++ = '\0';
 
 	for (cdp = cons_devs; cdp->name; cdp++) {
-		if (strcmp(arg, cdp->name) == 0) {
-			initio(cdp->tag);
-			print_banner();
-			return;
+		if (strcmp(arg, cdp->name) != 0)
+			continue;
+
+		if (sep != NULL) {
+			if (cdp->tag == CONSDEV_PC)
+goto error;
+
+			speed = atoi(sep);
+			if (speed < 0)
+goto error;
+			boot_params.bp_conspeed = speed;
 		}
+
+		initio(cdp->tag);
+		print_banner();
+		return;
 	}
+error:
 	printf("invalid console device.\n");
 }
 



CVS commit: src/sys/dev/i2c

2020-07-12 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Jul 12 08:48:49 UTC 2020

Modified Files:
src/sys/dev/i2c: dbcool_var.h

Log Message:
Make this compile


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/i2c/dbcool_var.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/dev/i2c/dbcool_var.h
diff -u src/sys/dev/i2c/dbcool_var.h:1.16 src/sys/dev/i2c/dbcool_var.h:1.17
--- src/sys/dev/i2c/dbcool_var.h:1.16	Thu Apr 16 23:29:53 2020
+++ src/sys/dev/i2c/dbcool_var.h	Sun Jul 12 08:48:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dbcool_var.h,v 1.16 2020/04/16 23:29:53 rin Exp $ */
+/*	$NetBSD: dbcool_var.h,v 1.17 2020/07/12 08:48:49 kim Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dbcool_var.h,v 1.16 2020/04/16 23:29:53 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcool_var.h,v 1.17 2020/07/12 08:48:49 kim Exp $");
 
 #include 
 
@@ -129,6 +129,7 @@ struct dbcool_softc {
 	int64_t sc_supply_voltage;
 	bool sc_suspend;
 	struct sysctllog *sc_sysctl_log;
+	prop_dictionary_t sc_prop;
 #ifdef DBCOOL_DEBUG
 	uint8_t sc_user_reg;
 #endif



CVS commit: src/sys/dev/pci

2020-07-12 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Jul 12 06:40:11 UTC 2020

Modified Files:
src/sys/dev/pci: vioscsi.c

Log Message:
Fix off-by-one SCSI target reporting

Use max_target as the controller ID instead of zero, so that the device
located at SCSI ID zero (e.g. a disk) is not obscured through not being
probed by scsi_probe_bus() (which skips the controller ID).

Copy the target requested onto the wire without decrementing it by one.

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/vioscsi.c

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/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.21 src/sys/dev/pci/vioscsi.c:1.22
--- src/sys/dev/pci/vioscsi.c:1.21	Sat Apr 13 06:17:33 2019
+++ src/sys/dev/pci/vioscsi.c	Sun Jul 12 06:40:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vioscsi.c,v 1.21 2019/04/13 06:17:33 maxv Exp $	*/
+/*	$NetBSD: vioscsi.c,v 1.22 2020/07/12 06:40:11 kim Exp $	*/
 /*	$OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.21 2019/04/13 06:17:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.22 2020/07/12 06:40:11 kim Exp $");
 
 #include 
 #include 
@@ -194,7 +194,7 @@ vioscsi_attach(device_t parent, device_t
 	chan->chan_channel = 0;
 	chan->chan_ntargets = MIN(max_target, 16);	/* cap reasonably */
 	chan->chan_nluns = MIN(max_lun, 1024);		/* cap reasonably */
-	chan->chan_id = 0;
+	chan->chan_id = max_target;
 	chan->chan_flags = SCSIPI_CHAN_NOSETTLE;
 
 	config_found(self, >sc_channel, scsiprint);
@@ -318,7 +318,7 @@ vioscsi_scsipi_request(struct scsipi_cha
 	}
 
 	req->lun[0] = 1;
-	req->lun[1] = periph->periph_target - 1;
+	req->lun[1] = periph->periph_target;
 	req->lun[2] = 0x40 | ((periph->periph_lun >> 8) & 0x3F);
 	req->lun[3] = periph->periph_lun & 0xFF;
 	memset(req->lun + 4, 0, 4);



CVS commit: src/sys/dev/scsipi

2020-07-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Jul 11 14:31:46 UTC 2020

Modified Files:
src/sys/dev/scsipi: scsiconf.c

Log Message:
Continue scanning a SCSI bus when a LUN is reported not present

This fixes disk attachment under Qemu when there is no disk on LUN 0 on
a SCSI bus but there is a disk on LUN 1. The inquiry for LUN 0 returns
SID_QUAL_LU_NOTPRESENT & T_NODEVICE.  Quirks are only checked if neither
one of those are set, so cannot use a quirk entry.

Use case 1: Proxmox 6 configures each disk on its own bus when using
the "Virtio SCSI single" SCSI controller. However, while the "scsi0"
disk is on LUN 0, the "scsi1" disk is on LUN 1.

Use case 2: A Linode boot profile with multiple disks results in
the first disk ("sda") on LUN 1, while the second disk ("sdb") is
on LUN 0, each on their own bus.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/dev/scsipi/scsiconf.c

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/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.287 src/sys/dev/scsipi/scsiconf.c:1.288
--- src/sys/dev/scsipi/scsiconf.c:1.287	Sat May  2 06:45:53 2020
+++ src/sys/dev/scsipi/scsiconf.c	Sat Jul 11 14:31:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $");
 
 #include 
 #include 
@@ -883,6 +883,8 @@ scsi_probe_device(struct scsibus_softc *
 		break;
 
 	case SID_QUAL_LU_NOTPRESENT:
+		docontinue = 1;
+		/* FALLTHROUGH */
 	case SID_QUAL_reserved:
 	case SID_QUAL_LU_NOT_SUPP:
 		goto bad;



CVS commit: src/usr.bin/w

2020-07-04 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Jul  4 23:30:32 UTC 2020

Modified Files:
src/usr.bin/w: w.c

Log Message:
Don't overwrite host_buf as x might be pointing to wanted data in it


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/usr.bin/w/w.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/w/w.c
diff -u src/usr.bin/w/w.c:1.86 src/usr.bin/w/w.c:1.87
--- src/usr.bin/w/w.c:1.86	Tue Jun 30 15:02:55 2020
+++ src/usr.bin/w/w.c	Sat Jul  4 23:30:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.86 2020/06/30 15:02:55 kim Exp $	*/
+/*	$NetBSD: w.c,v 1.87 2020/07/04 23:30:31 kim Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)w.c	8.6 (Berkeley) 6/30/94";
 #else
-__RCSID("$NetBSD: w.c,v 1.86 2020/06/30 15:02:55 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.87 2020/07/04 23:30:31 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -621,7 +621,7 @@ static void
 fixhost(struct entry *ep)
 {
 	char host_buf[sizeof(ep->host)];
-	char *p, *x, *m;
+	char *p, *r, *x, *m;
 	struct hostent *hp;
 	union {
 		struct in_addr l4;
@@ -649,26 +649,28 @@ fixhost(struct entry *ep)
 		} else
 			x = NULL;
 	}
+
 	int af = m ? AF_INET6 : AF_INET;
 	size_t alen = m ? sizeof(l.l6) : sizeof(l.l4);
 	if (!nflag && inet_pton(af, p, ) &&
 	(hp = gethostbyaddr((char *), alen, af)))
-		strlcpy(host_buf, hp->h_name, sizeof(host_buf));
+		r = hp->h_name;
+	else
+		r = host_buf;
 
 	if (domain[0] != '\0') {
-		p = host_buf;
-		p += strlen(host_buf);
+		p = r;
+		p += strlen(r);
 		p -= strlen(domain);
-		if (p > host_buf &&
+		if (p > r &&
 		strcasecmp(p, domain) == 0)
 			*p = '\0';
 	}
 
 	if (x)
-		(void)snprintf(ep->host, sizeof(ep->host), "%s:%s", host_buf,
-		x);
+		(void)snprintf(ep->host, sizeof(ep->host), "%s:%s", r, x);
 	else
-		strlcpy(ep->host, host_buf, sizeof(ep->host));
+		strlcpy(ep->host, r, sizeof(ep->host));
 }
 
 static void



CVS commit: src/usr.bin/w

2020-06-30 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Tue Jun 30 15:02:55 UTC 2020

Modified Files:
src/usr.bin/w: w.c

Log Message:
Remove local domain always, not just when looking up addresses


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/usr.bin/w/w.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/w/w.c
diff -u src/usr.bin/w/w.c:1.85 src/usr.bin/w/w.c:1.86
--- src/usr.bin/w/w.c:1.85	Tue Jun 30 14:57:25 2020
+++ src/usr.bin/w/w.c	Tue Jun 30 15:02:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.85 2020/06/30 14:57:25 kim Exp $	*/
+/*	$NetBSD: w.c,v 1.86 2020/06/30 15:02:55 kim Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)w.c	8.6 (Berkeley) 6/30/94";
 #else
-__RCSID("$NetBSD: w.c,v 1.85 2020/06/30 14:57:25 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.86 2020/06/30 15:02:55 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -652,23 +652,23 @@ fixhost(struct entry *ep)
 	int af = m ? AF_INET6 : AF_INET;
 	size_t alen = m ? sizeof(l.l6) : sizeof(l.l4);
 	if (!nflag && inet_pton(af, p, ) &&
-	(hp = gethostbyaddr((char *), alen, af))) {
-		if (domain[0] != '\0') {
-			p = hp->h_name;
-			p += strlen(hp->h_name);
-			p -= strlen(domain);
-			if (p > hp->h_name &&
-			strcasecmp(p, domain) == 0)
-*p = '\0';
-		}
-		p = hp->h_name;
+	(hp = gethostbyaddr((char *), alen, af)))
+		strlcpy(host_buf, hp->h_name, sizeof(host_buf));
+
+	if (domain[0] != '\0') {
+		p = host_buf;
+		p += strlen(host_buf);
+		p -= strlen(domain);
+		if (p > host_buf &&
+		strcasecmp(p, domain) == 0)
+			*p = '\0';
 	}
 
 	if (x)
-		(void)snprintf(ep->host, sizeof(ep->host), "%s:%s", p, x);
+		(void)snprintf(ep->host, sizeof(ep->host), "%s:%s", host_buf,
+		x);
 	else
-
-		strlcpy(ep->host, p, sizeof(ep->host));
+		strlcpy(ep->host, host_buf, sizeof(ep->host));
 }
 
 static void



CVS commit: src/usr.bin/w

2020-06-30 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Tue Jun 30 14:57:25 UTC 2020

Modified Files:
src/usr.bin/w: w.c

Log Message:
Compute a value for domain before comparing against it


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/usr.bin/w/w.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/w/w.c
diff -u src/usr.bin/w/w.c:1.84 src/usr.bin/w/w.c:1.85
--- src/usr.bin/w/w.c:1.84	Tue Oct 30 21:15:09 2018
+++ src/usr.bin/w/w.c	Tue Jun 30 14:57:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.84 2018/10/30 21:15:09 kre Exp $	*/
+/*	$NetBSD: w.c,v 1.85 2020/06/30 14:57:25 kim Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)w.c	8.6 (Berkeley) 6/30/94";
 #else
-__RCSID("$NetBSD: w.c,v 1.84 2018/10/30 21:15:09 kre Exp $");
+__RCSID("$NetBSD: w.c,v 1.85 2020/06/30 14:57:25 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -205,6 +205,18 @@ main(int argc, char **argv)
 			curtain = 0;
 	}
 
+	if (!nflag) {
+		int	rv;
+		char	*p;
+
+		rv = gethostname(domain, sizeof(domain));
+		domain[sizeof(domain) - 1] = '\0';
+		if (rv < 0 || (p = strchr(domain, '.')) == 0)
+			domain[0] = '\0';
+		else
+			memmove(domain, p, strlen(p) + 1);
+	}
+
 #ifdef SUPPORT_UTMPX
 	setutxent();
 #endif
@@ -388,18 +400,6 @@ main(int argc, char **argv)
 	}
 #endif
 
-	if (!nflag) {
-		int	rv;
-		char	*p;
-
-		rv = gethostname(domain, sizeof(domain));
-		domain[sizeof(domain) - 1] = '\0';
-		if (rv < 0 || (p = strchr(domain, '.')) == 0)
-			domain[0] = '\0';
-		else
-			memmove(domain, p, strlen(p) + 1);
-	}
-
 	for (ep = ehead; ep != NULL; ep = ep->next) {
 		if (ep->tp != NULL)
 			kp = ep->tp;



CVS commit: src/usr.bin/cal

2020-06-29 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Jun 29 14:01:14 UTC 2020

Modified Files:
src/usr.bin/cal: cal.c

Log Message:
Use two-letter weekday abbreviations in the heading

This matches output from ncal (a.k.a. cal) as found in FreeBSD and
bsdmainutils. (Why had "T" been found more ambiguous than "S" already?)


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/cal/cal.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/cal/cal.c
diff -u src/usr.bin/cal/cal.c:1.29 src/usr.bin/cal/cal.c:1.30
--- src/usr.bin/cal/cal.c:1.29	Tue Jun 16 22:54:10 2015
+++ src/usr.bin/cal/cal.c	Mon Jun 29 14:01:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cal.c,v 1.29 2015/06/16 22:54:10 christos Exp $	*/
+/*	$NetBSD: cal.c,v 1.30 2020/06/29 14:01:14 kim Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)cal.c	8.4 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: cal.c,v 1.29 2015/06/16 22:54:10 christos Exp $");
+__RCSID("$NetBSD: cal.c,v 1.30 2020/06/29 14:01:14 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -88,8 +88,8 @@ static const char *month_names[12] = {
 	"July", "August", "September", "October", "November", "December",
 };
 
-static const char *day_headings = " S  M Tu  W Th  F  S";
-static const char *j_day_headings = "  S   M  Tu   W  Th   F   S";
+static const char *day_headings = "Su Mo Tu We Th Fr Sa";
+static const char *j_day_headings = " Su  Mo  Tu  We  Th  Fr  Sa";
 
 /* leap years according to the julian calendar */
 #define j_leap_year(y, m, d) \



CVS commit: src/etc/mtree

2020-06-27 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Jun 28 03:05:59 UTC 2020

Modified Files:
src/etc/mtree: special

Log Message:
Fix /private/tmp mode to match etc/rc.d/perusertmp


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/etc/mtree/special

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

Modified files:

Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.169 src/etc/mtree/special:1.170
--- src/etc/mtree/special:1.169	Mon Jun 15 01:57:30 2020
+++ src/etc/mtree/special	Sun Jun 28 03:05:59 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: special,v 1.169 2020/06/15 01:57:30 christos Exp $
+#	$NetBSD: special,v 1.170 2020/06/28 03:05:59 kim Exp $
 #	@(#)special	8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -356,7 +356,7 @@
 ./etc/zfs			type=dir  mode=0755
 
 ./private			type=dir mode=0755 optional
-./private/tmp			type=dir mode=0111 optional ignore
+./private/tmp			type=dir mode=0555 optional ignore
 
 ./roottype=dir  mode=0755
 ./root/.cshrc			type=file mode=0644



CVS commit: src/usr.bin/finger

2020-05-07 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Thu May  7 13:40:20 UTC 2020

Modified Files:
src/usr.bin/finger: finger.1 util.c

Log Message:
Add lastlogx support


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/finger/finger.1
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/finger/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/finger/finger.1
diff -u src/usr.bin/finger/finger.1:1.21 src/usr.bin/finger/finger.1:1.22
--- src/usr.bin/finger/finger.1:1.21	Thu Jan 30 23:59:59 2020
+++ src/usr.bin/finger/finger.1	Thu May  7 13:40:20 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: finger.1,v 1.21 2020/01/30 23:59:59 sevan Exp $
+.\"	$NetBSD: finger.1,v 1.22 2020/05/07 13:40:20 kim Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)finger.1	8.3 (Berkeley) 5/5/94
 .\"
-.Dd January 30, 2020
+.Dd May 7, 2020
 .Dt FINGER 1
 .Os
 .Sh NAME
@@ -199,9 +199,23 @@ The
 .Fl l
 option is the only option that may be passed to a remote machine.
 .Sh FILES
-.Bl -tag -width /var/log/lastlog -compact
+.Bl -tag -width /var/log/lastlogx -compact
+.It Pa /var/run/utmpx
+The
+.Nm utmpx
+file.
+.It Pa /var/log/lastlogx
+The
+.Nm lastlogx
+file.
+.It Pa /var/run/utmp
+The
+.Nm utmp
+file.
 .It Pa /var/log/lastlog
-last login data base
+The
+.Nm lastlog
+file.
 .El
 .Sh SEE ALSO
 .Xr chpass 1 ,

Index: src/usr.bin/finger/util.c
diff -u src/usr.bin/finger/util.c:1.29 src/usr.bin/finger/util.c:1.30
--- src/usr.bin/finger/util.c:1.29	Wed Mar  9 16:12:14 2016
+++ src/usr.bin/finger/util.c	Thu May  7 13:40:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.29 2016/03/09 16:12:14 chs Exp $	*/
+/*	$NetBSD: util.c,v 1.30 2020/05/07 13:40:20 kim Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -72,7 +72,7 @@
 #if 0
 static char sccsid[] = "@(#)util.c	8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: util.c,v 1.29 2016/03/09 16:12:14 chs Exp $");
+__RCSID("$NetBSD: util.c,v 1.30 2020/05/07 13:40:20 kim Exp $");
 #endif
 #endif /* not lint */
 
@@ -90,7 +90,6 @@ __RCSID("$NetBSD: util.c,v 1.29 2016/03/
 #include 
 #include 
 #include 
-#include 
 
 #include "utmpentry.h"
 
@@ -160,15 +159,40 @@ void
 enter_lastlog(PERSON *pn)
 {
 	WHERE *w;
-	static int opened, fd;
+	static int opened;
+#ifdef SUPPORT_UTMPX
+# define ll_time	ll_tv.tv_sec
+# define UT_LINESIZE	_UTX_LINESIZE
+# define UT_HOSTSIZE	_UTX_HOSTSIZE
+	static DB *lldb = NULL;
+	DBT key, data;
+	struct lastlogx ll;
+#else
+	static int fd;
 	struct lastlog ll;
+#endif
 	char doit = 0;
 
+	(void)memset(, 0, sizeof(ll));
+
 	/* some systems may not maintain lastlog, don't report errors. */
 	if (!opened) {
+#ifdef SUPPORT_UTMPX
+		lldb = dbopen(_PATH_LASTLOGX, O_RDONLY|O_SHLOCK, 0, DB_HASH, NULL);
+#else
 		fd = open(_PATH_LASTLOG, O_RDONLY, 0);
+#endif
 		opened = 1;
 	}
+#ifdef SUPPORT_UTMPX
+	if (lldb != NULL) {
+		key.data = >uid;
+		key.size = sizeof(pn->uid);
+		if ((*lldb->get)(lldb, , , 0) == 0 &&
+		data.size == sizeof(ll))
+			(void)memcpy(, data.data, sizeof(ll));
+	}
+#else
 	if (fd == -1 ||
 	lseek(fd, (off_t)pn->uid * sizeof(ll), SEEK_SET) !=
 	(off_t)pn->uid * (off_t)sizeof(ll) ||
@@ -177,6 +201,7 @@ enter_lastlog(PERSON *pn)
 			ll.ll_line[0] = ll.ll_host[0] = '\0';
 			ll.ll_time = 0;
 		}
+#endif
 	if ((w = pn->whead) == NULL)
 		doit = 1;
 	else if (ll.ll_time != 0) {



CVS commit: src/usr.sbin/lastlogin

2020-05-06 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed May  6 19:45:39 UTC 2020

Modified Files:
src/usr.sbin/lastlogin: lastlogin.c

Log Message:
Output records in original order

Append to the list of output records instead of pushing on it, so we
don't reverse the order of records (when not sorting).


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/lastlogin/lastlogin.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.sbin/lastlogin/lastlogin.c
diff -u src/usr.sbin/lastlogin/lastlogin.c:1.18 src/usr.sbin/lastlogin/lastlogin.c:1.19
--- src/usr.sbin/lastlogin/lastlogin.c:1.18	Wed May  6 19:31:32 2020
+++ src/usr.sbin/lastlogin/lastlogin.c	Wed May  6 19:45:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lastlogin.c,v 1.18 2020/05/06 19:31:32 kim Exp $	*/
+/*	$NetBSD: lastlogin.c,v 1.19 2020/05/06 19:45:39 kim Exp $	*/
 /*
  * Copyright (c) 1996 John M. Vinopal
  * All rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: lastlogin.c,v 1.18 2020/05/06 19:31:32 kim Exp $");
+__RCSID("$NetBSD: lastlogin.c,v 1.19 2020/05/06 19:45:39 kim Exp $");
 #endif
 
 #include 
@@ -95,6 +95,7 @@ struct output {
 #define DOSORT(x)	((x) & (SORT_TIME))
 static	int sortlog = SORT_NONE;
 static	struct output *outstack = NULL;
+static	struct output *outstack_p = NULL;
 
 static int fixed = 0;
 #define FIXED_NAMELEN	UT_NAMESIZE
@@ -121,7 +122,7 @@ static	void		dolastlog(const char *, int
 static	void		process_entryx(struct passwd *, struct lastlogx *);
 static	void		dolastlogx(const char *, int, char *[]);
 #endif
-static	void		push_record(struct output *);
+static	void		append_record(struct output *);
 static	void		sizecolumns(struct output *);
 static	void		output_stack(struct output *);
 static	void		sort_and_output_stack(struct output *);
@@ -289,7 +290,7 @@ process_entry(struct passwd *p, struct l
 	 * onto a stack.  Otherwise, we can just output it.
 	 */
 	if (SIZECOLUMNS || DOSORT(sortlog))
-		push_record();
+		append_record();
 	else
 		output_record();
 }
@@ -417,14 +418,14 @@ process_entryx(struct passwd *p, struct 
 	 * onto a stack.  Otherwise, we can just output it.
 	 */
 	if (SIZECOLUMNS || DOSORT(sortlog))
-		push_record();
+		append_record();
 	else
 		output_record();
 }
 #endif
 
 static void
-push_record(struct output *o)
+append_record(struct output *o)
 {
 	struct output	*out;
 
@@ -434,12 +435,10 @@ push_record(struct output *o)
 	(void)memcpy(out, o, sizeof(*out));
 	out->next = NULL;
 
-	if (outstack) {
-		out->next = outstack;
-		outstack = out;
-	} else {
-		outstack = out;
-	}
+	if (outstack_p)
+		outstack_p = outstack_p->next = out;
+	else
+		outstack = outstack_p = out;
 }
 
 static void



CVS commit: src/usr.sbin/lastlogin

2020-05-06 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed May  6 19:31:32 UTC 2020

Modified Files:
src/usr.sbin/lastlogin: lastlogin.c

Log Message:
Use memcpy for copying out lastlog and lastlogx text

Lastlog and lastlogx text fields are not NUL-terminated when original data
is truncated.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/lastlogin/lastlogin.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.sbin/lastlogin/lastlogin.c
diff -u src/usr.sbin/lastlogin/lastlogin.c:1.17 src/usr.sbin/lastlogin/lastlogin.c:1.18
--- src/usr.sbin/lastlogin/lastlogin.c:1.17	Wed May  6 13:47:39 2020
+++ src/usr.sbin/lastlogin/lastlogin.c	Wed May  6 19:31:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lastlogin.c,v 1.17 2020/05/06 13:47:39 kim Exp $	*/
+/*	$NetBSD: lastlogin.c,v 1.18 2020/05/06 19:31:32 kim Exp $	*/
 /*
  * Copyright (c) 1996 John M. Vinopal
  * All rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: lastlogin.c,v 1.17 2020/05/06 13:47:39 kim Exp $");
+__RCSID("$NetBSD: lastlogin.c,v 1.18 2020/05/06 19:31:32 kim Exp $");
 #endif
 
 #include 
@@ -77,6 +77,10 @@ __RCSID("$NetBSD: lastlogin.c,v 1.17 202
 # define UTX_HOSTSIZE	256
 #endif
 
+/*
+ * Fields in the structure below are 1 byte longer than the maximum possible
+ * for NUL-termination.
+ */
 struct output {
 	struct timeval	 o_tv;
 	char		 o_name[UTX_USERSIZE+1];
@@ -268,12 +272,13 @@ process_entry(struct passwd *p, struct l
 {
 	struct output	o;
 
+	memset(, 0, sizeof(o));
 	if (numeric > 1)
 		(void)snprintf(o.o_name, sizeof(o.o_name), "%d", p->pw_uid);
 	else
 		(void)strlcpy(o.o_name, p->pw_name, sizeof(o.o_name));
-	(void)strlcpy(o.o_line, l->ll_line, sizeof(l->ll_line));
-	(void)strlcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
+	(void)memcpy(o.o_line, l->ll_line, sizeof(l->ll_line));
+	(void)memcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
 	o.o_tv.tv_sec = l->ll_time;
 	o.o_tv.tv_usec = 0;
 	o.next = NULL;
@@ -392,16 +397,17 @@ process_entryx(struct passwd *p, struct 
 {
 	struct output	o;
 
+	memset(, 0, sizeof(o));
 	if (numeric > 1)
 		(void)snprintf(o.o_name, sizeof(o.o_name), "%d", p->pw_uid);
 	else
 		(void)strlcpy(o.o_name, p->pw_name, sizeof(o.o_name));
-	(void)strlcpy(o.o_line, l->ll_line, sizeof(l->ll_line));
+	(void)memcpy(o.o_line, l->ll_line, sizeof(l->ll_line));
 	if (numeric)
 		(void)sockaddr_snprintf(o.o_host, sizeof(o.o_host), "%a",
 		(struct sockaddr *)>ll_ss);
 	else
-		(void)strlcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
+		(void)memcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
 	o.o_tv = l->ll_tv;
 	o.next = NULL;
 



CVS commit: src/usr.sbin/lastlogin

2020-05-06 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed May  6 13:47:40 UTC 2020

Modified Files:
src/usr.sbin/lastlogin: lastlogin.c

Log Message:
If the passwd entry is not found for a lastlogx entry, cons up a fake
struct passwd where pw_name is the numeric uid in parentheses. This was
already implemented for lastlog entries in revision 1.13.

If -n is specified more than once, also print the user numerically
(ie, uid instead of username) for lastlog entries. This was already
implemented for lastlogx entries in revision 1.13.

Reorder the lastlogx host name numeric condition so it better matches
the user name numeric condition.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/lastlogin/lastlogin.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.sbin/lastlogin/lastlogin.c
diff -u src/usr.sbin/lastlogin/lastlogin.c:1.16 src/usr.sbin/lastlogin/lastlogin.c:1.17
--- src/usr.sbin/lastlogin/lastlogin.c:1.16	Wed May  6 11:58:33 2020
+++ src/usr.sbin/lastlogin/lastlogin.c	Wed May  6 13:47:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lastlogin.c,v 1.16 2020/05/06 11:58:33 kim Exp $	*/
+/*	$NetBSD: lastlogin.c,v 1.17 2020/05/06 13:47:39 kim Exp $	*/
 /*
  * Copyright (c) 1996 John M. Vinopal
  * All rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: lastlogin.c,v 1.16 2020/05/06 11:58:33 kim Exp $");
+__RCSID("$NetBSD: lastlogin.c,v 1.17 2020/05/06 13:47:39 kim Exp $");
 #endif
 
 #include 
@@ -268,7 +268,10 @@ process_entry(struct passwd *p, struct l
 {
 	struct output	o;
 
-	(void)strlcpy(o.o_name, p->pw_name, sizeof(o.o_name));
+	if (numeric > 1)
+		(void)snprintf(o.o_name, sizeof(o.o_name), "%d", p->pw_uid);
+	else
+		(void)strlcpy(o.o_name, p->pw_name, sizeof(o.o_name));
 	(void)strlcpy(o.o_line, l->ll_line, sizeof(l->ll_line));
 	(void)strlcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
 	o.o_tv.tv_sec = l->ll_time;
@@ -358,9 +361,12 @@ dolastlogx(const char *logfile, int argc
 			(void)memcpy(, key.data, sizeof(uid));
 
 			if ((passwd = getpwuid(uid)) == NULL) {
-warnx("Cannot find user for uid %lu",
-(unsigned long)uid);
-continue;
+static struct passwd p;
+static char n[32];
+snprintf(n, sizeof(n), "(%d)", i);
+p.pw_uid = i;
+p.pw_name = n;
+passwd = 
 			}
 			(void)memcpy(, data.data, sizeof(l));
 			process_entryx(passwd, );
@@ -391,11 +397,11 @@ process_entryx(struct passwd *p, struct 
 	else
 		(void)strlcpy(o.o_name, p->pw_name, sizeof(o.o_name));
 	(void)strlcpy(o.o_line, l->ll_line, sizeof(l->ll_line));
-	if (!numeric)
-		(void)strlcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
-	else
+	if (numeric)
 		(void)sockaddr_snprintf(o.o_host, sizeof(o.o_host), "%a",
 		(struct sockaddr *)>ll_ss);
+	else
+		(void)strlcpy(o.o_host, l->ll_host, sizeof(l->ll_host));
 	o.o_tv = l->ll_tv;
 	o.next = NULL;
 



CVS commit: src/usr.sbin/lastlogin

2020-05-06 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed May  6 11:58:33 UTC 2020

Modified Files:
src/usr.sbin/lastlogin: lastlogin.8 lastlogin.c

Log Message:
Size output columns dynamically by default to fit contents.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/lastlogin/lastlogin.8
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/lastlogin/lastlogin.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.sbin/lastlogin/lastlogin.8
diff -u src/usr.sbin/lastlogin/lastlogin.8:1.12 src/usr.sbin/lastlogin/lastlogin.8:1.13
--- src/usr.sbin/lastlogin/lastlogin.8:1.12	Wed Apr  8 14:20:38 2009
+++ src/usr.sbin/lastlogin/lastlogin.8	Wed May  6 11:58:33 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lastlogin.8,v 1.12 2009/04/08 14:20:38 joerg Exp $
+.\"	$NetBSD: lastlogin.8,v 1.13 2020/05/06 11:58:33 kim Exp $
 .\"
 .\" Copyright (c) 1996 John M. Vinopal
 .\" All rights reserved.
@@ -30,7 +30,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 4, 2005
+.Dd May 6, 2020
 .Dt LASTLOGIN 8
 .Os
 .Sh NAME
@@ -38,7 +38,7 @@
 .Nd indicate last login time of users
 .Sh SYNOPSIS
 .Nm
-.Op Fl nrt
+.Op Fl Fnrt
 .Op Fl f Ar filename
 .Op Fl H Ar hostsize
 .Op Fl L Ar linesize
@@ -66,6 +66,8 @@ The last login database is never turned 
 .Pp
 The following options are available:
 .Bl -tag -width indent
+.It Fl F
+Use fixed widths for all output fields.
 .It Fl f Ar filename
 Process input from
 .Ar filename .

Index: src/usr.sbin/lastlogin/lastlogin.c
diff -u src/usr.sbin/lastlogin/lastlogin.c:1.15 src/usr.sbin/lastlogin/lastlogin.c:1.16
--- src/usr.sbin/lastlogin/lastlogin.c:1.15	Wed Aug 31 13:31:29 2011
+++ src/usr.sbin/lastlogin/lastlogin.c	Wed May  6 11:58:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lastlogin.c,v 1.15 2011/08/31 13:31:29 joerg Exp $	*/
+/*	$NetBSD: lastlogin.c,v 1.16 2020/05/06 11:58:33 kim Exp $	*/
 /*
  * Copyright (c) 1996 John M. Vinopal
  * All rights reserved.
@@ -33,7 +33,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: lastlogin.c,v 1.15 2011/08/31 13:31:29 joerg Exp $");
+__RCSID("$NetBSD: lastlogin.c,v 1.16 2020/05/06 11:58:33 kim Exp $");
 #endif
 
 #include 
@@ -57,12 +57,31 @@ __RCSID("$NetBSD: lastlogin.c,v 1.15 201
 #include 
 #include 
 
+#ifndef UT_NAMESIZE
+# define UT_NAMESIZE	8
+#endif
+#ifndef UT_LINESIZE
+# define UT_LINESIZE	8
+#endif
+#ifndef UT_HOSTSIZE
+# define UT_HOSTSIZE	16
+#endif
+
+#ifndef UTX_USERSIZE
+# define UTX_USERSIZE	64
+#endif
+#ifndef UTX_LINESIZE
+# define UTX_LINESIZE	64
+#endif
+#ifndef UTX_HOSTSIZE
+# define UTX_HOSTSIZE	256
+#endif
+
 struct output {
 	struct timeval	 o_tv;
-	struct sockaddr_storage o_ss;
-	char		 o_name[64];
-	char		 o_line[64];
-	char		 o_host[256];
+	char		 o_name[UTX_USERSIZE+1];
+	char		 o_line[UTX_LINESIZE+1];
+	char		 o_host[UTX_HOSTSIZE+1];
 	struct output	*next;
 };
 
@@ -73,24 +92,35 @@ struct output {
 static	int sortlog = SORT_NONE;
 static	struct output *outstack = NULL;
 
+static int fixed = 0;
+#define FIXED_NAMELEN	UT_NAMESIZE
+#define FIXED_LINELEN	UT_LINESIZE
+/*
+ * This makes the "fixed" output fit in 79 columns.
+ * Using UT_HOSTSIZE (16) seems too conservative.
+ */
+#define FIXED_HOSTLEN	32
+
 static int numeric = 0;
-static size_t namelen = UT_NAMESIZE;
-static size_t linelen = UT_LINESIZE;
-static size_t hostlen = UT_HOSTSIZE;
+static size_t namelen = 0;
+static size_t linelen = 0;
+static size_t hostlen = 0;
+#define SIZECOLUMNS	(!(namelen && linelen && hostlen))
 
-static	int	comparelog(const void *, const void *);
-static	void	output(struct output *);
+static	int		comparelog(const void *, const void *);
+static	void		output_record(struct output *);
 #ifdef SUPPORT_UTMP
-static	void	process_entry(struct passwd *, struct lastlog *);
-static	void	dolastlog(const char *, int, char *[]);
+static	void		process_entry(struct passwd *, struct lastlog *);
+static	void		dolastlog(const char *, int, char *[]);
 #endif
 #ifdef SUPPORT_UTMPX
-static	void	process_entryx(struct passwd *, struct lastlogx *);
-static	void	dolastlogx(const char *, int, char *[]);
+static	void		process_entryx(struct passwd *, struct lastlogx *);
+static	void		dolastlogx(const char *, int, char *[]);
 #endif
-static	void	push(struct output *);
-static	const char 	*gethost(struct output *);
-static	void	sortoutput(struct output *);
+static	void		push_record(struct output *);
+static	void		sizecolumns(struct output *);
+static	void		output_stack(struct output *);
+static	void		sort_and_output_stack(struct output *);
 __dead static	void	usage(void);
 
 int
@@ -107,7 +137,7 @@ main(int argc, char *argv[])
 	int	ch;
 	size_t	len;
 
-	while ((ch = getopt(argc, argv, "f:H:L:nN:rt")) != -1) {
+	while ((ch = getopt(argc, argv, "f:FH:L:nN:rt")) != -1) {
 		switch (ch) {
 		case 'H':
 			hostlen = atoi(optarg);
@@ -115,6 +145,9 @@ main(int argc, char *argv[])
 		case 'f':
 			logfile = optarg;
 	

CVS commit: src

2020-04-17 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Apr 17 13:36:49 UTC 2020

Modified Files:
src/share/man/man5: ifconfig.if.5
src/usr.sbin/rtsold: rtsold.8

Log Message:
Update date


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man5/ifconfig.if.5
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/rtsold/rtsold.8

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/man5/ifconfig.if.5
diff -u src/share/man/man5/ifconfig.if.5:1.19 src/share/man/man5/ifconfig.if.5:1.20
--- src/share/man/man5/ifconfig.if.5:1.19	Wed Apr 15 20:31:57 2020
+++ src/share/man/man5/ifconfig.if.5	Fri Apr 17 13:36:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ifconfig.if.5,v 1.19 2020/04/15 20:31:57 kim Exp $
+.\"	$NetBSD: ifconfig.if.5,v 1.20 2020/04/17 13:36:48 kim Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 18, 2014
+.Dd April 15, 2020
 .Dt IFCONFIG.IF 5
 .Os
 .Sh NAME

Index: src/usr.sbin/rtsold/rtsold.8
diff -u src/usr.sbin/rtsold/rtsold.8:1.41 src/usr.sbin/rtsold/rtsold.8:1.42
--- src/usr.sbin/rtsold/rtsold.8:1.41	Thu Apr 16 07:23:58 2020
+++ src/usr.sbin/rtsold/rtsold.8	Fri Apr 17 13:36:49 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rtsold.8,v 1.41 2020/04/16 07:23:58 wiz Exp $
+.\"	$NetBSD: rtsold.8,v 1.42 2020/04/17 13:36:49 kim Exp $
 .\"	$KAME: rtsold.8,v 1.17 2001/07/09 22:30:37 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 12, 2014
+.Dd April 15, 2020
 .Dt RTSOLD 8
 .Os
 .\"



CVS commit: src

2020-04-15 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Wed Apr 15 20:31:58 UTC 2020

Modified Files:
src/etc/rc.d: network
src/share/man/man5: ifconfig.if.5
src/usr.sbin/rtsold: rtsold.8

Log Message:
Add an "rtsol" keyword to ifconfig.if for enabling IPv6 RS/RA


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/etc/rc.d/network
cvs rdiff -u -r1.18 -r1.19 src/share/man/man5/ifconfig.if.5
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/rtsold/rtsold.8

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/network
diff -u src/etc/rc.d/network:1.77 src/etc/rc.d/network:1.78
--- src/etc/rc.d/network:1.77	Sat Feb 22 11:52:45 2020
+++ src/etc/rc.d/network	Wed Apr 15 20:31:57 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.77 2020/02/22 11:52:45 roy Exp $
+# $NetBSD: network,v 1.78 2020/04/15 20:31:57 kim Exp $
 #
 
 # PROVIDE: network
@@ -215,7 +215,8 @@ network_start_interfaces()
 	# For each line from the $ifconfig_xxN variable or the
 	# /etc/ifconfig.xxN file, we ignore comments and blank lines,
 	# treat lines beginning with "!" as commands to execute, treat
-	# "dhcp" as a special case to invoke dhcpcd, and for any other
+	# "dhcp" as a special case to invoke dhcpcd, treat "rtsol" as
+	# a special case to send a router solicitation, and for any other
 	# line we run "ifconfig xxN", using each line of the file as the
 	# arguments for a separate "ifconfig" invocation.
 	#
@@ -322,6 +323,13 @@ network_start_interfaces()
 		${dhcpcd_flags} $int
 fi
 ;;
+			rtsol)
+if ! checkyesno dhcpcd; then
+	/sbin/sysctl -qw \
+		net.inet6.ip6.accept_rtadv=1
+	/sbin/dhcpcd -q6T --nodhcp6 $int
+fi
+;;
 			*)
 # Pass args to ifconfig.  Note
 # that args may contain embedded

Index: src/share/man/man5/ifconfig.if.5
diff -u src/share/man/man5/ifconfig.if.5:1.18 src/share/man/man5/ifconfig.if.5:1.19
--- src/share/man/man5/ifconfig.if.5:1.18	Mon Dec 29 14:22:25 2014
+++ src/share/man/man5/ifconfig.if.5	Wed Apr 15 20:31:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ifconfig.if.5,v 1.18 2014/12/29 14:22:25 wiz Exp $
+.\"	$NetBSD: ifconfig.if.5,v 1.19 2020/04/15 20:31:57 kim Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -94,6 +94,23 @@ is set to true in
 and any per interface configuration or restriction is done in
 .Xr dhcpcd.conf 5 .
 .Pp
+If the line is equal to
+.Dq rtsol ,
+kernel processing of router advertisements will be enabled and an IPv6
+router solicitation message will be sent out on the interface.
+This is useful on networks where default routes can best be learned
+from router advertisements.
+However, if
+.Sy dhcpcd
+has been set to true in
+.Xr rc.conf 5 ,
+it is assumed that
+.Xr dhcpcd 8
+will take care of sending any necessary router solicitation messages and
+processing received router advertisements through its configuration in
+.Xr dhcpcd.conf 5
+instead.
+.Pp
 If a line is empty, or starts with
 .Sq # ,
 the line will be ignored as comment.
@@ -119,6 +136,19 @@ inet6 2001:db8::1 prefixlen 64 alias
 inet6 2001:db8:: prefixlen 64 alias anycast
 .Ed
 .Pp
+For networks that do not use a virtual address for the default gateway
+that could be set using a single address in
+.Sy defaultroute6 ,
+static IPv6 address configuration could use the
+.Dq rtsol
+keyword instead to solicit router advertisements for learning a default
+route and even achieving route redundancy given multiple responding
+routers:
+.Bd -literal -offset indent
+inet6 2001:db8::100 prefixlen 64 alias
+rtsol
+.Ed
+.Pp
 The following example sets a network name for a wireless interface
 (using quotes to protect special characters in the name),
 and starts

Index: src/usr.sbin/rtsold/rtsold.8
diff -u src/usr.sbin/rtsold/rtsold.8:1.39 src/usr.sbin/rtsold/rtsold.8:1.40
--- src/usr.sbin/rtsold/rtsold.8:1.39	Mon Apr 13 20:44:39 2020
+++ src/usr.sbin/rtsold/rtsold.8	Wed Apr 15 20:31:58 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rtsold.8,v 1.39 2020/04/13 20:44:39 wiz Exp $
+.\"	$NetBSD: rtsold.8,v 1.40 2020/04/15 20:31:58 kim Exp $
 .\"	$KAME: rtsold.8,v 1.17 2001/07/09 22:30:37 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -46,10 +46,23 @@ have been removed from
 as their functionality is now included in
 .Xr dhcpcd 8 .
 .Pp
-For example to send a routing solicitation message and print information
-about it without changing the actual routing table:
+For example to send a router solicitation message and print information
+about the response without changing the actual routing table:
 .Pp
 .Dl dhcpcd -dB6T --nodhcp6 < Ns Ar interface Ns \^>
+.Pp
+To quietly send a router solicitation message:
+.Pp
+.Dl dhcpcd -q6T --nodhcp6 < Ns Ar interface Ns \^>
+.Pp
+The
+.Xr ifconfig.if 5
+network interface configuration files and variables can also use an
+.Dq rtsol
+keyword to invoke
+.Xr dhcpcd 8
+to send a router solicitation 

CVS commit: src/sys/netinet6

2020-04-13 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Apr 13 14:04:27 UTC 2020

Modified Files:
src/sys/netinet6: nd6_rtr.c

Log Message:
Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/netinet6/nd6_rtr.c

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

Modified files:

Index: src/sys/netinet6/nd6_rtr.c
diff -u src/sys/netinet6/nd6_rtr.c:1.147 src/sys/netinet6/nd6_rtr.c:1.148
--- src/sys/netinet6/nd6_rtr.c:1.147	Fri Dec 27 10:17:56 2019
+++ src/sys/netinet6/nd6_rtr.c	Mon Apr 13 14:04:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_rtr.c,v 1.147 2019/12/27 10:17:56 msaitoh Exp $	*/
+/*	$NetBSD: nd6_rtr.c,v 1.148 2020/04/13 14:04:27 kim Exp $	*/
 /*	$KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.147 2019/12/27 10:17:56 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.148 2020/04/13 14:04:27 kim Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -487,6 +487,11 @@ defrouter_addreq(struct nd_defrouter *ne
 	if (error == 0) {
 		nd6_numroutes++;
 		newdr->installed = 1;
+	} else {
+		char ip6buf[INET6_ADDRSTRLEN];
+		log(LOG_ERR, "defrouter_addreq: "
+		"error %d adding default router %s on %s\n",
+		error, IN6_PRINT(ip6buf, >rtaddr), newdr->ifp->if_xname);
 	}
 #ifndef NET_MPSAFE
 	splx(s);
@@ -596,10 +601,15 @@ defrouter_delreq(struct nd_defrouter *dr
 
 	error = rtrequest_newmsg(RTM_DELETE, , , ,
 	RTF_GATEWAY);
-	if (error == 0)
+	if (error == 0) {
 		nd6_numroutes--;
-
-	dr->installed = 0;
+		dr->installed = 0;
+	} else {
+		char ip6buf[INET6_ADDRSTRLEN];
+		log(LOG_ERR, "defrouter_delreq: "
+		"error %d deleting default router %s on %s\n",
+		error, IN6_PRINT(ip6buf, >rtaddr), dr->ifp->if_xname);
+	}
 }
 
 /*
@@ -675,14 +685,6 @@ nd6_defrouter_select(void)
 	 * the ordering rule of the list described in defrtrlist_update().
 	 */
 	ND_DEFROUTER_LIST_FOREACH(dr) {
-		ndi = ND_IFINFO(dr->ifp);
-		if (nd6_accepts_rtadv(ndi))
-			continue;
-
-		if (selected_dr == NULL &&
-		nd6_is_llinfo_probreach(dr))
-			selected_dr = dr;
-
 		if (dr->installed && !installed_dr)
 			installed_dr = dr;
 		else if (dr->installed && installed_dr) {
@@ -690,6 +692,14 @@ nd6_defrouter_select(void)
 			log(LOG_ERR, "nd6_defrouter_select: more than one router"
 			" is installed\n");
 		}
+
+		ndi = ND_IFINFO(dr->ifp);
+		if (!nd6_accepts_rtadv(ndi))
+			continue;
+
+		if (selected_dr == NULL &&
+		nd6_is_llinfo_probreach(dr))
+			selected_dr = dr;
 	}
 	/*
 	 * If none of the default routers was found to be reachable,



CVS commit: src/etc

2020-03-29 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Mar 29 06:44:16 UTC 2020

Modified Files:
src/etc: crontab

Log Message:
Fix skipped daily in Eastern Europe

- Move /etc/daily from 03:15 -> 04:15
- Move /etc/weekly from 04:30 -> 05:30 (to keep the spacing)

This should prevent problems during daylight savings changeover (which
is usually between 01:00 -> 04:00, depending upon the region) where the
cronjobs may be executed twice, or never at all...

This expands on the previous fix in revision 1.13 from 1997.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/etc/crontab

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

Modified files:

Index: src/etc/crontab
diff -u src/etc/crontab:1.15 src/etc/crontab:1.16
--- src/etc/crontab:1.15	Wed Nov 27 15:09:17 2002
+++ src/etc/crontab	Sun Mar 29 06:44:16 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: crontab,v 1.15 2002/11/27 15:09:17 perry Exp $
+#	$NetBSD: crontab,v 1.16 2020/03/29 06:44:16 kim Exp $
 #
 # /var/cron/tabs/root - root's crontab for NetBSD
 #
@@ -15,6 +15,6 @@ CRON_WITHIN=7200
 0	*	*	*	*	/usr/bin/newsyslog
 #
 # do daily/weekly/monthly maintenance
-15	3	*	*	*	/bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | sendmail -t
-30	4	*	*	6	/bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | sendmail -t
+15	4	*	*	*	/bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | sendmail -t
+30	5	*	*	6	/bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | sendmail -t
 #30	5	1	*	*	/bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | sendmail -t



CVS commit: src/share/locale

2020-03-23 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Mar 23 13:56:12 UTC 2020

Modified Files:
src/share/locale: Makefile.common
src/share/locale/monetary/converted: fi_FI.ISO8859-1.src

Log Message:
Fix the currency symbol for fi_FI.ISO8859-1

In the Finnish language, the recommended symbol for euro is the euro sign
where it is available, and the lowercase letter e otherwise.

The use of the ISO currency code EUR is not an abbreviation of the word
euro in the Finnish language, just like FIM is not an abbreviation of
the word markka.

Reference:
https://www.kielikello.fi/-/euro-
Euro
Kielikello 3/1998
Kotimaisten kielten keskus
Institute for the Languages of Finland
[Last retrieved 2020-03-23]


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/locale/Makefile.common
cvs rdiff -u -r1.1 -r1.2 \
src/share/locale/monetary/converted/fi_FI.ISO8859-1.src

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

Modified files:

Index: src/share/locale/Makefile.common
diff -u src/share/locale/Makefile.common:1.1 src/share/locale/Makefile.common:1.2
--- src/share/locale/Makefile.common:1.1	Sun Aug 11 22:09:40 2013
+++ src/share/locale/Makefile.common	Mon Mar 23 13:56:12 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2013/08/11 22:09:40 joerg Exp $
+# $NetBSD: Makefile.common,v 1.2 2020/03/23 13:56:12 kim Exp $
 
 all:		${LOCALES:S/$/.out/g}
 realall:	${LOCALES:S/$/.out/g}
@@ -37,6 +37,7 @@ update-converted:
 	@echo Generating character set ${charset} of ${locale_name}...
 	@rm -f ${.CURDIR}/converted/${locale}.src
 	@set -e; cat < ${.CURDIR}/${locale_name}.UTF-8.src \
+	| (case ${locale}  in fi_FI.ISO8859-1) sed 's,€,e,g';; *) cat ;; esac) \
 	| (case ${charset} in ISO8859-[125]) sed 's,€,EUR,g';; *) cat ;; esac) \
 	| (case ${charset} in ISO8859-9) sed 's,₺,L,g';; *) cat ;; esac) \
 	| (case ${charset} in ISO8859*) sed 's,−,-,g';; *) cat ;; esac) \

Index: src/share/locale/monetary/converted/fi_FI.ISO8859-1.src
diff -u src/share/locale/monetary/converted/fi_FI.ISO8859-1.src:1.1 src/share/locale/monetary/converted/fi_FI.ISO8859-1.src:1.2
--- src/share/locale/monetary/converted/fi_FI.ISO8859-1.src:1.1	Sun Aug 11 22:09:41 2013
+++ src/share/locale/monetary/converted/fi_FI.ISO8859-1.src	Mon Mar 23 13:56:12 2020
@@ -1,4 +1,4 @@
-# $NetBSD: fi_FI.ISO8859-1.src,v 1.1 2013/08/11 22:09:41 joerg Exp $
+# $NetBSD: fi_FI.ISO8859-1.src,v 1.2 2020/03/23 13:56:12 kim Exp $
 #
 # Locale: fi_FI
 # Character set: ISO8859-1
@@ -33,7 +33,7 @@ EUR 
 #
 # Currency Symbol (currency_symbol)
 #
-EUR
+e
 #
 # Monetary Decimal Point (mon_decimal_point)
 #



CVS commit: src/share/locale

2020-03-23 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Mar 23 08:44:10 UTC 2020

Modified Files:
src/share/locale: locale.alias

Log Message:
Add C.UTF-8


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/locale/locale.alias

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

Modified files:

Index: src/share/locale/locale.alias
diff -u src/share/locale/locale.alias:1.12 src/share/locale/locale.alias:1.13
--- src/share/locale/locale.alias:1.12	Sun Aug 11 22:09:40 2013
+++ src/share/locale/locale.alias	Mon Mar 23 08:44:10 2020
@@ -1,9 +1,13 @@
-# $NetBSD: locale.alias,v 1.12 2013/08/11 22:09:40 joerg Exp $
+# $NetBSD: locale.alias,v 1.13 2020/03/23 08:44:10 kim Exp $
 
 #
 # Locale aliases
 #
 
+# C.UTF-8
+C.UTF-8/LC_CTYPE		en_US.UTF-8
+C.UTF-8C
+
 # Pig locale
 Pig/LC_MESSAGES			/FORCE
 



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

2020-03-01 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Mar  1 08:21:38 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh/dist: ssh_config sshd_config

Log Message:
Sync with OpenSSH 8.2p1 sample configs

- Add GSSAPIAuthentication and related options
- Add KerberosAuthentication and related options
- Bring in the lengthy but useful comment block about
  the side-effect of UsePAM with regards to PermitRootLogin.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/crypto/external/bsd/openssh/dist/ssh_config
cvs rdiff -u -r1.24 -r1.25 src/crypto/external/bsd/openssh/dist/sshd_config

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/ssh_config
diff -u src/crypto/external/bsd/openssh/dist/ssh_config:1.13 src/crypto/external/bsd/openssh/dist/ssh_config:1.14
--- src/crypto/external/bsd/openssh/dist/ssh_config:1.13	Fri Feb 28 10:41:48 2020
+++ src/crypto/external/bsd/openssh/dist/ssh_config	Sun Mar  1 08:21:38 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: ssh_config,v 1.13 2020/02/28 10:41:48 kim Exp $
+#	$NetBSD: ssh_config,v 1.14 2020/03/01 08:21:38 kim Exp $
 #	$OpenBSD: ssh_config,v 1.34 2019/02/04 02:39:42 dtucker Exp $
 
 # This is the ssh client system-wide configuration file.  See
@@ -27,6 +27,8 @@ Host *.netbsd.org *.NetBSD.org
 #   ForwardX11 no
 #   PasswordAuthentication yes
 #   HostbasedAuthentication no
+#   GSSAPIAuthentication no
+#   GSSAPIDelegateCredentials no
 #   BatchMode no
 #   CheckHostIP yes
 #   AddressFamily any

Index: src/crypto/external/bsd/openssh/dist/sshd_config
diff -u src/crypto/external/bsd/openssh/dist/sshd_config:1.24 src/crypto/external/bsd/openssh/dist/sshd_config:1.25
--- src/crypto/external/bsd/openssh/dist/sshd_config:1.24	Fri Feb 28 10:59:58 2020
+++ src/crypto/external/bsd/openssh/dist/sshd_config	Sun Mar  1 08:21:38 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: sshd_config,v 1.24 2020/02/28 10:59:58 kim Exp $
+#	$NetBSD: sshd_config,v 1.25 2020/03/01 08:21:38 kim Exp $
 #	$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
 
 # This is the sshd server system-wide configuration file.  See
@@ -60,6 +60,27 @@ AuthorizedKeysFile	.ssh/authorized_keys
 # Change to no to disable s/key passwords
 #ChallengeResponseAuthentication yes
 
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication.  Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+UsePAM yes
+
 #AllowAgentForwarding yes
 #AllowTcpForwarding yes
 #GatewayPorts no
@@ -72,7 +93,6 @@ AuthorizedKeysFile	.ssh/authorized_keys
 #PrintMotd yes
 #PrintLastLog yes
 #TCPKeepAlive yes
-UsePAM yes
 #PermitUserEnvironment no
 #Compression delayed
 #ClientAliveInterval 0



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

2020-02-28 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 28 17:50:29 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh/dist: version.h

Log Message:
Remove unreferenced SSH_RELEASE


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/crypto/external/bsd/openssh/dist/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/crypto/external/bsd/openssh/dist/version.h
diff -u src/crypto/external/bsd/openssh/dist/version.h:1.31 src/crypto/external/bsd/openssh/dist/version.h:1.32
--- src/crypto/external/bsd/openssh/dist/version.h:1.31	Thu Feb 27 00:27:44 2020
+++ src/crypto/external/bsd/openssh/dist/version.h	Fri Feb 28 17:50:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.31 2020/02/27 00:27:44 christos Exp $	*/
+/*	$NetBSD: version.h,v 1.32 2020/02/28 17:50:29 kim Exp $	*/
 /* $OpenBSD: version.h,v 1.86 2020/02/14 00:39:20 djm Exp $ */
 
 #define __OPENSSH_VERSION	"OpenSSH_8.2"
@@ -10,4 +10,3 @@
  * used for bug compatibility operation.  present NetBSD SSH version as comment
  */
 #define SSH_VERSION	__OPENSSH_VERSION " " __NETBSDSSH_VERSION SSH_HPN SSH_LPK
-#define SSH_RELEASE SSH_VERSION SSH_HPN SSH_LPK



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

2020-02-28 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 28 17:27:34 UTC 2020

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

Log Message:
Fix duplicate entries in the keywords list.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/crypto/external/bsd/openssh/dist/readconf.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/readconf.c
diff -u src/crypto/external/bsd/openssh/dist/readconf.c:1.29 src/crypto/external/bsd/openssh/dist/readconf.c:1.30
--- src/crypto/external/bsd/openssh/dist/readconf.c:1.29	Thu Feb 27 00:24:40 2020
+++ src/crypto/external/bsd/openssh/dist/readconf.c	Fri Feb 28 17:27:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: readconf.c,v 1.29 2020/02/27 00:24:40 christos Exp $	*/
+/*	$NetBSD: readconf.c,v 1.30 2020/02/28 17:27:34 kim Exp $	*/
 /* $OpenBSD: readconf.c,v 1.326 2020/02/06 22:46:31 djm Exp $ */
 /*
  * Author: Tatu Ylonen 
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: readconf.c,v 1.29 2020/02/27 00:24:40 christos Exp $");
+__RCSID("$NetBSD: readconf.c,v 1.30 2020/02/28 17:27:34 kim Exp $");
 #include 
 #include 
 #include 
@@ -196,9 +196,25 @@ static struct {
 	{ "useprivilegedport", oDeprecated },
 
 	/* Unsupported options */
+#ifdef AFS
+	{ "afstokenpassing", oAFSTokenPassing },
+#else
 	{ "afstokenpassing", oUnsupported },
+#endif
+#if defined(KRB4) || defined(KRB5)
+	{ "kerberosauthentication", oKerberosAuthentication },
+#else
 	{ "kerberosauthentication", oUnsupported },
+#endif
+#if defined(AFS) || defined(KRB5)
+	{ "kerberostgtpassing", oKerberosTgtPassing },
+	{ "kerberos5tgtpassing", oKerberosTgtPassing },		/* alias */
+	{ "kerberos4tgtpassing", oKerberosTgtPassing },		/* alias */
+#else
 	{ "kerberostgtpassing", oUnsupported },
+	{ "kerberos5tgtpassing", oUnsupported },
+	{ "kerberos4tgtpassing", oUnsupported },
+#endif
 	{ "rsaauthentication", oUnsupported },
 	{ "rhostsrsaauthentication", oUnsupported },
 	{ "compressionlevel", oUnsupported },
@@ -235,17 +251,6 @@ static struct {
 	{ "challengeresponseauthentication", oChallengeResponseAuthentication },
 	{ "skeyauthentication", oChallengeResponseAuthentication }, /* alias */
 	{ "tisauthentication", oChallengeResponseAuthentication },  /* alias */
-#if defined(KRB4) || defined(KRB5)
-	{ "kerberosauthentication", oKerberosAuthentication },
-#endif
-#if defined(AFS) || defined(KRB5)
-	{ "kerberostgtpassing", oKerberosTgtPassing },
-	{ "kerberos5tgtpassing", oKerberosTgtPassing },		/* alias */
-	{ "kerberos4tgtpassing", oKerberosTgtPassing },		/* alias */
-#endif
-#ifdef AFS
-	{ "afstokenpassing", oAFSTokenPassing },
-#endif
 #if defined(GSSAPI)
 	{ "gssapiauthentication", oGssAuthentication },
 	{ "gssapidelegatecredentials", oGssDelegateCreds },



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

2020-02-28 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 28 10:59:58 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh/dist: sshd_config

Log Message:
Cleanup

- Match the case of the UsePAM keyword used in the manual page and code,
  to aid case-sensitive grep etc.
- Remove references to obsole UseLogin and UsePrivilegeSeparation keywords.
- Whitespace police


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/crypto/external/bsd/openssh/dist/sshd_config

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/sshd_config
diff -u src/crypto/external/bsd/openssh/dist/sshd_config:1.23 src/crypto/external/bsd/openssh/dist/sshd_config:1.24
--- src/crypto/external/bsd/openssh/dist/sshd_config:1.23	Sun Aug 26 07:46:37 2018
+++ src/crypto/external/bsd/openssh/dist/sshd_config	Fri Feb 28 10:59:58 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: sshd_config,v 1.23 2018/08/26 07:46:37 christos Exp $
+#	$NetBSD: sshd_config,v 1.24 2020/02/28 10:59:58 kim Exp $
 #	$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
 
 # This is the sshd server system-wide configuration file.  See
@@ -53,7 +53,7 @@ AuthorizedKeysFile	.ssh/authorized_keys
 # Don't read the user's ~/.rhosts and ~/.shosts files
 #IgnoreRhosts yes
 
-# To disable password authentication, set this and UsePam to no
+# To disable password authentication, set this and UsePAM to no
 #PasswordAuthentication yes
 #PermitEmptyPasswords no
 
@@ -72,9 +72,7 @@ AuthorizedKeysFile	.ssh/authorized_keys
 #PrintMotd yes
 #PrintLastLog yes
 #TCPKeepAlive yes
-#UseLogin no
-#UsePrivilegeSeparation sandbox
-UsePam yes
+UsePAM yes
 #PermitUserEnvironment no
 #Compression delayed
 #ClientAliveInterval 0
@@ -121,7 +119,6 @@ Subsystem	sftp	/usr/libexec/sftp-server
 # buffer size for hpn to non-hpn connections
 #HPNBufferSize 2048
 
-
 # Example of overriding settings on a per-user basis
 #Match User anoncvs
 #	X11Forwarding no



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

2020-02-28 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 28 10:41:49 UTC 2020

Modified Files:
src/crypto/external/bsd/openssh/dist: ssh_config

Log Message:
Move NetBSD.org-specific entry above the match-all entry

The first matching entry that sets an option "wins." Therefore more
specific matches should be provided before the "Host *" entry that
matches everything. This way options set in the more specific entry will
not be accidentally made ineffective by the match-all entry.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/crypto/external/bsd/openssh/dist/ssh_config

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/ssh_config
diff -u src/crypto/external/bsd/openssh/dist/ssh_config:1.12 src/crypto/external/bsd/openssh/dist/ssh_config:1.13
--- src/crypto/external/bsd/openssh/dist/ssh_config:1.12	Sat Apr 20 17:16:40 2019
+++ src/crypto/external/bsd/openssh/dist/ssh_config	Fri Feb 28 10:41:48 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: ssh_config,v 1.12 2019/04/20 17:16:40 christos Exp $
+#	$NetBSD: ssh_config,v 1.13 2020/02/28 10:41:48 kim Exp $
 #	$OpenBSD: ssh_config,v 1.34 2019/02/04 02:39:42 dtucker Exp $
 
 # This is the ssh client system-wide configuration file.  See
@@ -18,6 +18,10 @@
 # list of available options, their meanings and defaults, please see the
 # ssh_config(5) man page.
 
+# NetBSD.org DNS provides SSHFP records - use them when possible
+Host *.netbsd.org *.NetBSD.org
+VerifyHostKeyDNS ask
+
 # Host *
 #   ForwardAgent no
 #   ForwardX11 no
@@ -45,7 +49,3 @@
 
 # If you use xorg from pkgsrc then uncomment the following line.
 #   XAuthLocation /usr/pkg/bin/xauth
-
-# NetBSD.org DNS provides SSHFP records - use them when possible
-Host *.netbsd.org *.NetBSD.org
-VerifyHostKeyDNS ask



CVS commit: src/share/man/man7

2020-02-27 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 28 07:31:38 UTC 2020

Modified Files:
src/share/man/man7: groups.7

Log Message:
Typo fix (remove extra TPM)


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

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/man7/groups.7
diff -u src/share/man/man7/groups.7:1.6 src/share/man/man7/groups.7:1.7
--- src/share/man/man7/groups.7:1.6	Fri Feb 28 07:30:51 2020
+++ src/share/man/man7/groups.7	Fri Feb 28 07:31:38 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: groups.7,v 1.6 2020/02/28 07:30:51 kim Exp $
+.\"	$NetBSD: groups.7,v 1.7 2020/02/28 07:31:38 kim Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -245,7 +245,7 @@ Primary group for the
 pseudo-user used by the
 .Xr tcsd 8
 .Sq Trusted Computing
-daemon TPM to manage a TPM.
+daemon to manage a TPM.
 .It Em _gpio
 Users authorized to read and write GPIO pins; see
 .Xr gpio 4



CVS commit: src/share/man/man7

2020-02-27 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 28 07:30:51 UTC 2020

Modified Files:
src/share/man/man7: groups.7 users.7

Log Message:
Fix .Dt to match installed section


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man7/groups.7
cvs rdiff -u -r1.3 -r1.4 src/share/man/man7/users.7

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/man7/groups.7
diff -u src/share/man/man7/groups.7:1.5 src/share/man/man7/groups.7:1.6
--- src/share/man/man7/groups.7:1.5	Wed Feb 26 18:32:57 2020
+++ src/share/man/man7/groups.7	Fri Feb 28 07:30:51 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: groups.7,v 1.5 2020/02/26 18:32:57 uwe Exp $
+.\"	$NetBSD: groups.7,v 1.6 2020/02/28 07:30:51 kim Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd February 25, 2020
-.Dt GROUPS 5
+.Dt GROUPS 7
 .Os
 .\"
 .Sh NAME

Index: src/share/man/man7/users.7
diff -u src/share/man/man7/users.7:1.3 src/share/man/man7/users.7:1.4
--- src/share/man/man7/users.7:1.3	Wed Feb 26 18:39:24 2020
+++ src/share/man/man7/users.7	Fri Feb 28 07:30:51 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: users.7,v 1.3 2020/02/26 18:39:24 uwe Exp $
+.\"	$NetBSD: users.7,v 1.4 2020/02/28 07:30:51 kim Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd February 25, 2020
-.Dt USERS 5
+.Dt USERS 7
 .Os
 .\"
 .Sh NAME



CVS commit: src/etc/rc.d

2020-02-14 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Fri Feb 14 12:12:07 UTC 2020

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

Log Message:
Use the configured IP6ADDRCTL_CMD for stopping also.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/etc/rc.d/ip6addrctl

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/ip6addrctl
diff -u src/etc/rc.d/ip6addrctl:1.4 src/etc/rc.d/ip6addrctl:1.5
--- src/etc/rc.d/ip6addrctl:1.4	Mon Jan 27 08:33:24 2020
+++ src/etc/rc.d/ip6addrctl	Fri Feb 14 12:12:07 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ip6addrctl,v 1.4 2020/01/27 08:33:24 kim Exp $
+# $NetBSD: ip6addrctl,v 1.5 2020/02/14 12:12:07 kim Exp $
 # FreeBSD: head/etc/rc.d/ip6addrctl 270836 2014-08-30 07:08:10Z hrs
 #
 
@@ -86,7 +86,7 @@ ip6addrctl_start()
 
 ip6addrctl_stop()
 {
-	ip6addrctl flush >/dev/null 2>&1
+	${IP6ADDRCTL_CMD} flush >/dev/null 2>&1
 }
 
 load_rc_config $name



CVS commit: src/etc/rc.d

2020-01-27 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Jan 27 08:33:24 UTC 2020

Modified Files:
src/etc/rc.d: autounmountd ip6addrctl

Log Message:
Add NetBSD ID


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/autounmountd
cvs rdiff -u -r1.3 -r1.4 src/etc/rc.d/ip6addrctl

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/autounmountd
diff -u src/etc/rc.d/autounmountd:1.2 src/etc/rc.d/autounmountd:1.3
--- src/etc/rc.d/autounmountd:1.2	Wed Aug  7 19:30:00 2019
+++ src/etc/rc.d/autounmountd	Mon Jan 27 08:33:24 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD$
+# $NetBSD: autounmountd,v 1.3 2020/01/27 08:33:24 kim Exp $
 #
 
 # PROVIDE: autounmountd

Index: src/etc/rc.d/ip6addrctl
diff -u src/etc/rc.d/ip6addrctl:1.3 src/etc/rc.d/ip6addrctl:1.4
--- src/etc/rc.d/ip6addrctl:1.3	Wed Aug  7 19:30:00 2019
+++ src/etc/rc.d/ip6addrctl	Mon Jan 27 08:33:24 2020
@@ -1,6 +1,7 @@
 #!/bin/sh
 #
-# $FreeBSD: head/etc/rc.d/ip6addrctl 270836 2014-08-30 07:08:10Z hrs $
+# $NetBSD: ip6addrctl,v 1.4 2020/01/27 08:33:24 kim Exp $
+# FreeBSD: head/etc/rc.d/ip6addrctl 270836 2014-08-30 07:08:10Z hrs
 #
 
 # PROVIDE: ip6addrctl



CVS commit: src/etc/rc.d

2020-01-27 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Mon Jan 27 08:28:33 UTC 2020

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

Log Message:
Skip inet6 addresses that begin with fe80: (not just exact match).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/etc/rc.d/ipsec

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/ipsec
diff -u src/etc/rc.d/ipsec:1.15 src/etc/rc.d/ipsec:1.16
--- src/etc/rc.d/ipsec:1.15	Mon Aug 13 09:16:06 2018
+++ src/etc/rc.d/ipsec	Mon Jan 27 08:28:33 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ipsec,v 1.15 2018/08/13 09:16:06 christos Exp $
+# $NetBSD: ipsec,v 1.16 2020/01/27 08:28:33 kim Exp $
 #
 
 # PROVIDE: ipsec
@@ -34,7 +34,7 @@ ipsec_getip() {
 		case "$what" in
 		inet)	echo "local v4_addr=$address;";;
 		inet6)	case "$address" in
-			fe80:)	;;
+			fe80:*)	;;
 			*)	echo "local v6_addr=$address;";;
 			esac;;
 		esac



CVS commit: src/etc

2016-12-25 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sun Dec 25 12:10:52 UTC 2016

Modified Files:
src/etc: man.conf

Log Message:
Make precedence between {cat,man}[39]{,lua} logical:
- Search man3 right after cat3, before cat3lua (and man3lua).
- Search man9 right after cat9, before cat9lua (and man9lua).


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/etc/man.conf

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

Modified files:

Index: src/etc/man.conf
diff -u src/etc/man.conf:1.35 src/etc/man.conf:1.36
--- src/etc/man.conf:1.35	Sun Dec 22 01:18:28 2013
+++ src/etc/man.conf	Sun Dec 25 12:10:52 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: man.conf,v 1.35 2013/12/22 01:18:28 dholland Exp $
+#	$NetBSD: man.conf,v 1.36 2016/12/25 12:10:52 kim Exp $
 
 # Sheer, raging paranoia...
 _version	BSD.2
@@ -7,7 +7,7 @@ _version	BSD.2
 _mandb /var/db/man.db
 
 # Subdirectories for paths ending in '/', IN SEARCH ORDER.
-_subdir		cat1 man1 cat8 man8 cat6 man6 cat2 man2 cat3 cat3lua man3 man3lua cat4 man4 cat5 man5 cat7 man7 man3f cat9 cat9lua man9 man9lua catn mann catl manl
+_subdir		cat1 man1 cat8 man8 cat6 man6 cat2 man2 cat3 man3 cat3lua man3lua cat4 man4 cat5 man5 cat7 man7 man3f cat9 man9 cat9lua man9lua catn mann catl manl
 
 # Files typed by suffix and their commands.
 # Note the order, .Z must come after .[1-9].Z, or it will match first.



CVS commit: src/usr.sbin/npf/npfctl

2010-09-14 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Tue Sep 14 11:04:57 UTC 2010

Modified Files:
src/usr.sbin/npf/npfctl: npfctl.8

Log Message:
Fix remaining references for npf.conf(8) to npf.conf(5)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/npf/npfctl/npfctl.8

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/npf/npfctl/npfctl.8
diff -u src/usr.sbin/npf/npfctl/npfctl.8:1.2 src/usr.sbin/npf/npfctl/npfctl.8:1.3
--- src/usr.sbin/npf/npfctl/npfctl.8:1.2	Tue Aug 24 23:55:05 2010
+++ src/usr.sbin/npf/npfctl/npfctl.8	Tue Sep 14 11:04:57 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: npfctl.8,v 1.2 2010/08/24 23:55:05 rmind Exp $
+.\	$NetBSD: npfctl.8,v 1.3 2010/09/14 11:04:57 kim Exp $
 .\
 .\ Copyright (c) 2009-2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -43,7 +43,7 @@
 .Nm
 command can be used to control the NPF packet filter.
 For a description of NPF's configuration file, see
-.Xr npf.conf 8 .
+.Xr npf.conf 5 .
 .Pp
 The first argument,
 .Ar command ,
@@ -91,7 +91,7 @@
 Therefore, frequent reloads should be avoided.
 Use of tables should be considered as an alternative design.
 See
-.Xr npf.conf 8
+.Xr npf.conf 5
 for details.
 .\ -
 .Sh FILES