CVS commit: src/sys/kern

2015-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 22 00:50:30 UTC 2015

Modified Files:
src/sys/kern: syscalls.master

Log Message:
PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 src/sys/kern/syscalls.master

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

Modified files:

Index: src/sys/kern/syscalls.master
diff -u src/sys/kern/syscalls.master:1.271 src/sys/kern/syscalls.master:1.272
--- src/sys/kern/syscalls.master:1.271	Tue Feb 10 10:07:39 2015
+++ src/sys/kern/syscalls.master	Sat Feb 21 19:50:30 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.271 2015/02/10 15:07:39 martin Exp $
+	$NetBSD: syscalls.master,v 1.272 2015/02/22 00:50:30 christos Exp $
 
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
 
@@ -919,7 +919,7 @@
 			const struct timespec *tptr, int flag); }
 468	STD  RUMP	{ int|sys||openat(int fd, const char *path, \
 			int oflags, ... mode_t mode); }
-469	STD  RUMP	{ int|sys||readlinkat(int fd, const char *path, \
+469	STD  RUMP	{ ssize_t|sys||readlinkat(int fd, const char *path, \
 			char *buf, size_t bufsize); }
 470	STD  RUMP	{ int|sys||symlinkat(const char *path1, int fd, \
 			const char *path2); }



CVS commit: src/lib/libedit

2015-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 22 00:46:58 UTC 2015

Modified Files:
src/lib/libedit: chartype.c chartype.h

Log Message:
PR/49683: Amir Plivatsky: Off-by-one comparison in ct_decode_string() leading
to out of bounds referrence.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libedit/chartype.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libedit/chartype.h

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/chartype.c
diff -u src/lib/libedit/chartype.c:1.10 src/lib/libedit/chartype.c:1.11
--- src/lib/libedit/chartype.c:1.10	Tue Aug 16 12:25:15 2011
+++ src/lib/libedit/chartype.c	Sat Feb 21 19:46:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.c,v 1.10 2011/08/16 16:25:15 christos Exp $	*/
+/*	$NetBSD: chartype.c,v 1.11 2015/02/22 00:46:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 #include config.h
 #if !defined(lint)  !defined(SCCSID)
-__RCSID($NetBSD: chartype.c,v 1.10 2011/08/16 16:25:15 christos Exp $);
+__RCSID($NetBSD: chartype.c,v 1.11 2015/02/22 00:46:58 christos Exp $);
 #endif /* not lint  not SCCSID */
 #include el.h
 #include stdlib.h
@@ -46,7 +46,7 @@ __RCSID($NetBSD: chartype.c,v 1.10 2011
 #define CT_BUFSIZ ((size_t)1024)
 
 #ifdef WIDECHAR
-protected void
+protected int
 ct_conv_buff_resize(ct_buffer_t *conv, size_t mincsize, size_t minwsize)
 {
 	void *p;
@@ -57,6 +57,7 @@ ct_conv_buff_resize(ct_buffer_t *conv, s
 			conv-csize = 0;
 			el_free(conv-cbuff);
 			conv-cbuff = NULL;
+			return -1;
 		} else 
 			conv-cbuff = p;
 	}
@@ -68,9 +69,11 @@ ct_conv_buff_resize(ct_buffer_t *conv, s
 			conv-wsize = 0;
 			el_free(conv-wbuff);
 			conv-wbuff = NULL;
+			return -1;
 		} else
 			conv-wbuff = p;
 	}
+	return 0;
 }
 
 
@@ -78,26 +81,22 @@ public char *
 ct_encode_string(const Char *s, ct_buffer_t *conv)
 {
 	char *dst;
-	ssize_t used = 0;
+	ssize_t used;
 
 	if (!s)
 		return NULL;
-	if (!conv-cbuff)
-		ct_conv_buff_resize(conv, CT_BUFSIZ, (size_t)0);
-	if (!conv-cbuff)
-		return NULL;
 
 	dst = conv-cbuff;
-	while (*s) {
-		used = (ssize_t)(conv-csize - (size_t)(dst - conv-cbuff));
-		if (used  5) {
-			used = dst - conv-cbuff;
-			ct_conv_buff_resize(conv, conv-csize + CT_BUFSIZ,
-			(size_t)0);
-			if (!conv-cbuff)
+	for (;;) {
+		used = (ssize_t)(dst - conv-cbuff);
+		if ((conv-csize - (size_t)used)  5) {
+			if (ct_conv_buff_resize(conv, conv-csize + CT_BUFSIZ,
+			(size_t)0) == -1)
 return NULL;
 			dst = conv-cbuff + used;
 		}
+		if (!*s)
+			break;
 		used = ct_encode_char(dst, (size_t)5, *s);
 		if (used == -1) /* failed to encode, need more buffer space */
 			abort();
@@ -111,22 +110,19 @@ ct_encode_string(const Char *s, ct_buffe
 public Char *
 ct_decode_string(const char *s, ct_buffer_t *conv)
 {
-	size_t len = 0;
+	size_t len;
 
 	if (!s)
 		return NULL;
-	if (!conv-wbuff)
-		ct_conv_buff_resize(conv, (size_t)0, CT_BUFSIZ);
-	if (!conv-wbuff)
-		return NULL;
 
 	len = ct_mbstowcs(NULL, s, (size_t)0);
 	if (len == (size_t)-1)
 		return NULL;
-	if (len  conv-wsize)
-		ct_conv_buff_resize(conv, (size_t)0, len + 1);
-	if (!conv-wbuff)
-		return NULL;
+
+	if (conv-csize  ++len)
+		if (ct_conv_buff_resize(conv, (size_t)0, len + CT_BUFSIZ) == -1)
+			return NULL;
+
 	ct_mbstowcs(conv-wbuff, s, conv-wsize);
 	return conv-wbuff;
 }
@@ -145,9 +141,10 @@ ct_decode_argv(int argc, const char *arg
 	 * the argv strings. */
 	for (i = 0, bufspace = 0; i  argc; ++i)
 		bufspace += argv[i] ? strlen(argv[i]) + 1 : 0;
-	ct_conv_buff_resize(conv, (size_t)0, bufspace);
-	if (!conv-wsize)
-		return NULL;
+	if (conv-csize  ++bufspace)
+		if (ct_conv_buff_resize(conv, (size_t)0, bufspace + CT_BUFSIZ)
+		== -1)
+			return NULL;
 
 	wargv = el_malloc((size_t)argc * sizeof(*wargv));
 

Index: src/lib/libedit/chartype.h
diff -u src/lib/libedit/chartype.h:1.11 src/lib/libedit/chartype.h:1.12
--- src/lib/libedit/chartype.h:1.11	Tue Feb 17 17:49:26 2015
+++ src/lib/libedit/chartype.h	Sat Feb 21 19:46:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.h,v 1.11 2015/02/17 22:49:26 christos Exp $	*/
+/*	$NetBSD: chartype.h,v 1.12 2015/02/22 00:46:58 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -189,7 +189,7 @@ public Char *ct_decode_string(const char
 protected Char **ct_decode_argv(int, const char *[],  ct_buffer_t *);
 
 /* Resizes the conversion buffer(s) if needed. */
-protected void ct_conv_buff_resize(ct_buffer_t *, size_t, size_t);
+protected int ct_conv_buff_resize(ct_buffer_t *, size_t, size_t);
 protected ssize_t ct_encode_char(char *, size_t, Char);
 protected size_t ct_enc_width(Char);
 



CVS commit: src/lib/libedit

2015-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 22 02:16:19 UTC 2015

Modified Files:
src/lib/libedit: chartype.c chartype.h

Log Message:
split the allocation functions, their mixed usage was too confusing.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libedit/chartype.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libedit/chartype.h

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/chartype.c
diff -u src/lib/libedit/chartype.c:1.11 src/lib/libedit/chartype.c:1.12
--- src/lib/libedit/chartype.c:1.11	Sat Feb 21 19:46:58 2015
+++ src/lib/libedit/chartype.c	Sat Feb 21 21:16:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.c,v 1.11 2015/02/22 00:46:58 christos Exp $	*/
+/*	$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 #include config.h
 #if !defined(lint)  !defined(SCCSID)
-__RCSID($NetBSD: chartype.c,v 1.11 2015/02/22 00:46:58 christos Exp $);
+__RCSID($NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $);
 #endif /* not lint  not SCCSID */
 #include el.h
 #include stdlib.h
@@ -47,32 +47,44 @@ __RCSID($NetBSD: chartype.c,v 1.11 2015
 
 #ifdef WIDECHAR
 protected int
-ct_conv_buff_resize(ct_buffer_t *conv, size_t mincsize, size_t minwsize)
+ct_conv_cbuff_resize(ct_buffer_t *conv, size_t csize)
 {
 	void *p;
-	if (mincsize  conv-csize) {
-		conv-csize = mincsize;
-		p = el_realloc(conv-cbuff, conv-csize * sizeof(*conv-cbuff));
-		if (p == NULL) {
-			conv-csize = 0;
-			el_free(conv-cbuff);
-			conv-cbuff = NULL;
-			return -1;
-		} else 
-			conv-cbuff = p;
+
+	if (csize = conv-csize)
+		return 0;
+
+	conv-csize = csize;
+
+	p = el_realloc(conv-cbuff, conv-csize * sizeof(*conv-cbuff));
+	if (p == NULL) {
+		conv-csize = 0;
+		el_free(conv-cbuff);
+		conv-cbuff = NULL;
+		return -1;
 	}
+	conv-cbuff = p;
+	return 0;
+}
 
-	if (minwsize  conv-wsize) {
-		conv-wsize = minwsize;
-		p = el_realloc(conv-wbuff, conv-wsize * sizeof(*conv-wbuff));
-		if (p == NULL) {
-			conv-wsize = 0;
-			el_free(conv-wbuff);
-			conv-wbuff = NULL;
-			return -1;
-		} else
-			conv-wbuff = p;
+protected int
+ct_conv_wbuff_resize(ct_buffer_t *conv, size_t wsize)
+{
+	void *p;
+
+	if (wsize = conv-wsize) 
+		return 0;
+
+	conv-wsize = wsize;
+
+	p = el_realloc(conv-wbuff, conv-wsize * sizeof(*conv-wbuff));
+	if (p == NULL) {
+		conv-wsize = 0;
+		el_free(conv-wbuff);
+		conv-wbuff = NULL;
+		return -1;
 	}
+	conv-wbuff = p;
 	return 0;
 }
 
@@ -90,8 +102,8 @@ ct_encode_string(const Char *s, ct_buffe
 	for (;;) {
 		used = (ssize_t)(dst - conv-cbuff);
 		if ((conv-csize - (size_t)used)  5) {
-			if (ct_conv_buff_resize(conv, conv-csize + CT_BUFSIZ,
-			(size_t)0) == -1)
+			if (ct_conv_cbuff_resize(conv,
+			conv-csize + CT_BUFSIZ) == -1)
 return NULL;
 			dst = conv-cbuff + used;
 		}
@@ -119,8 +131,8 @@ ct_decode_string(const char *s, ct_buffe
 	if (len == (size_t)-1)
 		return NULL;
 
-	if (conv-csize  ++len)
-		if (ct_conv_buff_resize(conv, (size_t)0, len + CT_BUFSIZ) == -1)
+	if (conv-wsize  ++len)
+		if (ct_conv_wbuff_resize(conv, len + CT_BUFSIZ) == -1)
 			return NULL;
 
 	ct_mbstowcs(conv-wbuff, s, conv-wsize);
@@ -141,9 +153,8 @@ ct_decode_argv(int argc, const char *arg
 	 * the argv strings. */
 	for (i = 0, bufspace = 0; i  argc; ++i)
 		bufspace += argv[i] ? strlen(argv[i]) + 1 : 0;
-	if (conv-csize  ++bufspace)
-		if (ct_conv_buff_resize(conv, (size_t)0, bufspace + CT_BUFSIZ)
-		== -1)
+	if (conv-wsize  ++bufspace)
+		if (ct_conv_wbuff_resize(conv, bufspace + CT_BUFSIZ) == -1)
 			return NULL;
 
 	wargv = el_malloc((size_t)argc * sizeof(*wargv));

Index: src/lib/libedit/chartype.h
diff -u src/lib/libedit/chartype.h:1.12 src/lib/libedit/chartype.h:1.13
--- src/lib/libedit/chartype.h:1.12	Sat Feb 21 19:46:58 2015
+++ src/lib/libedit/chartype.h	Sat Feb 21 21:16:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: chartype.h,v 1.12 2015/02/22 00:46:58 christos Exp $	*/
+/*	$NetBSD: chartype.h,v 1.13 2015/02/22 02:16:19 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -189,7 +189,8 @@ public Char *ct_decode_string(const char
 protected Char **ct_decode_argv(int, const char *[],  ct_buffer_t *);
 
 /* Resizes the conversion buffer(s) if needed. */
-protected int ct_conv_buff_resize(ct_buffer_t *, size_t, size_t);
+protected int ct_conv_cbuff_resize(ct_buffer_t *, size_t);
+protected int ct_conv_wbuff_resize(ct_buffer_t *, size_t);
 protected ssize_t ct_encode_char(char *, size_t, Char);
 protected size_t ct_enc_width(Char);
 
@@ -199,7 +200,8 @@ protected size_t ct_enc_width(Char);
 #define	ct_encode_string(s, b)	(s)
 #define ct_decode_string(s, b)	(s)
 #define ct_decode_argv(l, s, b)	(s)
-#define ct_conv_buff_resize(b, os, ns)
+#define ct_conv_cbuff_resize(b, s) ((s) == (0))
+#define ct_conv_wbuff_resize(b, s) ((s) == (0))
 #define 

CVS commit: src/sys

2015-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 22 00:53:29 UTC 2015

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/rump/include/rump: rump_syscalls.h
src/sys/sys: syscall.h syscallargs.h

Log Message:
PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.279 -r1.280 src/sys/kern/syscalls.c
cvs rdiff -u -r1.80 -r1.81 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.275 -r1.276 src/sys/sys/syscall.h
cvs rdiff -u -r1.258 -r1.259 src/sys/sys/syscallargs.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/kern/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.288 src/sys/kern/init_sysent.c:1.289
--- src/sys/kern/init_sysent.c:1.288	Tue Feb 10 12:43:44 2015
+++ src/sys/kern/init_sysent.c	Sat Feb 21 19:53:28 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.288 2015/02/10 17:43:44 christos Exp $ */
+/* $NetBSD: init_sysent.c,v 1.289 2015/02/22 00:53:28 christos Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.271 2015/02/10 15:07:39 martin Exp
+ * created from	NetBSD: syscalls.master,v 1.272 2015/02/22 00:50:30 christos Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.288 2015/02/10 17:43:44 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.289 2015/02/22 00:53:28 christos Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.279 src/sys/kern/syscalls.c:1.280
--- src/sys/kern/syscalls.c:1.279	Tue Feb 10 12:43:44 2015
+++ src/sys/kern/syscalls.c	Sat Feb 21 19:53:28 2015
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.279 2015/02/10 17:43:44 christos Exp $ */
+/* $NetBSD: syscalls.c,v 1.280 2015/02/22 00:53:28 christos Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.271 2015/02/10 15:07:39 martin Exp
+ * created from	NetBSD: syscalls.master,v 1.272 2015/02/22 00:50:30 christos Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.279 2015/02/10 17:43:44 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.280 2015/02/22 00:53:28 christos Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_modular.h

Index: src/sys/rump/include/rump/rump_syscalls.h
diff -u src/sys/rump/include/rump/rump_syscalls.h:1.80 src/sys/rump/include/rump/rump_syscalls.h:1.81
--- src/sys/rump/include/rump/rump_syscalls.h:1.80	Tue Feb 10 12:43:44 2015
+++ src/sys/rump/include/rump/rump_syscalls.h	Sat Feb 21 19:53:28 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: rump_syscalls.h,v 1.80 2015/02/10 17:43:44 christos Exp $ */
+/* $NetBSD: rump_syscalls.h,v 1.81 2015/02/22 00:53:28 christos Exp $ */
 
 /*
  * System call protos in rump namespace.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.271 2015/02/10 15:07:39 martin Exp
+ * created from	NetBSD: syscalls.master,v 1.272 2015/02/22 00:50:30 christos Exp
  */
 
 #ifndef _RUMP_RUMP_SYSCALLS_H_
@@ -1028,7 +1028,7 @@ int rump_sys_fchownat(int, const char *,
 int rump_sys_fstatat(int, const char *, struct stat *, int) __RENAME(RUMP_SYS_RENAME_FSTATAT);
 int rump_sys_utimensat(int, const char *, const struct timespec *, int) __RENAME(RUMP_SYS_RENAME_UTIMENSAT);
 int rump_sys_openat(int, const char *, int, ...) __RENAME(RUMP_SYS_RENAME_OPENAT);
-int rump_sys_readlinkat(int, const char *, char *, size_t) __RENAME(RUMP_SYS_RENAME_READLINKAT);
+ssize_t rump_sys_readlinkat(int, const char *, char *, size_t) __RENAME(RUMP_SYS_RENAME_READLINKAT);
 int rump_sys_symlinkat(const char *, int, const char *) __RENAME(RUMP_SYS_RENAME_SYMLINKAT);
 int rump_sys_unlinkat(int, const char *, int) __RENAME(RUMP_SYS_RENAME_UNLINKAT);
 int rump_sys_futimens(int, const struct timespec *) __RENAME(RUMP_SYS_RENAME_FUTIMENS);

Index: src/sys/sys/syscall.h
diff -u src/sys/sys/syscall.h:1.275 src/sys/sys/syscall.h:1.276
--- src/sys/sys/syscall.h:1.275	Tue Feb 10 12:43:44 2015
+++ src/sys/sys/syscall.h	Sat Feb 21 19:53:28 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: syscall.h,v 1.275 2015/02/10 17:43:44 christos Exp $ */
+/* $NetBSD: syscall.h,v 1.276 2015/02/22 00:53:28 christos Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.271 2015/02/10 15:07:39 martin Exp
+ * created from	NetBSD: syscalls.master,v 1.272 2015/02/22 00:50:30 christos Exp
  */
 
 #ifndef _SYS_SYSCALL_H_
@@ -1334,7 +1334,7 @@
 /* syscall: openat ret: int args: int const char * int ... */
 #define	SYS_openat	468
 
-/* syscall: readlinkat ret: int args: int const char * char * size_t */
+/* syscall: readlinkat ret: 

CVS commit: src/include

2015-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 22 00:54:46 UTC 2015

Modified Files:
src/include: unistd.h

Log Message:
PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/include/unistd.h

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

Modified files:

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.143 src/include/unistd.h:1.144
--- src/include/unistd.h:1.143	Fri Sep 26 15:28:03 2014
+++ src/include/unistd.h	Sat Feb 21 19:54:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.143 2014/09/26 19:28:03 christos Exp $	*/
+/*	$NetBSD: unistd.h,v 1.144 2015/02/22 00:54:46 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -308,7 +308,7 @@ int	linkat(int, const char *, int, const
 int	renameat(int, const char *, int, const char *);
 int	faccessat(int, const char *, int, int);
 int	fchownat(int, const char *, uid_t, gid_t, int);
-int	readlinkat(int, const char *, char *, size_t);
+ssize_t	readlinkat(int, const char *, char *, size_t);
 int	symlinkat(const char *, int, const char *);
 int	unlinkat(int, const char *, int);
 #endif



CVS commit: src

2015-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 21 23:13:00 UTC 2015

Modified Files:
src/distrib/sets/lists/etc: mi
src/etc/defaults: rc.conf
src/etc/mtree: special
src/etc/rc.d: Makefile
src/usr.sbin/postinstall: postinstall
Added Files:
src/etc/rc.d: iscsid

Log Message:
Add rc script for /sbin/iscsid.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.130 -r1.131 src/etc/defaults/rc.conf
cvs rdiff -u -r1.150 -r1.151 src/etc/mtree/special
cvs rdiff -u -r1.90 -r1.91 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/iscsid
cvs rdiff -u -r1.188 -r1.189 src/usr.sbin/postinstall/postinstall

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/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.234 src/distrib/sets/lists/etc/mi:1.235
--- src/distrib/sets/lists/etc/mi:1.234	Sun Jan 25 15:50:30 2015
+++ src/distrib/sets/lists/etc/mi	Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.234 2015/01/25 15:50:30 christos Exp $
+# $NetBSD: mi,v 1.235 2015/02/21 23:13:00 joerg Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked obsolete; they should just be removed from
@@ -216,6 +216,7 @@
 ./etc/rc.d/ipsecetc-net-rc
 ./etc/rc.d/irdaattachetc-sys-rc
 ./etc/rc.d/iscsi_targetetc-iscsi-rc
+./etc/rc.d/iscsidetc-iscsi-rc
 ./etc/rc.d/isdndetc-isdn-rc
 ./etc/rc.d/isibootdetc-bootserver-rc
 ./etc/rc.d/kdc	etc-krb5-rc

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.130 src/etc/defaults/rc.conf:1.131
--- src/etc/defaults/rc.conf:1.130	Sun Jan 25 16:26:34 2015
+++ src/etc/defaults/rc.conf	Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.130 2015/01/25 16:26:34 christos Exp $
+#	$NetBSD: rc.conf,v 1.131 2015/02/21 23:13:00 joerg Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -297,6 +297,8 @@ kdc=NO			kdc_flags=--detach
 
 # iSCSI target
 iscsi_target=NO		iscsi_target_flags=
+# iSCSI kernel initiator
+iscsid=NO
 
 # WPA daemons.
 hostapd=NO		hostapd_flags=-B /etc/hostapd.conf

Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.150 src/etc/mtree/special:1.151
--- src/etc/mtree/special:1.150	Tue Dec 30 03:52:03 2014
+++ src/etc/mtree/special	Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: special,v 1.150 2014/12/30 03:52:03 uebayasi Exp $
+#	$NetBSD: special,v 1.151 2015/02/21 23:13:00 joerg Exp $
 #	@(#)special	8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -221,6 +221,7 @@
 ./etc/rc.d/ipsec		type=file mode=0555
 ./etc/rc.d/irdaattach		type=file mode=0555
 ./etc/rc.d/iscsi_target		type=file mode=0555
+./etc/rc.d/iscsid		type=file mode=0555
 ./etc/rc.d/isdnd		type=file mode=0555
 ./etc/rc.d/isibootd		type=file mode=0555
 ./etc/rc.d/kdc			type=file mode=0555

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.90 src/etc/rc.d/Makefile:1.91
--- src/etc/rc.d/Makefile:1.90	Thu Sep 11 18:01:22 2014
+++ src/etc/rc.d/Makefile	Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.90 2014/09/11 18:01:22 roy Exp $
+# $NetBSD: Makefile,v 1.91 2015/02/21 23:13:00 joerg Exp $
 
 .include bsd.own.mk
 
@@ -23,7 +23,7 @@ CONFIGFILES=\
 		gpio \
 		hostapd httpd \
 		identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \
-		irdaattach iscsi_target isdnd isibootd \
+		irdaattach iscsi_target iscsid isdnd isibootd \
 		kdc \
 		ldconfig ldpd local lpd lvm \
 		makemandb mdnsd mixerctl mopd motd mountall mountcritlocal \

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.188 src/usr.sbin/postinstall/postinstall:1.189
--- src/usr.sbin/postinstall/postinstall:1.188	Tue Dec 30 07:02:29 2014
+++ src/usr.sbin/postinstall/postinstall	Sat Feb 21 23:13:00 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.188 2014/12/30 07:02:29 apb Exp $
+# $NetBSD: postinstall,v 1.189 2015/02/21 23:13:00 joerg Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1354,6 +1354,7 @@ ipnat
 ipsec
 irdaattach
 iscsi_target
+iscsid
 isdnd
 isibootd
 kdc

Added files:

Index: src/etc/rc.d/iscsid
diff -u /dev/null src/etc/rc.d/iscsid:1.1
--- /dev/null	Sat Feb 21 23:13:00 2015
+++ src/etc/rc.d/iscsid	Sat Feb 21 23:13:00 2015
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $NetBSD: iscsid,v 1.1 2015/02/21 23:13:00 joerg Exp $
+#
+
+# PROVIDE: iscsid
+# REQUIRE: NETWORKING mountcritlocal
+# BEFORE:  securelevel mountcritremote
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name=iscsid
+rcvar=$name
+command=/sbin/${name}
+pidfile=/var/run/${name}.pid
+start_precmd=iscsid_precmd
+
+find_module()
+{
+	local module rest
+	/sbin/modstat $1 | while read module rest; do
+		if [ $module = $1 ]; then
+			echo found
+			break
+		fi
+	done
+}
+
+iscsid_precmd()
+{
+	if [ 

CVS commit: src/sys/dev/usb

2015-02-21 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Feb 21 10:42:15 UTC 2015

Modified Files:
src/sys/dev/usb: if_athn_usb.c

Log Message:
pass collect size of firmware to firmware_free(9).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_athn_usb.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/if_athn_usb.c
diff -u src/sys/dev/usb/if_athn_usb.c:1.7 src/sys/dev/usb/if_athn_usb.c:1.8
--- src/sys/dev/usb/if_athn_usb.c:1.7	Wed Jan  7 07:05:48 2015
+++ src/sys/dev/usb/if_athn_usb.c	Sat Feb 21 10:42:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_athn_usb.c,v 1.7 2015/01/07 07:05:48 ozaki-r Exp $	*/
+/*	$NetBSD: if_athn_usb.c,v 1.8 2015/02/21 10:42:15 nonaka Exp $	*/
 /*	$OpenBSD: if_athn_usb.c,v 1.12 2013/01/14 09:50:31 jsing Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_athn_usb.c,v 1.7 2015/01/07 07:05:48 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_athn_usb.c,v 1.8 2015/02/21 10:42:15 nonaka Exp $);
 
 #ifdef	_KERNEL_OPT
 #include opt_inet.h
@@ -795,7 +795,7 @@ athn_usb_load_firmware(struct athn_usb_s
 	usb_device_request_t req;
 	const char *name;
 	u_char *fw, *ptr;
-	size_t size;
+	size_t size, remain;
 	uint32_t addr;
 	int s, mlen, error;
 
@@ -841,8 +841,9 @@ athn_usb_load_firmware(struct athn_usb_s
 	req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
 	req.bRequest = AR_FW_DOWNLOAD;
 	USETW(req.wIndex, 0);
-	while (size  0) {
-		mlen = MIN(size, 4096);
+	remain = size;
+	while (remain  0) {
+		mlen = MIN(remain, 4096);
 
 		USETW(req.wValue, addr);
 		USETW(req.wLength, mlen);
@@ -851,9 +852,9 @@ athn_usb_load_firmware(struct athn_usb_s
 			firmware_free(fw, size);
 			return error;
 		}
-		addr += mlen  8;
-		ptr  += mlen;
-		size -= mlen;
+		addr   += mlen  8;
+		ptr+= mlen;
+		remain -= mlen;
 	}
 	firmware_free(fw, size);
 



CVS commit: src/external/cddl/osnet

2015-02-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Feb 21 15:00:30 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_subr.c
src/external/cddl/osnet/sys/sys: isa_defs.h

Log Message:
Fix dtrace build error with gcc 4.8 on i386 and arm

_ILP32 is required by dt_popc.

The fix is inspired by FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/sys/isa_defs.h

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c:1.10 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c:1.11
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c:1.10	Wed Feb 18 03:07:56 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c	Sat Feb 21 15:00:30 2015
@@ -48,6 +48,7 @@
 #include limits.h
 #include paths.h
 
+#include sys/isa_defs.h
 #include dt_impl.h
 
 static const struct {

Index: src/external/cddl/osnet/sys/sys/isa_defs.h
diff -u src/external/cddl/osnet/sys/sys/isa_defs.h:1.1 src/external/cddl/osnet/sys/sys/isa_defs.h:1.2
--- src/external/cddl/osnet/sys/sys/isa_defs.h:1.1	Fri Aug  7 20:57:57 2009
+++ src/external/cddl/osnet/sys/sys/isa_defs.h	Sat Feb 21 15:00:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_defs.h,v 1.1 2009/08/07 20:57:57 haad Exp $	*/
+/*	$NetBSD: isa_defs.h,v 1.2 2015/02/21 15:00:30 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,3 +30,22 @@
  */
 
 #include sys/types.h
+
+#if defined(__i386__)
+#if !defined(_ILP32)
+#define _ILP32
+#endif
+
+#elif defined(__amd64__)
+#if !defined(_LP64)
+#define _LP64
+#endif
+
+#elif defined(__arm__)
+#if !defined(_ILP32)
+#define _ILP32
+#endif
+
+#else
+#error architecture not supported
+#endif



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace

2015-02-21 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Feb 21 15:13:20 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/arm: dt_isadep.c
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_consume.c
dt_parser.c dt_printf.c

Log Message:
Fix dtrace build for arm with gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dist/lib/libdtrace/arm/dt_isadep.c
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.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/cddl/osnet/dist/lib/libdtrace/arm/dt_isadep.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/arm/dt_isadep.c:1.2 src/external/cddl/osnet/dist/lib/libdtrace/arm/dt_isadep.c:1.3
--- src/external/cddl/osnet/dist/lib/libdtrace/arm/dt_isadep.c:1.2	Thu Mar 27 15:50:48 2014
+++ src/external/cddl/osnet/dist/lib/libdtrace/arm/dt_isadep.c	Sat Feb 21 15:13:20 2015
@@ -75,8 +75,6 @@ dt_pid_create_return_probe(struct ps_pro
 {
 
 	uint32_t *text;
-	int i;
-	int srdepth = 0;
 
 	dt_dprintf(%s: unimplemented\n, __func__);
 	return (DT_PROC_ERR);

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c:1.6 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c:1.7
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c:1.6	Sat Feb  7 20:30:03 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c	Sat Feb 21 15:13:20 2015
@@ -2187,6 +2187,8 @@ again:
 case DTRACEACT_FREOPEN:
 	func = dtrace_freopen;
 	break;
+default: /* XXX gcc 4.8 */
+	assert(0);
 }
 
 n = (*func)(dtp, fp, fmtdata, data,
Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c:1.6 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c:1.7
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c:1.6	Sat Feb  7 20:30:03 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_printf.c	Sat Feb 21 15:13:20 2015
@@ -295,7 +295,9 @@ pfprint_fp(dtrace_hdl_t *dtp, FILE *fp, 
 const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal)
 {
 	double n = (double)normal;
+#if !defined(__arm__)  !defined(__powerpc__)  !defined(__mips__)
 	long double ldn = (long double)normal;
+#endif
 
 	switch (size) {
 	case sizeof (float):

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c:1.5 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c:1.6
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c:1.5	Sat Feb 14 15:55:05 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c	Sat Feb 21 15:13:20 2015
@@ -1039,10 +1039,12 @@ dt_node_is_ptrcompat(const dt_node_t *lp
 	 * then resolve the referenced type as well (assuming the base type
 	 * is CTF_K_POINTER or CTF_K_ARRAY).  Otherwise [lr]ref = CTF_ERR.
 	 */
-	if (!lp_is_int) {
-		lbase = ctf_type_resolve(lfp, lp-dn_type);
-		lkind = ctf_type_kind(lfp, lbase);
+	lbase = ctf_type_resolve(lfp, lp-dn_type);
+	lkind = ctf_type_kind(lfp, lbase);
+	rbase = ctf_type_resolve(rfp, rp-dn_type);
+	rkind = ctf_type_kind(rfp, rbase);
 
+	if (!lp_is_int) {
 		if (lkind == CTF_K_POINTER) {
 			lref = ctf_type_resolve(lfp,
 			ctf_type_reference(lfp, lbase));
@@ -1053,9 +1055,6 @@ dt_node_is_ptrcompat(const dt_node_t *lp
 	}
 
 	if (!rp_is_int) {
-		rbase = ctf_type_resolve(rfp, rp-dn_type);
-		rkind = ctf_type_kind(rfp, rbase);
-
 		if (rkind == CTF_K_POINTER) {
 			rref = ctf_type_resolve(rfp,
 			ctf_type_reference(rfp, rbase));



CVS commit: src/sys/dev/iscsi

2015-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 21 17:14:37 UTC 2015

Modified Files:
src/sys/dev/iscsi: iscsi_main.c

Log Message:
Revert and add comment that this dance is for the sake of builtin module
registration.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/iscsi/iscsi_main.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/iscsi/iscsi_main.c
diff -u src/sys/dev/iscsi/iscsi_main.c:1.11 src/sys/dev/iscsi/iscsi_main.c:1.12
--- src/sys/dev/iscsi/iscsi_main.c:1.11	Sat Feb 21 12:32:23 2015
+++ src/sys/dev/iscsi/iscsi_main.c	Sat Feb 21 17:14:37 2015
@@ -501,13 +501,13 @@ iscsi_done(ccb_t *ccb)
 	}
 }
 
-#ifdef _MODULE
 /* Kernel Module support */
 
 #include sys/module.h
 
-MODULE(MODULE_CLASS_DRIVER, iscsi, NULL);
+MODULE(MODULE_CLASS_DRIVER, iscsi, NULL); /* Possibly a builtin module */
 
+#ifdef _MODULE
 static const struct cfiattrdata ibescsi_info = { scsi, 1,
 	{{channel, -1, -1},}
 };
@@ -528,15 +528,19 @@ static struct cfdata iscsi_cfdata[] = {
 	},
 	{ NULL, NULL, 0, 0, NULL, 0, NULL }
 };
+#endif
 
 static int
 iscsi_modcmd(modcmd_t cmd, void *arg)
 {
+#ifdef _MODULE
 	devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
 	int error;
+#endif
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+#ifdef _MODULE
 		error = config_cfdriver_attach(iscsi_cd);
 		if (error) {
 			return error;
@@ -577,10 +581,12 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 			config_cfdriver_detach(iscsi_cd);
 			return ENXIO;
 		}
+#endif
 		return 0;
 		break;
 
 	case MODULE_CMD_FINI:
+#ifdef _MODULE
 		error = config_cfdata_detach(iscsi_cfdata);
 		if (error)
 			return error;
@@ -588,6 +594,7 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 		config_cfattach_detach(iscsi_cd.cd_name, iscsi_ca);
 		config_cfdriver_detach(iscsi_cd);
 		devsw_detach(NULL, iscsi_cdevsw);
+#endif
 		return 0;
 		break;
 
@@ -600,4 +607,3 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 		break;
 	}
 }
-#endif /* _MODULE */



CVS commit: [netbsd-7] src/external/mit/lua/dist/src

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 18:16:21 UTC 2015

Modified Files:
src/external/mit/lua/dist/src [netbsd-7]: lapi.c ldebug.c llex.c
llimits.h lstrlib.c lua.h luaconf.h lvm.c

Log Message:
Pull up following revision(s) (requested by lneto in ticket #534):
external/mit/lua/dist/src/lvm.c: revision 1.5
external/mit/lua/dist/src/lapi.c: revision 1.4
external/mit/lua/dist/src/ldebug.c: revision 1.4
external/mit/lua/dist/src/lstrlib.c: revision 1.7
external/mit/lua/dist/src/lua.h: revision 1.4
external/mit/lua/dist/src/luaconf.h: revision 1.13
external/mit/lua/dist/src/llimits.h: revision 1.4
external/mit/lua/dist/src/llex.c: revision 1.4
lua(4): small fixes in kernel Lua
* fixed hex parsing
* restored lua_isnumber
* removed unwanted macros from luaconf.h
* restored stdarg.h include in ldebug.c
* removed doubles from unions
* removed unused functions


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/external/mit/lua/dist/src/lapi.c \
src/external/mit/lua/dist/src/ldebug.c \
src/external/mit/lua/dist/src/llex.c \
src/external/mit/lua/dist/src/llimits.h \
src/external/mit/lua/dist/src/lua.h
cvs rdiff -u -r1.5.2.1 -r1.5.2.2 src/external/mit/lua/dist/src/lstrlib.c
cvs rdiff -u -r1.9.2.2 -r1.9.2.3 src/external/mit/lua/dist/src/luaconf.h
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/external/mit/lua/dist/src/lvm.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/mit/lua/dist/src/lapi.c
diff -u src/external/mit/lua/dist/src/lapi.c:1.2.2.1 src/external/mit/lua/dist/src/lapi.c:1.2.2.2
--- src/external/mit/lua/dist/src/lapi.c:1.2.2.1	Wed Feb  4 21:32:46 2015
+++ src/external/mit/lua/dist/src/lapi.c	Sat Feb 21 18:16:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lapi.c,v 1.2.2.1 2015/02/04 21:32:46 martin Exp $	*/
+/*	$NetBSD: lapi.c,v 1.2.2.2 2015/02/21 18:16:21 martin Exp $	*/
 
 /*
 ** Id: lapi.c,v 2.244 2014/12/26 14:43:45 roberto Exp 
@@ -276,13 +276,11 @@ LUA_API int lua_isinteger (lua_State *L,
 }
 
 
-#ifndef _KERNEL
 LUA_API int lua_isnumber (lua_State *L, int idx) {
   lua_Number n;
   const TValue *o = index2addr(L, idx);
   return tonumber(o, n);
 }
-#endif
 
 
 LUA_API int lua_isstring (lua_State *L, int idx) {
Index: src/external/mit/lua/dist/src/ldebug.c
diff -u src/external/mit/lua/dist/src/ldebug.c:1.2.2.1 src/external/mit/lua/dist/src/ldebug.c:1.2.2.2
--- src/external/mit/lua/dist/src/ldebug.c:1.2.2.1	Wed Feb  4 21:32:46 2015
+++ src/external/mit/lua/dist/src/ldebug.c	Sat Feb 21 18:16:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldebug.c,v 1.2.2.1 2015/02/04 21:32:46 martin Exp $	*/
+/*	$NetBSD: ldebug.c,v 1.2.2.2 2015/02/21 18:16:21 martin Exp $	*/
 
 /*
 ** Id: ldebug.c,v 2.110 2015/01/02 12:52:22 roberto Exp 
@@ -12,8 +12,8 @@
 #include lprefix.h
 
 
-#ifndef _KERNEL
 #include stdarg.h
+#ifndef _KERNEL
 #include stddef.h
 #include string.h
 #endif
Index: src/external/mit/lua/dist/src/llex.c
diff -u src/external/mit/lua/dist/src/llex.c:1.2.2.1 src/external/mit/lua/dist/src/llex.c:1.2.2.2
--- src/external/mit/lua/dist/src/llex.c:1.2.2.1	Wed Feb  4 21:32:46 2015
+++ src/external/mit/lua/dist/src/llex.c	Sat Feb 21 18:16:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: llex.c,v 1.2.2.1 2015/02/04 21:32:46 martin Exp $	*/
+/*	$NetBSD: llex.c,v 1.2.2.2 2015/02/21 18:16:21 martin Exp $	*/
 
 /*
 ** Id: llex.c,v 2.89 2014/11/14 16:06:09 roberto Exp 
@@ -202,7 +202,6 @@ static int check_next1 (LexState *ls, in
 }
 
 
-#ifndef _KERNEL
 /*
 ** Check whether current char is in set 'set' (with two chars) and
 ** saves it
@@ -217,6 +216,7 @@ static int check_next2 (LexState *ls, co
 }
 
 
+#ifndef _KERNEL
 /*
 ** change all characters 'from' in buffer to 'to'
 */
@@ -296,8 +296,11 @@ static int read_numeral (LexState *ls, S
 
 static int read_numeral (LexState *ls, SemInfo *seminfo) {
   TValue obj;
+  int first = ls-current;
   lua_assert(lisdigit(ls-current));
   save_and_next(ls);
+  if (first == '0')
+check_next2(ls, xX);  /* hexadecimal? */
   for (;;) {
 if (lisxdigit(ls-current))
   save_and_next(ls);
Index: src/external/mit/lua/dist/src/llimits.h
diff -u src/external/mit/lua/dist/src/llimits.h:1.2.2.1 src/external/mit/lua/dist/src/llimits.h:1.2.2.2
--- src/external/mit/lua/dist/src/llimits.h:1.2.2.1	Wed Feb  4 21:32:46 2015
+++ src/external/mit/lua/dist/src/llimits.h	Sat Feb 21 18:16:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: llimits.h,v 1.2.2.1 2015/02/04 21:32:46 martin Exp $	*/
+/*	$NetBSD: llimits.h,v 1.2.2.2 2015/02/21 18:16:21 martin Exp $	*/
 
 /*
 ** Id: llimits.h,v 1.125 2014/12/19 13:30:23 roberto Exp 
@@ -68,13 +68,19 @@ typedef unsigned char lu_byte;
 #if defined(LUAI_USER_ALIGNMENT_T)
 typedef LUAI_USER_ALIGNMENT_T L_Umaxalign;
 #else
+#ifndef _KERNEL
 typedef union { double u; void *s; lua_Integer i; long l; } L_Umaxalign;
+#else /* _KERNEL */
+typedef union { void *s; 

CVS commit: [netbsd-7] src/sys/arch/arm/include

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 18:22:01 UTC 2015

Modified Files:
src/sys/arch/arm/include [netbsd-7]: lock.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #536):
sys/arch/arm/include/lock.h: revision 1.30
Don't use plain inline in that might end up compiled with -ansi.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.2.1 src/sys/arch/arm/include/lock.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/arm/include/lock.h
diff -u src/sys/arch/arm/include/lock.h:1.28 src/sys/arch/arm/include/lock.h:1.28.2.1
--- src/sys/arch/arm/include/lock.h:1.28	Sun Aug 10 06:23:13 2014
+++ src/sys/arch/arm/include/lock.h	Sat Feb 21 18:22:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock.h,v 1.28 2014/08/10 06:23:13 matt Exp $	*/
+/*	$NetBSD: lock.h,v 1.28.2.1 2015/02/21 18:22:01 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -139,7 +139,7 @@ __swp(int __val, __cpu_simple_lock_t *__
 }
 #endif /* !_ARM_ARCH_6 */
 
-static inline void
+static __inline void
 __arm_membar_producer(void)
 {
 #ifdef _ARM_ARCH_7
@@ -149,7 +149,7 @@ __arm_membar_producer(void)
 #endif
 }
 
-static inline void
+static __inline void
 __arm_membar_consumer(void)
 {
 #ifdef _ARM_ARCH_7



CVS commit: src

2015-02-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb 21 17:17:16 UTC 2015

Modified Files:
src/distrib/sets/lists/xcomp: mi
src/external/mit/xorg/lib/libxcb/libxcb: Makefile

Log Message:
install xcb/xkb.h


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/libxcb/libxcb/Makefile

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/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.157 src/distrib/sets/lists/xcomp/mi:1.158
--- src/distrib/sets/lists/xcomp/mi:1.157	Thu Feb 19 20:57:36 2015
+++ src/distrib/sets/lists/xcomp/mi	Sat Feb 21 17:17:16 2015
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.157 2015/02/19 20:57:36 snj Exp $
+#	 $NetBSD: mi,v 1.158 2015/02/21 17:17:16 jmcneill Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -5852,6 +5852,7 @@
 ./usr/X11R7/include/xcb/xfixes.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xinerama.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xinput.h			-unknown-	xorg
+./usr/X11R7/include/xcb/xkb.h-unknown-	xorg
 ./usr/X11R7/include/xcb/xproto.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xselinux.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xtest.h-unknown-	xorg

Index: src/external/mit/xorg/lib/libxcb/libxcb/Makefile
diff -u src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.6 src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.7
--- src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.6	Wed Oct  1 09:30:58 2014
+++ src/external/mit/xorg/lib/libxcb/libxcb/Makefile	Sat Feb 21 17:17:16 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2014/10/01 09:30:58 skrll Exp $
+#	$NetBSD: Makefile,v 1.7 2015/02/21 17:17:16 jmcneill Exp $
 
 .include bsd.own.mk
 
@@ -60,6 +60,7 @@ INCS=	\
 	xfixes.h \
 	xinerama.h \
 	xinput.h \
+	xkb.h \
 	xproto.h \
 	xselinux.h \
 	xtest.h \



CVS commit: [netbsd-7] src/sys/arch/powerpc/booke

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 18:18:33 UTC 2015

Modified Files:
src/sys/arch/powerpc/booke [netbsd-7]: e500_tlb.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #535):
sys/arch/powerpc/booke/e500_tlb.c: revision 1.17
fix compile failure without DIAGNOSTIC.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/powerpc/booke/e500_tlb.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/powerpc/booke/e500_tlb.c
diff -u src/sys/arch/powerpc/booke/e500_tlb.c:1.13 src/sys/arch/powerpc/booke/e500_tlb.c:1.13.4.1
--- src/sys/arch/powerpc/booke/e500_tlb.c:1.13	Mon Dec  9 09:35:16 2013
+++ src/sys/arch/powerpc/booke/e500_tlb.c	Sat Feb 21 18:18:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_tlb.c,v 1.13 2013/12/09 09:35:16 wiz Exp $	*/
+/*	$NetBSD: e500_tlb.c,v 1.13.4.1 2015/02/21 18:18:33 martin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: e500_tlb.c,v 1.13 2013/12/09 09:35:16 wiz Exp $);
+__KERNEL_RCSID(0, $NetBSD: e500_tlb.c,v 1.13.4.1 2015/02/21 18:18:33 martin Exp $);
 
 #include sys/param.h
 
@@ -766,7 +766,7 @@ e500_tlb_ioreserve(vaddr_t va, vsize_t l
 	KASSERT(((pte  PTE_RPN_MASK)  (len - 1)) == 0);
 
 	if ((xtlb = e500_tlb_lookup_xtlb2(va, len)) != NULL) {
-		psize_t mask = ~(xtlb-e_tlb.tlb_size - 1);
+		psize_t mask __diagused = ~(xtlb-e_tlb.tlb_size - 1);
 		KASSERT(len = xtlb-e_tlb.tlb_size);
 		KASSERT((pte  mask) == (xtlb-e_tlb.tlb_pte  mask));
 		xtlb-e_refcnt++;



CVS commit: [netbsd-7] src/sys/netinet

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 18:24:51 UTC 2015

Modified Files:
src/sys/netinet [netbsd-7]: icmp_var.h ip_icmp.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #537):
sys/netinet/icmp_var.h: revision 1.30
sys/netinet/ip_icmp.h: revision 1.34
PR/49676: Ryo Shimizu: ICMP_STATINC() buffer overflows
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.22.1 src/sys/netinet/icmp_var.h
cvs rdiff -u -r1.33 -r1.33.22.1 src/sys/netinet/ip_icmp.h

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

Modified files:

Index: src/sys/netinet/icmp_var.h
diff -u src/sys/netinet/icmp_var.h:1.29 src/sys/netinet/icmp_var.h:1.29.22.1
--- src/sys/netinet/icmp_var.h:1.29	Sat Dec 24 19:54:41 2011
+++ src/sys/netinet/icmp_var.h	Sat Feb 21 18:24:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp_var.h,v 1.29 2011/12/24 19:54:41 christos Exp $	*/
+/*	$NetBSD: icmp_var.h,v 1.29.22.1 2015/02/21 18:24:51 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -56,8 +56,8 @@
 #define	ICMP_STAT_BMCASTTSTAMP	10	/* b/mcast tstamp requests dropped */
 #define	ICMP_STAT_LAST		16	/* Allow for 5 spare ones */
 #define	ICMP_STAT_OUTHIST	ICMP_STAT_LAST
-#define	ICMP_STAT_INHIST	(ICMP_STAT_LAST + ICMP_MAXTYPE)
-#define	ICMP_NSTATS		(ICMP_STAT_LAST + 2 * ICMP_MAXTYPE)
+#define	ICMP_STAT_INHIST	(ICMP_STAT_LAST + ICMP_NTYPES)
+#define	ICMP_NSTATS		(ICMP_STAT_LAST + 2 * ICMP_NTYPES)
 
 /*
  * Names for ICMP sysctl objects

Index: src/sys/netinet/ip_icmp.h
diff -u src/sys/netinet/ip_icmp.h:1.33 src/sys/netinet/ip_icmp.h:1.33.22.1
--- src/sys/netinet/ip_icmp.h:1.33	Sat Dec 24 20:18:54 2011
+++ src/sys/netinet/ip_icmp.h	Sat Feb 21 18:24:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.h,v 1.33 2011/12/24 20:18:54 christos Exp $	*/
+/*	$NetBSD: ip_icmp.h,v 1.33.22.1 2015/02/21 18:24:51 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -189,6 +189,7 @@ struct icmp {
 #define		ICMP_PHOTURIS_NEED_AUTHZ	5	/* no authorization */
 
 #define ICMP_MAXTYPE		40
+#define ICMP_NTYPES		(ICMP_MAXTYPE + 1)
 
 #ifdef ICMP_STRINGS
 static const char *icmp_type[] = {



CVS commit: [netbsd-7] src/sys/arch/sparc64/dev

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 18:28:13 UTC 2015

Modified Files:
src/sys/arch/sparc64/dev [netbsd-7]: lom.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #539):
sys/arch/sparc64/dev/lom.c: revision 1.14
Fix queue handling to make the watchdog timer actually works on
netbsd-7 if it is configured by wdogctl=YES in rc.conf, and also
avoid a hangup duaring shutdown.
- don't put an entry which is already in the queue.
- read a first entry properly to handle the queue.
- check the lom status if input buffer is empty before writing.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/sparc64/dev/lom.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/sparc64/dev/lom.c
diff -u src/sys/arch/sparc64/dev/lom.c:1.13 src/sys/arch/sparc64/dev/lom.c:1.13.4.1
--- src/sys/arch/sparc64/dev/lom.c:1.13	Tue Feb 25 18:30:08 2014
+++ src/sys/arch/sparc64/dev/lom.c	Sat Feb 21 18:28:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lom.c,v 1.13 2014/02/25 18:30:08 pooka Exp $	*/
+/*	$NetBSD: lom.c,v 1.13.4.1 2015/02/21 18:28:13 martin Exp $	*/
 /*	$OpenBSD: lom.c,v 1.21 2010/02/28 20:44:39 kettenis Exp $	*/
 /*
  * Copyright (c) 2009 Mark Kettenis
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.13 2014/02/25 18:30:08 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.13.4.1 2015/02/21 18:28:13 martin Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -600,7 +600,15 @@ lom1_write_polled(struct lom_softc *sc, 
 static void
 lom1_queue_cmd(struct lom_softc *sc, struct lom_cmd *lc)
 {
+	struct lom_cmd *lcp;
+
 	mutex_enter(sc-sc_queue_mtx);
+	TAILQ_FOREACH(lcp, sc-sc_queue, lc_next) {
+		if (lcp == lc) {
+			mutex_exit(sc-sc_queue_mtx);
+			return;
+		}
+	}
 	TAILQ_INSERT_TAIL(sc-sc_queue, lc, lc_next);
 	if (sc-sc_state == LOM_STATE_IDLE) {
 		sc-sc_state = LOM_STATE_CMD;
@@ -818,13 +826,21 @@ lom2_write_polled(struct lom_softc *sc, 
 static void
 lom2_queue_cmd(struct lom_softc *sc, struct lom_cmd *lc)
 {
+	struct lom_cmd *lcp;
 	uint8_t str;
 
 	mutex_enter(sc-sc_queue_mtx);
+	TAILQ_FOREACH(lcp, sc-sc_queue, lc_next) {
+		if (lcp == lc) {
+			mutex_exit(sc-sc_queue_mtx);
+			return;
+		}
+	}
 	TAILQ_INSERT_TAIL(sc-sc_queue, lc, lc_next);
 	if (sc-sc_state == LOM_STATE_IDLE) {
 		str = bus_space_read_1(sc-sc_iot, sc-sc_ioh, LOM2_STATUS);
 		if ((str  LOM2_STATUS_IBF) == 0) {
+			lc = TAILQ_FIRST(sc-sc_queue);
 			bus_space_write_1(sc-sc_iot, sc-sc_ioh,
 			LOM2_CMD, lc-lc_cmd);
 			sc-sc_state = LOM_STATE_DATA;
@@ -852,9 +868,11 @@ lom2_intr(void *arg)
 	}
 
 	if (lc-lc_cmd  LOM_IDX_WRITE) {
-		bus_space_write_1(sc-sc_iot, sc-sc_ioh,
-		LOM2_DATA, lc-lc_data);
-		lc-lc_cmd = ~LOM_IDX_WRITE;
+		if ((str  LOM2_STATUS_IBF) == 0) {
+			bus_space_write_1(sc-sc_iot, sc-sc_ioh,
+			LOM2_DATA, lc-lc_data);
+			lc-lc_cmd = ~LOM_IDX_WRITE;
+		}
 		mutex_exit(sc-sc_queue_mtx);
 		return (1);
 	}
@@ -871,6 +889,7 @@ lom2_intr(void *arg)
 	if (!TAILQ_EMPTY(sc-sc_queue)) {
 		str = bus_space_read_1(sc-sc_iot, sc-sc_ioh, LOM2_STATUS);
 		if ((str  LOM2_STATUS_IBF) == 0) {
+			lc = TAILQ_FIRST(sc-sc_queue);
 			bus_space_write_1(sc-sc_iot, sc-sc_ioh,
 			LOM2_CMD, lc-lc_cmd);
 			sc-sc_state = LOM_STATE_DATA;



CVS import: src/external/ibm-public/postfix/dist

2015-02-21 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Feb 21 11:57:03 UTC 2015

Update of /cvsroot/src/external/ibm-public/postfix/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv18093

Log Message:
Import Postfix 2.11.4. Changes since version 2.11.3:
- Fix a core dump when smtp_policy_maps specifies an invalid TLS level.
- Fix a missing  in \%s\, in postconf(1) fatal error messages, which
  violated the C language spec. Reported by Iain Hibbert.
- Stop excessive recursion in the cleanup server while recovering from a
  virtual alias expansion loop. Problem found at Two Sigma.
- Stop exponential memory allocation with virtual alias expansion loops.
  This came to light after fixing the previous problem.

Status:

Vendor Tag: VENEMA
Release Tags:   PFIX-2-11-4

U src/external/ibm-public/postfix/dist/Makefile
U src/external/ibm-public/postfix/dist/AAAREADME
U src/external/ibm-public/postfix/dist/COMPATIBILITY
U src/external/ibm-public/postfix/dist/COPYRIGHT
U src/external/ibm-public/postfix/dist/HISTORY
U src/external/ibm-public/postfix/dist/IPv6-ChangeLog
U src/external/ibm-public/postfix/dist/LICENSE
U src/external/ibm-public/postfix/dist/makedefs
U src/external/ibm-public/postfix/dist/Makefile.in
U src/external/ibm-public/postfix/dist/Makefile.init
U src/external/ibm-public/postfix/dist/PORTING
U src/external/ibm-public/postfix/dist/RELEASE_NOTES
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-1.0
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-1.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.0
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.1
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.10
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.2
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.3
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.4
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.5
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.6
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.7
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.8
U src/external/ibm-public/postfix/dist/RELEASE_NOTES-2.9
U src/external/ibm-public/postfix/dist/TLS_ACKNOWLEDGEMENTS
U src/external/ibm-public/postfix/dist/TLS_CHANGES
U src/external/ibm-public/postfix/dist/TLS_LICENSE
U src/external/ibm-public/postfix/dist/TLS_TODO
U src/external/ibm-public/postfix/dist/US_PATENT_6321267
U src/external/ibm-public/postfix/dist/pflogsumm_quickfix.txt
U src/external/ibm-public/postfix/dist/postfix-install
U src/external/ibm-public/postfix/dist/INSTALL
U src/external/ibm-public/postfix/dist/README_FILES/BACKSCATTER_README
U src/external/ibm-public/postfix/dist/README_FILES/LMDB_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_REWRITING_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_CLASS_README
U src/external/ibm-public/postfix/dist/README_FILES/FILTER_README
U src/external/ibm-public/postfix/dist/README_FILES/DSN_README
U src/external/ibm-public/postfix/dist/README_FILES/ADDRESS_VERIFICATION_README
U src/external/ibm-public/postfix/dist/README_FILES/BASIC_CONFIGURATION_README
U src/external/ibm-public/postfix/dist/README_FILES/BUILTIN_FILTER_README
U src/external/ibm-public/postfix/dist/README_FILES/CDB_README
U src/external/ibm-public/postfix/dist/README_FILES/CONNECTION_CACHE_README
U src/external/ibm-public/postfix/dist/README_FILES/CONTENT_INSPECTION_README
U src/external/ibm-public/postfix/dist/README_FILES/CYRUS_README
U src/external/ibm-public/postfix/dist/README_FILES/DATABASE_README
U src/external/ibm-public/postfix/dist/README_FILES/DB_README
U src/external/ibm-public/postfix/dist/README_FILES/DEBUG_README
U src/external/ibm-public/postfix/dist/README_FILES/INSTALL
U src/external/ibm-public/postfix/dist/README_FILES/ETRN_README
U src/external/ibm-public/postfix/dist/README_FILES/SCHEDULER_README
U src/external/ibm-public/postfix/dist/README_FILES/FORWARD_SECRECY_README
U src/external/ibm-public/postfix/dist/README_FILES/IPV6_README
U src/external/ibm-public/postfix/dist/README_FILES/LDAP_README
U src/external/ibm-public/postfix/dist/README_FILES/LINUX_README
U src/external/ibm-public/postfix/dist/README_FILES/AAAREADME
U src/external/ibm-public/postfix/dist/README_FILES/LOCAL_RECIPIENT_README
U src/external/ibm-public/postfix/dist/README_FILES/MAILDROP_README
U src/external/ibm-public/postfix/dist/README_FILES/MEMCACHE_README
U src/external/ibm-public/postfix/dist/README_FILES/MILTER_README
U src/external/ibm-public/postfix/dist/README_FILES/MULTI_INSTANCE_README
U src/external/ibm-public/postfix/dist/README_FILES/MYSQL_README
U src/external/ibm-public/postfix/dist/README_FILES/NFS_README
U src/external/ibm-public/postfix/dist/README_FILES/OVERVIEW
U src/external/ibm-public/postfix/dist/README_FILES/PACKAGE_README
U src/external/ibm-public/postfix/dist/README_FILES/PCRE_README
U src/external/ibm-public/postfix/dist/README_FILES/PGSQL_README
U 

CVS commit: src/doc

2015-02-21 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Feb 21 12:05:47 UTC 2015

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Postfix 2.11.4 was imported.


To generate a diff of this commit:
cvs rdiff -u -r1.1205 -r1.1206 src/doc/3RDPARTY
cvs rdiff -u -r1.2045 -r1.2046 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.1205 src/doc/3RDPARTY:1.1206
--- src/doc/3RDPARTY:1.1205	Sat Feb 21 08:57:48 2015
+++ src/doc/3RDPARTY	Sat Feb 21 12:05:47 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1205 2015/02/21 08:57:48 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.1206 2015/02/21 12:05:47 tron Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1140,7 +1140,7 @@ and more. Vern's ping is gone. We are to
 now to do a new import.
 
 Package:	Postfix
-Version:	2.11.3
+Version:	2.11.4
 Current Vers:	3.0
 Maintainer:	Wietse Venema wie...@porcupine.org
 Archive Site:	ftp://postfix.cloud9.net/official/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2045 src/doc/CHANGES:1.2046
--- src/doc/CHANGES:1.2045	Sat Jan 31 19:14:45 2015
+++ src/doc/CHANGES	Sat Feb 21 12:05:47 2015
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2045 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2046 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -131,3 +131,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	dhcpcd(8): Import dhcpcd-6.7.1. [roy 20150130]
 	zoneinfo: Import tzdata2015a. [apb 20150131]
 	libc: Import tzdata2015a. [christos 20150131]
+	postfix(1): Import version 2.11.4. [tron 20150221]



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

2015-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 21 12:50:23 UTC 2015

Added Files:
src/sys/arch/arm/include: Makefile.inc

Log Message:
Don't build modules with float instructions.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/include/Makefile.inc

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

Added files:

Index: src/sys/arch/arm/include/Makefile.inc
diff -u /dev/null src/sys/arch/arm/include/Makefile.inc:1.1
--- /dev/null	Sat Feb 21 12:50:23 2015
+++ src/sys/arch/arm/include/Makefile.inc	Sat Feb 21 12:50:23 2015
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2015/02/21 12:50:23 joerg Exp $
+
+CFLAGS+=	 -mfloat-abi=soft



CVS commit: [netbsd-6-0] src/sys/netinet

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:06:35 UTC 2015

Modified Files:
src/sys/netinet [netbsd-6-0]: icmp_var.h ip_icmp.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #1258):
sys/netinet/icmp_var.h: revision 1.30
sys/netinet/ip_icmp.h: revision 1.34
PR/49676: Ryo Shimizu: ICMP_STATINC() buffer overflows


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/netinet/icmp_var.h
cvs rdiff -u -r1.33 -r1.33.8.1 src/sys/netinet/ip_icmp.h

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

Modified files:

Index: src/sys/netinet/icmp_var.h
diff -u src/sys/netinet/icmp_var.h:1.29 src/sys/netinet/icmp_var.h:1.29.8.1
--- src/sys/netinet/icmp_var.h:1.29	Sat Dec 24 19:54:41 2011
+++ src/sys/netinet/icmp_var.h	Sat Feb 21 13:06:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp_var.h,v 1.29 2011/12/24 19:54:41 christos Exp $	*/
+/*	$NetBSD: icmp_var.h,v 1.29.8.1 2015/02/21 13:06:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -56,8 +56,8 @@
 #define	ICMP_STAT_BMCASTTSTAMP	10	/* b/mcast tstamp requests dropped */
 #define	ICMP_STAT_LAST		16	/* Allow for 5 spare ones */
 #define	ICMP_STAT_OUTHIST	ICMP_STAT_LAST
-#define	ICMP_STAT_INHIST	(ICMP_STAT_LAST + ICMP_MAXTYPE)
-#define	ICMP_NSTATS		(ICMP_STAT_LAST + 2 * ICMP_MAXTYPE)
+#define	ICMP_STAT_INHIST	(ICMP_STAT_LAST + ICMP_NTYPES)
+#define	ICMP_NSTATS		(ICMP_STAT_LAST + 2 * ICMP_NTYPES)
 
 /*
  * Names for ICMP sysctl objects

Index: src/sys/netinet/ip_icmp.h
diff -u src/sys/netinet/ip_icmp.h:1.33 src/sys/netinet/ip_icmp.h:1.33.8.1
--- src/sys/netinet/ip_icmp.h:1.33	Sat Dec 24 20:18:54 2011
+++ src/sys/netinet/ip_icmp.h	Sat Feb 21 13:06:35 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.h,v 1.33 2011/12/24 20:18:54 christos Exp $	*/
+/*	$NetBSD: ip_icmp.h,v 1.33.8.1 2015/02/21 13:06:35 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -189,6 +189,7 @@ struct icmp {
 #define		ICMP_PHOTURIS_NEED_AUTHZ	5	/* no authorization */
 
 #define ICMP_MAXTYPE		40
+#define ICMP_NTYPES		(ICMP_MAXTYPE + 1)
 
 #ifdef ICMP_STRINGS
 static const char *icmp_type[] = {



CVS commit: [netbsd-6-1] src/doc

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:15:12 UTC 2015

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
Tickets #1257 and #1258


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-6.1.6

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-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.28 src/doc/CHANGES-6.1.6:1.1.2.29
--- src/doc/CHANGES-6.1.6:1.1.2.28	Wed Feb 11 14:57:55 2015
+++ src/doc/CHANGES-6.1.6	Sat Feb 21 13:15:12 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.28 2015/02/11 14:57:55 martin Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.29 2015/02/21 13:15:12 martin Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -4050,4 +4050,15 @@ xfree/xc/programs/Xserver/xkb/xkb.c		1.2
 	Information leak in the XkbSetGeometry request of X servers.
 	[mrg, ticket #1253]
 
+lib/libc/regex/regcomp.c			(patch)
+
+	Fix a multiplication overflow in allocation, which has been fixed
+	differently in rev. 1.34 in -current.
+	[joerg, ticket #1257]
+
+sys/netinet/icmp_var.h1.30
+sys/netinet/ip_icmp.h1.34
+
+	Fix ICMP_STATINC() buffer overflows.
+	[christos, ticket #1258]
 



CVS commit: [netbsd-7] src/usr.bin/progress

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:47:00 UTC 2015

Modified Files:
src/usr.bin/progress [netbsd-7]: progress.c

Log Message:
Pull up following revision(s) (requested by gson in ticket #532):
usr.bin/progress/progress.c: revision 1.21
Retry read() on EINTR.  Fixes premature exit of
/dev/random progress -e cat /dev/null


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.10.1 src/usr.bin/progress/progress.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/progress/progress.c
diff -u src/usr.bin/progress/progress.c:1.20 src/usr.bin/progress/progress.c:1.20.10.1
--- src/usr.bin/progress/progress.c:1.20	Wed Jun 27 22:07:36 2012
+++ src/usr.bin/progress/progress.c	Sat Feb 21 13:47:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: progress.c,v 1.20 2012/06/27 22:07:36 riastradh Exp $ */
+/*	$NetBSD: progress.c,v 1.20.10.1 2015/02/21 13:47:00 martin Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: progress.c,v 1.20 2012/06/27 22:07:36 riastradh Exp $);
+__RCSID($NetBSD: progress.c,v 1.20.10.1 2015/02/21 13:47:00 martin Exp $);
 #endif/* not lint */
 
 #include sys/types.h
@@ -228,7 +228,12 @@ main(int argc, char *argv[])
 	signal(SIGPIPE, broken_pipe);
 	progressmeter(-1);
 
-	while ((nr = read(fd, fb_buf, buffersize))  0)
+	while (1) {
+		do {
+			nr = read(fd, fb_buf, buffersize);
+		} while (nr  0  errno == EINTR);
+		if (nr = 0)
+			break;
 		for (off = 0; nr; nr -= nw, off += nw, bytes += nw)
 			if ((nw = write(outpipe[1], fb_buf + off,
 			(size_t) nr))  0) {
@@ -236,6 +241,7 @@ main(int argc, char *argv[])
 err(1, writing %u bytes to output pipe,
 			(unsigned) nr);
 			}
+	}
 	close(outpipe[1]);
 
 	gzipstat = 0;



CVS commit: src/sys/dev/iscsi

2015-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 21 12:32:23 UTC 2015

Modified Files:
src/sys/dev/iscsi: iscsi_main.c

Log Message:
Simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/iscsi/iscsi_main.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/iscsi/iscsi_main.c
diff -u src/sys/dev/iscsi/iscsi_main.c:1.10 src/sys/dev/iscsi/iscsi_main.c:1.11
--- src/sys/dev/iscsi/iscsi_main.c:1.10	Mon Nov 24 21:49:17 2014
+++ src/sys/dev/iscsi/iscsi_main.c	Sat Feb 21 12:32:23 2015
@@ -501,13 +501,13 @@ iscsi_done(ccb_t *ccb)
 	}
 }
 
+#ifdef _MODULE
 /* Kernel Module support */
 
 #include sys/module.h
 
 MODULE(MODULE_CLASS_DRIVER, iscsi, NULL);
 
-#ifdef _MODULE
 static const struct cfiattrdata ibescsi_info = { scsi, 1,
 	{{channel, -1, -1},}
 };
@@ -528,19 +528,15 @@ static struct cfdata iscsi_cfdata[] = {
 	},
 	{ NULL, NULL, 0, 0, NULL, 0, NULL }
 };
-#endif
 
 static int
 iscsi_modcmd(modcmd_t cmd, void *arg)
 {
-#ifdef _MODULE
 	devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
 	int error;
-#endif
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
-#ifdef _MODULE
 		error = config_cfdriver_attach(iscsi_cd);
 		if (error) {
 			return error;
@@ -581,12 +577,10 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 			config_cfdriver_detach(iscsi_cd);
 			return ENXIO;
 		}
-#endif
 		return 0;
 		break;
 
 	case MODULE_CMD_FINI:
-#ifdef _MODULE
 		error = config_cfdata_detach(iscsi_cfdata);
 		if (error)
 			return error;
@@ -594,7 +588,6 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 		config_cfattach_detach(iscsi_cd.cd_name, iscsi_ca);
 		config_cfdriver_detach(iscsi_cd);
 		devsw_detach(NULL, iscsi_cdevsw);
-#endif
 		return 0;
 		break;
 
@@ -607,3 +600,4 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
 		break;
 	}
 }
+#endif /* _MODULE */



CVS commit: [netbsd-6-0] src/lib/libc/regex

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 12:58:01 UTC 2015

Modified Files:
src/lib/libc/regex [netbsd-6-0]: regcomp.c

Log Message:
Apply patch, requested by joerg in ticket #1257:

lib/libc/regex/regcomp.c (patch)

Fix a multiplication overflow in allocation, which has been fixed
differently in rev. 1.34 in -current.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.6.1 src/lib/libc/regex/regcomp.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/regex/regcomp.c
diff -u src/lib/libc/regex/regcomp.c:1.32 src/lib/libc/regex/regcomp.c:1.32.6.1
--- src/lib/libc/regex/regcomp.c:1.32	Tue Nov  8 19:25:45 2011
+++ src/lib/libc/regex/regcomp.c	Sat Feb 21 12:58:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: regcomp.c,v 1.32 2011/11/08 19:25:45 christos Exp $	*/
+/*	$NetBSD: regcomp.c,v 1.32.6.1 2015/02/21 12:58:01 martin Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -76,7 +76,7 @@
 #if 0
 static char sccsid[] = @(#)regcomp.c	8.5 (Berkeley) 3/20/94;
 #else
-__RCSID($NetBSD: regcomp.c,v 1.32 2011/11/08 19:25:45 christos Exp $);
+__RCSID($NetBSD: regcomp.c,v 1.32.6.1 2015/02/21 12:58:01 martin Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -261,12 +261,15 @@ regcomp(
 	} else
 		len = strlen(pattern);
 
+	p-ssize = len/(size_t)2*(size_t)3 + (size_t)1;	/* ugh */
+	if (p-ssize  SIZE_MAX / sizeof(sop))
+		return(REG_ESPACE);
+
 	/* do the mallocs early so failure handling is easy */
 	g = (struct re_guts *)malloc(sizeof(struct re_guts) +
 			(NC-1)*sizeof(cat_t));
 	if (g == NULL)
 		return(REG_ESPACE);
-	p-ssize = len/(size_t)2*(size_t)3 + (size_t)1;	/* ugh */
 	p-strip = malloc(p-ssize * sizeof(sop));
 	p-slen = 0;
 	if (p-strip == NULL) {
@@ -1243,7 +1246,7 @@ allocset(
 		nc = p-ncsalloc;
 		assert(nc % CHAR_BIT == 0);
 		nbytes = nc / CHAR_BIT * css;
-		if (MEMSIZE(p)  MEMLIMIT)
+		if (MEMSIZE(p)  MEMLIMIT || nc  SIZE_MAX / sizeof(cset))
 			goto oomem;
 		if (p-g-sets == NULL)
 			p-g-sets = malloc(nc * sizeof(cset));
@@ -1773,7 +1776,7 @@ enlarge(
 
 	osize = p-ssize;
 	p-ssize = size;
-	if (MEMSIZE(p)  MEMLIMIT)
+	if (MEMSIZE(p)  MEMLIMIT || p-ssize  SIZE_MAX / sizeof(sop))
 		goto oomem;
 	sp = realloc(p-strip, p-ssize * sizeof(sop));
 	if (sp == NULL) {
@@ -1800,6 +1803,11 @@ stripsnug(
 	_DIAGASSERT(g != NULL);
 
 	g-nstates = p-slen;
+	if (p-slen  SIZE_MAX / sizeof(sop)) {
+		SETERROR(REG_ESPACE);
+		g-strip = p-strip;
+		return;
+	}
 	g-strip = realloc(p-strip, p-slen * sizeof(sop));
 	if (g-strip == NULL) {
 		SETERROR(REG_ESPACE);



CVS commit: [netbsd-7] src

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:40:19 UTC 2015

Modified Files:
src/share/man/man4 [netbsd-7]: tcp.4
src/sys/netinet [netbsd-7]: tcp.h tcp_input.c tcp_output.c tcp_subr.c
tcp_usrreq.c tcp_var.h
src/sys/sys [netbsd-7]: param.h

Log Message:
Pull up following revision(s) (requested by he in ticket #530):
sys/netinet/tcp_output.c: revision 1.180
sys/netinet/tcp_input.c: revision 1.336
sys/netinet/tcp_usrreq.c: revision 1.203
share/man/man4/tcp.4: revision 1.30
sys/netinet/tcp.h: revision 1.31
sys/netinet/tcp_subr.c: revision 1.258
sys/netinet/tcp_var.h: revision 1.176
sys/netinet/tcp_var.h: revision 1.177
sys/sys/param.h: bump revision

Port over the TCP_INFO socket option from FreeBSD, originally from
the Linux 2.6 TCP API.  This permits the caller to query certain information
about a TCP connection, and is used by pkgsrc's net/iperf3 test program
if available.

This extends struct tcbcb with three fields to count retransmits,
out-of-sequence receives and zero window announcements, and will
therefore warrant a kernel revision bump (done separately).

Change the new counter variables in struct tcpcb to uint32_t, as
per christos' comments.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.4.1 src/share/man/man4/tcp.4
cvs rdiff -u -r1.30 -r1.30.22.1 src/sys/netinet/tcp.h
cvs rdiff -u -r1.334 -r1.334.2.1 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.176.2.3 -r1.176.2.4 src/sys/netinet/tcp_output.c
cvs rdiff -u -r1.255.4.1 -r1.255.4.2 src/sys/netinet/tcp_subr.c
cvs rdiff -u -r1.200.2.1 -r1.200.2.2 src/sys/netinet/tcp_usrreq.c
cvs rdiff -u -r1.175 -r1.175.2.1 src/sys/netinet/tcp_var.h
cvs rdiff -u -r1.459.2.1 -r1.459.2.2 src/sys/sys/param.h

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/tcp.4
diff -u src/share/man/man4/tcp.4:1.29 src/share/man/man4/tcp.4:1.29.4.1
--- src/share/man/man4/tcp.4:1.29	Thu Oct 10 12:28:10 2013
+++ src/share/man/man4/tcp.4	Sat Feb 21 13:40:19 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: tcp.4,v 1.29 2013/10/10 12:28:10 christos Exp $
+.\	$NetBSD: tcp.4,v 1.29.4.1 2015/02/21 13:40:19 martin Exp $
 .\	$FreeBSD: tcp.4,v 1.11.2.16 2004/02/16 22:21:47 bms Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
@@ -243,6 +243,23 @@ option value is inherited from the liste
 This option takes an
 .Vt unsigned int
 value, with a value greater than 0.
+.It Dv TCP_INFO
+Information about a socket's underlying TCP session may be retreived
+by passing the read-only option
+.Dv TPC_INFO
+to 
+.Xr getsockopt 2 .
+It accepts a single argument: a pointer to an instance of
+.Vt struct tcp_info .
+.Pp
+This API is subject to change; consult the source to determine
+which fields are currently filled out by this option.
+.Nx
+specific additions include
+send window size,
+receive window size,
+and
+bandwidth-controlled window space.
 .\ range of 0 to N (where N is the
 .\ .Xr sysctl 8
 .\ variable

Index: src/sys/netinet/tcp.h
diff -u src/sys/netinet/tcp.h:1.30 src/sys/netinet/tcp.h:1.30.22.1
--- src/sys/netinet/tcp.h:1.30	Sat Jan  7 20:20:22 2012
+++ src/sys/netinet/tcp.h	Sat Feb 21 13:40:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp.h,v 1.30 2012/01/07 20:20:22 christos Exp $	*/
+/*	$NetBSD: tcp.h,v 1.30.22.1 2015/02/21 13:40:19 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -127,7 +127,80 @@ struct tcphdr {
 #ifdef notyet
 #define	TCP_NOOPT	8	/* reserved for FreeBSD compat */
 #endif
+#define	TCP_INFO	9	/* retrieve tcp_info structure */
 #define	TCP_MD5SIG	0x10	/* use MD5 digests (RFC2385) */
 #define	TCP_CONGCTL	0x20	/* selected congestion control */
 
+#define	TCPI_OPT_TIMESTAMPS	0x01
+#define	TCPI_OPT_SACK		0x02
+#define	TCPI_OPT_WSCALE		0x04
+#define	TCPI_OPT_ECN		0x08
+#define	TCPI_OPT_TOE		0x10
+
+/*
+ * The TCP_INFO socket option comes from the Linux 2.6 TCP API, and permits
+ * the caller to query certain information about the state of a TCP
+ * connection.  We provide an overlapping set of fields with the Linux
+ * implementation, but since this is a fixed size structure, room has been
+ * left for growth.  In order to maximize potential future compatibility with
+ * the Linux API, the same variable names and order have been adopted, and
+ * padding left to make room for omitted fields in case they are added later.
+ *
+ * XXX: This is currently an unstable ABI/API, in that it is expected to
+ * change.
+ */
+struct tcp_info {
+	uint8_t		tcpi_state; /* TCP FSM state. */
+	uint8_t		__tcpi_ca_state;
+	uint8_t		__tcpi_retransmits;
+	uint8_t		__tcpi_probes;
+	uint8_t		__tcpi_backoff;
+	uint8_t		tcpi_options;	   /* Options enabled on conn. */
+	uint8_t		tcpi_snd_wscale:4,	/* RFC1323 send shift value. */
+			tcpi_rcv_wscale:4; /* RFC1323 recv shift value. */
+
+	uint32_t	tcpi_rto;		/* Retransmission timeout (usec). */
+	uint32_t	__tcpi_ato;
+	

CVS commit: [netbsd-6-1] src/lib/libc/regex

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 12:56:30 UTC 2015

Modified Files:
src/lib/libc/regex [netbsd-6-1]: regcomp.c

Log Message:
Apply patch, requested by joerg in ticket #1257:

lib/libc/regex/regcomp.c (patch)

Fix a multiplication overflow in allocation, which has been fixed
differently in rev. 1.34 in -current.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.8.1 src/lib/libc/regex/regcomp.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/regex/regcomp.c
diff -u src/lib/libc/regex/regcomp.c:1.32 src/lib/libc/regex/regcomp.c:1.32.8.1
--- src/lib/libc/regex/regcomp.c:1.32	Tue Nov  8 19:25:45 2011
+++ src/lib/libc/regex/regcomp.c	Sat Feb 21 12:56:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: regcomp.c,v 1.32 2011/11/08 19:25:45 christos Exp $	*/
+/*	$NetBSD: regcomp.c,v 1.32.8.1 2015/02/21 12:56:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -76,7 +76,7 @@
 #if 0
 static char sccsid[] = @(#)regcomp.c	8.5 (Berkeley) 3/20/94;
 #else
-__RCSID($NetBSD: regcomp.c,v 1.32 2011/11/08 19:25:45 christos Exp $);
+__RCSID($NetBSD: regcomp.c,v 1.32.8.1 2015/02/21 12:56:30 martin Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -261,12 +261,15 @@ regcomp(
 	} else
 		len = strlen(pattern);
 
+	p-ssize = len/(size_t)2*(size_t)3 + (size_t)1;	/* ugh */
+	if (p-ssize  SIZE_MAX / sizeof(sop))
+		return(REG_ESPACE);
+
 	/* do the mallocs early so failure handling is easy */
 	g = (struct re_guts *)malloc(sizeof(struct re_guts) +
 			(NC-1)*sizeof(cat_t));
 	if (g == NULL)
 		return(REG_ESPACE);
-	p-ssize = len/(size_t)2*(size_t)3 + (size_t)1;	/* ugh */
 	p-strip = malloc(p-ssize * sizeof(sop));
 	p-slen = 0;
 	if (p-strip == NULL) {
@@ -1243,7 +1246,7 @@ allocset(
 		nc = p-ncsalloc;
 		assert(nc % CHAR_BIT == 0);
 		nbytes = nc / CHAR_BIT * css;
-		if (MEMSIZE(p)  MEMLIMIT)
+		if (MEMSIZE(p)  MEMLIMIT || nc  SIZE_MAX / sizeof(cset))
 			goto oomem;
 		if (p-g-sets == NULL)
 			p-g-sets = malloc(nc * sizeof(cset));
@@ -1773,7 +1776,7 @@ enlarge(
 
 	osize = p-ssize;
 	p-ssize = size;
-	if (MEMSIZE(p)  MEMLIMIT)
+	if (MEMSIZE(p)  MEMLIMIT || p-ssize  SIZE_MAX / sizeof(sop))
 		goto oomem;
 	sp = realloc(p-strip, p-ssize * sizeof(sop));
 	if (sp == NULL) {
@@ -1800,6 +1803,11 @@ stripsnug(
 	_DIAGASSERT(g != NULL);
 
 	g-nstates = p-slen;
+	if (p-slen  SIZE_MAX / sizeof(sop)) {
+		SETERROR(REG_ESPACE);
+		g-strip = p-strip;
+		return;
+	}
 	g-strip = realloc(p-strip, p-slen * sizeof(sop));
 	if (g-strip == NULL) {
 		SETERROR(REG_ESPACE);



CVS commit: [netbsd-6-1] src/sys/netinet

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:05:38 UTC 2015

Modified Files:
src/sys/netinet [netbsd-6-1]: icmp_var.h ip_icmp.h

Log Message:
Pull up following revision(s) (requested by christos in ticket #1258):
sys/netinet/icmp_var.h: revision 1.30
sys/netinet/ip_icmp.h: revision 1.34
PR/49676: Ryo Shimizu: ICMP_STATINC() buffer overflows


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.16.1 src/sys/netinet/icmp_var.h
cvs rdiff -u -r1.33 -r1.33.16.1 src/sys/netinet/ip_icmp.h

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

Modified files:

Index: src/sys/netinet/icmp_var.h
diff -u src/sys/netinet/icmp_var.h:1.29 src/sys/netinet/icmp_var.h:1.29.16.1
--- src/sys/netinet/icmp_var.h:1.29	Sat Dec 24 19:54:41 2011
+++ src/sys/netinet/icmp_var.h	Sat Feb 21 13:05:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp_var.h,v 1.29 2011/12/24 19:54:41 christos Exp $	*/
+/*	$NetBSD: icmp_var.h,v 1.29.16.1 2015/02/21 13:05:38 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -56,8 +56,8 @@
 #define	ICMP_STAT_BMCASTTSTAMP	10	/* b/mcast tstamp requests dropped */
 #define	ICMP_STAT_LAST		16	/* Allow for 5 spare ones */
 #define	ICMP_STAT_OUTHIST	ICMP_STAT_LAST
-#define	ICMP_STAT_INHIST	(ICMP_STAT_LAST + ICMP_MAXTYPE)
-#define	ICMP_NSTATS		(ICMP_STAT_LAST + 2 * ICMP_MAXTYPE)
+#define	ICMP_STAT_INHIST	(ICMP_STAT_LAST + ICMP_NTYPES)
+#define	ICMP_NSTATS		(ICMP_STAT_LAST + 2 * ICMP_NTYPES)
 
 /*
  * Names for ICMP sysctl objects

Index: src/sys/netinet/ip_icmp.h
diff -u src/sys/netinet/ip_icmp.h:1.33 src/sys/netinet/ip_icmp.h:1.33.16.1
--- src/sys/netinet/ip_icmp.h:1.33	Sat Dec 24 20:18:54 2011
+++ src/sys/netinet/ip_icmp.h	Sat Feb 21 13:05:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.h,v 1.33 2011/12/24 20:18:54 christos Exp $	*/
+/*	$NetBSD: ip_icmp.h,v 1.33.16.1 2015/02/21 13:05:38 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -189,6 +189,7 @@ struct icmp {
 #define		ICMP_PHOTURIS_NEED_AUTHZ	5	/* no authorization */
 
 #define ICMP_MAXTYPE		40
+#define ICMP_NTYPES		(ICMP_MAXTYPE + 1)
 
 #ifdef ICMP_STRINGS
 static const char *icmp_type[] = {



CVS commit: [netbsd-6] src/doc

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:12:02 UTC 2015

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
Tickets #1257 and #1258


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.196 -r1.1.2.197 src/doc/CHANGES-6.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-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.196 src/doc/CHANGES-6.2:1.1.2.197
--- src/doc/CHANGES-6.2:1.1.2.196	Mon Feb 16 08:33:39 2015
+++ src/doc/CHANGES-6.2	Sat Feb 21 13:12:01 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.196 2015/02/16 08:33:39 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.197 2015/02/21 13:12:01 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -9610,3 +9610,15 @@ sys/dev/pci/if_bge.c1.278
 	PCIe devices.
 	[msaitoh, ticket #1256]
 
+lib/libc/regex/regcomp.c			(patch)
+
+	Fix a multiplication overflow in allocation, which has been fixed
+	differently in rev. 1.34 in -current.
+	[joerg, ticket #1257]
+
+sys/netinet/icmp_var.h1.30
+sys/netinet/ip_icmp.h1.34
+
+	Fix ICMP_STATINC() buffer overflows.
+	[christos, ticket #1258]
+



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

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:16:05 UTC 2015

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
Tickets #1257 and #1258


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-6.0.7

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-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.28 src/doc/CHANGES-6.0.7:1.1.2.29
--- src/doc/CHANGES-6.0.7:1.1.2.28	Wed Feb 11 14:58:56 2015
+++ src/doc/CHANGES-6.0.7	Sat Feb 21 13:16:05 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.28 2015/02/11 14:58:56 martin Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.29 2015/02/21 13:16:05 martin Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -4316,4 +4316,15 @@ xfree/xc/programs/Xserver/xkb/xkb.c		1.2
 	Information leak in the XkbSetGeometry request of X servers.
 	[mrg, ticket #1253]
 
+lib/libc/regex/regcomp.c			(patch)
+
+	Fix a multiplication overflow in allocation, which has been fixed
+	differently in rev. 1.34 in -current.
+	[joerg, ticket #1257]
+
+sys/netinet/icmp_var.h1.30
+sys/netinet/ip_icmp.h1.34
+
+	Fix ICMP_STATINC() buffer overflows.
+	[christos, ticket #1258]
 



CVS commit: [netbsd-7] src/external/gpl3/binutils/dist/ld/emultempl

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 13:55:08 UTC 2015

Modified Files:
src/external/gpl3/binutils/dist/ld/emultempl [netbsd-7]: aarch64elf.em
armelf.em

Log Message:
Pull up following revision(s) (requested by joerg in ticket #533):
external/gpl3/binutils/dist/ld/emultempl/armelf.em: revision 1.2
external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em: revision 1.2
Apply elf32.em r1.8 to the corresponding sections of armelf.em and
aarch64elf.em. Original commit message:
Recursively add DT_NEEDED entries from shared libraries if symbols are
used indirectly. This is more in line with the old GNU ld behavior, but
not exactly the desired semantic.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.6.1 \
src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.4.1 \
src/external/gpl3/binutils/dist/ld/emultempl/armelf.em

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/binutils/dist/ld/emultempl/aarch64elf.em
diff -u src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em:1.1.1.1 src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em:1.1.1.1.6.1
--- src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em:1.1.1.1	Sun Sep 29 13:45:51 2013
+++ src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em	Sat Feb 21 13:55:08 2015
@@ -38,6 +38,7 @@ gld${EMULATION_NAME}_before_parse (void)
   ldfile_set_output_arch (`echo ${ARCH}`, bfd_arch_unknown);
 #endif /* not TARGET_ */
   input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
+  input_flags.add_DT_NEEDED_for_dynamic = TRUE;
   config.has_shared = `if test -n $GENERATE_SHLIB_SCRIPT ; then echo TRUE ; else echo FALSE ; fi`;
   config.separate_code = `if test x${SEPARATE_CODE} = xyes ; then echo TRUE ; else echo FALSE ; fi`;
 }

Index: src/external/gpl3/binutils/dist/ld/emultempl/armelf.em
diff -u src/external/gpl3/binutils/dist/ld/emultempl/armelf.em:1.1.1.3 src/external/gpl3/binutils/dist/ld/emultempl/armelf.em:1.1.1.3.4.1
--- src/external/gpl3/binutils/dist/ld/emultempl/armelf.em:1.1.1.3	Sun Sep 29 13:45:51 2013
+++ src/external/gpl3/binutils/dist/ld/emultempl/armelf.em	Sat Feb 21 13:55:08 2015
@@ -51,6 +51,7 @@ gld${EMULATION_NAME}_before_parse (void)
   ldfile_set_output_arch (`echo ${ARCH}`, bfd_arch_unknown);
 #endif /* not TARGET_ */
   input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
+  input_flags.add_DT_NEEDED_for_dynamic = TRUE;
   config.has_shared = `if test -n $GENERATE_SHLIB_SCRIPT ; then echo TRUE ; else echo FALSE ; fi`;
   config.separate_code = `if test x${SEPARATE_CODE} = xyes ; then echo TRUE ; else echo FALSE ; fi`;
 }



CVS commit: [netbsd-7] src

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 19:30:41 UTC 2015

Modified Files:
src/distrib/sets/lists/xcomp [netbsd-7]: mi
src/external/mit/xorg/lib/libxcb/libxcb [netbsd-7]: Makefile

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #541):
distrib/sets/lists/xcomp/mi: revision 1.158
external/mit/xorg/lib/libxcb/libxcb/Makefile: revision 1.7
install xcb/xkb.h


To generate a diff of this commit:
cvs rdiff -u -r1.152.2.3 -r1.152.2.4 src/distrib/sets/lists/xcomp/mi
cvs rdiff -u -r1.5.22.1 -r1.5.22.2 \
src/external/mit/xorg/lib/libxcb/libxcb/Makefile

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/xcomp/mi
diff -u src/distrib/sets/lists/xcomp/mi:1.152.2.3 src/distrib/sets/lists/xcomp/mi:1.152.2.4
--- src/distrib/sets/lists/xcomp/mi:1.152.2.3	Wed Feb 11 09:43:58 2015
+++ src/distrib/sets/lists/xcomp/mi	Sat Feb 21 19:30:41 2015
@@ -1,4 +1,4 @@
-#	 $NetBSD: mi,v 1.152.2.3 2015/02/11 09:43:58 martin Exp $
+#	 $NetBSD: mi,v 1.152.2.4 2015/02/21 19:30:41 martin Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -5852,6 +5852,7 @@
 ./usr/X11R7/include/xcb/xfixes.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xinerama.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xinput.h			-unknown-	xorg
+./usr/X11R7/include/xcb/xkb.h-unknown-	xorg
 ./usr/X11R7/include/xcb/xproto.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xselinux.h			-unknown-	xorg
 ./usr/X11R7/include/xcb/xtest.h-unknown-	xorg

Index: src/external/mit/xorg/lib/libxcb/libxcb/Makefile
diff -u src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.5.22.1 src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.5.22.2
--- src/external/mit/xorg/lib/libxcb/libxcb/Makefile:1.5.22.1	Mon Oct  6 13:09:41 2014
+++ src/external/mit/xorg/lib/libxcb/libxcb/Makefile	Sat Feb 21 19:30:41 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5.22.1 2014/10/06 13:09:41 martin Exp $
+#	$NetBSD: Makefile,v 1.5.22.2 2015/02/21 19:30:41 martin Exp $
 
 .include bsd.own.mk
 
@@ -60,6 +60,7 @@ INCS=	\
 	xfixes.h \
 	xinerama.h \
 	xinput.h \
+	xkb.h \
 	xproto.h \
 	xselinux.h \
 	xtest.h \



CVS commit: [netbsd-7] src/doc

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 19:41:21 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets #530, 532--541


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.208 -r1.1.2.209 src/doc/CHANGES-7.0

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-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.208 src/doc/CHANGES-7.0:1.1.2.209
--- src/doc/CHANGES-7.0:1.1.2.208	Wed Feb 18 06:41:11 2015
+++ src/doc/CHANGES-7.0	Sat Feb 21 19:41:21 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.208 2015/02/18 06:41:11 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.209 2015/02/21 19:41:21 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -15935,3 +15935,97 @@ sys/kern/vfs_syscalls.c1.493
 	*retval.
 	[martin, ticket #523]
 
+share/man/man4/tcp.41.30
+sys/netinet/tcp.h1.31
+sys/netinet/tcp_input.c1.336
+sys/netinet/tcp_output.c			1.180
+sys/netinet/tcp_subr.c1.258
+sys/netinet/tcp_usrreq.c			1.203
+sys/netinet/tcp_var.h1.176-1.177
+sys/sys/param.h	(bump revision)
+
+	Port over the TCP_INFO socket option from FreeBSD, originally from
+	the Linux 2.6 TCP API.  This permits the caller to query certain
+	information about a TCP connection.
+	[he, ticket #530]
+
+usr.bin/progress/progress.c			1.21
+
+	Retry read() on EINTR.  Fixes premature exit of
+	/dev/random progress -e cat /dev/null
+	[gson, ticket #532]
+
+external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em 1.2
+external/gpl3/binutils/dist/ld/emultempl/armelf.em 1.2
+
+	Apply elf32.em r1.8 to the corresponding sections of armelf.em and
+	aarch64elf.em:
+	  Recursively add DT_NEEDED entries from shared libraries if symbols
+	  are used indirectly. This is more in line with the old GNU ld
+	  behavior, but not exactly the desired semantic.
+	[joerg, ticket #533]
+
+external/mit/lua/dist/src/lapi.c		1.4
+external/mit/lua/dist/src/ldebug.c		1.4
+external/mit/lua/dist/src/llex.c		1.4
+external/mit/lua/dist/src/llimits.h		1.4
+external/mit/lua/dist/src/lstrlib.c		1.7
+external/mit/lua/dist/src/lua.h			1.4
+external/mit/lua/dist/src/luaconf.h		1.13
+external/mit/lua/dist/src/lvm.c			1.5
+
+	lua(4): small fixes in kernel Lua
+	* fixed hex parsing
+	* restored lua_isnumber
+	* removed unwanted macros from luaconf.h
+	* restored stdarg.h include in ldebug.c
+	* removed doubles from unions
+	* removed unused functions
+	[lneto, ticket #534]
+
+sys/arch/powerpc/booke/e500_tlb.c		1.17
+
+	fix compile failure without DIAGNOSTIC.
+	[nonaka, ticket #535]
+
+sys/arch/arm/include/lock.h			1.30
+
+	Don't use plain inline in that might end up compiled with -ansi.
+	[joerg, ticket #536]
+
+sys/netinet/icmp_var.h1.30
+sys/netinet/ip_icmp.h1.34
+
+	Fix ICMP_STATINC() buffer overflows.
+	[christos, ticket #537]
+
+sys/dev/usb/uftdi.c1.60
+sys/dev/usb/usbdevs1.690
+sys/dev/usb/usbdevs.h(regen)
+sys/dev/usb/usbdevs_data.h			(regen)
+
+	Support BUFFALO PC-OP-RS1
+	[nonaka, ticket #538]
+
+sys/arch/sparc64/dev/lom.c			1.14
+
+	Fix queue handling to make the watchdog timer actually works on
+	netbsd-7 if it is configured by wdogctl=YES in rc.conf, and also
+	avoid a hangup duaring shutdown.
+	- don't put an entry which is already in the queue.
+	- read a first entry properly to handle the queue.
+	- check the lom status if input buffer is empty before writing.
+	[nakayama, ticket #539]
+
+sys/dev/ic/i82596.c1.32
+
+	Fix multicast handling,
+	[skrll, ticket #540]
+
+distrib/sets/lists/xcomp/mi			1.158
+external/mit/xorg/lib/libxcb/libxcb/Makefile	1.7
+
+	install xcb/xkb.h
+	[jmcneill, ticket #541]
+
+



CVS commit: src/sbin/iscsid

2015-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Feb 21 20:33:44 UTC 2015

Modified Files:
src/sbin/iscsid: iscsid.h

Log Message:
Move communication socket to /var/run, especially when starting iscsid
during boot, it might disappear otherwise.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/iscsid/iscsid.h

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

Modified files:

Index: src/sbin/iscsid/iscsid.h
diff -u src/sbin/iscsid/iscsid.h:1.3 src/sbin/iscsid/iscsid.h:1.4
--- src/sbin/iscsid/iscsid.h:1.3	Sun May 27 20:05:04 2012
+++ src/sbin/iscsid/iscsid.h	Sat Feb 21 20:33:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsid.h,v 1.3 2012/05/27 20:05:04 christos Exp $	*/
+/*	$NetBSD: iscsid.h,v 1.4 2015/02/21 20:33:44 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2004,2006,2011 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@ __BEGIN_DECLS
 
 /* The socket name */
 
-#define ISCSID_SOCK_NAME   /tmp/iscsid_socket
+#define ISCSID_SOCK_NAME   /var/run/iscsid_socket
 
 
 /*  Requests  */



CVS commit: [netbsd-7] src/sys/dev/ic

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 19:27:50 UTC 2015

Modified Files:
src/sys/dev/ic [netbsd-7]: i82596.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #540):
sys/dev/ic/i82596.c: revision 1.32
Fix multicast handling.
Fixes PR kern/49472, patch from Nick Hudson.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.4.1 src/sys/dev/ic/i82596.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/i82596.c
diff -u src/sys/dev/ic/i82596.c:1.31 src/sys/dev/ic/i82596.c:1.31.4.1
--- src/sys/dev/ic/i82596.c:1.31	Mon Feb 24 07:23:43 2014
+++ src/sys/dev/ic/i82596.c	Sat Feb 21 19:27:49 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: i82596.c,v 1.31 2014/02/24 07:23:43 skrll Exp $ */
+/* $NetBSD: i82596.c,v 1.31.4.1 2015/02/21 19:27:49 martin Exp $ */
 
 /*
  * Copyright (c) 2003 Jochen Kunz.
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: i82596.c,v 1.31 2014/02/24 07:23:43 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: i82596.c,v 1.31.4.1 2015/02/21 19:27:49 martin Exp $);
 
 /* autoconfig and device stuff */
 #include sys/param.h
@@ -513,10 +513,10 @@ iee_cb_setup(struct iee_softc *sc, uint3
 break;
 			}
 			memcpy(__UNVOLATILE(cb-cb_mcast.mc_addrs[
-			cb-cb_mcast.mc_size * ETHER_ADDR_LEN]),
+			cb-cb_mcast.mc_size]),
 			enm-enm_addrlo, ETHER_ADDR_LEN);
 			ETHER_NEXT_MULTI(step, enm);
-			cb-cb_mcast.mc_size++;
+			cb-cb_mcast.mc_size += ETHER_ADDR_LEN;
 		}
 		if (cb-cb_mcast.mc_size == 0) {
 			/* Can't do exact mcast filtering, do ALLMULTI mode. */



CVS commit: [netbsd-7] src/sys/dev/usb

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 19:38:02 UTC 2015

Modified Files:
src/sys/dev/usb [netbsd-7]: uftdi.c usbdevs

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #538):
sys/dev/usb/uftdi.c: revision 1.60
sys/dev/usb/usbdevs: revision 1.690
PR/49681: Support BUFFALO PC-OP-RS1
PR/49681: Support BUFFALO PC-OP-RS1


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.59.4.1 src/sys/dev/usb/uftdi.c
cvs rdiff -u -r1.680.2.2 -r1.680.2.3 src/sys/dev/usb/usbdevs

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/uftdi.c
diff -u src/sys/dev/usb/uftdi.c:1.59 src/sys/dev/usb/uftdi.c:1.59.4.1
--- src/sys/dev/usb/uftdi.c:1.59	Thu Dec 19 08:22:40 2013
+++ src/sys/dev/usb/uftdi.c	Sat Feb 21 19:38:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uftdi.c,v 1.59 2013/12/19 08:22:40 msaitoh Exp $	*/
+/*	$NetBSD: uftdi.c,v 1.59.4.1 2015/02/21 19:38:02 martin Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.59 2013/12/19 08:22:40 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.59.4.1 2015/02/21 19:38:02 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -159,6 +159,7 @@ static const struct usb_devno uftdi_devs
 	{ USB_VENDOR_xxFTDI, USB_PRODUCT_xxFTDI_SHEEVAPLUG_JTAG },
 	{ USB_VENDOR_INTREPIDCS, USB_PRODUCT_INTREPIDCS_VALUECAN },
 	{ USB_VENDOR_INTREPIDCS, USB_PRODUCT_INTREPIDCS_NEOVI },
+	{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_PCOPRS1 },
 	{ USB_VENDOR_RATOC, USB_PRODUCT_RATOC_REXUSB60F },
 	{ USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_USBSERIAL },
 	{ USB_VENDOR_SEALEVEL, USB_PRODUCT_SEALEVEL_SEAPORT4P1 },

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.680.2.2 src/sys/dev/usb/usbdevs:1.680.2.3
--- src/sys/dev/usb/usbdevs:1.680.2.2	Fri Jan 16 08:30:42 2015
+++ src/sys/dev/usb/usbdevs	Sat Feb 21 19:38:02 2015
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.680.2.2 2015/01/16 08:30:42 martin Exp $
+$NetBSD: usbdevs,v 1.680.2.3 2015/02/21 19:38:02 martin Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2082,6 +2082,7 @@ product MELCO KG54		0x0066	WLI-U2-KG54 W
 product MELCO KG54AI		0x0067	WLI-U2-KG54-AI WLAN
 product MELCO LUAU2GT		0x006e	LUA-U2-GT Ethernet
 product MELCO NINWIFI		0x008b	Nintendo Wi-Fi
+product MELCO PCOPRS1		0x00b3	RemoteStation PC-OP-RS1
 product MELCO SG54HP		0x00d8	WLI-U2-SG54HP
 product MELCO G54HP		0x00d9	WLI-U2-G54HP
 product MELCO KG54L		0x00da	WLI-U2-KG54L



CVS commit: [netbsd-7] src/sys/dev/usb

2015-02-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Feb 21 19:38:51 UTC 2015

Modified Files:
src/sys/dev/usb [netbsd-7]: usbdevs.h usbdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.672.2.2 -r1.672.2.3 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.673.2.2 -r1.673.2.3 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.672.2.2 src/sys/dev/usb/usbdevs.h:1.672.2.3
--- src/sys/dev/usb/usbdevs.h:1.672.2.2	Fri Jan 16 08:31:31 2015
+++ src/sys/dev/usb/usbdevs.h	Sat Feb 21 19:38:51 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.672.2.2 2015/01/16 08:31:31 martin Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.672.2.3 2015/02/21 19:38:51 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.680.2.2 2015/01/16 08:30:42 martin Exp
+ *	NetBSD: usbdevs,v 1.680.2.3 2015/02/21 19:38:02 martin Exp
  */
 
 /*
@@ -2089,6 +2089,7 @@
 #define	USB_PRODUCT_MELCO_KG54AI	0x0067		/* WLI-U2-KG54-AI WLAN */
 #define	USB_PRODUCT_MELCO_LUAU2GT	0x006e		/* LUA-U2-GT Ethernet */
 #define	USB_PRODUCT_MELCO_NINWIFI	0x008b		/* Nintendo Wi-Fi */
+#define	USB_PRODUCT_MELCO_PCOPRS1	0x00b3		/* RemoteStation PC-OP-RS1 */
 #define	USB_PRODUCT_MELCO_SG54HP	0x00d8		/* WLI-U2-SG54HP */
 #define	USB_PRODUCT_MELCO_G54HP	0x00d9		/* WLI-U2-G54HP */
 #define	USB_PRODUCT_MELCO_KG54L	0x00da		/* WLI-U2-KG54L */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.673.2.2 src/sys/dev/usb/usbdevs_data.h:1.673.2.3
--- src/sys/dev/usb/usbdevs_data.h:1.673.2.2	Fri Jan 16 08:31:31 2015
+++ src/sys/dev/usb/usbdevs_data.h	Sat Feb 21 19:38:51 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.673.2.2 2015/01/16 08:31:31 martin Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.673.2.3 2015/02/21 19:38:51 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.680.2.2 2015/01/16 08:30:42 martin Exp
+ *	NetBSD: usbdevs,v 1.680.2.3 2015/02/21 19:38:02 martin Exp
  */
 
 /*
@@ -6467,6 +6467,10 @@ const struct usb_product usb_products[] 
 	Nintendo Wi-Fi,
 	},
 	{
+	USB_VENDOR_MELCO, USB_PRODUCT_MELCO_PCOPRS1,
+	RemoteStation PC-OP-RS1,
+	},
+	{
 	USB_VENDOR_MELCO, USB_PRODUCT_MELCO_SG54HP,
 	WLI-U2-SG54HP,
 	},
@@ -10195,4 +10199,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 2008;
+const int usb_nproducts = 2009;