CVS commit: src/doc

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 10 04:02:29 UTC 2016

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new bind


To generate a diff of this commit:
cvs rdiff -u -r1.1310 -r1.1311 src/doc/3RDPARTY
cvs rdiff -u -r1.2139 -r1.2140 src/doc/CHANGES

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.1310 src/doc/3RDPARTY:1.1311
--- src/doc/3RDPARTY:1.1310	Wed Mar  9 21:23:26 2016
+++ src/doc/3RDPARTY	Wed Mar  9 23:02:29 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1310 2016/03/10 02:23:26 taca Exp $
+#	$NetBSD: 3RDPARTY,v 1.1311 2016/03/10 04:02:29 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -114,7 +114,7 @@ Notes:
 bc includes dc, both of which are in the NetBSD tree.
 
 Package:	bind [named and utils]
-Version:	9.10.3-P3
+Version:	9.10.3-P4
 Current Vers:	9.10.3-P4
 Maintainer:	Paul Vixie 
 Archive Site:	ftp://ftp.isc.org/isc/bind9/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2139 src/doc/CHANGES:1.2140
--- src/doc/CHANGES:1.2139	Tue Mar  1 20:54:19 2016
+++ src/doc/CHANGES	Wed Mar  9 23:02:29 2016
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2139 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2140 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -253,3 +253,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	mv(1): Add SIGINFO support. [mrg 20160228]
 	openssl: Import openssl 1.0.1s - disable weak (export) ciphers and SSLv2
 		[christos 20160301]
+	bind: Import version 9.10.3-P4. [christos 20160309]



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 10 03:50:48 UTC 2016

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: varasm.c

Log Message:
Do the same song and dance for functions.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc.old/dist/gcc/varasm.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/gpl3/gcc.old/dist/gcc/varasm.c
diff -u src/external/gpl3/gcc.old/dist/gcc/varasm.c:1.4 src/external/gpl3/gcc.old/dist/gcc/varasm.c:1.5
--- src/external/gpl3/gcc.old/dist/gcc/varasm.c:1.4	Mon Mar  7 22:58:08 2016
+++ src/external/gpl3/gcc.old/dist/gcc/varasm.c	Wed Mar  9 22:50:47 2016
@@ -6659,6 +6659,17 @@ default_binds_local_p_3 (const_tree exp,
   else if (vnode && resolution_local_p (vnode->symbol.resolution))
 	resolved_locally = true;
 }
+  else if (TREE_CODE (exp) == FUNCTION_DECL && TREE_PUBLIC (exp))
+{
+  struct cgraph_node *cnode = cgraph_get_node (exp);
+  if (cnode && cnode->symbol.in_other_partition)
+	defined_locally = true;
+  if (cnode && resolution_to_local_definition_p (cnode->symbol.resolution))
+	defined_locally = resolved_locally = true;
+  else if (cnode && resolution_local_p (cnode->symbol.resolution))
+	resolved_locally = true;
+}
+
   if (defined_locally && weak_dominate && !shlib)
 resolved_locally = true;
 



CVS commit: src/doc

2016-03-09 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Thu Mar 10 02:23:26 UTC 2016

Modified Files:
src/doc: 3RDPARTY

Log Message:
BIND 9.10.3-P4 has released.


To generate a diff of this commit:
cvs rdiff -u -r1.1309 -r1.1310 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.1309 src/doc/3RDPARTY:1.1310
--- src/doc/3RDPARTY:1.1309	Wed Mar  2 01:54:19 2016
+++ src/doc/3RDPARTY	Thu Mar 10 02:23:26 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1309 2016/03/02 01:54:19 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1310 2016/03/10 02:23:26 taca Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -115,7 +115,7 @@ bc includes dc, both of which are in the
 
 Package:	bind [named and utils]
 Version:	9.10.3-P3
-Current Vers:	9.10.3-P3
+Current Vers:	9.10.3-P4
 Maintainer:	Paul Vixie 
 Archive Site:	ftp://ftp.isc.org/isc/bind9/
 Home Page:	http://www.isc.org/software/bind/



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

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 22:27:17 UTC 2016

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: isakmp.c isakmp_cfg.c
isakmp_ident.c

Log Message:
>From Frank Wille:
Request "IKE mode config" in "rsasig" (certificates on both sides only)
authentication mode, if "mode_cfg" is configured to "on".
Tested with a Lancom router, using the following configuration:

path include "/etc/racoon";
path certificate "/etc/racoon/certs";
path script "/etc/racoon/scripts";

remote "wpsd"
{
remote_address 1.2.3.4;
exchange_mode main,base;

my_identifier asn1dn;
certificate_type x509 "vpnclient15.crt" "vpnclient15.key";
ca_type x509 "ca.crt";

mode_cfg on;
dpd_delay 20;
nat_traversal on;
lifetime time 8 hour;
script "phase1-up.sh" phase1_up;
script "phase1-down.sh" phase1_down;

proposal {
encryption_algorithm aes;
hash_algorithm md5;
authentication_method rsasig;
dh_group 2;
}
proposal_check obey;
}

sainfo anonymous
{
pfs_group 2;
lifetime time 8 hour;
encryption_algorithm aes;
authentication_algorithm hmac_md5;
compression_algorithm deflate;
}


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c
cvs rdiff -u -r1.25 -r1.26 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_ident.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.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.74 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.75
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.74	Sun Jan  1 10:57:31 2012
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp.c	Wed Mar  9 17:27:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp.c,v 1.74 2012/01/01 15:57:31 tteras Exp $	*/
+/*	$NetBSD: isakmp.c,v 1.75 2016/03/09 22:27:17 christos Exp $	*/
 
 /* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */
 
@@ -890,6 +890,10 @@ ph1_main(iph1, msg)
 /* XXX Don't process INITIAL_CONTACT */
 iph1->rmconf->ini_contact = 0;
 break;
+			case OAKLEY_ATTR_AUTH_METHOD_RSASIG:
+if (iph1->rmconf->mode_cfg)
+	error = isakmp_cfg_getconfig(iph1);
+break;
 			default:
 break;
 			}
@@ -945,6 +949,10 @@ ph1_main(iph1, msg)
 break;
 			}
 		}
+		if ((iph1->rmconf->mode_cfg) &&
+		!(iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH)) {
+			error = isakmp_cfg_getconfig(iph1);
+		}
 	}
 
 	return 0;

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c:1.25 src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c:1.26
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c:1.25	Fri Apr 12 06:03:45 2013
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c	Wed Mar  9 17:27:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_cfg.c,v 1.25 2013/04/12 10:03:45 tteras Exp $	*/
+/*	$NetBSD: isakmp_cfg.c,v 1.26 2016/03/09 22:27:17 christos Exp $	*/
 
 /* Id: isakmp_cfg.c,v 1.55 2006/08/22 18:17:17 manubsd Exp */
 
@@ -457,6 +457,7 @@ isakmp_cfg_reply(iph1, attrpl)
 		case OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSASIG_I:
 		case OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSAENC_I: 
 		case OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSAREV_I: 
+		case OAKLEY_ATTR_AUTH_METHOD_RSASIG:
 			script_hook(iph1, SCRIPT_PHASE1_UP);
 			break;
 		default:
@@ -639,6 +640,7 @@ isakmp_cfg_request(iph1, attrpl)
 		case OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSASIG_R:
 		case OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSAENC_R: 
 		case OAKLEY_ATTR_AUTH_METHOD_XAUTH_RSAREV_R: 
+		case OAKLEY_ATTR_AUTH_METHOD_RSASIG:
 			script_hook(iph1, SCRIPT_PHASE1_UP);
 			break;
 		default:

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c:1.13 src/crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c:1.14
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c:1.13	Fri Sep 18 06:31:11 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c	Wed Mar  9 17:27:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_ident.c,v 1.13 2009/09/18 10:31:11 tteras Exp $	*/
+/*	$NetBSD: isakmp_ident.c,v 1.14 2016/03/09 22:27:17 christos Exp $	*/
 
 /* Id: isakmp_ident.c,v 1.21 2006/04/06 16:46:08 manubsd Exp */
 
@@ -172,6 +172,7 @@ ident_i1send(iph1, msg)
 			plist = isakmp_plist_append(plist,
 			vid_xauth, ISAKMP_NPTYPE_VID);
 
+	case OAKLEY_ATTR_AUTH_METHOD_RSASIG:
 		if ((vid_unity = set_vendorid(VENDORID_UNITY)) == NULL)
 			plog(LLV_ERROR, LOCATION, NULL,
 			 "Unity vendor ID generation failed\n");



CVS commit: src/external/gpl3/gdb/dist/gdb

2016-03-09 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Mar  9 20:55:22 UTC 2016

Modified Files:
src/external/gpl3/gdb/dist/gdb: shnbsd-tdep.c

Log Message:
gdb now checks the size of the core register section, so pacify the
warning in corelow.c by providing the expected size.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.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/gpl3/gdb/dist/gdb/shnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.12 src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.13
--- src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.12	Sun Aug 16 09:58:29 2015
+++ src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c	Wed Mar  9 20:55:22 2016
@@ -203,11 +203,10 @@ shnbsd_init_abi (struct gdbarch_info inf
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   tdep->core_gregmap = (struct sh_corefile_regmap *)gregs_table;
+  tdep->sizeof_gregset = 88;
+
   tdep->core_fpregmap = (struct sh_corefile_regmap *)fpregs_table;
-#if 0
-  tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
-  tdep->sizeof_gregset = 84;
-#endif
+  tdep->sizeof_fpregset = 0;	/* XXX */
 
   set_solib_svr4_fetch_link_map_offsets
 (gdbarch, nbsd_ilp32_solib_svr4_fetch_link_map_offsets);



CVS commit: src/sys/fs/cd9660

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 20:18:17 UTC 2016

Modified Files:
src/sys/fs/cd9660: cd9660_util.c

Log Message:
remove installboot.h; it is not needed


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/fs/cd9660/cd9660_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/sys/fs/cd9660/cd9660_util.c
diff -u src/sys/fs/cd9660/cd9660_util.c:1.13 src/sys/fs/cd9660/cd9660_util.c:1.14
--- src/sys/fs/cd9660/cd9660_util.c:1.13	Wed Mar  9 10:45:37 2016
+++ src/sys/fs/cd9660/cd9660_util.c	Wed Mar  9 15:18:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660_util.c,v 1.13 2016/03/09 15:45:37 christos Exp $	*/
+/*	$NetBSD: cd9660_util.c,v 1.14 2016/03/09 20:18:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 1994
@@ -38,7 +38,7 @@
 
 #include 
 #ifdef _KERNEL
-__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.13 2016/03/09 15:45:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.14 2016/03/09 20:18:17 christos Exp $");
 #else
 /* used by macppc_installboot */
 #if HAVE_NBTOOL_CONFIG_H
@@ -69,7 +69,6 @@ __KERNEL_RCSID(0, "$NetBSD: cd9660_util.
 #ifdef _KERNEL
 #include 
 #else
-#include "installboot.h"
 static int isochar(const u_char *, const u_char *, int, uint16_t *);
 #endif
 



CVS commit: src/sys/arch/amiga/dev

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 20:11:41 UTC 2016

Modified Files:
src/sys/arch/amiga/dev: sbic.c

Log Message:
PR/50928: David Binderman: Clarify precedence with parentheses.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/amiga/dev/sbic.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/amiga/dev/sbic.c
diff -u src/sys/arch/amiga/dev/sbic.c:1.74 src/sys/arch/amiga/dev/sbic.c:1.75
--- src/sys/arch/amiga/dev/sbic.c:1.74	Mon Jan 19 15:10:27 2015
+++ src/sys/arch/amiga/dev/sbic.c	Wed Mar  9 15:11:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbic.c,v 1.74 2015/01/19 20:10:27 phx Exp $ */
+/*	$NetBSD: sbic.c,v 1.75 2016/03/09 20:11:41 christos Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,7 +81,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.74 2015/01/19 20:10:27 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.75 2016/03/09 20:11:41 christos Exp $");
 
 #include 
 #include 
@@ -259,8 +259,8 @@ sbic_save_ptrs(struct sbic_softc *dev, s
 	struct sbic_acb* acb;
 
 	SBIC_TRACE(dev);
-	if( !dev->sc_cur ) return;
-	if( !(dev->sc_flags & SBICF_INDMA) ) return; /* DMA not active */
+	if (!dev->sc_cur) return;
+	if (!(dev->sc_flags & SBICF_INDMA)) return; /* DMA not active */
 
 	s = splbio();
 
@@ -268,13 +268,13 @@ sbic_save_ptrs(struct sbic_softc *dev, s
 	count = -1;
 	do {
 		GET_SBIC_asr(regs, asr);
-		if( asr & SBIC_ASR_DBR ) {
+		if (asr & SBIC_ASR_DBR) {
 			printf("sbic_save_ptrs: asr %02x canceled!\n", asr);
 			splx(s);
 			SBIC_TRACE(dev);
 			return;
 		}
-	} while( asr & (SBIC_ASR_BSY|SBIC_ASR_CIP) );
+	} while (asr & (SBIC_ASR_BSY|SBIC_ASR_CIP));
 
 	/* Save important state */
 	/* must be done before dmastop */
@@ -287,8 +287,8 @@ sbic_save_ptrs(struct sbic_softc *dev, s
 	SBIC_TC_PUT(regs, 0);
 
 #ifdef DEBUG
-	if(!count && sbic_debug) printf("%dcount0",target);
-	if(data_pointer_debug == -1)
+	if (!count && sbic_debug) printf("%dcount0",target);
+	if (data_pointer_debug == -1)
 		printf("SBIC saving target %d data pointers from (%p,%x)%xASR:%02x",
 		   target, dev->sc_cur->dc_addr, dev->sc_cur->dc_count,
 		   acb->sc_dmacmd, asr);
@@ -302,7 +302,7 @@ sbic_save_ptrs(struct sbic_softc *dev, s
 
 	acb->sc_tcnt = dev->sc_tcnt = count;
 #ifdef DEBUG
-	if(data_pointer_debug)
+	if (data_pointer_debug)
 		printf(" at (%p,%x):%x\n",
 		   dev->sc_cur->dc_addr, dev->sc_cur->dc_count,count);
 	sbicdma_saves++;
@@ -324,7 +324,7 @@ sbic_load_ptrs(struct sbic_softc *dev, s
 
 	SBIC_TRACE(dev);
 	acb = dev->sc_nexus;
-	if( !acb->sc_kv.dc_count ) {
+	if (!acb->sc_kv.dc_count) {
 		/* No data to xfer */
 		SBIC_TRACE(dev);
 		return;
@@ -339,7 +339,7 @@ sbic_load_ptrs(struct sbic_softc *dev, s
 #ifdef DEBUG
 	sbicdma_ops++;
 #endif
-	if( !dev->sc_tcnt ) {
+	if (!dev->sc_tcnt) {
 		/* sc_tcnt == 0 implies end of segment */
 
 		/* do kvm to pa mappings */
@@ -348,12 +348,12 @@ sbic_load_ptrs(struct sbic_softc *dev, s
 
 		vaddr = acb->sc_kv.dc_addr;
 		count = acb->sc_kv.dc_count;
-		for(count = (PAGE_SIZE - ((int)vaddr & PGOFSET));
+		for (count = (PAGE_SIZE - ((int)vaddr & PGOFSET));
 		count < acb->sc_kv.dc_count
 		&& (char*)kvtop(vaddr + count + 4) == paddr + count + 4;
 		count += PAGE_SIZE);
 		/* If it's all contiguous... */
-		if(count > acb->sc_kv.dc_count ) {
+		if (count > acb->sc_kv.dc_count) {
 			count = acb->sc_kv.dc_count;
 #ifdef DEBUG
 			sbicdma_hits++;
@@ -367,7 +367,7 @@ sbic_load_ptrs(struct sbic_softc *dev, s
 		acb->sc_pa.dc_count = count >> 1;
 
 #ifdef DEBUG
-		if(data_pointer_debug)
+		if (data_pointer_debug)
 			printf("DMA recalc:kv(%p,%x)pa(%p,%lx)\n",
 			   acb->sc_kv.dc_addr,
 			   acb->sc_kv.dc_count,
@@ -377,7 +377,7 @@ sbic_load_ptrs(struct sbic_softc *dev, s
 	}
 	splx(s);
 #ifdef DEBUG
-	if(data_pointer_debug)
+	if (data_pointer_debug)
 		printf("SBIC restoring target %d data pointers at (%p,%x)%x\n",
 		   target, dev->sc_cur->dc_addr, dev->sc_cur->dc_count,
 		   dev->sc_dmacmd);
@@ -447,7 +447,7 @@ sbic_scsipi_request(struct scsipi_channe
 
 			dev->sc_flags |= SBICF_ICMD;
 			do {
-while(dev->sc_nexus)
+while (dev->sc_nexus)
 	sbicpoll(dev);
 dev->sc_nexus = acb;
 dev->sc_stat[0] = -1;
@@ -539,14 +539,14 @@ sbic_sched(struct sbic_softc *dev)
 		sbicreset(dev);
 
 #ifdef DEBUG
-	if( data_pointer_debug > 1 )
+	if (data_pointer_debug > 1)
 		printf("sbic_sched(%d,%d)\n", periph->periph_target,
 			periph->periph_lun);
 #endif
 	dev->sc_stat[0] = -1;
 	dev->target = periph->periph_target;
 	dev->lun = periph->periph_lun;
-	if ( flags & XS_CTL_POLL || ( !sbic_parallel_operations
+	if (flags & XS_CTL_POLL || (!sbic_parallel_operations
    && (sbicdmaok(dev, xs) == 0)))
 		stat = sbicicmd(dev, periph->periph_target,
 			periph->periph_lun, &acb->cmd,
@@ -587,11 +587,11 @@ sbic_scsidon

CVS commit: src/sys/dev/ic

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 20:07:04 UTC 2016

Modified Files:
src/sys/dev/ic: arn9003.c

Log Message:
PR/50927: David Binderman: Fix wrong paren


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/arn9003.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/ic/arn9003.c
diff -u src/sys/dev/ic/arn9003.c:1.7 src/sys/dev/ic/arn9003.c:1.8
--- src/sys/dev/ic/arn9003.c:1.7	Sun May 24 13:08:50 2015
+++ src/sys/dev/ic/arn9003.c	Wed Mar  9 15:07:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn9003.c,v 1.7 2015/05/24 17:08:50 matt Exp $	*/
+/*	$NetBSD: arn9003.c,v 1.8 2016/03/09 20:07:04 christos Exp $	*/
 /*	$OpenBSD: ar9003.c,v 1.25 2012/10/20 09:53:32 stsp Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.7 2015/05/24 17:08:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.8 2016/03/09 20:07:04 christos Exp $");
 
 #include 
 #include 
@@ -2235,7 +2235,7 @@ ar9003_calib_iq(struct athn_softc *sc)
 		if (cal->pwr_meas_q == 0)
 			continue;
 
-		if ((iq_corr_neg = cal->iq_corr_meas < 0))
+		if ((iq_corr_neg = cal->iq_corr_meas) < 0)
 			cal->iq_corr_meas = -cal->iq_corr_meas;
 
 		i_coff_denom =



CVS commit: src/sys/dev/ic

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 20:06:31 UTC 2016

Modified Files:
src/sys/dev/ic: arn5008.c

Log Message:
PR/50926: David Binderman: Fix wrong paren


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/arn5008.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/ic/arn5008.c
diff -u src/sys/dev/ic/arn5008.c:1.9 src/sys/dev/ic/arn5008.c:1.10
--- src/sys/dev/ic/arn5008.c:1.9	Fri May 29 20:56:42 2015
+++ src/sys/dev/ic/arn5008.c	Wed Mar  9 15:06:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn5008.c,v 1.9 2015/05/30 00:56:42 jmcneill Exp $	*/
+/*	$NetBSD: arn5008.c,v 1.10 2016/03/09 20:06:31 christos Exp $	*/
 /*	$OpenBSD: ar5008.c,v 1.21 2012/08/25 12:14:31 kettenis Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.9 2015/05/30 00:56:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.10 2016/03/09 20:06:31 christos Exp $");
 
 #include 
 #include 
@@ -2020,7 +2020,7 @@ ar5008_calib_iq(struct athn_softc *sc)
 		if (cal->pwr_meas_q == 0)
 			continue;
 
-		if ((iq_corr_neg = cal->iq_corr_meas < 0))
+		if ((iq_corr_neg = cal->iq_corr_meas) < 0)
 			cal->iq_corr_meas = -cal->iq_corr_meas;
 
 		i_coff_denom =



CVS commit: src/usr.bin/infocmp

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 20:02:33 UTC 2016

Modified Files:
src/usr.bin/infocmp: Makefile infocmp.c

Log Message:
PR/50932: David Binderman: use emalloc/erealloc/ecalloc


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/infocmp/Makefile
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/infocmp/infocmp.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/infocmp/Makefile
diff -u src/usr.bin/infocmp/Makefile:1.2 src/usr.bin/infocmp/Makefile:1.3
--- src/usr.bin/infocmp/Makefile:1.2	Sun Aug 11 02:48:46 2013
+++ src/usr.bin/infocmp/Makefile	Wed Mar  9 15:02:33 2016
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.2 2013/08/11 06:48:46 dholland Exp $
+#	$NetBSD: Makefile,v 1.3 2016/03/09 20:02:33 christos Exp $
 
 PROG=		infocmp
 
 CPPFLAGS+=	-I${.CURDIR}/../../lib/libterminfo
-LDADD+=		-lterminfo
-DPADD+=		${LIBTERMINFO}
+LDADD+=		-lterminfo -lutil
+DPADD+=		${LIBTERMINFO} ${LIBUTIL}
 
 .include 

Index: src/usr.bin/infocmp/infocmp.c
diff -u src/usr.bin/infocmp/infocmp.c:1.9 src/usr.bin/infocmp/infocmp.c:1.10
--- src/usr.bin/infocmp/infocmp.c:1.9	Wed Feb 24 08:31:54 2016
+++ src/usr.bin/infocmp/infocmp.c	Wed Mar  9 15:02:33 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.9 2016/02/24 13:31:54 roy Exp $ */
+/* $NetBSD: infocmp.c,v 1.10 2016/03/09 20:02:33 christos Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: infocmp.c,v 1.9 2016/02/24 13:31:54 roy Exp $");
+__RCSID("$NetBSD: infocmp.c,v 1.10 2016/03/09 20:02:33 christos Exp $");
 
 #include 
 
@@ -40,6 +40,7 @@ __RCSID("$NetBSD: infocmp.c,v 1.9 2016/0
 #include 
 #include 
 #include 
+#include 
 
 #define SW 8
 
@@ -180,7 +181,7 @@ print_ent(const TIENT *ents, size_t nent
 l = strlen(ents[i].id) + 3;
 			break;
 		default:
-			errx(1, "invalid type");
+			errx(EXIT_FAILURE, "invalid type");
 		}
 		if (col != SW) {
 			if (col + l > cols) {
@@ -431,9 +432,7 @@ load_term(const char *name)
 {
 	TERMINAL *t;
 
-	t = calloc(1, sizeof(*t));
-	if (t == NULL)
-		err(1, "calloc");
+	t = ecalloc(1, sizeof(*t));
 	if (name == NULL)
 		name = getenv("TERM");
 	if (name == NULL)
@@ -442,9 +441,9 @@ load_term(const char *name)
 		return t;
 
 	if (_ti_database == NULL)
-		errx(1, "no terminal definition found in internal database");
+		errx(EXIT_FAILURE, "no terminal definition found in internal database");
 	else
-		errx(1, "no terminal definition found in %s.db", _ti_database);
+		errx(EXIT_FAILURE, "no terminal definition found in %s.db", _ti_database);
 }
 
 static void
@@ -507,15 +506,13 @@ use_terms(TERMINAL *term, size_t nuse, c
 	TERMUSERDEF *ud, *tud;
 	size_t i, j, agree, absent, data;
 
-	terms = malloc(sizeof(**terms) * nuse);
-	if (terms == NULL)
-		err(1, "malloc");
+	terms = ecalloc(nuse, sizeof(**terms));
 	for (i = 0; i < nuse; i++) {
 		if (strcmp(term->name, *uterms) == 0)
-			errx(1, "cannot use same terminal");
+			errx(EXIT_FAILURE, "cannot use same terminal");
 		for (j = 0; j < i; j++)
 			if (strcmp(terms[j]->name, *uterms) == 0)
-errx(1, "cannot use same terminal");
+errx(EXIT_FAILURE, "cannot use same terminal");
 		terms[i] = load_term(*uterms++);
 	}
 
@@ -628,10 +625,8 @@ use_terms(TERMINAL *term, size_t nuse, c
 			ud = find_userdef(term, terms[i]->_userdefs[j].id);
 			if (ud != NULL)
 continue; /* We have handled this */
-			term->_userdefs = realloc(term->_userdefs,
+			term->_userdefs = erealloc(term->_userdefs,
 			sizeof(*term->_userdefs) * (term->_nuserdefs + 1));
-			if (term->_userdefs == NULL)
-err(1, "malloc");
 			tud = &term->_userdefs[term->_nuserdefs++];
 			tud->id = terms[i]->_userdefs[j].id;
 			tud->type = terms[i]->_userdefs[j].flag;



CVS commit: src/sbin/raidctl

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 19:53:32 UTC 2016

Modified Files:
src/sbin/raidctl: rf_configure.c

Log Message:
PR/50921: David Binderman: Fix memory leak


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/raidctl/rf_configure.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/raidctl/rf_configure.c
diff -u src/sbin/raidctl/rf_configure.c:1.25 src/sbin/raidctl/rf_configure.c:1.26
--- src/sbin/raidctl/rf_configure.c:1.25	Wed Jan 27 13:34:02 2010
+++ src/sbin/raidctl/rf_configure.c	Wed Mar  9 14:53:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_configure.c,v 1.25 2010/01/27 18:34:02 christos Exp $	*/
+/*	$NetBSD: rf_configure.c,v 1.26 2016/03/09 19:53:32 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: rf_configure.c,v 1.25 2010/01/27 18:34:02 christos Exp $");
+__RCSID("$NetBSD: rf_configure.c,v 1.26 2016/03/09 19:53:32 christos Exp $");
 #endif
 
 
@@ -495,21 +495,19 @@ rf_ReadSpareTable(RF_SparetWait_t *req, 
 	spareDisk, spareBlkOffset;
 	char buf[1024], targString[100], errString[100];
 	RF_SpareTableEntry_t **table;
-	FILE *fp;
+	FILE *fp = NULL;
 
 	/* allocate and initialize the table */
-	table = malloc(req->TablesPerSpareRegion * 
-		   sizeof(RF_SpareTableEntry_t *));
+	table = calloc(req->TablesPerSpareRegion, sizeof(*table));
 	if (table == NULL) {
-		warnx("rf_ReadSpareTable: Unable to allocate table");
-		return (NULL);
+		warn("%s: Unable to allocate table", __func__);
+		return NULL;
 	}
 	for (i = 0; i < req->TablesPerSpareRegion; i++) {
-		table[i] = malloc(req->BlocksPerTable * 
-  sizeof(RF_SpareTableEntry_t));
+		table[i] = calloc(req->BlocksPerTable, sizeof(**table));
 		if (table[i] == NULL) {
-			warnx("rf_ReadSpareTable: Unable to allocate table");
-			return (NULL);  /* XXX should cleanup too! */
+			warn("%s: Unable to allocate table", __func__);
+			goto out;
 		}
 		for (j = 0; j < req->BlocksPerTable; j++)
 			table[i][j].spareDisk =
@@ -518,22 +516,22 @@ rf_ReadSpareTable(RF_SparetWait_t *req, 
 
 	/* 2.  open sparemap file, sanity check */
 	if ((fp = fopen(fname, "r")) == NULL) {
-		warn("rf_ReadSpareTable: Can't open sparemap file %s", fname);
-		return (NULL);
+		warn("%s: Can't open sparemap file %s", __func__, fname);
+		goto out;
 	}
 	if (rf_get_next_nonblank_line(buf, 1024, fp,
-	"Invalid sparemap file:  can't find header line\n")) {
-		fclose(fp);
-		return (NULL);
-	}
-	if (buf[strlen(buf) - 1] == '\n')
-		buf[strlen(buf) - 1] = '\0';
+	"Invalid sparemap file:  can't find header line\n"))
+		goto out;
+
+	size_t len = strlen(buf);
+	if (len != 0 && buf[len - 1] == '\n')
+		buf[len - 1] = '\0';
 
 	snprintf(targString, sizeof(targString), "fdisk %d\n", req->fcol);
 	snprintf(errString, sizeof(errString),
 	"Invalid sparemap file:  can't find \"fdisk %d\" line\n",
 	req->fcol);
-	while (1) {
+	for (;;) {
 		rf_get_next_nonblank_line(buf, 1024, fp, errString);
 		if (!strncmp(buf, targString, strlen(targString)))
 			break;
@@ -547,8 +545,7 @@ rf_ReadSpareTable(RF_SparetWait_t *req, 
 		if (numFound != 4) {
 			warnx("Sparemap file prematurely exhausted after %d "
 			"of %d lines", i, linecount);
-			fclose(fp);
-			return (NULL);
+			goto out;
 		}
 
 		table[tableNum][tupleNum].spareDisk = spareDisk;
@@ -558,4 +555,11 @@ rf_ReadSpareTable(RF_SparetWait_t *req, 
 
 	fclose(fp);
 	return ((void *) table);
+out:
+	if (fp)
+		fclose(fp);
+	for (i = 0; i < req->TablesPerSpareRegion; i++)
+		free(table[i]);
+	free(table);
+	return NULL;
 }



CVS commit: src/sbin/newfs_udf

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 19:48:24 UTC 2016

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

Log Message:
PR/50920: David Binderman: fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/newfs_udf/newfs_udf.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/newfs_udf/newfs_udf.c
diff -u src/sbin/newfs_udf/newfs_udf.c:1.18 src/sbin/newfs_udf/newfs_udf.c:1.19
--- src/sbin/newfs_udf/newfs_udf.c:1.18	Fri Aug  9 11:11:08 2013
+++ src/sbin/newfs_udf/newfs_udf.c	Wed Mar  9 14:48:24 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_udf.c,v 1.18 2013/08/09 15:11:08 reinoud Exp $ */
+/* $NetBSD: newfs_udf.c,v 1.19 2016/03/09 19:48:24 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@@ -121,11 +121,13 @@ udf_write_sector(void *sector, uint64_t 
 	if ((seekpos == NULL) || (seekpos->sectornr != location)) {
 		pos = calloc(1, sizeof(struct wrsect));
 		if (pos == NULL)
-			return ENOMEM;
+			return errno;
 		/* allocate space for copy of sector data */
 		pos->sector_data = calloc(1, context.sector_size);
-		if (pos->sector_data == NULL)
-			return ENOMEM;
+		if (pos->sector_data == NULL) {
+			free(pos);
+			return errno;
+		}
 		pos->sectornr = location;
 
 		if (seekpos) {



CVS commit: src/lib/libform

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 19:47:13 UTC 2016

Modified Files:
src/lib/libform: field.c form.c internals.c internals.h post.c
type_enum.c type_ipv4.c

Log Message:
PR/50919: David Binderman: Re-do all the debug stuff in a more sustainable way.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libform/field.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libform/form.c
cvs rdiff -u -r1.37 -r1.38 src/lib/libform/internals.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libform/internals.h \
src/lib/libform/type_ipv4.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libform/post.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libform/type_enum.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/libform/field.c
diff -u src/lib/libform/field.c:1.30 src/lib/libform/field.c:1.31
--- src/lib/libform/field.c:1.30	Fri Dec 11 16:22:57 2015
+++ src/lib/libform/field.c	Wed Mar  9 14:47:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: field.c,v 1.30 2015/12/11 21:22:57 joerg Exp $	*/
+/*	$NetBSD: field.c,v 1.31 2016/03/09 19:47:13 christos Exp $	*/
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
  * (bl...@baea.com.au, brett_l...@yahoo.com.au)
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: field.c,v 1.30 2015/12/11 21:22:57 joerg Exp $");
+__RCSID("$NetBSD: field.c,v 1.31 2016/03/09 19:47:13 christos Exp $");
 
 #include 
 #include 
@@ -425,26 +425,19 @@ set_field_buffer(FIELD *field, int buffe
 	&& ((field->rows + field->nrows) == 1))
 		len = field->cols;
 
-#ifdef DEBUG
-	if (_formi_create_dbg_file() != E_OK)
-		return E_SYSTEM_ERROR;
-
-	fprintf(dbg,
-		"set_field_buffer: entry: len = %d, value = %s, buffer=%d\n",
-		len, value, buffer);
-	fprintf(dbg, "set_field_buffer: entry: string = ");
+	_formi_dbg_printf( "%s: len = %d, value = %s, buffer=%d\n", __func__,
+	len, value, buffer);
 	if (field->buffers[buffer].string != NULL)
-		fprintf(dbg, "%s, len = %d\n", field->buffers[buffer].string,
-			field->buffers[buffer].length);
-	else
-		fprintf(dbg, "(null), len = 0\n");
-	fprintf(dbg, "set_field_buffer: entry: lines.len = %d\n",
-		field->alines[0].length);
-#endif
+		_formi_dbg_printf("%s: string=%s, len = %d\n", __func__,
+		field->buffers[buffer].string,
+		field->buffers[buffer].length);
+	else
+		_formi_dbg_printf("%s: string=(null), len = 0\n", __func__);
+	_formi_dbg_printf("%s: lines.len = %d\n", __func__,
+	field->alines[0].length);
 	
-	if ((field->buffers[buffer].string =
-	 (char *) realloc(field->buffers[buffer].string,
-			  (size_t) len + 1)) == NULL)
+	if ((field->buffers[buffer].string = realloc(
+	field->buffers[buffer].string, (size_t) len + 1)) == NULL)
 		return E_SYSTEM_ERROR;
 
 	strlcpy(field->buffers[buffer].string, value, (size_t) len + 1);
@@ -452,14 +445,11 @@ set_field_buffer(FIELD *field, int buffe
 	field->buffers[buffer].allocated = len + 1;
 	status = field_buffer_init(field, buffer, len);
 
-#ifdef DEBUG
-	fprintf(dbg, "set_field_buffer: exit: len = %d, value = %s\n",
-		len, value);
-	fprintf(dbg, "set_field_buffer: exit: string = %s, len = %d\n",
-		field->buffers[buffer].string, field->buffers[buffer].length);
-	fprintf(dbg, "set_field_buffer: exit: lines.len = %d\n",
+	_formi_dbg_printf("%s: len = %d, value = %s\n", __func__, len, value);
+	_formi_dbg_printf("%s: string = %s, len = %d\n", __func__,
+	field->buffers[buffer].string, field->buffers[buffer].length);
+	_formi_dbg_printf("%s: lines.len = %d\n", __func__,
 		field->alines[0].length);
-#endif
 
 	return status;
 }

Index: src/lib/libform/form.c
diff -u src/lib/libform/form.c:1.15 src/lib/libform/form.c:1.16
--- src/lib/libform/form.c:1.15	Wed Nov 24 06:57:09 2004
+++ src/lib/libform/form.c	Wed Mar  9 14:47:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: form.c,v 1.15 2004/11/24 11:57:09 blymn Exp $	*/
+/*	$NetBSD: form.c,v 1.16 2016/03/09 19:47:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: form.c,v 1.15 2004/11/24 11:57:09 blymn Exp $");
+__RCSID("$NetBSD: form.c,v 1.16 2016/03/09 19:47:13 christos Exp $");
 
 #include 
 #include 
@@ -603,9 +603,7 @@ pos_form_cursor(FORM *form)
 		}
 	}
 	
-#ifdef DEBUG
-	fprintf(dbg, "pos_cursor: row=%d, col=%d\n", row, col);
-#endif
+	_formi_dbg_printf("%s: row=%d, col=%d\n", __func__, row, col);
 	
 	wmove(form->scrwin, row, col);
 

Index: src/lib/libform/internals.c
diff -u src/lib/libform/internals.c:1.37 src/lib/libform/internals.c:1.38
--- src/lib/libform/internals.c:1.37	Mon Nov 25 20:17:00 2013
+++ src/lib/libform/internals.c	Wed Mar  9 14:47:13 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: internals.c,v 1.37 2013/11/26 01:17:00 christos Exp $	*/
+/*	$NetBSD: internals.c,v 1.38 2016/03/09 19:47:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: internals.c,v 1.37 2013

CVS commit: src/usr.bin/finger

2016-03-09 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Mar  9 16:12:14 UTC 2016

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

Log Message:
in find_idle_and_ttywrite(), initialize idletime and writable to 0
when stat() fails.  this prevents a coredump later in stimeprint()
due to gmtime() returning NULL for an uninitialized idletime.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 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/util.c
diff -u src/usr.bin/finger/util.c:1.28 src/usr.bin/finger/util.c:1.29
--- src/usr.bin/finger/util.c:1.28	Sun Apr 12 06:18:54 2009
+++ src/usr.bin/finger/util.c	Wed Mar  9 16:12:14 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.28 2009/04/12 06:18:54 lukem Exp $	*/
+/*	$NetBSD: util.c,v 1.29 2016/03/09 16:12:14 chs 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.28 2009/04/12 06:18:54 lukem Exp $");
+__RCSID("$NetBSD: util.c,v 1.29 2016/03/09 16:12:14 chs Exp $");
 #endif
 #endif /* not lint */
 
@@ -358,6 +358,8 @@ find_idle_and_ttywrite(WHERE *w)
 	(void)snprintf(tbuf, sizeof(tbuf), "%s/%s", _PATH_DEV, w->tty);
 	if (stat(tbuf, &sb) < 0) {
 		warn("%s", tbuf);
+		w->idletime = 0;
+		w->writable = 0;
 		return;
 	}
 	w->idletime = now < sb.st_atime ? 0 : now - sb.st_atime;



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

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 15:58:25 UTC 2016

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

Log Message:
PR/50918: David Binderman: Fix memory leak


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.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_xauth.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.27 src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.28
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.27	Tue Mar 18 14:20:35 2014
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c	Wed Mar  9 10:58:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_xauth.c,v 1.27 2014/03/18 18:20:35 riastradh Exp $	*/
+/*	$NetBSD: isakmp_xauth.c,v 1.28 2016/03/09 15:58:25 christos Exp $	*/
 
 /* Id: isakmp_xauth.c,v 1.38 2006/08/22 18:17:17 manubsd Exp */
 
@@ -1803,7 +1803,7 @@ xauth_rmconf_dup(xauth_rmconf)
 		new = racoon_malloc(sizeof(*new));
 		if (new == NULL) {
 			plog(LLV_ERROR, LOCATION, NULL, 
-			"xauth_rmconf_dup: malloc failed\n");
+			"%s: malloc failed\n", __func__);
 			return NULL;
 		}
 
@@ -1813,16 +1813,16 @@ xauth_rmconf_dup(xauth_rmconf)
 			new->login = vdup(xauth_rmconf->login);
 			if (new->login == NULL) {
 plog(LLV_ERROR, LOCATION, NULL, 
-"xauth_rmconf_dup: malloc failed (login)\n");
-return NULL;
+"%s: malloc failed (login)\n", __func__);
+goto out;
 			}
 		}
 		if (xauth_rmconf->pass != NULL) {
 			new->pass = vdup(xauth_rmconf->pass);
 			if (new->pass == NULL) {
 plog(LLV_ERROR, LOCATION, NULL, 
-"xauth_rmconf_dup: malloc failed (password)\n");
-return NULL;
+"%s: malloc failed (password)\n", __func__);
+goto out;
 			}
 		}
 
@@ -1830,4 +1830,8 @@ xauth_rmconf_dup(xauth_rmconf)
 	}
 
 	return NULL;
+out:
+	vfree(new->login);
+	racoon_free(new);
+	return NULL;
 }



CVS commit: src/sys/fs/cd9660

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 15:45:38 UTC 2016

Modified Files:
src/sys/fs/cd9660: cd9660_util.c

Log Message:
Make it usable from userland.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/fs/cd9660/cd9660_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/sys/fs/cd9660/cd9660_util.c
diff -u src/sys/fs/cd9660/cd9660_util.c:1.12 src/sys/fs/cd9660/cd9660_util.c:1.13
--- src/sys/fs/cd9660/cd9660_util.c:1.12	Mon Nov 10 13:46:33 2014
+++ src/sys/fs/cd9660/cd9660_util.c	Wed Mar  9 10:45:37 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660_util.c,v 1.12 2014/11/10 18:46:33 maxv Exp $	*/
+/*	$NetBSD: cd9660_util.c,v 1.13 2016/03/09 15:45:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 1994
@@ -37,9 +37,17 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.12 2014/11/10 18:46:33 maxv Exp $");
+#ifdef _KERNEL
+__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.13 2016/03/09 15:45:37 christos Exp $");
+#else
+/* used by macppc_installboot */
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+#endif
 
 #include 
+#ifdef _KERNEL
 #include 
 #include 
 #include 
@@ -51,14 +59,24 @@ __KERNEL_RCSID(0, "$NetBSD: cd9660_util.
 #include 
 #include 
 #include 
+#else
+#include 
+#include 
+#define KASSERT(x)	assert(x)	/* XXX for  */
+#endif
 
 #include 
+#ifdef _KERNEL
 #include 
+#else
+#include "installboot.h"
+static int isochar(const u_char *, const u_char *, int, uint16_t *);
+#endif
 
 #include 
 
-static u_int16_t wget(const u_char **, size_t *, int);
-static int wput(u_char *, size_t, u_int16_t, int);
+static uint16_t wget(const u_char **, size_t *, int);
+static int wput(u_char *, size_t, uint16_t, int);
 
 int cd9660_utf8_joliet = 1;
 
@@ -68,8 +86,9 @@ int cd9660_utf8_joliet = 1;
  */
 int
 isochar(const u_char *isofn, const u_char *isoend, int joliet_level,
-	u_int16_t *c)
+uint16_t *c)
 {
+
 	*c = isofn[0];
 	if (joliet_level == 0 || isofn + 1 == isoend) {
 		/* (00) and (01) are one byte in Joliet, too */
@@ -95,12 +114,17 @@ isochar(const u_char *isofn, const u_cha
  */
 int
 isofncmp(const u_char *fn, size_t fnlen, const u_char *isofn, size_t isolen,
-	int joliet_level)
+int joliet_level)
 {
 	int i, j;
-	u_int16_t fc, ic;
+	uint16_t fc, ic;
 	const u_char *isoend = isofn + isolen;
 
+#ifdef ISOFNCMPDEBUG
+	printf("fn = %s, fnlen = %zu, isofn = %s, isolen = %zu\n",
+	fn, fnlen, isofn, isolen);
+#endif
+
 	while (fnlen > 0) {
 		fc = wget(&fn, &fnlen, joliet_level);
 
@@ -132,10 +156,10 @@ isofncmp(const u_char *fn, size_t fnlen,
 	if (fc >= 'a' && fc <= 'z')
 		fc -= 'a' - 'A';
 
-	return (int) fc - (int) ic;
+	return (int)fc - (int)ic;
 }
 			} else
-return (int) fc - (int) ic;
+return (int)fc - (int)ic;
 		}
 	}
 	if (isofn != isoend) {
@@ -162,11 +186,11 @@ isofncmp(const u_char *fn, size_t fnlen,
  */
 void
 isofntrans(const u_char *infn, int infnlen, u_char *outfn, u_short *outfnlen,
-	int original, int casetrans, int assoc, int joliet_level)
+int original, int casetrans, int assoc, int joliet_level)
 {
 	int fnidx = 0;
 	const u_char *infnend = infn + infnlen;
-	u_int16_t c;
+	uint16_t c;
 	int sz;
 
 	if (assoc) {
@@ -199,7 +223,7 @@ isofntrans(const u_char *infn, int infnl
 	*outfnlen = fnidx;
 }
 
-static u_int16_t
+static uint16_t
 wget(const u_char **str, size_t *sz, int joliet_level)
 {
 	if (joliet_level > 0 && cd9660_utf8_joliet) {
@@ -211,7 +235,7 @@ wget(const u_char **str, size_t *sz, int
 		 * this effectively assumes provided file name is using
 		 * ISO-8859-1 subset.
 		 */
-		u_int16_t c = *str[0];
+		uint16_t c = *str[0];
 		(*str)++;
 		(*sz)--;
 
@@ -220,7 +244,7 @@ wget(const u_char **str, size_t *sz, int
 }
 
 static int
-wput(u_char *s, size_t n, u_int16_t c, int joliet_level)
+wput(u_char *s, size_t n, uint16_t c, int joliet_level)
 {
 	if (joliet_level > 0 && cd9660_utf8_joliet) {
 		/* Store Joliet file name encoded into UTF-8 */



CVS commit: src/distrib/cdrom/macppc_installboot

2016-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar  9 15:44:49 UTC 2016

Modified Files:
src/distrib/cdrom/macppc_installboot: Makefile installboot.h
Removed Files:
src/distrib/cdrom/macppc_installboot: cd9660_util.c

Log Message:
dedup


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -u -r1.4 -r0 src/distrib/cdrom/macppc_installboot/cd9660_util.c
cvs rdiff -u -r1.3 -r1.4 src/distrib/cdrom/macppc_installboot/installboot.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/cdrom/macppc_installboot/Makefile
diff -u src/distrib/cdrom/macppc_installboot/Makefile:1.9 src/distrib/cdrom/macppc_installboot/Makefile:1.10
--- src/distrib/cdrom/macppc_installboot/Makefile:1.9	Sun Dec  2 07:55:27 2012
+++ src/distrib/cdrom/macppc_installboot/Makefile	Wed Mar  9 10:44:49 2016
@@ -1,8 +1,12 @@
-#	$NetBSD: Makefile,v 1.9 2012/12/02 12:55:27 apb Exp $
+#	$NetBSD: Makefile,v 1.10 2016/03/09 15:44:49 christos Exp $
 
+NOMAN=	# defined
+
+.include 
 HOSTPROG=	macppc_installboot
 SRCS=		installboot.c cd9660.c cd9660_util.c
-NOMAN=	# defined
+
+.PATH.c: ${NETBSDSRCDIR}/sys/fs/cd9660
 
 HOST_CPPFLAGS+=	-I. -I${.CURDIR}
 #HOST_CPPFLAGS+=	-DDEBUG

Index: src/distrib/cdrom/macppc_installboot/installboot.h
diff -u src/distrib/cdrom/macppc_installboot/installboot.h:1.3 src/distrib/cdrom/macppc_installboot/installboot.h:1.4
--- src/distrib/cdrom/macppc_installboot/installboot.h:1.3	Wed Mar 25 11:26:49 2009
+++ src/distrib/cdrom/macppc_installboot/installboot.h	Wed Mar  9 10:44:49 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.h,v 1.3 2009/03/25 15:26:49 tsutsui Exp $	*/
+/*	$NetBSD: installboot.h,v 1.4 2016/03/09 15:44:49 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -135,8 +135,7 @@ struct bbinfo_params {
 int		cd9660_match(ib_params *);
 int		cd9660_findstage2(ib_params *, uint32_t *, ib_block *);
 
-int	isofncmp(const u_char *, size_t, const u_char *, size_t, int);
-void	isofntrans(u_char *, int, u_char *, u_short *, int, int, int, int);
-
+int isofncmp(const u_char *, size_t, const u_char *, size_t, int);
+void isofntrans(const u_char *, int, u_char *, u_short *, int, int, int, int);
 
 #endif	/* _INSTALLBOOT_H */



CVS commit: src/sys/arch/sparc64/sparc64

2016-03-09 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Wed Mar  9 12:20:21 UTC 2016

Modified Files:
src/sys/arch/sparc64/sparc64: locore.s

Log Message:
32-bit kernels use 32-bit stack.


To generate a diff of this commit:
cvs rdiff -u -r1.389 -r1.390 src/sys/arch/sparc64/sparc64/locore.s

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/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.389 src/sys/arch/sparc64/sparc64/locore.s:1.390
--- src/sys/arch/sparc64/sparc64/locore.s:1.389	Thu Mar  3 20:45:45 2016
+++ src/sys/arch/sparc64/sparc64/locore.s	Wed Mar  9 12:20:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.389 2016/03/03 20:45:45 palle Exp $	*/
+/*	$NetBSD: locore.s,v 1.390 2016/03/09 12:20:20 nakayama Exp $	*/
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -4123,7 +4123,11 @@ rft_kernel:
 	rdpr	%cwp, %g1
 	dec	%g1
 	wrpr	%g1, %cwp
+#ifdef _LP64
 	FILL	ldxa, %sp+BIAS, 8, %asi
+#else
+	FILL	lda, %sp, 4, %asi
+#endif
 	restored
 	inc	%g1
 	wrpr	%g1, %cwp



CVS commit: [nick-nhusb] src/sys/dev/usb

2016-03-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar  9 08:00:22 UTC 2016

Modified Files:
src/sys/dev/usb [nick-nhusb]: ohci.c

Log Message:
More debug


To generate a diff of this commit:
cvs rdiff -u -r1.254.2.56 -r1.254.2.57 src/sys/dev/usb/ohci.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/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.56 src/sys/dev/usb/ohci.c:1.254.2.57
--- src/sys/dev/usb/ohci.c:1.254.2.56	Tue Mar  8 21:40:22 2016
+++ src/sys/dev/usb/ohci.c	Wed Mar  9 08:00:22 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.56 2016/03/08 21:40:22 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.57 2016/03/09 08:00:22 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.56 2016/03/08 21:40:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.57 2016/03/09 08:00:22 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1483,6 +1483,7 @@ ohci_softintr(void *v)
 			DPRINTFN(5, "add ITD %p", sitd, 0, 0, 0);
 			continue;
 		}
+		DPRINTFN(10, "addr %p not found", done, 0, 0, 0);
 		device_printf(sc->sc_dev, "WARNING: addr 0x%08lx not found\n",
 		(u_long)done);
 		break;