CVS commit: src/etc/ssh

2011-05-08 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sun May  8 13:19:09 UTC 2011

Modified Files:
src/etc/ssh: ssh_known_hosts

Log Message:
babylon5 ssh key changed (due to reinstall)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/etc/ssh/ssh_known_hosts

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

Modified files:

Index: src/etc/ssh/ssh_known_hosts
diff -u src/etc/ssh/ssh_known_hosts:1.6 src/etc/ssh/ssh_known_hosts:1.7
--- src/etc/ssh/ssh_known_hosts:1.6	Sun Sep 12 05:00:21 2010
+++ src/etc/ssh/ssh_known_hosts	Sun May  8 13:19:08 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: ssh_known_hosts,v 1.6 2010/09/12 05:00:21 spz Exp $
+#	$NetBSD: ssh_known_hosts,v 1.7 2011/05/08 13:19:08 spz Exp $
 #
 anoncvs.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEA3QiBl8leG9fqIJpKeNov0PKq5YryFFiroMWOPUv4hDFn8R0jC07YVaR/OSBrr37CTmGX5AFceXPzoFnLlwCqWR7rXg4NR75FTlTp9CG9EBAEtU8mee27KDrUFBTZdfVl2+aRYoAI5fTXA+0vpIO68Cq843vRWUZCcwinS4cNLUU=
 
@@ -20,7 +20,7 @@
 
 garibaldi.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEA7CW/T6MxwXi2qAQSGnSRXqwlwhrKsKVj3VKbsPpFf3fg28259fpqBYHgE4qWlhxg/wEtHoMaxRee1H3KaQwj88ez4fYMgDRkDgFY+NlwII/vgeFFKvjZvzsmfLP75uXC9YS/AlagHmIeubu4ymlgQ29fpwacKmrgCLTrEIXMHPc=
 
-babylon5.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEApDHT2kauEY8RhFXgB5/QIlg3vbdLWvXSfofAvZQ6Ks5y3xKXYiMqKG/WEm5kkycpFMI4QBCA/wzi1/IiTFA2f2ZosxZlTVOhGPoyB6oEQPPHmLEjS3vzkc2Dwo59qF+6VGkRH+Yd2Q03gbxXKqEY7ck2GFsSpIzdA0fm3jwmb+E=
+babylon5.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAwR5xZ0J/jfvT4ZqlJy/JkVbZV2FRqkq/IbyL2aM4FAFDWKxOsm+kvScXGnoGKb9fT9EJAhJNjYjAAGkmFdT/Q97MFYghKUhGW85y4b37SWaFgITGYjEObGy9G2dRWcTion9Ve1fLe2eCO5o4EIsCIfvTA53Fp721o5lPgG6RUVU=
 
 morden.netbsd.org ssh-rsa B3NzaC1yc2EBIwAAAIEAv+tO1aHHsW1McwHgnJ28qsXn8gH8z/61yopJzmOKuHH07zBYOnhenAcni6E0+BRavSXXIuuTDdyxEyWcTqXoR0LEVShTzAFmZS3RyzTVl7A+Fp644lNnRaJh1380H+20uZjcKSPU0IudG5J7QllMbJY9RnIBFjGLzTb4vrC8GIc=
 



CVS commit: src/sys/netatalk

2011-05-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  8 13:51:31 UTC 2011

Modified Files:
src/sys/netatalk: aarp.c aarp.h ddp_usrreq.c

Log Message:
aarpprobe() is called before MOWNER_ATTACH(aarp_mowner), leading
to a DIAGNOSTIC panic when MBUFTRACE is defined and atalkd is started.
Fix by moving MOWNER_ATTACH(aarp_mowner) to ddp_init().
Should fix PR kern/44734


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/netatalk/aarp.c
cvs rdiff -u -r1.2 -r1.3 src/sys/netatalk/aarp.h
cvs rdiff -u -r1.39 -r1.40 src/sys/netatalk/ddp_usrreq.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/netatalk/aarp.c
diff -u src/sys/netatalk/aarp.c:1.34 src/sys/netatalk/aarp.c:1.35
--- src/sys/netatalk/aarp.c:1.34	Sat Sep 12 20:43:18 2009
+++ src/sys/netatalk/aarp.c	Sun May  8 13:51:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarp.c,v 1.34 2009/09/12 20:43:18 tsutsui Exp $	*/
+/*	$NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.34 2009/09/12 20:43:18 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $);
 
 #include opt_mbuftrace.h
 
@@ -508,7 +508,6 @@
 		first = 0;
 		callout_init(aarptimer_callout, 0);
 		callout_reset(aarptimer_callout, hz, aarptimer, NULL);
-		MOWNER_ATTACH(aarp_mowner);
 	}
 	aat = aarptab[AARPTAB_HASH(*addr) * AARPTAB_BSIZ];
 	for (n = 0; n  AARPTAB_BSIZ; n++, aat++) {

Index: src/sys/netatalk/aarp.h
diff -u src/sys/netatalk/aarp.h:1.2 src/sys/netatalk/aarp.h:1.3
--- src/sys/netatalk/aarp.h:1.2	Sat Dec 10 23:29:05 2005
+++ src/sys/netatalk/aarp.h	Sun May  8 13:51:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarp.h,v 1.2 2005/12/10 23:29:05 elad Exp $	*/
+/*	$NetBSD: aarp.h,v 1.3 2011/05/08 13:51:31 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -76,4 +76,6 @@
 #define AARPOP_RESPONSE	0x02
 #define AARPOP_PROBE	0x03
 
+extern struct mowner aarp_mowner;
+
 #endif /* !_NETATALK_AARP_H_ */

Index: src/sys/netatalk/ddp_usrreq.c
diff -u src/sys/netatalk/ddp_usrreq.c:1.39 src/sys/netatalk/ddp_usrreq.c:1.40
--- src/sys/netatalk/ddp_usrreq.c:1.39	Thu Apr 16 21:37:17 2009
+++ src/sys/netatalk/ddp_usrreq.c	Sun May  8 13:51:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ddp_usrreq.c,v 1.39 2009/04/16 21:37:17 elad Exp $	 */
+/*	$NetBSD: ddp_usrreq.c,v 1.40 2011/05/08 13:51:31 bouyer Exp $	 */
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ddp_usrreq.c,v 1.39 2009/04/16 21:37:17 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: ddp_usrreq.c,v 1.40 2011/05/08 13:51:31 bouyer Exp $);
 
 #include opt_mbuftrace.h
 
@@ -554,6 +554,7 @@
 
 	MOWNER_ATTACH(atalk_tx_mowner);
 	MOWNER_ATTACH(atalk_rx_mowner);
+	MOWNER_ATTACH(aarp_mowner);
 }
 
 #if 0



CVS commit: src/sbin/fdisk

2011-05-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun May  8 14:22:16 UTC 2011

Modified Files:
src/sbin/fdisk: fdisk.c

Log Message:
Fix parsing of -A option so that the [/ptn_0_offset] part is optional, as
described in the man page.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.130 src/sbin/fdisk/fdisk.c:1.131
--- src/sbin/fdisk/fdisk.c:1.130	Wed Dec 23 18:50:40 2009
+++ src/sbin/fdisk/fdisk.c	Sun May  8 14:22:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.130 2009/12/23 18:50:40 dsl Exp $ */
+/*	$NetBSD: fdisk.c,v 1.131 2011/05/08 14:22:16 pgoyette Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.130 2009/12/23 18:50:40 dsl Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.131 2011/05/08 14:22:16 pgoyette Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -418,8 +418,8 @@
 b_cyl = MAXCYL;
 			break;
 		case 'A':	/* Partition alignment[/offset] */
-			if (sscanf(optarg, %u/%u%n, ptn_alignment,
-ptn_0_offset, n)  1
+			if (sscanf(optarg, %u%n/%u%n, ptn_alignment,
+n, ptn_0_offset, n)  1
 			|| optarg[n] != 0
 			|| ptn_0_offset  ptn_alignment)
 errx(1, Bad argument to the -A flag.);



CVS commit: [netbsd-4] src

2011-05-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  8 17:18:20 UTC 2011

Modified Files:
src/distrib/sets/lists/man [netbsd-4]: mi
src/share/man/man4 [netbsd-4]: Makefile
Added Files:
src/share/man/man4 [netbsd-4]: gtp.4

Log Message:
Pull up following revision(s) (requested by fair in ticket #1422):
share/man/man4/gtp.4: revision 1.1
distrib/sets/lists/man/mi: revision 1.1304
share/man/man4/Makefile: revision 1.556
The mr(4) driver was replaced by gtp(4) in 2002, but the documentation
did not follow; fix PR kern/40070


To generate a diff of this commit:
cvs rdiff -u -r1.955.2.23 -r1.955.2.24 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.415.2.11 -r1.415.2.12 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.2.4.2 src/share/man/man4/gtp.4

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.955.2.23 src/distrib/sets/lists/man/mi:1.955.2.24
--- src/distrib/sets/lists/man/mi:1.955.2.23	Fri Jun  5 17:19:27 2009
+++ src/distrib/sets/lists/man/mi	Sun May  8 17:18:19 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.955.2.23 2009/06/05 17:19:27 snj Exp $
+# $NetBSD: mi,v 1.955.2.24 2011/05/08 17:18:19 bouyer Exp $
 ./etc/mtree/set.manman-sys-root
 ./usr/share/info/am-utils.info			man-amd-info		info
 ./usr/share/info/as.info			man-computil-info	bfd,info
@@ -3278,6 +3278,7 @@
 ./usr/share/man/man4/gpioow.4			man-sys-man		.man
 ./usr/share/man/man4/gre.4			man-sys-man		.man
 ./usr/share/man/man4/gsip.4			man-sys-man		.man
+./usr/share/man/man4/gtp.4			man-sys-man		.man
 ./usr/share/man/man4/gus.4			man-sys-man		.man
 ./usr/share/man/man4/guspnp.4			man-sys-man		.man
 ./usr/share/man/man4/hcide.4			man-sys-man		.man
@@ -3508,7 +3509,7 @@
 ./usr/share/man/man4/mly.4			man-sys-man		.man
 ./usr/share/man/man4/mpt.4			man-sys-man		.man
 ./usr/share/man/man4/mpu.4			man-sys-man		.man
-./usr/share/man/man4/mr.4			man-sys-man		.man
+./usr/share/man/man4/mr.4			man-obsolete		obsolete
 ./usr/share/man/man4/msk.4			man-sys-man		.man
 ./usr/share/man/man4/mskc.4			man-sys-man		.man
 ./usr/share/man/man4/mtd.4			man-sys-man		.man

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.415.2.11 src/share/man/man4/Makefile:1.415.2.12
--- src/share/man/man4/Makefile:1.415.2.11	Tue Mar 24 21:25:02 2009
+++ src/share/man/man4/Makefile	Sun May  8 17:18:19 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.415.2.11 2009/03/24 21:25:02 bouyer Exp $
+#	$NetBSD: Makefile,v 1.415.2.12 2011/05/08 17:18:19 bouyer Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 adc.4 adt7467c.4 adv.4 \
@@ -67,7 +67,7 @@
 	acpitz.4
 
 # Radio devices
-MAN+=	radio.4 az.4 mr.4 rt.4 rtii.4 sf2r.4
+MAN+=	radio.4 az.4 gtp.4 rt.4 rtii.4 sf2r.4
 
 # machine-independent busses
 MAN+=	eisa.4 isa.4 isapnp.4 ofisa.4 pci.4 pcmcia.4

Added files:

Index: src/share/man/man4/gtp.4
diff -u /dev/null src/share/man/man4/gtp.4:1.2.4.2
--- /dev/null	Sun May  8 17:18:20 2011
+++ src/share/man/man4/gtp.4	Sun May  8 17:18:19 2011
@@ -0,0 +1,77 @@
+.\	$OpenBSD: gtp.4,v 1.9 2007/05/31 19:19:50 jmc Exp $
+.\
+.\ Copyright (c) 2002 Vladimir Popov ju...@narod.ru
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+.\ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+.\ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\ (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 $Mdocdate$
+.Dd March 26, 2011
+.Dt GTP 4
+.Os
+.Sh NAME
+.Nm gtp
+.Nd Gemtek PCI FM radio device
+.Sh SYNOPSIS
+.Cd gtp*   at pci? flags 0x00
+.Cd radio* at gtp?
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Gemtek PCI and Guillemot MaxiRadio FM2000
+FM radio tuners.
+.Pp
+The Gemtek PCI cards are stereo FM tuners that can tune in the range
+87.5 \- 108.0 MHz, 

CVS commit: [netbsd-4] src/share/man/man4

2011-05-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  8 17:19:01 UTC 2011

Removed Files:
src/share/man/man4 [netbsd-4]: mr.4

Log Message:
Pull up following revision(s) (requested by fair in ticket #1422):
share/man/man4/gtp.4: revision 1.1
share/man/man4/mr.4: delete
distrib/sets/lists/man/mi: revision 1.1304
share/man/man4/Makefile: revision 1.556
The mr(4) driver was replaced by gtp(4) in 2002, but the documentation
did not follow; fix PR kern/40070


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/share/man/man4/mr.4

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



CVS commit: [netbsd-4] src/distrib/sets/lists/man

2011-05-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  8 17:24:55 UTC 2011

Modified Files:
src/distrib/sets/lists/man [netbsd-4]: mi

Log Message:
Pull up following revision(s) (requested by fair in ticket #1423):
distrib/sets/lists/man/mi: revision 1.1305 via patch
I missed the .0 and .html changes for mr.4 replacement by gtp.4 in PR =
kern/40070
Now corrected.


To generate a diff of this commit:
cvs rdiff -u -r1.955.2.24 -r1.955.2.25 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.955.2.24 src/distrib/sets/lists/man/mi:1.955.2.25
--- src/distrib/sets/lists/man/mi:1.955.2.24	Sun May  8 17:18:19 2011
+++ src/distrib/sets/lists/man/mi	Sun May  8 17:24:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.955.2.24 2011/05/08 17:18:19 bouyer Exp $
+# $NetBSD: mi,v 1.955.2.25 2011/05/08 17:24:55 bouyer Exp $
 ./etc/mtree/set.manman-sys-root
 ./usr/share/info/am-utils.info			man-amd-info		info
 ./usr/share/info/as.info			man-computil-info	bfd,info
@@ -857,6 +857,7 @@
 ./usr/share/man/cat4/gpioow.0			man-sys-catman		.cat
 ./usr/share/man/cat4/gre.0			man-sys-catman		.cat
 ./usr/share/man/cat4/gsip.0			man-sys-catman		.cat
+./usr/share/man/cat4/gtp.0			man-sys-catman		.cat
 ./usr/share/man/cat4/gus.0			man-sys-catman		.cat
 ./usr/share/man/cat4/guspnp.0			man-sys-catman		.cat
 ./usr/share/man/cat4/hcide.0			man-sys-catman		.cat
@@ -1087,7 +1088,7 @@
 ./usr/share/man/cat4/mly.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mpt.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mpu.0			man-sys-catman		.cat
-./usr/share/man/cat4/mr.0			man-sys-catman		.cat
+./usr/share/man/cat4/mr.0			man-obsolete		obsolete
 ./usr/share/man/cat4/msk.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mskc.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mtd.0			man-sys-catman		.cat



CVS commit: [netbsd-4] src/lib/libc/db

2011-05-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  8 17:26:14 UTC 2011

Modified Files:
src/lib/libc/db/btree [netbsd-4]: bt_open.c
src/lib/libc/db/hash [netbsd-4]: hash_page.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1428):
lib/libc/db/hash/hash_page.c: revision 1.24
lib/libc/db/btree/bt_open.c: revision 1.25
Correct check for snprintf() overflow via Maksymilian Arciemowicz from FreeBSD.
(the bt one was ok, but set errno and make it the same for consistency).
[to be pulled up]


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.2.1 src/lib/libc/db/btree/bt_open.c
cvs rdiff -u -r1.19 -r1.19.2.1 src/lib/libc/db/hash/hash_page.c

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

Modified files:

Index: src/lib/libc/db/btree/bt_open.c
diff -u src/lib/libc/db/btree/bt_open.c:1.20 src/lib/libc/db/btree/bt_open.c:1.20.2.1
--- src/lib/libc/db/btree/bt_open.c:1.20	Fri Nov  3 20:18:49 2006
+++ src/lib/libc/db/btree/bt_open.c	Sun May  8 17:26:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_open.c,v 1.20 2006/11/03 20:18:49 christos Exp $	*/
+/*	$NetBSD: bt_open.c,v 1.20.2.1 2011/05/08 17:26:13 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)bt_open.c	8.10 (Berkeley) 8/17/94;
 #else
-__RCSID($NetBSD: bt_open.c,v 1.20 2006/11/03 20:18:49 christos Exp $);
+__RCSID($NetBSD: bt_open.c,v 1.20.2.1 2011/05/08 17:26:13 bouyer Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -394,7 +394,7 @@
 tmp()
 {
 	sigset_t set, oset;
-	size_t len;
+	int len;
 	int fd;
 	char *envtmp;
 	char path[PATH_MAX];
@@ -406,8 +406,10 @@
 
 	len = snprintf(path,
 	sizeof(path), %s/bt.XX, envtmp ? envtmp : _PATH_TMP);
-	if (len = sizeof(path))
+	if (len  0 || (size_t)len = sizeof(path)) {
+		errno = ENAMETOOLONG;
 		return -1;
+	}
 	
 	(void)sigfillset(set);
 	(void)sigprocmask(SIG_BLOCK, set, oset);

Index: src/lib/libc/db/hash/hash_page.c
diff -u src/lib/libc/db/hash/hash_page.c:1.19 src/lib/libc/db/hash/hash_page.c:1.19.2.1
--- src/lib/libc/db/hash/hash_page.c:1.19	Fri Nov  3 20:18:49 2006
+++ src/lib/libc/db/hash/hash_page.c	Sun May  8 17:26:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_page.c,v 1.19 2006/11/03 20:18:49 christos Exp $	*/
+/*	$NetBSD: hash_page.c,v 1.19.2.1 2011/05/08 17:26:13 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)hash_page.c	8.7 (Berkeley) 8/16/94;
 #else
-__RCSID($NetBSD: hash_page.c,v 1.19 2006/11/03 20:18:49 christos Exp $);
+__RCSID($NetBSD: hash_page.c,v 1.19.2.1 2011/05/08 17:26:13 bouyer Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -880,15 +880,19 @@
 	sigset_t set, oset;
 	char *envtmp;
 	char namestr[PATH_MAX];
+	int len;
 
 	if (issetugid())
 		envtmp = NULL;
 	else
 		envtmp = getenv(TMPDIR);
 
-	if (-1 == snprintf(namestr, sizeof(namestr), %s/_hashXX,
-	envtmp ? envtmp : _PATH_TMP))
+	len = snprintf(namestr, sizeof(namestr), %s/_hashXX,
+	envtmp ? envtmp : _PATH_TMP);
+	if (len  0 || (size_t)len = sizeof(namestr)) {
+		errno = ENAMETOOLONG;
 		return -1;
+	}
 
 	/* Block signals; make sure file goes away at process exit. */
 	(void)sigfillset(set);



CVS commit: [netbsd-4] src/doc

2011-05-08 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  8 17:32:20 UTC 2011

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Tickets 1422, 1423, 1428


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.222 -r1.1.2.223 src/doc/CHANGES-4.1

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

Modified files:

Index: src/doc/CHANGES-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.222 src/doc/CHANGES-4.1:1.1.2.223
--- src/doc/CHANGES-4.1:1.1.2.222	Thu Apr  7 17:34:14 2011
+++ src/doc/CHANGES-4.1	Sun May  8 17:32:20 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.222 2011/04/07 17:34:14 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.223 2011/05/08 17:32:20 bouyer Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4428,3 +4428,26 @@
 	response values.
 	[christos, ticket #1427]
 
+distrib/sets/lists/man/mi			1.1304
+share/man/man4/Makefile1.556
+share/man/man4/gtp.41.1
+share/man/man4/mr.4delete
+
+	The mr(4) driver was replaced by gtp(4) in 2002, but the documentation
+	did not follow; fix PR kern/40070
+	[fair, ticket #1422]
+
+distrib/sets/lists/man/mi			1.1305 via patch
+
+	I missed the .0 and .html changes for mr.4 replacement by gtp.4 in PR
+	kern/40070.  Now corrected.
+	[fair, ticket #1423]
+
+lib/libc/db/btree/bt_open.c			1.25
+lib/libc/db/hash/hash_page.c			1.24
+
+	Correct check for snprintf() overflow via Maksymilian Arciemowicz
+	from FreeBSD.  (the bt one was ok, but set errno and make it the
+	same for consistency).
+	[christos, ticket #1428]
+



CVS commit: src/sys/ufs/ffs

2011-05-08 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun May  8 18:37:15 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Revert previous commit.  Locking the snapshot vnode while the file system
is suspended extends the suspension until the vnode gets unlocked by
the caller of ffs_snapshot().

Resuming the file system before expunging all snapshots and syncing the
snapshot creates races and deadlocks with journaling file systems at least.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.114 src/sys/ufs/ffs/ffs_snapshot.c:1.115
--- src/sys/ufs/ffs/ffs_snapshot.c:1.114	Fri Apr 29 09:45:15 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Sun May  8 18:37:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.114 2011/04/29 09:45:15 hannken Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.115 2011/05/08 18:37:15 hannken Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.114 2011/04/29 09:45:15 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.115 2011/05/08 18:37:15 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -177,7 +177,7 @@
 	return EOPNOTSUPP;
 }
 #else /* defined(FFS_NO_SNAPSHOT) */
-	bool suspended = false, snapshot_locked = false;
+	bool suspended = false;
 	int error, redo = 0, snaploc;
 	void *sbbuf = NULL;
 	daddr_t *snaplist = NULL, snaplistsize = 0;
@@ -310,24 +310,6 @@
 	DIP_ASSIGN(ip, mtimensec, ts.tv_nsec);
 	ip-i_flag |= IN_CHANGE | IN_UPDATE;
 	/*
-	 * Lock the snapshot and resume file system.
-	 */
-	mutex_enter(si-si_snaplock);
-	mutex_enter(si-si_lock);
-	si-si_owner = curlwp;
-	mutex_exit(si-si_lock);
-	snapshot_locked = true;
-	KASSERT(suspended);
-	vfs_resume(vp-v_mount);
-	suspended = false;
-#ifdef DEBUG
-	getmicrotime(endtime);
-	timersub(endtime, starttime, endtime);
-	printf(%s: suspended %lld.%03d sec, redo %d of %d\n,
-	mp-mnt_stat.f_mntonname, (long long)endtime.tv_sec,
-	endtime.tv_usec / 1000, redo, fs-fs_ncg);
-#endif
-	/*
 	 * Copy allocation information from all snapshots and then
 	 * expunge them from our view.
 	 */
@@ -399,13 +381,17 @@
 	si-si_gen++;
 	mutex_exit(si-si_lock);
 
-	if (suspended)
+	if (suspended) {
+		VOP_UNLOCK(vp);
 		vfs_resume(vp-v_mount);
-	if (snapshot_locked) {
-		mutex_enter(si-si_lock);
-		si-si_owner = NULL;
-		mutex_exit(si-si_lock);
-		mutex_exit(si-si_snaplock);
+		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+#ifdef DEBUG
+		getmicrotime(endtime);
+		timersub(endtime, starttime, endtime);
+		printf(%s: suspended %lld.%03d sec, redo %d of %d\n,
+		mp-mnt_stat.f_mntonname, (long long)endtime.tv_sec,
+		endtime.tv_usec / 1000, redo, fs-fs_ncg);
+#endif
 	}
 	if (error) {
 		if (!UFS_WAPBL_BEGIN(mp)) {



CVS commit: src/sys/netinet

2011-05-08 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sun May  8 18:42:54 UTC 2011

Modified Files:
src/sys/netinet: icmp6.h

Log Message:
update (unused) ND option identifiers and corresponding comments


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/netinet/icmp6.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/netinet/icmp6.h
diff -u src/sys/netinet/icmp6.h:1.40 src/sys/netinet/icmp6.h:1.41
--- src/sys/netinet/icmp6.h:1.40	Sat Oct 31 22:32:17 2009
+++ src/sys/netinet/icmp6.h	Sun May  8 18:42:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.h,v 1.40 2009/10/31 22:32:17 christos Exp $	*/
+/*	$NetBSD: icmp6.h,v 1.41 2011/05/08 18:42:53 spz Exp $	*/
 /*	$KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $	*/
 
 
@@ -229,7 +229,7 @@
 #define ND_RA_FLAG_HOME_AGENT	0x20
 
 /*
- * Router preference values based on RFC4199.
+ * Router preference values based on RFC4191.
  */
 #define ND_RA_FLAG_RTPREF_MASK	0x18 /* 00011000 */
 
@@ -300,11 +300,11 @@
 #define ND_OPT_HOMEAGENT_INFO		8
 #define ND_OPT_SOURCE_ADDRLIST		9
 #define ND_OPT_TARGET_ADDRLIST		10
+/* RFC5380 */
+#define ND_OPT_MAP			23
+/* RFC4191 */
+#define ND_OPT_ROUTE_INFO		24
 #define ND_OPT_RDNSS			25
-/* draft-ietf-ipngwg-router-preference, not officially assigned yet */
-#define ND_OPT_ROUTE_INFO		200
-/* draft-ietf-mobileip-hmipv6, not officially assigned yet */
-#define ND_OPT_MAP			201
 
 struct nd_opt_route_info {	/* route info */
 	u_int8_t	nd_opt_rti_type;