CVS commit: src/share/man/man4

2009-04-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 22 07:19:51 UTC 2009

Modified Files:
src/share/man/man4: ld.4

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/ld.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/ld.4
diff -u src/share/man/man4/ld.4:1.17 src/share/man/man4/ld.4:1.18
--- src/share/man/man4/ld.4:1.17	Tue Apr 21 22:21:02 2009
+++ src/share/man/man4/ld.4	Wed Apr 22 07:19:50 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: ld.4,v 1.17 2009/04/21 22:21:02 nonaka Exp $
+.\	$NetBSD: ld.4,v 1.18 2009/04/22 07:19:50 wiz Exp $
 .\
 .\ Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 13, 2006
+.Dd April 22, 2009
 .Dt LD 4
 .Os
 .Sh NAME



CVS commit: src/sys/arch/x86/include

2009-04-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Apr 22 10:17:48 UTC 2009

Modified Files:
src/sys/arch/x86/include: pmap.h

Log Message:
change pmap flags argument from int to u_int.
forgot to commit this.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/include/pmap.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/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.23 src/sys/arch/x86/include/pmap.h:1.24
--- src/sys/arch/x86/include/pmap.h:1.23	Sat Apr 18 08:51:45 2009
+++ src/sys/arch/x86/include/pmap.h	Wed Apr 22 10:17:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.23 2009/04/18 08:51:45 cegger Exp $	*/
+/*	$NetBSD: pmap.h,v 1.24 2009/04/22 10:17:48 cegger Exp $	*/
 
 /*
  *
@@ -178,7 +178,7 @@
 /*
  * MD flags that we use for pmap_enter:
  */
-#define PMAP_NOCACHE	0x0100	/* set the non-cacheable bit */
+#define PMAP_NOCACHE	0x0100	/* set the non-cacheable bit */
 
 /*
  * global kernel variables
@@ -398,7 +398,7 @@
 /* pmap functions with machine addresses */
 void	pmap_kenter_ma(vaddr_t, paddr_t, vm_prot_t);
 int	pmap_enter_ma(struct pmap *, vaddr_t, paddr_t, paddr_t,
-	vm_prot_t, int, int);
+	vm_prot_t, u_int, int);
 bool	pmap_extract_ma(pmap_t, vaddr_t, paddr_t *);
 
 paddr_t	vtomach(vaddr_t);



CVS commit: src/distrib/pmax/ramdisk

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 11:18:29 UTC 2009

Modified Files:
src/distrib/pmax/ramdisk: list

Log Message:
Put /usr/mdec/bootxx_ffsv2 into install ramdisk.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/pmax/ramdisk/list

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

Modified files:

Index: src/distrib/pmax/ramdisk/list
diff -u src/distrib/pmax/ramdisk/list:1.20 src/distrib/pmax/ramdisk/list:1.21
--- src/distrib/pmax/ramdisk/list:1.20	Sun Nov 30 04:18:14 2008
+++ src/distrib/pmax/ramdisk/list	Wed Apr 22 11:18:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.20 2008/11/30 04:18:14 tsutsui Exp $
+#	$NetBSD: list,v 1.21 2009/04/22 11:18:29 tsutsui Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/pmax/stand
 
@@ -61,6 +61,7 @@
 
 # we need the boot blocks /usr/mdec
 COPY	${DESTDIR}/usr/mdec/bootxx_ffs		usr/mdec/bootxx_ffs
+COPY	${DESTDIR}/usr/mdec/bootxx_ffsv2	usr/mdec/bootxx_ffsv2
 COPY	${DESTDIR}/usr/mdec/boot.pmax		usr/mdec/boot.pmax
 
 # various files that we need in /etc for the install



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-04-22 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Wed Apr 22 11:24:20 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: isakmp_frag.c

Log Message:
From Neil Kettle: Fix a possible null pointer dereference in fragmentation
code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/dist/ipsec-tools/src/racoon/isakmp_frag.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/dist/ipsec-tools/src/racoon/isakmp_frag.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c:1.4 src/crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c:1.5
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c:1.4	Sat Sep  9 16:22:09 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c	Wed Apr 22 11:24:20 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_frag.c,v 1.4 2006/09/09 16:22:09 manu Exp $	*/
+/*	$NetBSD: isakmp_frag.c,v 1.5 2009/04/22 11:24:20 tteras Exp $	*/
 
 /* Id: isakmp_frag.c,v 1.4 2004/11/13 17:31:36 manubsd Exp */
 
@@ -199,7 +199,8 @@
 	 * frag-len is the frag payload data plus the frag payload header,
 	 * whose size is sizeof(*frag) 
 	 */
-	if (msg-l  sizeof(*isakmp) + ntohs(frag-len)) {
+	if (msg-l  sizeof(*isakmp) + ntohs(frag-len) ||
+	ntohs(frag-len)  sizeof(*frag) + 1) {
 		plog(LLV_ERROR, LOCATION, NULL, Fragment too short\n);
 		return -1;
 	}



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools

2009-04-22 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Wed Apr 22 11:26:51 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools [ipsec-tools-0_7-branch]: NEWS configure.ac

Log Message:
Updates for 0.7.2 release


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.6.3 -r1.1.1.6.6.4 src/crypto/dist/ipsec-tools/NEWS
cvs rdiff -u -r1.3.4.11 -r1.3.4.12 src/crypto/dist/ipsec-tools/configure.ac

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

Modified files:

Index: src/crypto/dist/ipsec-tools/NEWS
diff -u src/crypto/dist/ipsec-tools/NEWS:1.1.1.6.6.3 src/crypto/dist/ipsec-tools/NEWS:1.1.1.6.6.4
--- src/crypto/dist/ipsec-tools/NEWS:1.1.1.6.6.3	Wed Jul 23 14:09:13 2008
+++ src/crypto/dist/ipsec-tools/NEWS	Wed Apr 22 11:26:50 2009
@@ -1,6 +1,16 @@
 Version history:
 
 
+0.7.2 - 22 April 2009
+	o Fix a remote crash in fragmentation code
+	o Phase2 message identities are phase1 specific (Vista compatibility=
+	o Autogenerate ChangeLog from cvs metadata
+	o Fix mode config pool resizing
+	o NAT-T fixes related to purging of IPsec SA:s and retransmission
+	o Remove phase1 handler immediately if first exchange is bad
+	o A bunch of memory leak and possible memory corruptions (triggerable
+	  by bad configuration or startup parameters)
+
 0.7.1 - 23 July 2008
 	o Fixes a memory leak when invalid proposal received
 	o Some fixes in DPD

Index: src/crypto/dist/ipsec-tools/configure.ac
diff -u src/crypto/dist/ipsec-tools/configure.ac:1.3.4.11 src/crypto/dist/ipsec-tools/configure.ac:1.3.4.12
--- src/crypto/dist/ipsec-tools/configure.ac:1.3.4.11	Tue Jan 20 14:38:55 2009
+++ src/crypto/dist/ipsec-tools/configure.ac	Wed Apr 22 11:26:50 2009
@@ -2,7 +2,7 @@
 dnl Id: configure.ac,v 1.77 2006/07/20 19:19:27 manubsd Exp
 
 AC_PREREQ(2.52)
-AC_INIT(ipsec-tools, 0.7.1)
+AC_INIT(ipsec-tools, 0.7.2)
 AC_CONFIG_SRCDIR([configure.ac])
 AM_CONFIG_HEADER(config.h)
 



CVS commit: src/distrib/landisk/ramdisk

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 12:15:03 UTC 2009

Modified Files:
src/distrib/landisk/ramdisk: list

Log Message:
Put /usr/mdec/bootxx_ffsv2 into install ramdisk.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/landisk/ramdisk/list

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

Modified files:

Index: src/distrib/landisk/ramdisk/list
diff -u src/distrib/landisk/ramdisk/list:1.4 src/distrib/landisk/ramdisk/list:1.5
--- src/distrib/landisk/ramdisk/list:1.4	Tue Apr  7 11:49:17 2009
+++ src/distrib/landisk/ramdisk/list	Wed Apr 22 12:15:03 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.4 2009/04/07 11:49:17 joerg Exp $
+#	$NetBSD: list,v 1.5 2009/04/22 12:15:03 tsutsui Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin gnu/usr.bin
 
@@ -77,3 +77,4 @@
 # we need the boot 
 COPY${DESTDIR}/usr/mdec/boot		usr/mdec/boot
 COPY${DESTDIR}/usr/mdec/bootxx_ffsv1	usr/mdec/bootxx_ffsv1
+COPY${DESTDIR}/usr/mdec/bootxx_ffsv2	usr/mdec/bootxx_ffsv2



CVS commit: src/distrib/utils/sysinst/arch/alpha

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 12:35:46 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/alpha: md.c

Log Message:
Make sure to free(3) memory allocated by asprintf(3) in bootxx_name().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/distrib/utils/sysinst/arch/alpha/md.c

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

Modified files:

Index: src/distrib/utils/sysinst/arch/alpha/md.c
diff -u src/distrib/utils/sysinst/arch/alpha/md.c:1.46 src/distrib/utils/sysinst/arch/alpha/md.c:1.47
--- src/distrib/utils/sysinst/arch/alpha/md.c:1.46	Tue Apr  7 10:45:04 2009
+++ src/distrib/utils/sysinst/arch/alpha/md.c	Wed Apr 22 12:35:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.46 2009/04/07 10:45:04 tsutsui Exp $	*/
+/*	$NetBSD: md.c,v 1.47 2009/04/22 12:35:46 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -127,14 +127,21 @@
 md_post_newfs(void)
 {
 	char *bootxx;
+	int error;
 
-	printf (msg_string(MSG_dobootblks), diskdev);
+	printf(msg_string(MSG_dobootblks), diskdev);
 	cp_to_target(/usr/mdec/boot, /boot);
 	bootxx = bootxx_name();
-	if (bootxx == NULL || run_program(RUN_DISPLAY | RUN_NO_CLEAR,
-	/usr/sbin/installboot /dev/r%sc %s, diskdev, bootxx))
+	if (bootxx != NULL) {
+		error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+		/usr/sbin/installboot /dev/r%sc %s, diskdev, bootxx);
+		free(bootxx);
+	} else
+		error = -1;
+
+	if (error != 0)
 		process_menu(MENU_ok,
-			 deconst(Warning: disk is probably not bootable));
+		deconst(Warning: disk is probably not bootable));
 
 	return 0;
 }



CVS commit: src/distrib/utils/sysinst/arch/pmax

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 12:37:01 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/pmax: md.c md.h

Log Message:
Add UFS2 root and boot support.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/distrib/utils/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.32 -r1.33 src/distrib/utils/sysinst/arch/pmax/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/pmax/md.c
diff -u src/distrib/utils/sysinst/arch/pmax/md.c:1.61 src/distrib/utils/sysinst/arch/pmax/md.c:1.62
--- src/distrib/utils/sysinst/arch/pmax/md.c:1.61	Tue Oct  7 09:58:15 2008
+++ src/distrib/utils/sysinst/arch/pmax/md.c	Wed Apr 22 12:37:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.61 2008/10/07 09:58:15 abs Exp $	*/
+/*	$NetBSD: md.c,v 1.62 2009/04/22 12:37:01 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -141,18 +141,29 @@
 int
 md_post_newfs(void)
 {
+	char *bootxx;
+	int error;
+
 	/* XXX boot blocks ... */
 	if (target_already_root()) {
-		/* /usr is empty and we must already have bootblocks?*/
+		/* /usr is empty and we must already have bootblocks? */
 		return 0;
 	}
 
 	printf(msg_string(MSG_dobootblks), diskdev);
 	cp_to_target(/usr/mdec/boot.pmax, /boot.pmax);
-	if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
-	/usr/sbin/installboot /dev/r%sc /usr/mdec/bootxx_ffs, diskdev))
+	bootxx = bootxx_name();
+	if (bootxx != NULL) {
+		error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+		/usr/sbin/installboot /dev/r%sc %s, diskdev, bootxx);
+		free(bootxx);
+	} else
+		error = -1;
+
+	if (error != 0)
 		process_menu(MENU_ok,
-			deconst(Warning: disk is probably not bootable));
+		deconst(Warning: disk is probably not bootable));
+
 	return 0;
 }
 

Index: src/distrib/utils/sysinst/arch/pmax/md.h
diff -u src/distrib/utils/sysinst/arch/pmax/md.h:1.32 src/distrib/utils/sysinst/arch/pmax/md.h:1.33
--- src/distrib/utils/sysinst/arch/pmax/md.h:1.32	Mon Nov 12 15:07:36 2007
+++ src/distrib/utils/sysinst/arch/pmax/md.h	Wed Apr 22 12:37:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.32 2007/11/12 15:07:36 jmmv Exp $	*/
+/*	$NetBSD: md.h,v 1.33 2009/04/22 12:37:01 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -55,6 +55,15 @@
 #define DEFUSRSIZE	120	/* Default /usr size, if /home */
 #define XNEEDMB		100	/* Extra megs for full X installation */
 
+/* have support for booting from UFS2 */
+#define HAVE_UFS2_BOOT
+
+/* have file system specific primary boot loader */
+#define HAVE_BOOTXX_xFS
+#define BOOTXXDIR	/usr/mdec
+#define BOOTXX_FFSV1	bootxx_ffs
+#define BOOTXX_FFSV2	bootxx_ffsv2
+
 /*
  * Machine-specific command to write a new label to a disk.
  * If not defined, we assume the port does not support disklabels and



CVS commit: src/crypto/dist/openssl/doc/ssl

2009-04-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Apr 22 13:10:33 UTC 2009

Modified Files:
src/crypto/dist/openssl/doc/ssl: ssl.pod

Log Message:
Apply rev 1.21 from src/lib/libcrypto/man/ssl.3:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/crypto/dist/openssl/doc/ssl/ssl.pod

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

Modified files:

Index: src/crypto/dist/openssl/doc/ssl/ssl.pod
diff -u src/crypto/dist/openssl/doc/ssl/ssl.pod:1.7 src/crypto/dist/openssl/doc/ssl/ssl.pod:1.8
--- src/crypto/dist/openssl/doc/ssl/ssl.pod:1.7	Fri May  9 21:49:42 2008
+++ src/crypto/dist/openssl/doc/ssl/ssl.pod	Wed Apr 22 13:10:33 2009
@@ -158,7 +158,7 @@
 
 Constructor for the TLSv1 SSL_METHOD structure for a dedicated client.
 
-=item cosnt SSL_METHOD *BTLSv1_server_method(void);
+=item const SSL_METHOD *BTLSv1_server_method(void);
 
 Constructor for the TLSv1 SSL_METHOD structure for a dedicated server.
 



CVS commit: src/doc

2009-04-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Apr 22 13:31:44 UTC 2009

Modified Files:
src/doc: 3RDPARTY

Log Message:
gcc-4.4.0 out.


To generate a diff of this commit:
cvs rdiff -u -r1.688 -r1.689 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.688 src/doc/3RDPARTY:1.689
--- src/doc/3RDPARTY:1.688	Mon Apr 20 04:11:26 2009
+++ src/doc/3RDPARTY	Wed Apr 22 13:31:44 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.688 2009/04/20 04:11:26 mrg Exp $
+#	$NetBSD: 3RDPARTY,v 1.689 2009/04/22 13:31:44 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -323,7 +323,7 @@
 
 Package:	gcc
 Version:	4.1.3-20080831
-Current Vers:	4.3.2
+Current Vers:	4.4.0
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gcc/
 Home Page:	http://www.gnu.org/software/gcc/



CVS commit: src/distrib/landisk/ramdisk

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 16:43:43 UTC 2009

Modified Files:
src/distrib/landisk/ramdisk: list

Log Message:
Also put /usr/mdec/mbr to install ramdisk to initialize a disk.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/landisk/ramdisk/list

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

Modified files:

Index: src/distrib/landisk/ramdisk/list
diff -u src/distrib/landisk/ramdisk/list:1.5 src/distrib/landisk/ramdisk/list:1.6
--- src/distrib/landisk/ramdisk/list:1.5	Wed Apr 22 12:15:03 2009
+++ src/distrib/landisk/ramdisk/list	Wed Apr 22 16:43:43 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.5 2009/04/22 12:15:03 tsutsui Exp $
+#	$NetBSD: list,v 1.6 2009/04/22 16:43:43 tsutsui Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin gnu/usr.bin
 
@@ -78,3 +78,4 @@
 COPY${DESTDIR}/usr/mdec/boot		usr/mdec/boot
 COPY${DESTDIR}/usr/mdec/bootxx_ffsv1	usr/mdec/bootxx_ffsv1
 COPY${DESTDIR}/usr/mdec/bootxx_ffsv2	usr/mdec/bootxx_ffsv2
+COPY${DESTDIR}/usr/mdec/mbr			usr/mdec/mbr



CVS commit: src/distrib/utils/sysinst/arch/landisk

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 16:51:02 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/landisk: md.c

Log Message:
Remove a bogus (debug?) message.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/sysinst/arch/landisk/md.c

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

Modified files:

Index: src/distrib/utils/sysinst/arch/landisk/md.c
diff -u src/distrib/utils/sysinst/arch/landisk/md.c:1.2 src/distrib/utils/sysinst/arch/landisk/md.c:1.3
--- src/distrib/utils/sysinst/arch/landisk/md.c:1.2	Tue Oct  7 09:58:15 2008
+++ src/distrib/utils/sysinst/arch/landisk/md.c	Wed Apr 22 16:51:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.2 2008/10/07 09:58:15 abs Exp $	*/
+/*	$NetBSD: md.c,v 1.3 2009/04/22 16:51:02 tsutsui Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -113,9 +113,6 @@
 		process_menu(MENU_ok,
 			 deconst(Warning: disk is probably not bootable));
 
-	process_menu(MENU_ok,
-		 deconst(blah));
-
 	return 0;
 }
 



CVS commit: src/distrib/utils/sysinst/arch/landisk

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 16:53:15 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/landisk: md.c

Log Message:
Install MBR bootcode (/usr/mdec/mbr) after write_mbr().


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/sysinst/arch/landisk/md.c

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

Modified files:

Index: src/distrib/utils/sysinst/arch/landisk/md.c
diff -u src/distrib/utils/sysinst/arch/landisk/md.c:1.3 src/distrib/utils/sysinst/arch/landisk/md.c:1.4
--- src/distrib/utils/sysinst/arch/landisk/md.c:1.3	Wed Apr 22 16:51:02 2009
+++ src/distrib/utils/sysinst/arch/landisk/md.c	Wed Apr 22 16:53:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.3 2009/04/22 16:51:02 tsutsui Exp $	*/
+/*	$NetBSD: md.c,v 1.4 2009/04/22 16:53:15 tsutsui Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -119,17 +119,21 @@
 int
 md_pre_disklabel(void)
 {
+
 	if (no_mbr)
 		return 0;
 
 	msg_display(MSG_dofdisk);
 
 	/* write edited MBR onto disk. */
-	if (write_mbr(diskdev, mbr, 1) != 0) {
+	if (write_mbr(diskdev, mbr, 1) != 0 ||
+	run_program(RUN_SILENT | RUN_ERROR_OK,
+	/sbin/fdisk -f -i -c /usr/mdec/mbr %s, diskdev)) {
 		msg_display(MSG_wmbrfail);
 		process_menu(MENU_ok, NULL);
 		return 1;
 	}
+
 	return 0;
 }
 



CVS commit: src/sys/arch/landisk/stand/bootxx

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 17:20:08 UTC 2009

Modified Files:
src/sys/arch/landisk/stand/bootxx: Makefile

Log Message:
Build and install bootxx_ustarfs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/landisk/stand/bootxx/Makefile

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

Modified files:

Index: src/sys/arch/landisk/stand/bootxx/Makefile
diff -u src/sys/arch/landisk/stand/bootxx/Makefile:1.3 src/sys/arch/landisk/stand/bootxx/Makefile:1.4
--- src/sys/arch/landisk/stand/bootxx/Makefile:1.3	Tue Apr 21 15:17:58 2009
+++ src/sys/arch/landisk/stand/bootxx/Makefile	Wed Apr 22 17:20:08 2009
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2009/04/21 15:17:58 tsutsui Exp $
+# $NetBSD: Makefile,v 1.4 2009/04/22 17:20:08 tsutsui Exp $
 
-SUBDIR=	bootxx_ffsv1 bootxx_ffsv2
+SUBDIR=	bootxx_ffsv1 bootxx_ffsv2 bootxx_ustarfs
 
 LIBOBJ= ${.OBJDIR}
 .MAKEOVERRIDES+= LIBOBJ



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

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 17:20:15 UTC 2009

Modified Files:
src/distrib/sets/lists/base: md.landisk

Log Message:
+/usr/mdec/bootxx_ustarfs


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base/md.landisk

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/base/md.landisk
diff -u src/distrib/sets/lists/base/md.landisk:1.4 src/distrib/sets/lists/base/md.landisk:1.5
--- src/distrib/sets/lists/base/md.landisk:1.4	Tue Apr 21 15:18:50 2009
+++ src/distrib/sets/lists/base/md.landisk	Wed Apr 22 17:20:15 2009
@@ -1,5 +1,6 @@
-# $NetBSD: md.landisk,v 1.4 2009/04/21 15:18:50 tsutsui Exp $
+# $NetBSD: md.landisk,v 1.5 2009/04/22 17:20:15 tsutsui Exp $
 ./usr/mdec/boot			base-sysutil-bin
 ./usr/mdec/bootxx_ffsv1		base-sysutil-bin
 ./usr/mdec/bootxx_ffsv2		base-sysutil-bin
+./usr/mdec/bootxx_ustarfs	base-sysutil-bin
 ./usr/mdec/mbr			base-sysutil-bin



CVS commit: src/distrib/utils/sysinst/arch/landisk

2009-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 22 17:21:48 UTC 2009

Modified Files:
src/distrib/utils/sysinst/arch/landisk: md.c md.h

Log Message:
Add UFS2 root and boot support.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/utils/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/sysinst/arch/landisk/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/landisk/md.c
diff -u src/distrib/utils/sysinst/arch/landisk/md.c:1.4 src/distrib/utils/sysinst/arch/landisk/md.c:1.5
--- src/distrib/utils/sysinst/arch/landisk/md.c:1.4	Wed Apr 22 16:53:15 2009
+++ src/distrib/utils/sysinst/arch/landisk/md.c	Wed Apr 22 17:21:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.4 2009/04/22 16:53:15 tsutsui Exp $	*/
+/*	$NetBSD: md.c,v 1.5 2009/04/22 17:21:47 tsutsui Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -104,14 +104,22 @@
 int
 md_post_newfs(void)
 {
+	char *bootxx;
+	int error;
 
 	printf (msg_string(MSG_dobootblks), diskdev);
 	cp_to_target(/usr/mdec/boot, /boot);
-	if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
-	/usr/sbin/installboot -v -m landisk /dev/r%sa /usr/mdec/bootxx_ffsv1,
-	diskdev))
+	bootxx = bootxx_name();
+	if (bootxx != NULL) {
+		error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+		/usr/sbin/installboot -v /dev/r%sa %s, diskdev, bootxx);
+		free(bootxx);
+	} else
+		error = -1;
+
+	if (error != 0)
 		process_menu(MENU_ok,
-			 deconst(Warning: disk is probably not bootable));
+		deconst(Warning: disk is probably not bootable));
 
 	return 0;
 }

Index: src/distrib/utils/sysinst/arch/landisk/md.h
diff -u src/distrib/utils/sysinst/arch/landisk/md.h:1.1 src/distrib/utils/sysinst/arch/landisk/md.h:1.2
--- src/distrib/utils/sysinst/arch/landisk/md.h:1.1	Mon Apr 14 17:24:56 2008
+++ src/distrib/utils/sysinst/arch/landisk/md.h	Wed Apr 22 17:21:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.1 2008/04/14 17:24:56 skrll Exp $	*/
+/*	$NetBSD: md.h,v 1.2 2009/04/22 17:21:47 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -46,6 +46,15 @@
 /* Megs required for a full X installation. */
 #define XNEEDMB			340
 
+/* have support for booting from UFS2 */
+#define HAVE_UFS2_BOOT
+
+/* have file system specific primary boot loader */
+#define HAVE_BOOTXX_xFS
+#define BOOTXXDIR	/usr/mdec
+#define BOOTXX_FFSV1	bootxx_ffsv1
+#define BOOTXX_FFSV2	bootxx_ffsv2
+
 /*
  *  Default filesets to fetch and install during installation or upgrade.
  *  The standard sets are: base etc comp games man misc text



CVS commit: src/sys/sys

2009-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 18:04:02 UTC 2009

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

Log Message:
Cast the argument of the __BIT to an unsigned type, since it does not make
sense for it to be signed and gcc complains if it is.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/sys/cdefs.h

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

Modified files:

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.73 src/sys/sys/cdefs.h:1.74
--- src/sys/sys/cdefs.h:1.73	Thu Mar 26 18:16:44 2009
+++ src/sys/sys/cdefs.h	Wed Apr 22 14:04:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.73 2009/03/26 22:16:44 gmcgarry Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.74 2009/04/22 18:04:02 christos Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -396,7 +396,7 @@
 
 /* __BIT(n): nth bit, where __BIT(0) == 0x1. */
 #define	__BIT(__n)	\
-	(((__n) = NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1  (__n)))
+(((uintmax_t)(__n) = NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1  (uintmax_t)(__n)))
 
 /* __BITS(m, n): bits m through n, m  n. */
 #define	__BITS(__m, __n)	\



CVS commit: src/external/bsd/bind/dist/bin/named

2009-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 18:25:24 UTC 2009

Modified Files:
src/external/bsd/bind/dist/bin/named: server.c

Log Message:
Don't log if . is not writable. In the chrooted environment this is
/var/chroot/named, and there is no reason whatsoever for this to be
writable!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/bind/dist/bin/named/server.c

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

Modified files:

Index: src/external/bsd/bind/dist/bin/named/server.c
diff -u src/external/bsd/bind/dist/bin/named/server.c:1.1.1.1 src/external/bsd/bind/dist/bin/named/server.c:1.2
--- src/external/bsd/bind/dist/bin/named/server.c:1.1.1.1	Sun Mar 22 10:56:08 2009
+++ src/external/bsd/bind/dist/bin/named/server.c	Wed Apr 22 14:25:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.1.1.1 2009/03/22 14:56:08 christos Exp $	*/
+/*	$NetBSD: server.c,v 1.2 2009/04/22 18:25:24 christos Exp $	*/
 
 /*
  * Copyright (C) 2004-2009  Internet Systems Consortium, Inc. (ISC)
@@ -3451,6 +3451,7 @@
 	if (first_time)
 		ns_os_changeuser();
 
+#ifdef notdef
 	/*
 	 * Check that the working directory is writable.
 	 */
@@ -3459,6 +3460,7 @@
 			  NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
 			  the working directory is not writable);
 	}
+#endif
 
 	/*
 	 * Configure the logging system.



CVS commit: src/etc/rc.d

2009-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 18:27:03 UTC 2009

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

Log Message:
Adjust for new default location of the pid file.


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

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

Modified files:

Index: src/etc/rc.d/named
diff -u src/etc/rc.d/named:1.18 src/etc/rc.d/named:1.19
--- src/etc/rc.d/named:1.18	Tue Nov 29 16:07:25 2005
+++ src/etc/rc.d/named	Wed Apr 22 14:27:03 2009
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: named,v 1.18 2005/11/29 21:07:25 christos Exp $
+# $NetBSD: named,v 1.19 2009/04/22 18:27:03 christos Exp $
 #
 
 # PROVIDE: named
@@ -13,7 +13,7 @@
 name=named
 rcvar=$name
 command=/usr/sbin/${name}
-pidfile=/var/run/${name}.pid
+pidfile=/var/run/${name}/${name}.pid
 start_precmd=named_precmd
 extra_commands=reload
 required_dirs=$named_chrootdir	# if it is set, it must exist



CVS commit: src/lib/libc/db

2009-04-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 22 18:44:06 UTC 2009

Modified Files:
src/lib/libc/db/btree: bt_split.c
src/lib/libc/db/hash: hash_buf.c
src/lib/libc/db/mpool: mpool.c

Log Message:
Avoid information leaks by zeroing memory, from FreeBSD (we had done some
already)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/btree/bt_split.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/hash/hash_buf.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/mpool/mpool.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_split.c
diff -u src/lib/libc/db/btree/bt_split.c:1.18 src/lib/libc/db/btree/bt_split.c:1.19
--- src/lib/libc/db/btree/bt_split.c:1.18	Thu Feb 12 01:41:40 2009
+++ src/lib/libc/db/btree/bt_split.c	Wed Apr 22 14:44:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_split.c,v 1.18 2009/02/12 06:41:40 lukem Exp $	*/
+/*	$NetBSD: bt_split.c,v 1.19 2009/04/22 18:44:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: bt_split.c,v 1.18 2009/02/12 06:41:40 lukem Exp $);
+__RCSID($NetBSD: bt_split.c,v 1.19 2009/04/22 18:44:06 christos Exp $);
 
 #include namespace.h
 #include sys/types.h
@@ -383,7 +383,7 @@
 	}
 
 	/* Put the new left page for the split into place. */
-	if ((l = (PAGE *)malloc(t-bt_psize)) == NULL) {
+	if ((l = calloc(1, t-bt_psize)) == NULL) {
 		mpool_put(t-bt_mp, r, 0);
 		return (NULL);
 	}

Index: src/lib/libc/db/hash/hash_buf.c
diff -u src/lib/libc/db/hash/hash_buf.c:1.14 src/lib/libc/db/hash/hash_buf.c:1.15
--- src/lib/libc/db/hash/hash_buf.c:1.14	Wed Sep 10 13:52:35 2008
+++ src/lib/libc/db/hash/hash_buf.c	Wed Apr 22 14:44:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_buf.c,v 1.14 2008/09/10 17:52:35 joerg Exp $	*/
+/*	$NetBSD: hash_buf.c,v 1.15 2009/04/22 18:44:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hash_buf.c,v 1.14 2008/09/10 17:52:35 joerg Exp $);
+__RCSID($NetBSD: hash_buf.c,v 1.15 2009/04/22 18:44:06 christos Exp $);
 
 /*
  * PACKAGE: hash
@@ -313,8 +313,10 @@
 		}
 		/* Check if we are freeing stuff */
 		if (do_free) {
-			if (bp-page)
+			if (bp-page) {
+(void)memset(bp-page, 0, hashp-BSIZE);
 free(bp-page);
+			}
 			BUF_REMOVE(bp);
 			free(bp);
 			bp = LRU;

Index: src/lib/libc/db/mpool/mpool.c
diff -u src/lib/libc/db/mpool/mpool.c:1.18 src/lib/libc/db/mpool/mpool.c:1.19
--- src/lib/libc/db/mpool/mpool.c:1.18	Thu Sep 11 08:58:00 2008
+++ src/lib/libc/db/mpool/mpool.c	Wed Apr 22 14:44:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpool.c,v 1.18 2008/09/11 12:58:00 joerg Exp $	*/
+/*	$NetBSD: mpool.c,v 1.19 2009/04/22 18:44:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: mpool.c,v 1.18 2008/09/11 12:58:00 joerg Exp $);
+__RCSID($NetBSD: mpool.c,v 1.19 2009/04/22 18:44:06 christos Exp $);
 
 #include namespace.h
 #include sys/queue.h
@@ -341,7 +341,7 @@
 			return (bp);
 		}
 
-new:	if ((bp = (BKT *)malloc((size_t)(sizeof(BKT) + mp-pagesize))) == NULL)
+new:	if ((bp = calloc(1, (size_t)(sizeof(BKT) + mp-pagesize))) == NULL)
 		return (NULL);
 #ifdef STATISTICS
 	++mp-pagealloc;



CVS commit: src/share/man/man9

2009-04-22 Thread Elad Efrat
Module Name:src
Committed By:   elad
Date:   Wed Apr 22 20:53:44 UTC 2009

Modified Files:
src/share/man/man9: vattr.9 vfsops.9 vfssubr.9 vnode.9

Log Message:
There is no vfs_subr2.c.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/vattr.9
cvs rdiff -u -r1.41 -r1.42 src/share/man/man9/vfsops.9
cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/vfssubr.9
cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/vnode.9

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

Modified files:

Index: src/share/man/man9/vattr.9
diff -u src/share/man/man9/vattr.9:1.10 src/share/man/man9/vattr.9:1.11
--- src/share/man/man9/vattr.9:1.10	Wed Apr 30 13:10:59 2008
+++ src/share/man/man9/vattr.9	Wed Apr 22 20:53:44 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: vattr.9,v 1.10 2008/04/30 13:10:59 martin Exp $
+.\ $NetBSD: vattr.9,v 1.11 2009/04/22 20:53:44 elad Exp $
 .\
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 24, 2008
+.Dd April 22, 2009
 .Dt VATTR 9
 .Os
 .Sh NAME
@@ -111,7 +111,7 @@
 .Pa /usr/src .
 .Pp
 The vnode attributes ares implemented within the file
-.Pa sys/kern/vfs_subr2.c .
+.Pa sys/kern/vfs_subr.c .
 .Sh SEE ALSO
 .Xr intro 9 ,
 .Xr vfs 9 ,

Index: src/share/man/man9/vfsops.9
diff -u src/share/man/man9/vfsops.9:1.41 src/share/man/man9/vfsops.9:1.42
--- src/share/man/man9/vfsops.9:1.41	Tue Mar 17 00:10:37 2009
+++ src/share/man/man9/vfsops.9	Wed Apr 22 20:53:44 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: vfsops.9,v 1.41 2009/03/17 00:10:37 joerg Exp $
+.\ $NetBSD: vfsops.9,v 1.42 2009/04/22 20:53:44 elad Exp $
 .\
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 24, 2008
+.Dd April 22, 2009
 .Dt VFSOPS 9
 .Os
 .Sh NAME
@@ -416,8 +416,7 @@
 .Pa /usr/src .
 .Pp
 The vfs operations are implemented within the files
-.Pa sys/kern/vfs_subr.c ,
-.Pa sys/kern/vfs_subr2.c
+.Pa sys/kern/vfs_subr.c
 and
 .Pa sys/kern/vfs_init.c .
 .Sh SEE ALSO

Index: src/share/man/man9/vfssubr.9
diff -u src/share/man/man9/vfssubr.9:1.16 src/share/man/man9/vfssubr.9:1.17
--- src/share/man/man9/vfssubr.9:1.16	Wed Apr 30 13:10:59 2008
+++ src/share/man/man9/vfssubr.9	Wed Apr 22 20:53:44 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: vfssubr.9,v 1.16 2008/04/30 13:10:59 martin Exp $
+.\ $NetBSD: vfssubr.9,v 1.17 2009/04/22 20:53:44 elad Exp $
 .\
 .\ Copyright (c) 2003, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 21, 2007
+.Dd April 22, 2009
 .Dt VFSSUBR 9
 .Os
 .Sh NAME
@@ -196,8 +196,7 @@
 .Pa /usr/src .
 .Pp
 The vfs interface functions are implemented within the files
-.Pa sys/kern/vfs_subr.c ,
-.Pa sys/kern/vfs_subr2.c ,
+.Pa sys/kern/vfs_subr.c
 and
 .Pa sys/kern/vfs_init.c .
 .Sh SEE ALSO

Index: src/share/man/man9/vnode.9
diff -u src/share/man/man9/vnode.9:1.39 src/share/man/man9/vnode.9:1.40
--- src/share/man/man9/vnode.9:1.39	Wed Apr 30 13:10:59 2008
+++ src/share/man/man9/vnode.9	Wed Apr 22 20:53:44 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: vnode.9,v 1.39 2008/04/30 13:10:59 martin Exp $
+.\ $NetBSD: vnode.9,v 1.40 2009/04/22 20:53:44 elad Exp $
 .\
 .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 24, 2008
+.Dd April 22, 2009
 .Dt VNODE 9
 .Os
 .Sh NAME
@@ -782,10 +782,8 @@
 All pathnames are relative to
 .Pa /usr/src .
 .Pp
-The vnode framework is implemented within the files
-.Pa sys/kern/vfs_subr.c
-and
-.Pa sys/kern/vfs_subr2.c .
+The vnode framework is implemented within the file
+.Pa sys/kern/vfs_subr.c .
 .Sh SEE ALSO
 .Xr intro 9 ,
 .Xr lock 9 ,



CVS commit: src/sys

2009-04-22 Thread Elad Efrat
Module Name:src
Committed By:   elad
Date:   Wed Apr 22 22:57:09 UTC 2009

Modified Files:
src/sys/fs/ptyfs: ptyfs_vnops.c
src/sys/fs/tmpfs: tmpfs_subr.c
src/sys/fs/udf: udf_vnops.c
src/sys/kern: vfs_subr.c
src/sys/miscfs/genfs: genfs.h genfs_vnops.c
src/sys/sys: vnode.h
src/sys/ufs/ext2fs: ext2fs_vnops.c
src/sys/ufs/ufs: ufs_vnops.c

Log Message:
Per discussion on tech-kern@:

  - Replace use of label/goto with returns

  - Rename, change prototype of, and move functions from vfs_subr.c to
genfs_vnops.c


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/ptyfs/ptyfs_vnops.c
cvs rdiff -u -r1.51 -r1.52 src/sys/fs/tmpfs/tmpfs_subr.c
cvs rdiff -u -r1.39 -r1.40 src/sys/fs/udf/udf_vnops.c
cvs rdiff -u -r1.373 -r1.374 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.23 -r1.24 src/sys/miscfs/genfs/genfs.h
cvs rdiff -u -r1.168 -r1.169 src/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -u -r1.204 -r1.205 src/sys/sys/vnode.h
cvs rdiff -u -r1.84 -r1.85 src/sys/ufs/ext2fs/ext2fs_vnops.c
cvs rdiff -u -r1.174 -r1.175 src/sys/ufs/ufs/ufs_vnops.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/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.28 src/sys/fs/ptyfs/ptyfs_vnops.c:1.29
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.28	Mon Apr 20 18:06:27 2009
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Wed Apr 22 22:57:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.28 2009/04/20 18:06:27 elad Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.29 2009/04/22 22:57:09 elad Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ptyfs_vnops.c,v 1.28 2009/04/20 18:06:27 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: ptyfs_vnops.c,v 1.29 2009/04/22 22:57:09 elad Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -464,7 +464,7 @@
 	struct ptyfsnode *ptyfs = VTOPTYFS(vp);
 	int error;
 
-	error = common_chmod_allowed(cred, vp, ptyfs-ptyfs_uid,
+	error = genfs_can_chmod(vp, cred, ptyfs-ptyfs_uid,
 	ptyfs-ptyfs_gid, mode);
 	if (error)
 		return (error);
@@ -490,8 +490,8 @@
 	if (gid == (gid_t)VNOVAL)
 		gid = ptyfs-ptyfs_gid;
 
-	error = common_chown_allowed(cred, ptyfs-ptyfs_uid, ptyfs-ptyfs_gid,
-	uid, gid);
+	error = genfs_can_chown(vp, cred, ptyfs-ptyfs_uid,
+	ptyfs-ptyfs_gid, uid, gid);
 	if (error)
 		return (error);
 

Index: src/sys/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.51 src/sys/fs/tmpfs/tmpfs_subr.c:1.52
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.51	Mon Apr 20 18:06:27 2009
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Wed Apr 22 22:57:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_subr.c,v 1.51 2009/04/20 18:06:27 elad Exp $	*/
+/*	$NetBSD: tmpfs_subr.c,v 1.52 2009/04/22 22:57:09 elad Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_subr.c,v 1.51 2009/04/20 18:06:27 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_subr.c,v 1.52 2009/04/22 22:57:09 elad Exp $);
 
 #include sys/param.h
 #include sys/dirent.h
@@ -1033,7 +1033,7 @@
 	if (node-tn_flags  (IMMUTABLE | APPEND))
 		return EPERM;
 
-	error = common_chmod_allowed(cred, vp, node-tn_uid, node-tn_gid,
+	error = genfs_can_chmod(vp, cred, node-tn_uid, node-tn_gid,
 	mode);
 	if (error)
 		return (error);
@@ -1084,7 +1084,7 @@
 	if (node-tn_flags  (IMMUTABLE | APPEND))
 		return EPERM;
 
-	error = common_chown_allowed(cred, node-tn_uid, node-tn_gid, uid,
+	error = genfs_can_chown(vp, cred, node-tn_uid, node-tn_gid, uid,
 	gid);
 	if (error)
 		return (error);

Index: src/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.39 src/sys/fs/udf/udf_vnops.c:1.40
--- src/sys/fs/udf/udf_vnops.c:1.39	Mon Apr 20 18:06:26 2009
+++ src/sys/fs/udf/udf_vnops.c	Wed Apr 22 22:57:09 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.39 2009/04/20 18:06:26 elad Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.40 2009/04/22 22:57:09 elad Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_vnops.c,v 1.39 2009/04/20 18:06:26 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_vnops.c,v 1.40 2009/04/22 22:57:09 elad Exp $);
 #endif /* not lint */
 
 
@@ -965,7 +965,7 @@
 		return EINVAL;
 
 	/* check permissions */
-	error = common_chown_allowed(cred, uid, gid, new_uid, new_gid);
+	error = genfs_can_chown(vp, cred, uid, gid, new_uid, new_gid);
 	if (error)
 		return (error);
 
@@ -1001,7 +1001,7 @@
 	udf_getownership(udf_node, uid, gid);
 
 	/* check permissions */
-	error = common_chmod_allowed(cred, vp, uid, gid, mode);
+	error = genfs_can_chmod(vp, cred, uid, gid, mode);
 	if (error)
 		return (error);
 

Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.373 src/sys/kern/vfs_subr.c:1.374
--- src/sys/kern/vfs_subr.c:1.373	Tue Apr 

CVS commit: src/usr.sbin/cpuctl

2009-04-22 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Apr 23 01:36:57 UTC 2009

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

Log Message:
Fix -Wsign-compare issue


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/cpuctl/cpuctl.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/cpuctl/cpuctl.c
diff -u src/usr.sbin/cpuctl/cpuctl.c:1.14 src/usr.sbin/cpuctl/cpuctl.c:1.15
--- src/usr.sbin/cpuctl/cpuctl.c:1.14	Sun Apr 19 14:11:38 2009
+++ src/usr.sbin/cpuctl/cpuctl.c	Thu Apr 23 01:36:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuctl.c,v 1.14 2009/04/19 14:11:38 ad Exp $	*/
+/*	$NetBSD: cpuctl.c,v 1.15 2009/04/23 01:36:56 lukem Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #ifndef lint
 #include sys/cdefs.h
-__RCSID($NetBSD: cpuctl.c,v 1.14 2009/04/19 14:11:38 ad Exp $);
+__RCSID($NetBSD: cpuctl.c,v 1.15 2009/04/23 01:36:56 lukem Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -223,7 +223,7 @@
 		usage();
 
 	np = sysconf(_SC_NPROCESSORS_CONF);
-	if (id = np)
+	if (id = (u_long)np)
 		errx(EXIT_FAILURE, Invalid CPU number);
 
 	return id;



CVS commit: src/usr.sbin/cpuctl

2009-04-22 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Apr 23 01:37:55 UTC 2009

Modified Files:
src/usr.sbin/cpuctl: Makefile

Log Message:
Allow WARNS=4 after Christos' fix sys/cdefs.h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/cpuctl/Makefile

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/cpuctl/Makefile
diff -u src/usr.sbin/cpuctl/Makefile:1.4 src/usr.sbin/cpuctl/Makefile:1.5
--- src/usr.sbin/cpuctl/Makefile:1.4	Wed Apr 22 15:23:02 2009
+++ src/usr.sbin/cpuctl/Makefile	Thu Apr 23 01:37:55 2009
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2009/04/22 15:23:02 lukem Exp $
-
-WARNS?=	3	# XXX -Wsign-compare issues in arch/i386.c
+#	$NetBSD: Makefile,v 1.5 2009/04/23 01:37:55 lukem Exp $
 
 .PATH:	${.CURDIR}/arch
 



CVS commit: src/lib/libc/time

2009-04-22 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Apr 23 01:39:47 UTC 2009

Modified Files:
src/lib/libc/time: zic.c

Log Message:
Fix -Wcast-qual issue


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/time/zic.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/time/zic.c
diff -u src/lib/libc/time/zic.c:1.23 src/lib/libc/time/zic.c:1.24
--- src/lib/libc/time/zic.c:1.23	Thu May 27 20:39:49 2004
+++ src/lib/libc/time/zic.c	Thu Apr 23 01:39:47 2009
@@ -1,9 +1,9 @@
-/*	$NetBSD: zic.c,v 1.23 2004/05/27 20:39:49 kleink Exp $	*/
+/*	$NetBSD: zic.c,v 1.24 2009/04/23 01:39:47 lukem Exp $	*/
 
 #include sys/cdefs.h
 #ifndef lint
 #ifndef NOID
-__RCSID($NetBSD: zic.c,v 1.23 2004/05/27 20:39:49 kleink Exp $);
+__RCSID($NetBSD: zic.c,v 1.24 2009/04/23 01:39:47 lukem Exp $);
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -1426,9 +1426,9 @@
 const void *	avp;
 const void *	bvp;
 {
-	if (((struct attype *) avp)-at  ((struct attype *) bvp)-at)
+	if (((const struct attype *) avp)-at  ((const struct attype *) bvp)-at)
 		return -1;
-	else if (((struct attype *) avp)-at  ((struct attype *) bvp)-at)
+	else if (((const struct attype *) avp)-at  ((const struct attype *) bvp)-at)
 		return 1;
 	else	return 0;
 }



CVS commit: [netbsd-3] src/lib/libedit

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:00:19 UTC 2009

Modified Files:
src/lib/libedit [netbsd-3]: common.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #2006):
lib/libedit/common.c: revision 1.23
fix mis-evaluating whether a char is digit or not.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.6.1 src/lib/libedit/common.c

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

Modified files:

Index: src/lib/libedit/common.c
diff -u src/lib/libedit/common.c:1.16 src/lib/libedit/common.c:1.16.6.1
--- src/lib/libedit/common.c:1.16	Thu Aug  7 16:44:30 2003
+++ src/lib/libedit/common.c	Thu Apr 23 02:00:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.16 2003/08/07 16:44:30 agc Exp $	*/
+/*	$NetBSD: common.c,v 1.16.6.1 2009/04/23 02:00:19 snj Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)common.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: common.c,v 1.16 2003/08/07 16:44:30 agc Exp $);
+__RCSID($NetBSD: common.c,v 1.16.6.1 2009/04/23 02:00:19 snj Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -383,7 +383,7 @@
 ed_digit(EditLine *el, int c)
 {
 
-	if (!isdigit(c))
+	if (!isdigit((unsigned char)c))
 		return (CC_ERROR);
 
 	if (el-el_state.doingarg) {
@@ -411,7 +411,7 @@
 ed_argument_digit(EditLine *el, int c)
 {
 
-	if (!isdigit(c))
+	if (!isdigit((unsigned char)c))
 		return (CC_ERROR);
 
 	if (el-el_state.doingarg) {



CVS commit: [netbsd-3] src/lib/libedit

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:03:55 UTC 2009

Modified Files:
src/lib/libedit [netbsd-3]: term.c

Log Message:
Apply patch (requested by msaitoh in ticket #2007):
Coverity CID 1668: Plug memory leak when malloc() failed.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.2.1 src/lib/libedit/term.c

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

Modified files:

Index: src/lib/libedit/term.c
diff -u src/lib/libedit/term.c:1.40 src/lib/libedit/term.c:1.40.2.1
--- src/lib/libedit/term.c:1.40	Sat May 22 23:21:28 2004
+++ src/lib/libedit/term.c	Thu Apr 23 02:03:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: term.c,v 1.40 2004/05/22 23:21:28 christos Exp $	*/
+/*	$NetBSD: term.c,v 1.40.2.1 2009/04/23 02:03:55 snj Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)term.c	8.2 (Berkeley) 4/30/95;
 #else
-__RCSID($NetBSD: term.c,v 1.40 2004/05/22 23:21:28 christos Exp $);
+__RCSID($NetBSD: term.c,v 1.40.2.1 2009/04/23 02:03:55 snj Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -472,8 +472,12 @@
 		return (-1);
 	for (i = 0; i  c-v; i++) {
 		b[i] = (char *) el_malloc((size_t) (sizeof(char) * (c-h + 1)));
-		if (b[i] == NULL)
+		if (b[i] == NULL) {
+			while (--i = 0)
+el_free((ptr_t) b[i]);
+			el_free((ptr_t) b);
 			return (-1);
+		}
 	}
 	b[c-v] = NULL;
 	el-el_display = b;
@@ -483,8 +487,12 @@
 		return (-1);
 	for (i = 0; i  c-v; i++) {
 		b[i] = (char *) el_malloc((size_t) (sizeof(char) * (c-h + 1)));
-		if (b[i] == NULL)
+		if (b[i] == NULL) {
+			while (--i = 0)
+el_free((ptr_t) b[i]);
+			el_free((ptr_t) b);
 			return (-1);
+		}
 	}
 	b[c-v] = NULL;
 	el-el_vdisplay = b;



CVS commit: [netbsd-3] src/doc

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:13:33 UTC 2009

Modified Files:
src/doc [netbsd-3]: CHANGES-3.2

Log Message:
Tickets 2006-2008 and 2010.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.164 -r1.1.2.165 src/doc/CHANGES-3.2

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-3.2
diff -u src/doc/CHANGES-3.2:1.1.2.164 src/doc/CHANGES-3.2:1.1.2.165
--- src/doc/CHANGES-3.2:1.1.2.164	Tue Apr 14 09:03:30 2009
+++ src/doc/CHANGES-3.2	Thu Apr 23 02:13:33 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-3.2,v 1.1.2.164 2009/04/14 09:03:30 jdc Exp $
+#	$NetBSD: CHANGES-3.2,v 1.1.2.165 2009/04/23 02:13:33 snj Exp $
 
 A complete list of changes from the NetBSD 3.1 release to the NetBSD 3.2
 release:
@@ -5213,3 +5213,26 @@
 sys/kern/uipc_usrreq.cpatch
 	Fix a problem with a failure path (PR#38391).
 	[mlelstv, ticket #2005]
+
+lib/libedit/common.c1.23
+
+	Fix mis-evaluating whether a char is digit or not.
+	[msaitoh, ticket #2006]
+
+lib/libedit/term.c1.44-1.45 via patch
+
+	Coverity CID 1668: Plug memory leak when malloc() failed.
+	[msaitoh, ticket #2007]
+
+usr.sbin/rtsold/if.c1.14-1.15
+
+	Fix two memory leaks; CID 990.
+	[msaitoh, ticket #2008]
+
+sys/arch/vax/vax/subr.S1.26
+
+	Make copyin(9) and copyout(9) work with 64KB or larger data
+	blocks.  Fixes broken pipe(2) problem mentioned in
+	PR port-vax/41139.
+	[mhitch, ticket #2010]
+



CVS commit: [netbsd-5] src/sys/dev/drm

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:17:14 UTC 2009

Modified Files:
src/sys/dev/drm [netbsd-5]: drm_drv.c drm_irq.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #714):
sys/dev/drm/drm_drv.c: revision 1.23
sys/dev/drm/drm_irq.c: revision 1.17
Move initialisation of the irq spinlock into the device handling code,
at least the Intel driver depends on it whether the IRQ is currently
enabled or not.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.6.1 src/sys/dev/drm/drm_drv.c
cvs rdiff -u -r1.16 -r1.16.6.1 src/sys/dev/drm/drm_irq.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/drm/drm_drv.c
diff -u src/sys/dev/drm/drm_drv.c:1.19 src/sys/dev/drm/drm_drv.c:1.19.6.1
--- src/sys/dev/drm/drm_drv.c:1.19	Thu Jul  3 17:36:44 2008
+++ src/sys/dev/drm/drm_drv.c	Thu Apr 23 02:17:13 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.19 2008/07/03 17:36:44 drochner Exp $ */
+/* $NetBSD: drm_drv.c,v 1.19.6.1 2009/04/23 02:17:13 snj Exp $ */
 
 /* drm_drv.h -- Generic driver template -*- linux-c -*-
  * Created: Thu Nov 23 03:10:50 2000 by gar...@valinux.com
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: drm_drv.c,v 1.19 2008/07/03 17:36:44 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: drm_drv.c,v 1.19.6.1 2009/04/23 02:17:13 snj Exp $);
 /*
 __FBSDID($FreeBSD: src/sys/dev/drm/drm_drv.c,v 1.6 2006/09/07 23:04:47 anholt Exp $);
 */
@@ -298,6 +298,7 @@
 	int i;
 
 	DRM_SPINLOCK_ASSERT(dev-dev_lock);
+	DRM_SPININIT(dev-irq_lock, DRM IRQ lock);
 
 	/* prebuild the SAREA */
 	i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM,
@@ -432,6 +433,8 @@
 		free(filep, M_DRM);
 	}
 
+	DRM_SPINUNINIT(dev-irq_lock);
+
 	return 0;
 }
 

Index: src/sys/dev/drm/drm_irq.c
diff -u src/sys/dev/drm/drm_irq.c:1.16 src/sys/dev/drm/drm_irq.c:1.16.6.1
--- src/sys/dev/drm/drm_irq.c:1.16	Mon Jul  7 00:33:23 2008
+++ src/sys/dev/drm/drm_irq.c	Thu Apr 23 02:17:14 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $ */
+/* $NetBSD: drm_irq.c,v 1.16.6.1 2009/04/23 02:17:14 snj Exp $ */
 
 /* drm_irq.c -- IRQ IOCTL and function support
  * Created: Fri Oct 18 2003 by anh...@freebsd.org
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: drm_irq.c,v 1.16.6.1 2009/04/23 02:17:14 snj Exp $);
 /*
 __FBSDID($FreeBSD: src/sys/dev/drm/drm_irq.c,v 1.2 2005/11/28 23:13:52 anholt Exp $);
 */
@@ -94,8 +94,6 @@
 
 	dev-context_flag = 0;
 
-	DRM_SPININIT(dev-irq_lock, DRM IRQ lock);
-
 /* Before installing handler */
 
 	dev-driver.irq_preinstall(dev);
@@ -141,7 +139,6 @@
 	dev-driver.irq_uninstall(dev);
 
 	pci_intr_disestablish(dev-pa.pa_pc, dev-irqh);
-	DRM_SPINUNINIT(dev-irq_lock);
 
 	return 0;
 }



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

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:34:14 UTC 2009

Modified Files:
src/lib/libc/db/hash [netbsd-5]: hash_buf.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #719):
lib/libc/db/hash/hash_buf.c: revision 1.16
Include string.h for memset prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/lib/libc/db/hash/hash_buf.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/hash/hash_buf.c
diff -u src/lib/libc/db/hash/hash_buf.c:1.14.4.1 src/lib/libc/db/hash/hash_buf.c:1.14.4.2
--- src/lib/libc/db/hash/hash_buf.c:1.14.4.1	Thu Apr 23 02:33:18 2009
+++ src/lib/libc/db/hash/hash_buf.c	Thu Apr 23 02:34:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_buf.c,v 1.14.4.1 2009/04/23 02:33:18 snj Exp $	*/
+/*	$NetBSD: hash_buf.c,v 1.14.4.2 2009/04/23 02:34:14 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hash_buf.c,v 1.14.4.1 2009/04/23 02:33:18 snj Exp $);
+__RCSID($NetBSD: hash_buf.c,v 1.14.4.2 2009/04/23 02:34:14 snj Exp $);
 
 /*
  * PACKAGE: hash
@@ -61,6 +61,7 @@
 #include stddef.h
 #include stdio.h
 #include stdlib.h
+#include string.h
 #include assert.h
 
 #include db.h



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

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:41:56 UTC 2009

Modified Files:
src/lib/libc/db/btree [netbsd-4-0]: bt_split.c
src/lib/libc/db/hash [netbsd-4-0]: hash_buf.c
src/lib/libc/db/mpool [netbsd-4-0]: mpool.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1310):
lib/libc/db/btree/bt_split.c: revision 1.19
lib/libc/db/hash/hash_buf.c: revision 1.15
lib/libc/db/mpool/mpool.c: revision 1.19
Avoid information leaks by zeroing memory, from FreeBSD (we had done some
already)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.20.1 src/lib/libc/db/btree/bt_split.c
cvs rdiff -u -r1.11 -r1.11.14.1 src/lib/libc/db/hash/hash_buf.c
cvs rdiff -u -r1.15 -r1.15.8.1 src/lib/libc/db/mpool/mpool.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_split.c
diff -u src/lib/libc/db/btree/bt_split.c:1.13 src/lib/libc/db/btree/bt_split.c:1.13.20.1
--- src/lib/libc/db/btree/bt_split.c:1.13	Thu Aug  7 16:42:41 2003
+++ src/lib/libc/db/btree/bt_split.c	Thu Apr 23 02:41:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_split.c,v 1.13 2003/08/07 16:42:41 agc Exp $	*/
+/*	$NetBSD: bt_split.c,v 1.13.20.1 2009/04/23 02:41:55 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)bt_split.c	8.9 (Berkeley) 7/26/94;
 #else
-__RCSID($NetBSD: bt_split.c,v 1.13 2003/08/07 16:42:41 agc Exp $);
+__RCSID($NetBSD: bt_split.c,v 1.13.20.1 2009/04/23 02:41:55 snj Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -391,7 +391,7 @@
 	}
 
 	/* Put the new left page for the split into place. */
-	if ((l = (PAGE *)malloc(t-bt_psize)) == NULL) {
+	if ((l = calloc(1, t-bt_psize)) == NULL) {
 		mpool_put(t-bt_mp, r, 0);
 		return (NULL);
 	}

Index: src/lib/libc/db/hash/hash_buf.c
diff -u src/lib/libc/db/hash/hash_buf.c:1.11 src/lib/libc/db/hash/hash_buf.c:1.11.14.1
--- src/lib/libc/db/hash/hash_buf.c:1.11	Sun Jun 20 22:20:14 2004
+++ src/lib/libc/db/hash/hash_buf.c	Thu Apr 23 02:41:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_buf.c,v 1.11 2004/06/20 22:20:14 jmc Exp $	*/
+/*	$NetBSD: hash_buf.c,v 1.11.14.1 2009/04/23 02:41:55 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = @(#)hash_buf.c	8.5 (Berkeley) 7/15/94;
 #else
-__RCSID($NetBSD: hash_buf.c,v 1.11 2004/06/20 22:20:14 jmc Exp $);
+__RCSID($NetBSD: hash_buf.c,v 1.11.14.1 2009/04/23 02:41:55 snj Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -332,8 +332,10 @@
 		}
 		/* Check if we are freeing stuff */
 		if (do_free) {
-			if (bp-page)
+			if (bp-page) {
+(void)memset(bp-page, 0, hashp-BSIZE);
 free(bp-page);
+			}
 			BUF_REMOVE(bp);
 			free(bp);
 			bp = LRU;

Index: src/lib/libc/db/mpool/mpool.c
diff -u src/lib/libc/db/mpool/mpool.c:1.15 src/lib/libc/db/mpool/mpool.c:1.15.8.1
--- src/lib/libc/db/mpool/mpool.c:1.15	Tue Jan 24 17:37:05 2006
+++ src/lib/libc/db/mpool/mpool.c	Thu Apr 23 02:41:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpool.c,v 1.15 2006/01/24 17:37:05 christos Exp $	*/
+/*	$NetBSD: mpool.c,v 1.15.8.1 2009/04/23 02:41:55 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)mpool.c	8.5 (Berkeley) 7/26/94;
 #else
-__RCSID($NetBSD: mpool.c,v 1.15 2006/01/24 17:37:05 christos Exp $);
+__RCSID($NetBSD: mpool.c,v 1.15.8.1 2009/04/23 02:41:55 snj Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -360,7 +360,7 @@
 			return (bp);
 		}
 
-new:	if ((bp = (BKT *)malloc((size_t)(sizeof(BKT) + mp-pagesize))) == NULL)
+new:	if ((bp = calloc(1, (size_t)(sizeof(BKT) + mp-pagesize))) == NULL)
 		return (NULL);
 #ifdef STATISTICS
 	++mp-pagealloc;



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

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:44:22 UTC 2009

Modified Files:
src/lib/libc/db/hash [netbsd-4-0]: hash_buf.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1310):
lib/libc/db/hash/hash_buf.c: revision 1.16 via patch
Include string.h for memset prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.11.14.1 -r1.11.14.2 src/lib/libc/db/hash/hash_buf.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/hash/hash_buf.c
diff -u src/lib/libc/db/hash/hash_buf.c:1.11.14.1 src/lib/libc/db/hash/hash_buf.c:1.11.14.2
--- src/lib/libc/db/hash/hash_buf.c:1.11.14.1	Thu Apr 23 02:41:55 2009
+++ src/lib/libc/db/hash/hash_buf.c	Thu Apr 23 02:44:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_buf.c,v 1.11.14.1 2009/04/23 02:41:55 snj Exp $	*/
+/*	$NetBSD: hash_buf.c,v 1.11.14.2 2009/04/23 02:44:22 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = @(#)hash_buf.c	8.5 (Berkeley) 7/15/94;
 #else
-__RCSID($NetBSD: hash_buf.c,v 1.11.14.1 2009/04/23 02:41:55 snj Exp $);
+__RCSID($NetBSD: hash_buf.c,v 1.11.14.2 2009/04/23 02:44:22 snj Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -67,6 +67,7 @@
 #include stddef.h
 #include stdio.h
 #include stdlib.h
+#include string.h
 
 #ifdef DEBUG
 #include assert.h



CVS commit: [netbsd-4-0] src/doc

2009-04-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 23 02:44:43 UTC 2009

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

Log Message:
Ticket 1310.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-4.0.2

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.0.2
diff -u src/doc/CHANGES-4.0.2:1.1.2.26 src/doc/CHANGES-4.0.2:1.1.2.27
--- src/doc/CHANGES-4.0.2:1.1.2.26	Sat Apr 18 00:32:59 2009
+++ src/doc/CHANGES-4.0.2	Thu Apr 23 02:44:43 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.26 2009/04/18 00:32:59 snj Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.27 2009/04/23 02:44:43 snj Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -216,3 +216,10 @@
 	Fix CVE-2009-0159.
 	[christos, ticket #1308]
 
+lib/libc/db/btree/bt_split.c			1.19
+lib/libc/db/hash/hash_buf.c			1.15, 1.16
+lib/libc/db/mpool/mpool.c			1.19
+
+	Avoid information leaks by zeroing memory.
+	[christos, ticket #1310]
+



CVS commit: src/lib/libc/db/hash

2009-04-22 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Thu Apr 23 03:49:39 UTC 2009

Modified Files:
src/lib/libc/db/hash: hash_buf.c

Log Message:
Cast the arg to an unsigned value to let this compile


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/db/hash/hash_buf.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/hash/hash_buf.c
diff -u src/lib/libc/db/hash/hash_buf.c:1.16 src/lib/libc/db/hash/hash_buf.c:1.17
--- src/lib/libc/db/hash/hash_buf.c:1.16	Wed Apr 22 21:52:59 2009
+++ src/lib/libc/db/hash/hash_buf.c	Thu Apr 23 03:49:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_buf.c,v 1.16 2009/04/22 21:52:59 njoly Exp $	*/
+/*	$NetBSD: hash_buf.c,v 1.17 2009/04/23 03:49:39 agc Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hash_buf.c,v 1.16 2009/04/22 21:52:59 njoly Exp $);
+__RCSID($NetBSD: hash_buf.c,v 1.17 2009/04/23 03:49:39 agc Exp $);
 
 /*
  * PACKAGE: hash
@@ -315,7 +315,7 @@
 		/* Check if we are freeing stuff */
 		if (do_free) {
 			if (bp-page) {
-(void)memset(bp-page, 0, hashp-BSIZE);
+(void)memset(bp-page, 0, (unsigned)hashp-BSIZE);
 free(bp-page);
 			}
 			BUF_REMOVE(bp);



CVS commit: src/usr.sbin/pf

2009-04-22 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Apr 23 05:25:07 UTC 2009

Modified Files:
src/usr.sbin/pf: Makefile.inc

Log Message:
WARNS=1 for pf


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/pf/Makefile.inc

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

Modified files:

Index: src/usr.sbin/pf/Makefile.inc
diff -u src/usr.sbin/pf/Makefile.inc:1.6 src/usr.sbin/pf/Makefile.inc:1.7
--- src/usr.sbin/pf/Makefile.inc:1.6	Wed Apr 22 15:23:06 2009
+++ src/usr.sbin/pf/Makefile.inc	Thu Apr 23 05:25:06 2009
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile.inc,v 1.6 2009/04/22 15:23:06 lukem Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2009/04/23 05:25:06 lukem Exp $
+
+WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
 CPPFLAGS+=	-include ${.CURDIR}/../compat_openbsd.h