CVS commit: src/external/mit/xorg/server

2017-03-07 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar  8 07:45:11 UTC 2017

Modified Files:
src/external/mit/xorg/server/xorg-server.old/os: Makefile
src/external/mit/xorg/server/xorg-server/os: Makefile

Log Message:
build timingsafe_memcpy.c.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/mit/xorg/server/xorg-server.old/os/Makefile
cvs rdiff -u -r1.14 -r1.15 \
src/external/mit/xorg/server/xorg-server/os/Makefile

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/xorg/server/xorg-server.old/os/Makefile
diff -u src/external/mit/xorg/server/xorg-server.old/os/Makefile:1.1.1.1 src/external/mit/xorg/server/xorg-server.old/os/Makefile:1.2
--- src/external/mit/xorg/server/xorg-server.old/os/Makefile:1.1.1.1	Fri Jun 10 03:42:14 2016
+++ src/external/mit/xorg/server/xorg-server.old/os/Makefile	Wed Mar  8 07:45:11 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.1.1 2016/06/10 03:42:14 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2017/03/08 07:45:11 mrg Exp $
 
 .include "../Makefile.serverlib"
 .include "../Makefile.servermod"
@@ -9,7 +9,8 @@ LIB=	os
 SRCS=	WaitFor.c access.c auth.c connection.c io.c mitauth.c \
 	oscolor.c osinit.c utils.c xdmauth.c \
 	xstrans.c xprintf.c log.c xdmcp.c \
-	rpcauth.c backtrace.c xprintf.c xsha1.c
+	rpcauth.c backtrace.c xprintf.c xsha1.c \
+	timingsafe_memcmp.c
 
 CPPFLAGS+=	-I${X11SRCDIR.xorg-server}/include \
 		-I${DESTDIR}${X11INCDIR}/X11 \

Index: src/external/mit/xorg/server/xorg-server/os/Makefile
diff -u src/external/mit/xorg/server/xorg-server/os/Makefile:1.14 src/external/mit/xorg/server/xorg-server/os/Makefile:1.15
--- src/external/mit/xorg/server/xorg-server/os/Makefile:1.14	Sun Aug 14 03:43:05 2016
+++ src/external/mit/xorg/server/xorg-server/os/Makefile	Wed Mar  8 07:45:11 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2016/08/14 03:43:05 mrg Exp $
+#	$NetBSD: Makefile,v 1.15 2017/03/08 07:45:11 mrg Exp $
 
 .include "../Makefile.serverlib"
 .include "../Makefile.servermod"
@@ -11,7 +11,8 @@ SRCS=	WaitFor.c access.c auth.c backtrac
 	oscolor.c osinit.c utils.c xdmauth.c \
 	xstrans.c xprintf.c log.c xdmcp.c busfault.c \
 	rpcauth.c xsha1.c \
-	reallocarray.c
+	reallocarray.c \
+	timingsafe_memcmp.c
 
 CPPFLAGS+=	-I${X11SRCDIR.xorg-server}/include \
 		-I${DESTDIR}${X11INCDIR}/X11 \



CVS commit: xsrc/external/mit/xorg-server.old

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 07:44:16 UTC 2017

Modified Files:
xsrc/external/mit/xorg-server.old/dist: configure.ac
xsrc/external/mit/xorg-server.old/dist/include: dix-config.h.in
xsrc/external/mit/xorg-server.old/dist/os: auth.c
xsrc/external/mit/xorg-server.old/include: dix-config.h

Log Message:
port to xorg-server 1.10:

apply
https://cgit.freedesktop.org/xorg/xserver/commit/?id=957e8db38f27932d353e86e9aa69cf16778b18f1

--
Use arc4random_buf(3) if available to generate cookies.

Reviewed-by: Adam Jackson 
Signed-off-by: Matthieu Herrb 
--


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xorg-server.old/dist/configure.ac
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server.old/dist/os/auth.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xorg-server.old/include/dix-config.h

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

Modified files:

Index: xsrc/external/mit/xorg-server.old/dist/configure.ac
diff -u xsrc/external/mit/xorg-server.old/dist/configure.ac:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/configure.ac:1.2
--- xsrc/external/mit/xorg-server.old/dist/configure.ac:1.1.1.1	Thu Jun  9 09:07:55 2016
+++ xsrc/external/mit/xorg-server.old/dist/configure.ac	Wed Mar  8 07:44:16 2017
@@ -220,6 +220,8 @@ AC_CHECK_FUNC([strlcpy], AC_DEFINE(HAS_S
 
 AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno])
 
+AC_CHECK_LIB([bsd], [arc4random_buf])
+
 dnl Check for mmap support for Xvfb
 AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP, 1, [Have the 'mmap' function.]))
 

Index: xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in
diff -u xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in:1.2 xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in:1.3
--- xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in:1.2	Wed Mar  8 07:31:42 2017
+++ xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in	Wed Mar  8 07:44:16 2017
@@ -133,6 +133,9 @@
 /* Build a standalone xpbproxy */
 #undef STANDALONE_XPBPROXY
 
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+#undef HAVE_LIBBSD
+
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
 
@@ -160,6 +163,9 @@
 /* Define to 1 if you have the  header file. */
 #undef HAVE_RPCSVC_DBM_H
 
+/* Define to 1 if you have the `arc4random_buf' function. */
+#undef HAVE_ARC4RANDOM_BUF
+
 /* Define to use libc SHA1 functions */
 #undef HAVE_SHA1_IN_LIBC
 

Index: xsrc/external/mit/xorg-server.old/dist/os/auth.c
diff -u xsrc/external/mit/xorg-server.old/dist/os/auth.c:1.2 xsrc/external/mit/xorg-server.old/dist/os/auth.c:1.3
--- xsrc/external/mit/xorg-server.old/dist/os/auth.c:1.2	Wed Mar  8 07:18:47 2017
+++ xsrc/external/mit/xorg-server.old/dist/os/auth.c	Wed Mar  8 07:44:16 2017
@@ -45,6 +45,9 @@ from The Open Group.
 #ifdef WIN32
 #include
 #endif
+#ifdef HAVE_LIBBSD
+#include  /* for arc4random_buf() */
+#endif
 
 struct protocol {
 unsigned short   name_length;
@@ -317,11 +320,15 @@ GenerateAuthorization(
 void
 GenerateRandomData (int len, char *buf)
 {
+#ifdef HAVE_ARC4RANDOMBUF
+arc4random_buf(buf, len);
+#else
 int fd;
 
 fd = open("/dev/urandom", O_RDONLY);
 read(fd, buf, len);
 close(fd);
+#endif
 }
 
 #endif /* XCSECURITY */

Index: xsrc/external/mit/xorg-server.old/include/dix-config.h
diff -u xsrc/external/mit/xorg-server.old/include/dix-config.h:1.3 xsrc/external/mit/xorg-server.old/include/dix-config.h:1.4
--- xsrc/external/mit/xorg-server.old/include/dix-config.h:1.3	Wed Mar  8 07:31:42 2017
+++ xsrc/external/mit/xorg-server.old/include/dix-config.h	Wed Mar  8 07:44:16 2017
@@ -134,6 +134,9 @@
 /* Build a standalone xpbproxy */
 /* #undef STANDALONE_XPBPROXY */
 
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+/* #undef HAVE_LIBBSD */
+
 /* Define to 1 if you have the `m' library (-lm). */
 #define HAVE_LIBM 1
 
@@ -161,6 +164,9 @@
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_RPCSVC_DBM_H */
 
+/* Define to 1 if you have the `arc4random_buf' function. */
+#define HAVE_ARC4RANDOM_BUF 1
+
 /* Define to use libc SHA1 functions */
 #define HAVE_SHA1_IN_LIBC 1
 



CVS commit: xsrc/external/mit/xorg-server

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 07:39:44 UTC 2017

Modified Files:
xsrc/external/mit/xorg-server/dist: configure.ac
xsrc/external/mit/xorg-server/dist/include: dix-config.h.in
xsrc/external/mit/xorg-server/dist/os: auth.c
xsrc/external/mit/xorg-server/include: dix-config.h

Log Message:
apply
https://cgit.freedesktop.org/xorg/xserver/commit/?id=957e8db38f27932d353e86e9aa69cf16778b18f1

--
Use arc4random_buf(3) if available to generate cookies.

Reviewed-by: Adam Jackson 
Signed-off-by: Matthieu Herrb 
--


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/configure.ac
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/include/dix-config.h.in
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/os/auth.c
cvs rdiff -u -r1.26 -r1.27 xsrc/external/mit/xorg-server/include/dix-config.h

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/configure.ac
diff -u xsrc/external/mit/xorg-server/dist/configure.ac:1.4 xsrc/external/mit/xorg-server/dist/configure.ac:1.5
--- xsrc/external/mit/xorg-server/dist/configure.ac:1.4	Wed Mar  8 07:14:11 2017
+++ xsrc/external/mit/xorg-server/dist/configure.ac	Wed Mar  8 07:39:44 2017
@@ -223,6 +223,8 @@ AC_CHECK_FUNCS([backtrace ffs geteuid ge
 AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\
 	timingsafe_memcmp])
 
+AC_CHECK_LIB([bsd], [arc4random_buf])
+
 AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include ]])
 
 dnl Check for SO_PEERCRED #define

Index: xsrc/external/mit/xorg-server/dist/include/dix-config.h.in
diff -u xsrc/external/mit/xorg-server/dist/include/dix-config.h.in:1.2 xsrc/external/mit/xorg-server/dist/include/dix-config.h.in:1.3
--- xsrc/external/mit/xorg-server/dist/include/dix-config.h.in:1.2	Wed Mar  8 07:14:11 2017
+++ xsrc/external/mit/xorg-server/dist/include/dix-config.h.in	Wed Mar  8 07:39:44 2017
@@ -125,6 +125,9 @@
 /* Build a standalone xpbproxy */
 #undef STANDALONE_XPBPROXY
 
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+#undef HAVE_LIBBSD
+
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
 
@@ -155,6 +158,9 @@
 /* Define to 1 if you have the  header file. */
 #undef HAVE_RPCSVC_DBM_H
 
+/* Define to 1 if you have the `arc4random_buf' function. */
+#undef HAVE_ARC4RANDOM_BUF
+
 /* Define to use libc SHA1 functions */
 #undef HAVE_SHA1_IN_LIBC
 

Index: xsrc/external/mit/xorg-server/dist/os/auth.c
diff -u xsrc/external/mit/xorg-server/dist/os/auth.c:1.2 xsrc/external/mit/xorg-server/dist/os/auth.c:1.3
--- xsrc/external/mit/xorg-server/dist/os/auth.c:1.2	Wed Mar  8 06:54:39 2017
+++ xsrc/external/mit/xorg-server/dist/os/auth.c	Wed Mar  8 07:39:44 2017
@@ -45,6 +45,9 @@ from The Open Group.
 #ifdef WIN32
 #include
 #endif
+#ifdef HAVE_LIBBSD
+#include  /* for arc4random_buf() */
+#endif
 
 struct protocol {
 unsigned short name_length;
@@ -302,11 +305,15 @@ GenerateAuthorization(unsigned name_leng
 void
 GenerateRandomData(int len, char *buf)
 {
+#ifdef HAVE_ARC4RANDOMBUF
+arc4random_buf(buf, len);
+#else
 int fd;
 
 fd = open("/dev/urandom", O_RDONLY);
 read(fd, buf, len);
 close(fd);
+#endif
 }
 
 #endif  /* XCSECURITY */

Index: xsrc/external/mit/xorg-server/include/dix-config.h
diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.26 xsrc/external/mit/xorg-server/include/dix-config.h:1.27
--- xsrc/external/mit/xorg-server/include/dix-config.h:1.26	Wed Mar  8 07:14:11 2017
+++ xsrc/external/mit/xorg-server/include/dix-config.h	Wed Mar  8 07:39:44 2017
@@ -128,6 +128,9 @@
 /* Build a standalone xpbproxy */
 /* #undef STANDALONE_XPBPROXY */
 
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+/* #undef HAVE_LIBBSD */
+
 /* Define to 1 if you have the `m' library (-lm). */
 #define HAVE_LIBM 1
 
@@ -158,6 +161,9 @@
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_RPCSVC_DBM_H */
 
+/* Define to 1 if you have the `arc4random_buf' function. */
+#define HAVE_ARC4RANDOM_BUF 1
+
 /* Define to use libc SHA1 functions */
 #define HAVE_SHA1_IN_LIBC 1
 



CVS commit: src/doc

2017-03-07 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  8 07:32:58 UTC 2017

Modified Files:
src/doc: TODO.smpnet

Log Message:
Tidy up the lists


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/doc/TODO.smpnet

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

Modified files:

Index: src/doc/TODO.smpnet
diff -u src/doc/TODO.smpnet:1.5 src/doc/TODO.smpnet:1.6
--- src/doc/TODO.smpnet:1.5	Wed Mar  8 06:59:36 2017
+++ src/doc/TODO.smpnet	Wed Mar  8 07:32:58 2017
@@ -1,9 +1,10 @@
-$NetBSD: TODO.smpnet,v 1.5 2017/03/08 06:59:36 ozaki-r Exp $
+$NetBSD: TODO.smpnet,v 1.6 2017/03/08 07:32:58 ozaki-r Exp $
 
 MP-safe components
 ==
 
  - bridge(4)
+   - STP
  - bpf(4)
  - gif(4)
  - l2tp(4)
@@ -23,54 +24,54 @@ MP-safe components
 Non MP-safe components and kernel options
 =
 
- - agr(4)
- - altq(4)
- - carp(4)
- - etherip(4)
- - faith(4)
- - gre(4)
- - ieee80211(4)
- - ipf(4)
- - ipsec(4)
- - kttcp(4)
- - mpls(4)
- - opencrypto(9)
- - pf(4)
- - ppp(4)
- - sl(4)
- - stf(4)
- - strip(4)
- - if_srt
- - tap(4)
- - vlan(4)
-
- - netsmb
- - netnatm
- - netisbn
- - netatalk
- - netbt
- - netkey
-
- - if_arcsubr.c
- - if_atmsubr.c
- - if_ecosubr.c
- - if_fddisubr.c
- - if_hippisubr.c
- - if_ieee1394subr.c
- - if_tokensubr.c
-
- - DCCP
- - IPSELSRC
- - MROUTING
- - NFS
- - PIM
- - SCTP
- - TCP
- - UDP
- - BRIDGE_IPF
-
- - Layer 4
  - Most network device drivers
+ - Layer 2
+   - ARCNET (if_arcsubr.c)
+   - ATM (if_atmsubr.c)
+   - BRIDGE_IPF
+   - if_ecosubr.c
+   - FDDI (if_fddisubr.c)
+   - HIPPI (if_hippisubr.c)
+   - IEEE 1394 (if_ieee1394subr.c)
+   - IEEE 802.11 (ieee80211(4))
+   - Token ring (if_tokensubr.c)
+ - Layer 3
+   - IPSELSRC
+   - MROUTING
+   - PIM
+   - MPLS (mpls(4))
+ - Layer 4
+   - DCCP
+   - SCTP
+   - TCP
+   - UDP
+ - Interfaces
+   - agr(4)
+   - carp(4)
+   - etherip(4)
+   - faith(4)
+   - gre(4)
+   - ppp(4)
+   - sl(4)
+   - stf(4)
+   - strip(4)
+   - if_srt
+   - tap(4)
+   - vlan(4)
+ - Packet filters
+   - ipf(4)
+   - pf(4)
+ - Others
+   - AppleTalk (sys/netatalk/)
+   - ATM (sys/netnatm/)
+   - Bluetooth (sys/netbt/)
+   - altq(4)
+   - CIFS (sys/netsmb/)
+   - ipsec(4)
+   - ISDN (sys/netisbn/)
+   - kttcp(4)
+   - NFS
+   - opencrypto(9)
 
 Know issues
 ===



CVS commit: xsrc/external/mit/xorg-server.old

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 07:31:42 UTC 2017

Modified Files:
xsrc/external/mit/xorg-server.old/dist/include: dix-config.h.in os.h
xsrc/external/mit/xorg-server.old/dist/os: mitauth.c
xsrc/external/mit/xorg-server.old/include: dix-config.h
Added Files:
xsrc/external/mit/xorg-server.old/dist/os: timingsafe_memcmp.c

Log Message:
port to xorg-server 1.10:

--
Log Message:
apply

https://cgit.freedesktop.org/xorg/xserver/commit/?id=d7ac755f0b618eb1259d93c8a16ec6e39a18627c

Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624
Provide the function definition for systems that don't have it.

Signed-off-by: Matthieu Herrb 
Reviewed-by: Alan Coopersmith 

and
https://cgit.freedesktop.org/xorg/xserver/commit/?id=5c44169caed811e59a65ba346de1cadb46d266ec

os: Squash missing declaration warning for timingsafe_memcmp
timingsafe_memcmp.c:21:1: warning: no previous prototype for 
`timingsafe_memcmp' [-Wmissing-prototypes]
 timingsafe_memcmp(const void *b1, const void *b2, size_t len)

Signed-off-by: Adam Jackson 
--


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in \
xsrc/external/mit/xorg-server.old/dist/include/os.h
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server.old/dist/os/mitauth.c
cvs rdiff -u -r0 -r1.1 \
xsrc/external/mit/xorg-server.old/dist/os/timingsafe_memcmp.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server.old/include/dix-config.h

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

Modified files:

Index: xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in
diff -u xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in:1.2
--- xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in:1.1.1.1	Thu Jun  9 09:08:00 2016
+++ xsrc/external/mit/xorg-server.old/dist/include/dix-config.h.in	Wed Mar  8 07:31:42 2017
@@ -228,6 +228,9 @@
 /* Define to 1 if you have the  header file. */
 #undef HAVE_SYS_VM86_H
 
+/* Define to 1 if you have the `timingsafe_memcmp' function. */
+#undef HAVE_TIMINGSAFE_MEMCMP
+
 /* Define to 1 if you have the  header file. */
 #undef HAVE_TSLIB_H
 
Index: xsrc/external/mit/xorg-server.old/dist/include/os.h
diff -u xsrc/external/mit/xorg-server.old/dist/include/os.h:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/include/os.h:1.2
--- xsrc/external/mit/xorg-server.old/dist/include/os.h:1.1.1.1	Thu Jun  9 09:08:00 2016
+++ xsrc/external/mit/xorg-server.old/dist/include/os.h	Wed Mar  8 07:31:42 2017
@@ -495,6 +495,11 @@ extern _X_EXPORT size_t strlcpy(char *ds
 extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz);
 #endif
 
+#ifndef HAVE_TIMINGSAFE_MEMCMP
+extern _X_EXPORT int
+timingsafe_memcmp(const void *b1, const void *b2, size_t len);
+#endif
+
 /* Logging. */
 typedef enum _LogParameter {
 XLOG_FLUSH,

Index: xsrc/external/mit/xorg-server.old/dist/os/mitauth.c
diff -u xsrc/external/mit/xorg-server.old/dist/os/mitauth.c:1.2 xsrc/external/mit/xorg-server.old/dist/os/mitauth.c:1.3
--- xsrc/external/mit/xorg-server.old/dist/os/mitauth.c:1.2	Wed Mar  8 07:18:47 2017
+++ xsrc/external/mit/xorg-server.old/dist/os/mitauth.c	Wed Mar  8 07:31:42 2017
@@ -82,7 +82,7 @@ MitCheckCookie (
 
 for (auth = mit_auth; auth; auth=auth->next) {
 if (data_length == auth->len &&
-	   memcmp (data, auth->data, (int) data_length) == 0)
+	   timingsafe_memcmp(data, auth->data, (int) data_length) == 0)
 	return auth->id;
 }
 *reason = "Invalid MIT-MAGIC-COOKIE-1 key";

Index: xsrc/external/mit/xorg-server.old/include/dix-config.h
diff -u xsrc/external/mit/xorg-server.old/include/dix-config.h:1.2 xsrc/external/mit/xorg-server.old/include/dix-config.h:1.3
--- xsrc/external/mit/xorg-server.old/include/dix-config.h:1.2	Wed Sep 21 22:11:16 2016
+++ xsrc/external/mit/xorg-server.old/include/dix-config.h	Wed Mar  8 07:31:42 2017
@@ -229,6 +229,9 @@
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_SYS_VM86_H */
 
+/* Define to 1 if you have the `timingsafe_memcmp' function. */
+/* #undef HAVE_TIMINGSAFE_MEMCMP */
+
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_TSLIB_H */
 

Added files:

Index: xsrc/external/mit/xorg-server.old/dist/os/timingsafe_memcmp.c
diff -u /dev/null xsrc/external/mit/xorg-server.old/dist/os/timingsafe_memcmp.c:1.1
--- /dev/null	Wed Mar  8 07:31:42 2017
+++ xsrc/external/mit/xorg-server.old/dist/os/timingsafe_memcmp.c	Wed Mar  8 07:31:42 2017
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014 Google Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR D

CVS commit: xsrc/external/mit/xorg-server.old/dist/os

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 07:18:48 UTC 2017

Modified Files:
xsrc/external/mit/xorg-server.old/dist/os: auth.c mitauth.c osdep.h
rpcauth.c xdmauth.c

Log Message:
port to xorg-server 1.10:
--
Log Message:
apply
https://cgit.freedesktop.org/xorg/xserver/commit/?id=2855f759b1e7bf7f5e57cac36c1f0d0e5ac1a683

auth: remove AuthToIDFunc and associated functions. Not used anymore.
And the current code for MitToId has a use-after-free() issue.

[Also remove the actual implementations - ajax]

Signed-off-by: Matthieu Herrb 
Reviewed-by: Alan Coopersmith 
--


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/xorg-server.old/dist/os/auth.c \
xsrc/external/mit/xorg-server.old/dist/os/mitauth.c \
xsrc/external/mit/xorg-server.old/dist/os/osdep.h \
xsrc/external/mit/xorg-server.old/dist/os/rpcauth.c \
xsrc/external/mit/xorg-server.old/dist/os/xdmauth.c

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

Modified files:

Index: xsrc/external/mit/xorg-server.old/dist/os/auth.c
diff -u xsrc/external/mit/xorg-server.old/dist/os/auth.c:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/os/auth.c:1.2
--- xsrc/external/mit/xorg-server.old/dist/os/auth.c:1.1.1.1	Thu Jun  9 09:08:00 2016
+++ xsrc/external/mit/xorg-server.old/dist/os/auth.c	Wed Mar  8 07:18:47 2017
@@ -52,7 +52,6 @@ struct protocol {
 AuthAddCFunc	Add;	/* new authorization data */
 AuthCheckFunc	Check;	/* verify client authorization data */
 AuthRstCFunc	Reset;	/* delete all authorization data entries */
-AuthToIDFunc	ToID;	/* convert cookie to ID */
 AuthFromIDFunc	FromID;	/* convert ID to cookie */
 AuthRemCFunc	Remove;	/* remove a specific cookie */
 #ifdef XCSECURITY
@@ -63,7 +62,7 @@ struct protocol {
 static struct protocol   protocols[] = {
 {   (unsigned short) 18,"MIT-MAGIC-COOKIE-1",
 		MitAddCookie,	MitCheckCookie,	MitResetCookie,
-		MitToID,	MitFromID,	MitRemoveCookie,
+		MitFromID,	MitRemoveCookie,
 #ifdef XCSECURITY
 		MitGenerateCookie
 #endif
@@ -71,7 +70,7 @@ static struct protocol   protocols[] = {
 #ifdef HASXDMAUTH
 {   (unsigned short) 19,"XDM-AUTHORIZATION-1",
 		XdmAddCookie,	XdmCheckCookie,	XdmResetCookie,
-		XdmToID,	XdmFromID,	XdmRemoveCookie,
+		XdmFromID,	XdmRemoveCookie,
 #ifdef XCSECURITY
 		NULL
 #endif
@@ -80,7 +79,7 @@ static struct protocol   protocols[] = {
 #ifdef SECURE_RPC
 {   (unsigned short) 9,"SUN-DES-1",
 		SecureRPCAdd,	SecureRPCCheck,	SecureRPCReset,
-		SecureRPCToID,	SecureRPCFromID,SecureRPCRemove,
+		SecureRPCFromID,SecureRPCRemove,
 #ifdef XCSECURITY
 		NULL
 #endif
Index: xsrc/external/mit/xorg-server.old/dist/os/mitauth.c
diff -u xsrc/external/mit/xorg-server.old/dist/os/mitauth.c:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/os/mitauth.c:1.2
--- xsrc/external/mit/xorg-server.old/dist/os/mitauth.c:1.1.1.1	Thu Jun  9 09:08:00 2016
+++ xsrc/external/mit/xorg-server.old/dist/os/mitauth.c	Wed Mar  8 07:18:47 2017
@@ -103,21 +103,6 @@ MitResetCookie (void)
 return 0;
 }
 
-XID
-MitToID (
-	unsigned short	data_length,
-	char		*data)
-{
-struct auth	*auth;
-
-for (auth = mit_auth; auth; auth=auth->next) {
-	if (data_length == auth->len &&
-	memcmp (data, auth->data, data_length) == 0)
-	return auth->id;
-}
-return (XID) -1;
-}
-
 int
 MitFromID (
 	XID		id,
Index: xsrc/external/mit/xorg-server.old/dist/os/osdep.h
diff -u xsrc/external/mit/xorg-server.old/dist/os/osdep.h:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/os/osdep.h:1.2
--- xsrc/external/mit/xorg-server.old/dist/os/osdep.h:1.1.1.1	Thu Jun  9 09:08:01 2016
+++ xsrc/external/mit/xorg-server.old/dist/os/osdep.h	Wed Mar  8 07:18:47 2017
@@ -158,9 +158,6 @@ typedef int (*AuthRemCFunc) (AuthRemCArg
 #define AuthRstCArgs void
 typedef int (*AuthRstCFunc) (AuthRstCArgs);
 
-#define AuthToIDArgs unsigned short data_length, char *data
-typedef XID (*AuthToIDFunc) (AuthToIDArgs);
-
 typedef void (*OsCloseFunc)(ClientPtr);
 
 typedef int (*OsFlushFunc)(ClientPtr who, struct _osComm * oc, char* extraBuf, int extraCount);
@@ -227,7 +224,6 @@ extern void GenerateRandomData (int len,
 /* in mitauth.c */
 extern XID  MitCheckCookie(AuthCheckArgs);
 extern XID  MitGenerateCookie (AuthGenCArgs);
-extern XID  MitToID   (AuthToIDArgs);
 extern int  MitAddCookie  (AuthAddCArgs);
 extern int  MitFromID (AuthFromIDArgs);
 extern int  MitRemoveCookie   (AuthRemCArgs);
@@ -236,7 +232,6 @@ extern int  MitResetCookie(AuthRstCA
 /* in xdmauth.c */
 #ifdef HASXDMAUTH
 extern XID  XdmCheckCookie(AuthCheckArgs);
-extern XID  XdmToID   (AuthToIDArgs);
 extern int  XdmAddCookie  (AuthAddCArgs);
 extern int  XdmFromID (AuthFromIDArgs);
 extern int  XdmRemoveCookie   (AuthRemCArgs);
@@ -247,7 +242,6 @@ extern int  XdmResetCookie(AuthRstCA
 #ifdef SECURE_RPC
 extern void SecureRPCInit (AuthInitArgs);
 extern 

CVS commit: xsrc/external/mit/xorg-server

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 07:14:12 UTC 2017

Modified Files:
xsrc/external/mit/xorg-server/dist: configure.ac
xsrc/external/mit/xorg-server/dist/include: dix-config.h.in os.h
xsrc/external/mit/xorg-server/dist/os: mitauth.c
xsrc/external/mit/xorg-server/include: dix-config.h
Added Files:
xsrc/external/mit/xorg-server/dist/os: timingsafe_memcmp.c

Log Message:
apply

https://cgit.freedesktop.org/xorg/xserver/commit/?id=d7ac755f0b618eb1259d93c8a16ec6e39a18627c

Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624
Provide the function definition for systems that don't have it.

Signed-off-by: Matthieu Herrb 
Reviewed-by: Alan Coopersmith 

and
https://cgit.freedesktop.org/xorg/xserver/commit/?id=5c44169caed811e59a65ba346de1cadb46d266ec

os: Squash missing declaration warning for timingsafe_memcmp
timingsafe_memcmp.c:21:1: warning: no previous prototype for 
`timingsafe_memcmp' [-Wmissing-prototypes]
 timingsafe_memcmp(const void *b1, const void *b2, size_t len)

Signed-off-by: Adam Jackson 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xorg-server/dist/configure.ac
cvs rdiff -u -r1.1.1.5 -r1.2 \
xsrc/external/mit/xorg-server/dist/include/dix-config.h.in
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xorg-server/dist/include/os.h
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/os/mitauth.c
cvs rdiff -u -r0 -r1.1 \
xsrc/external/mit/xorg-server/dist/os/timingsafe_memcmp.c
cvs rdiff -u -r1.25 -r1.26 xsrc/external/mit/xorg-server/include/dix-config.h

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/configure.ac
diff -u xsrc/external/mit/xorg-server/dist/configure.ac:1.3 xsrc/external/mit/xorg-server/dist/configure.ac:1.4
--- xsrc/external/mit/xorg-server/dist/configure.ac:1.3	Thu Aug 11 00:04:26 2016
+++ xsrc/external/mit/xorg-server/dist/configure.ac	Wed Mar  8 07:14:11 2017
@@ -220,7 +220,8 @@ AC_CHECK_FUNCS([backtrace ffs geteuid ge
 	getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
 	mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
 	walkcontext])
-AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup])
+AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\
+	timingsafe_memcmp])
 
 AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include ]])
 

Index: xsrc/external/mit/xorg-server/dist/include/dix-config.h.in
diff -u xsrc/external/mit/xorg-server/dist/include/dix-config.h.in:1.1.1.5 xsrc/external/mit/xorg-server/dist/include/dix-config.h.in:1.2
--- xsrc/external/mit/xorg-server/dist/include/dix-config.h.in:1.1.1.5	Wed Aug 10 07:44:32 2016
+++ xsrc/external/mit/xorg-server/dist/include/dix-config.h.in	Wed Mar  8 07:14:11 2017
@@ -232,6 +232,9 @@
 /* Define to 1 if you have the  header file. */
 #undef HAVE_SYS_UTSNAME_H
 
+/* Define to 1 if you have the `timingsafe_memcmp' function. */
+#undef HAVE_TIMINGSAFE_MEMCMP
+
 /* Define to 1 if you have the  header file. */
 #undef HAVE_TSLIB_H
 

Index: xsrc/external/mit/xorg-server/dist/include/os.h
diff -u xsrc/external/mit/xorg-server/dist/include/os.h:1.7 xsrc/external/mit/xorg-server/dist/include/os.h:1.8
--- xsrc/external/mit/xorg-server/dist/include/os.h:1.7	Thu Aug 11 00:04:35 2016
+++ xsrc/external/mit/xorg-server/dist/include/os.h	Wed Mar  8 07:14:11 2017
@@ -603,6 +603,11 @@ extern _X_EXPORT char *
 strndup(const char *str, size_t n);
 #endif
 
+#ifndef HAVE_TIMINGSAFE_MEMCMP
+extern _X_EXPORT int
+timingsafe_memcmp(const void *b1, const void *b2, size_t len);
+#endif
+
 /* Logging. */
 typedef enum _LogParameter {
 XLOG_FLUSH,

Index: xsrc/external/mit/xorg-server/dist/os/mitauth.c
diff -u xsrc/external/mit/xorg-server/dist/os/mitauth.c:1.2 xsrc/external/mit/xorg-server/dist/os/mitauth.c:1.3
--- xsrc/external/mit/xorg-server/dist/os/mitauth.c:1.2	Wed Mar  8 06:54:39 2017
+++ xsrc/external/mit/xorg-server/dist/os/mitauth.c	Wed Mar  8 07:14:11 2017
@@ -76,7 +76,7 @@ MitCheckCookie(unsigned short data_lengt
 
 for (auth = mit_auth; auth; auth = auth->next) {
 if (data_length == auth->len &&
-memcmp(data, auth->data, (int) data_length) == 0)
+timingsafe_memcmp(data, auth->data, (int) data_length) == 0)
 return auth->id;
 }
 *reason = "Invalid MIT-MAGIC-COOKIE-1 key";

Index: xsrc/external/mit/xorg-server/include/dix-config.h
diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.25 xsrc/external/mit/xorg-server/include/dix-config.h:1.26
--- xsrc/external/mit/xorg-server/include/dix-config.h:1.25	Thu Nov 17 07:58:08 2016
+++ xsrc/external/mit/xorg-server/include/dix-config.h	Wed Mar  8 07:14:11 2017
@@ -235,6 +235,9 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_SYS_UTSNAME_H 1
 
+/* Define to 1 if you have the

CVS commit: src/doc

2017-03-07 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  8 06:59:36 UTC 2017

Modified Files:
src/doc: TODO.smpnet

Log Message:
Remove multicast stuffs from the list of Non MP-safe components


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/doc/TODO.smpnet

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

Modified files:

Index: src/doc/TODO.smpnet
diff -u src/doc/TODO.smpnet:1.4 src/doc/TODO.smpnet:1.5
--- src/doc/TODO.smpnet:1.4	Wed Feb 22 04:44:16 2017
+++ src/doc/TODO.smpnet	Wed Mar  8 06:59:36 2017
@@ -1,4 +1,4 @@
-$NetBSD: TODO.smpnet,v 1.4 2017/02/22 04:44:16 ozaki-r Exp $
+$NetBSD: TODO.smpnet,v 1.5 2017/03/08 06:59:36 ozaki-r Exp $
 
 MP-safe components
 ==
@@ -60,7 +60,6 @@ Non MP-safe components and kernel option
  - if_tokensubr.c
 
  - DCCP
- - IGMP
  - IPSELSRC
  - MROUTING
  - NFS
@@ -71,7 +70,6 @@ Non MP-safe components and kernel option
  - BRIDGE_IPF
 
  - Layer 4
- - IP multicast
  - Most network device drivers
 
 Know issues



CVS commit: xsrc/external/mit/xorg-server/dist/os

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 06:54:39 UTC 2017

Modified Files:
xsrc/external/mit/xorg-server/dist/os: auth.c mitauth.c osdep.h
rpcauth.c xdmauth.c

Log Message:
apply
https://cgit.freedesktop.org/xorg/xserver/commit/?id=2855f759b1e7bf7f5e57cac36c1f0d0e5ac1a683

auth: remove AuthToIDFunc and associated functions. Not used anymore.
And the current code for MitToId has a use-after-free() issue.

[Also remove the actual implementations - ajax]

Signed-off-by: Matthieu Herrb 
Reviewed-by: Alan Coopersmith 


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/xorg-server/dist/os/auth.c \
xsrc/external/mit/xorg-server/dist/os/xdmauth.c
cvs rdiff -u -r1.1.1.3 -r1.2 xsrc/external/mit/xorg-server/dist/os/mitauth.c
cvs rdiff -u -r1.1.1.5 -r1.2 xsrc/external/mit/xorg-server/dist/os/osdep.h
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xorg-server/dist/os/rpcauth.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/os/auth.c
diff -u xsrc/external/mit/xorg-server/dist/os/auth.c:1.1.1.4 xsrc/external/mit/xorg-server/dist/os/auth.c:1.2
--- xsrc/external/mit/xorg-server/dist/os/auth.c:1.1.1.4	Wed Aug 10 07:44:32 2016
+++ xsrc/external/mit/xorg-server/dist/os/auth.c	Wed Mar  8 06:54:39 2017
@@ -52,7 +52,6 @@ struct protocol {
 AuthAddCFunc Add;   /* new authorization data */
 AuthCheckFunc Check;/* verify client authorization data */
 AuthRstCFunc Reset; /* delete all authorization data entries */
-AuthToIDFunc ToID;  /* convert cookie to ID */
 AuthFromIDFunc FromID;  /* convert ID to cookie */
 AuthRemCFunc Remove;/* remove a specific cookie */
 #ifdef XCSECURITY
@@ -63,7 +62,7 @@ struct protocol {
 static struct protocol protocols[] = {
 {(unsigned short) 18, "MIT-MAGIC-COOKIE-1",
  MitAddCookie, MitCheckCookie, MitResetCookie,
- MitToID, MitFromID, MitRemoveCookie,
+ MitFromID, MitRemoveCookie,
 #ifdef XCSECURITY
  MitGenerateCookie
 #endif
@@ -71,7 +70,7 @@ static struct protocol protocols[] = {
 #ifdef HASXDMAUTH
 {(unsigned short) 19, "XDM-AUTHORIZATION-1",
  XdmAddCookie, XdmCheckCookie, XdmResetCookie,
- XdmToID, XdmFromID, XdmRemoveCookie,
+ XdmFromID, XdmRemoveCookie,
 #ifdef XCSECURITY
  NULL
 #endif
@@ -80,7 +79,7 @@ static struct protocol protocols[] = {
 #ifdef SECURE_RPC
 {(unsigned short) 9, "SUN-DES-1",
  SecureRPCAdd, SecureRPCCheck, SecureRPCReset,
- SecureRPCToID, SecureRPCFromID, SecureRPCRemove,
+ SecureRPCFromID, SecureRPCRemove,
 #ifdef XCSECURITY
  NULL
 #endif
Index: xsrc/external/mit/xorg-server/dist/os/xdmauth.c
diff -u xsrc/external/mit/xorg-server/dist/os/xdmauth.c:1.1.1.4 xsrc/external/mit/xorg-server/dist/os/xdmauth.c:1.2
--- xsrc/external/mit/xorg-server/dist/os/xdmauth.c:1.1.1.4	Wed Aug 10 07:44:32 2016
+++ xsrc/external/mit/xorg-server/dist/os/xdmauth.c	Wed Mar  8 06:54:39 2017
@@ -411,33 +411,6 @@ XdmResetCookie(void)
 return 1;
 }
 
-XID
-XdmToID(unsigned short cookie_length, char *cookie)
-{
-XdmAuthorizationPtr auth;
-XdmClientAuthPtr client;
-unsigned char *plain;
-
-plain = malloc(cookie_length);
-if (!plain)
-return (XID) -1;
-for (auth = xdmAuth; auth; auth = auth->next) {
-XdmcpUnwrap((unsigned char *) cookie, (unsigned char *) &auth->key,
-plain, cookie_length);
-if ((client =
- XdmAuthorizationValidate(plain, cookie_length, &auth->rho, NULL,
-  NULL)) != NULL) {
-free(client);
-free(cookie);
-free(plain);
-return auth->id;
-}
-}
-free(cookie);
-free(plain);
-return (XID) -1;
-}
-
 int
 XdmFromID(XID id, unsigned short *data_lenp, char **datap)
 {

Index: xsrc/external/mit/xorg-server/dist/os/mitauth.c
diff -u xsrc/external/mit/xorg-server/dist/os/mitauth.c:1.1.1.3 xsrc/external/mit/xorg-server/dist/os/mitauth.c:1.2
--- xsrc/external/mit/xorg-server/dist/os/mitauth.c:1.1.1.3	Wed Aug 10 07:44:32 2016
+++ xsrc/external/mit/xorg-server/dist/os/mitauth.c	Wed Mar  8 06:54:39 2017
@@ -97,19 +97,6 @@ MitResetCookie(void)
 return 0;
 }
 
-XID
-MitToID(unsigned short data_length, char *data)
-{
-struct auth *auth;
-
-for (auth = mit_auth; auth; auth = auth->next) {
-if (data_length == auth->len &&
-memcmp(data, auth->data, data_length) == 0)
-return auth->id;
-}
-return (XID) -1;
-}
-
 int
 MitFromID(XID id, unsigned short *data_lenp, char **datap)
 {

Index: xsrc/external/mit/xorg-server/dist/os/osdep.h
diff -u xsrc/external/mit/xorg-server/dist/os/osdep.h:1.1.1.5 xsrc/external/mit/xorg-server/dist/os/osdep.h:1.2
--- xsrc/external/mit/xorg-server/dist/os/osdep.h:1.1.1.5	Wed Aug 10 07:44:32 2016
+++ xsrc/external/

CVS commit: src/tests/net/arp

2017-03-07 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Mar  8 05:30:56 UTC 2017

Modified Files:
src/tests/net/arp: t_dad.sh

Log Message:
Improve test stability and output messages on failure


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/net/arp/t_dad.sh

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

Modified files:

Index: src/tests/net/arp/t_dad.sh
diff -u src/tests/net/arp/t_dad.sh:1.13 src/tests/net/arp/t_dad.sh:1.14
--- src/tests/net/arp/t_dad.sh:1.13	Fri Nov 25 08:51:16 2016
+++ src/tests/net/arp/t_dad.sh	Wed Mar  8 05:30:56 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: t_dad.sh,v 1.13 2016/11/25 08:51:16 ozaki-r Exp $
+#	$NetBSD: t_dad.sh,v 1.14 2017/03/08 05:30:56 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -64,7 +64,7 @@ make_pkt_str()
 {
 	local target=$1
 	local sender=$2
-	pkt="> ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42:"
+	pkt="> ff:ff:ff:ff:ff:ff, ethertype ARP \(0x0806\), length 42:"
 	pkt="$pkt Request who-has $target tell $sender, length 28"
 	echo $pkt
 }
@@ -78,6 +78,10 @@ dad_basic_body()
 
 	export RUMP_SERVER=$SOCKLOCAL
 
+	# Increase the number of trials, which makes the tests stable
+	atf_check -s exit:0 -o match:'3 -> 5' \
+	rump.sysctl -w net.inet.ip.dad_count=5
+
 	atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.1/24
 	atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.2/24 alias
 	$DEBUG && rump.ifconfig shmif0
@@ -87,10 +91,9 @@ dad_basic_body()
 	$DEBUG && cat ./out
 
 	# The primary address doesn't start with tentative state
-	atf_check -s not-exit:0 -x "cat ./out |grep 10.0.0.1 |grep -iq tentative"
+	atf_check -s exit:0 -o not-match:'10\.0\.0\.1.+TENTATIVE' cat ./out
 	# The alias address starts with tentative state
-	# XXX we have no stable way to check this, so skip for now
-	#atf_check -s exit:0 -x "cat ./out |grep 10.0.0.2 |grep -iq tentative"
+	atf_check -s exit:0 -o match:'10\.0\.0\.2.+TENTATIVE' cat ./out
 
 	atf_check -s exit:0 sleep 2
 	extract_new_packets bus1 > ./out
@@ -98,23 +101,24 @@ dad_basic_body()
 
 	# Check DAD probe packets
 	pkt=$(make_pkt_str 10.0.0.2 0.0.0.0)
-	atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'"
+	atf_check -s exit:0 -o match:"$pkt" cat ./out
 	# No DAD for the primary address
 	pkt=$(make_pkt_str 10.0.0.1 0.0.0.0)
-	atf_check -s not-exit:0 -x "cat ./out |grep -q '$pkt'"
+	atf_check -s exit:0 -o not-match:"$pkt" cat ./out
 
 	# Waiting for DAD complete
 	atf_check -s exit:0 rump.ifconfig -w 10
 	# Give a chance to send a DAD announce packet
-	atf_check -s exit:0 sleep 1
+	atf_check -s exit:0 sleep 2
 	extract_new_packets bus1 > ./out
 	$DEBUG && cat ./out
 
 	# Check the DAD announce packet
 	pkt=$(make_pkt_str 10.0.0.2 10.0.0.2)
-	atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'"
+	atf_check -s exit:0 -o match:"$pkt" cat ./out
 	# The alias address left tentative
-	atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.2 |grep -iq tentative"
+	atf_check -s exit:0 -o not-match:'10\.0\.0\.2.+TENTATIVE' \
+	rump.ifconfig shmif0
 
 	#
 	# Add a new address on the fly
@@ -122,28 +126,29 @@ dad_basic_body()
 	atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.3/24 alias
 
 	# The new address starts with tentative state
-	# XXX we have no stable way to check this, so skip for now
-	#atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.3 |grep -iq tentative"
+	atf_check -s exit:0 -o match:'10\.0\.0\.3.+TENTATIVE' \
+	rump.ifconfig shmif0
 
 	# Check DAD probe packets
 	atf_check -s exit:0 sleep 2
 	extract_new_packets bus1 > ./out
 	$DEBUG && cat ./out
 	pkt=$(make_pkt_str 10.0.0.3 0.0.0.0)
-	atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'"
+	atf_check -s exit:0 -o match:"$pkt" cat ./out
 
 	# Waiting for DAD complete
 	atf_check -s exit:0 rump.ifconfig -w 10
 	# Give a chance to send a DAD announce packet
-	atf_check -s exit:0 sleep 1
+	atf_check -s exit:0 sleep 2
 	extract_new_packets bus1 > ./out
 	$DEBUG && cat ./out
 
 	# Check the DAD announce packet
 	pkt=$(make_pkt_str 10.0.0.3 10.0.0.3)
-	atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'"
+	atf_check -s exit:0 -o match:"$pkt" cat ./out
 	# The new address left tentative
-	atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.3 |grep -iq tentative"
+	atf_check -s exit:0 -o not-match:'10\.0\.0\.3.+TENTATIVE' \
+	rump.ifconfig shmif0
 
 	rump_server_destroy_ifaces
 }



CVS commit: xsrc/external/mit/xterm/include

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 04:11:14 UTC 2017

Added Files:
xsrc/external/mit/xterm/include: Tekparse.hin VTparse.hin

Log Message:
add new generated files.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 xsrc/external/mit/xterm/include/Tekparse.hin \
xsrc/external/mit/xterm/include/VTparse.hin

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

Added files:

Index: xsrc/external/mit/xterm/include/Tekparse.hin
diff -u /dev/null xsrc/external/mit/xterm/include/Tekparse.hin:1.1
--- /dev/null	Wed Mar  8 04:11:14 2017
+++ xsrc/external/mit/xterm/include/Tekparse.hin	Wed Mar  8 04:11:13 2017
@@ -0,0 +1,34 @@
+#define CASE_REPORT 0
+#define CASE_VT_MODE 1
+#define CASE_SPT_STATE 2
+#define CASE_GIN 3
+#define CASE_BEL 4
+#define CASE_BS 5
+#define CASE_PT_STATE 6
+#define CASE_PLT_STATE 7
+#define CASE_TAB 8
+#define CASE_IPL_STATE 9
+#define CASE_ALP_STATE 10
+#define CASE_UP 11
+#define CASE_COPY 12
+#define CASE_PAGE 13
+#define CASE_BES_STATE 14
+#define CASE_BYP_STATE 15
+#define CASE_IGNORE 16
+#define CASE_ASCII 17
+#define CASE_APL 18
+#define CASE_CHAR_SIZE 19
+#define CASE_BEAM_VEC 20
+#define CASE_CURSTATE 21
+#define CASE_PENUP 22
+#define CASE_PENDOWN 23
+#define CASE_IPL_POINT 24
+#define CASE_PLT_VEC 25
+#define CASE_PT_POINT 26
+#define CASE_SPT_POINT 27
+#define CASE_CR 28
+#define CASE_ESC_STATE 29
+#define CASE_LF 30
+#define CASE_SP 31
+#define CASE_PRINT 32
+#define CASE_OSC 33
Index: xsrc/external/mit/xterm/include/VTparse.hin
diff -u /dev/null xsrc/external/mit/xterm/include/VTparse.hin:1.1
--- /dev/null	Wed Mar  8 04:11:14 2017
+++ xsrc/external/mit/xterm/include/VTparse.hin	Wed Mar  8 04:11:14 2017
@@ -0,0 +1,162 @@
+#define CASE_GROUND_STATE 0
+#define CASE_IGNORE 1
+#define CASE_BELL 2
+#define CASE_BS 3
+#define CASE_CR 4
+#define CASE_ESC 5
+#define CASE_VMOT 6
+#define CASE_TAB 7
+#define CASE_SI 8
+#define CASE_SO 9
+#define CASE_SCR_STATE 10
+#define CASE_SCS0_STATE 11
+#define CASE_SCS1_STATE 12
+#define CASE_SCS2_STATE 13
+#define CASE_SCS3_STATE 14
+#define CASE_ESC_IGNORE 15
+#define CASE_ESC_DIGIT 16
+#define CASE_ESC_SEMI 17
+#define CASE_DEC_STATE 18
+#define CASE_ICH 19
+#define CASE_CUU 20
+#define CASE_CUD 21
+#define CASE_CUF 22
+#define CASE_CUB 23
+#define CASE_CUP 24
+#define CASE_ED 25
+#define CASE_EL 26
+#define CASE_IL 27
+#define CASE_DL 28
+#define CASE_DCH 29
+#define CASE_DA1 30
+#define CASE_TRACK_MOUSE 31
+#define CASE_TBC 32
+#define CASE_SET 33
+#define CASE_RST 34
+#define CASE_SGR 35
+#define CASE_CPR 36
+#define CASE_DECSTBM 37
+#define CASE_DECREQTPARM 38
+#define CASE_DECSET 39
+#define CASE_DECRST 40
+#define CASE_DECALN 41
+#define CASE_GSETS 42
+#define CASE_DECSC 43
+#define CASE_DECRC 44
+#define CASE_DECKPAM 45
+#define CASE_DECKPNM 46
+#define CASE_IND 47
+#define CASE_NEL 48
+#define CASE_HTS 49
+#define CASE_RI 50
+#define CASE_SS2 51
+#define CASE_SS3 52
+#define CASE_CSI_STATE 53
+#define CASE_OSC 54
+#define CASE_RIS 55
+#define CASE_LS2 56
+#define CASE_LS3 57
+#define CASE_LS3R 58
+#define CASE_LS2R 59
+#define CASE_LS1R 60
+#define CASE_PRINT 61
+#define CASE_XTERM_SAVE 62
+#define CASE_XTERM_RESTORE 63
+#define CASE_XTERM_TITLE 64
+#define CASE_DECID 65
+#define CASE_HP_MEM_LOCK 66
+#define CASE_HP_MEM_UNLOCK 67
+#define CASE_HP_BUGGY_LL 68
+#define CASE_HPA 69
+#define CASE_VPA 70
+#define CASE_XTERM_WINOPS 71
+#define CASE_ECH 72
+#define CASE_CHT 73
+#define CASE_CPL 74
+#define CASE_CNL 75
+#define CASE_CBT 76
+#define CASE_SU 77
+#define CASE_SD 78
+#define CASE_S7C1T 79
+#define CASE_S8C1T 80
+#define CASE_ESC_SP_STATE 81
+#define CASE_ENQ 82
+#define CASE_DECSCL 83
+#define CASE_DECSCA 84
+#define CASE_DECSED 85
+#define CASE_DECSEL 86
+#define CASE_DCS 87
+#define CASE_PM 88
+#define CASE_SOS 89
+#define CASE_ST 90
+#define CASE_APC 91
+#define CASE_EPA 92
+#define CASE_SPA 93
+#define CASE_CSI_QUOTE_STATE 94
+#define CASE_DSR 95
+#define CASE_ANSI_LEVEL_1 96
+#define CASE_ANSI_LEVEL_2 97
+#define CASE_ANSI_LEVEL_3 98
+#define CASE_MC 99
+#define CASE_DEC2_STATE 100
+#define CASE_DA2 101
+#define CASE_DEC3_STATE 102
+#define CASE_DECRPTUI 103
+#define CASE_VT52_CUP 104
+#define CASE_REP 105
+#define CASE_CSI_EX_STATE 106
+#define CASE_DECSTR 107
+#define CASE_DECDHL 108
+#define CASE_DECSWL 109
+#define CASE_DECDWL 110
+#define CASE_DEC_MC 111
+#define CASE_ESC_PERCENT 112
+#define CASE_UTF8 113
+#define CASE_CSI_TICK_STATE 114
+#define CASE_DECELR 115
+#define CASE_DECRQLP 116
+#define CASE_DECEFR 117
+#define CASE_DECSLE 118
+#define CASE_CSI_IGNORE 119
+#define CASE_VT52_IGNORE 120
+#define CASE_VT52_FINISH 121
+#define CASE_CSI_DOLLAR_STATE 122
+#define CASE_DECCRA 123
+#define CASE_DECERA 124
+#define CASE_DECFRA 125
+#define CASE_DECSERA 126
+#define CASE_DECSACE 127
+#define CASE_DECCARA 128
+#define CASE_DECRARA 129
+#define CASE_CSI_STAR_STATE 130
+#define CASE_SET_MOD_FKEYS 131
+#define CASE_SE

CVS commit: xsrc/external/mit/xterm/include

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 02:55:45 UTC 2017

Modified Files:
xsrc/external/mit/xterm/include: xtermcfg.h

Log Message:
update for xterm 327.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xterm/include/xtermcfg.h

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

Modified files:

Index: xsrc/external/mit/xterm/include/xtermcfg.h
diff -u xsrc/external/mit/xterm/include/xtermcfg.h:1.10 xsrc/external/mit/xterm/include/xtermcfg.h:1.11
--- xsrc/external/mit/xterm/include/xtermcfg.h:1.10	Thu Jul 23 04:57:09 2015
+++ xsrc/external/mit/xterm/include/xtermcfg.h	Wed Mar  8 02:55:45 2017
@@ -1,8 +1,8 @@
 /* xtermcfg.h.  Generated automatically by configure.  */
-/* $XTermId: xtermcfg.hin,v 1.208 2015/02/15 18:00:55 tom Exp $ */
+/* $XTermId: xtermcfg.hin,v 1.212 2016/05/30 20:42:13 tom Exp $ */
 
 /*
- * Copyright 1997-2014,2015 by Thomas E. Dickey
+ * Copyright 1997-2015,2016 by Thomas E. Dickey
  *
  * All Rights Reserved
  *
@@ -35,6 +35,22 @@
 #define included_xtermcfg_h 1
 
 /* This is a template for  */
+  
+/*
+ * There are no configure options for these features:
+ * ALLOWLOGFILECHANGES
+ * ALLOWLOGFILEONOFF
+ * CANT_OPEN_DEV_TTY
+ * DEBUG* (any debug-option)
+ * DUMP_BITMAP
+ * DUMP_COLORS
+ * HAS_LTCHARS
+ * HAVE_SYS_PTEM_H
+ * HAVE_X11_TRANSLATEI_H
+ * PUCC_PTYD
+ * USE_LOGIN_DASH_P
+ * USE_X11TERM
+ */
 
 /* #undef ALLOWLOGFILEEXEC */		/* CF_ARG_ENABLE(enable-logfile-exec) */
 /* #undef ALLOWLOGGING */		/* CF_ARG_ENABLE(enable-logging) */
@@ -78,6 +94,7 @@
 #define HAVE_PUTENV 1		/* AC_CHECK_FUNCS(putenv) */
 #define HAVE_SCHED_YIELD 1		/* AC_CHECK_FUNCS(sched_yield) */
 #define HAVE_SETPGID 1		/* AC_CHECK_FUNCS(setpgid) */
+#define HAVE_STDINT_H 1		/* AC_PROG_CC_STDC */
 #define HAVE_STDLIB_H 1		/* AC_CHECK_HEADERS(stdlib.h) */
 #define HAVE_STRFTIME 1		/* AC_CHECK_FUNCS(strftime) */
 /* #undef HAVE_SYS_TIME_H */		/* AC_HEADER_TIME */
@@ -125,6 +142,7 @@
 /* #undef OPT_BOX_CHARS */		/* CF_ARG_DISABLE(boxchars) */
 #define OPT_BROKEN_OSC 0		/* CF_ARG_ENABLE(broken-osc) */
 /* #undef OPT_BROKEN_ST */		/* CF_ARG_DISABLE(broken-st) */
+/* #undef OPT_BUILTIN_XPMS */		/* CF_ARG_ENABLE(builtin-xpms) */
 /* #undef OPT_C1_PRINT */		/* CF_ARG_DISABLE(c1-print) */
 /* #undef OPT_COLOR_CLASS */		/* CF_ARG_DISABLE(color-class) */
 /* #undef OPT_DABBREV */		/* CF_ARG_ENABLE(dabbrev) */
@@ -147,6 +165,7 @@
 /* #undef OPT_NUM_LOCK */		/* CF_ARG_DISABLE(num-lock) */
 #define OPT_PASTE64 1		/* CF_ARG_ENABLE(past64) */
 /* #undef OPT_PC_COLORS */		/* CF_ARG_DISABLE(pc-color) */
+/* #undef OPT_SCREEN_DUMPS */		/* CF_ARG_ENABLE(screen-dumps) */
 #define OPT_PTY_HANDSHAKE 1	/* CF_ARG_ENABLE(pty-handshake) */
 /* #undef OPT_READLINE */		/* CF_ARG_ENABLE(readline-mouse) */
 /* #undef OPT_SAME_NAME */		/* CF_ARG_DISABLE(samename) */



CVS import: xsrc/external/mit/xterm/dist

2017-03-07 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Wed Mar  8 02:54:12 UTC 2017

Update of /cvsroot/xsrc/external/mit/xterm/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv22877

Log Message:
initial import of xterm-327

Status:

Vendor Tag: xorg
Release Tags:   xterm-327

C xsrc/external/mit/xterm/dist/fontutils.c
U xsrc/external/mit/xterm/dist/data.h
U xsrc/external/mit/xterm/dist/uxterm.desktop
U xsrc/external/mit/xterm/dist/make.com
U xsrc/external/mit/xterm/dist/graphics_sixel.h
U xsrc/external/mit/xterm/dist/256colres.pl
U xsrc/external/mit/xterm/dist/xtermcfg.hin
U xsrc/external/mit/xterm/dist/Tekparse.h
U xsrc/external/mit/xterm/dist/README.i18n
U xsrc/external/mit/xterm/dist/XTerm-col.ad
U xsrc/external/mit/xterm/dist/charclass.c
U xsrc/external/mit/xterm/dist/xterm.desktop
C xsrc/external/mit/xterm/dist/xterm.man
U xsrc/external/mit/xterm/dist/data.c
U xsrc/external/mit/xterm/dist/print.c
U xsrc/external/mit/xterm/dist/fontutils.h
U xsrc/external/mit/xterm/dist/precompose.h
C xsrc/external/mit/xterm/dist/misc.c
U xsrc/external/mit/xterm/dist/precompose.c
U xsrc/external/mit/xterm/dist/main.h
U xsrc/external/mit/xterm/dist/keysym2ucs.c
U xsrc/external/mit/xterm/dist/trace.c
U xsrc/external/mit/xterm/dist/error.h
U xsrc/external/mit/xterm/dist/version.c
U xsrc/external/mit/xterm/dist/tabs.c
U xsrc/external/mit/xterm/dist/koi8rxterm.man
C xsrc/external/mit/xterm/dist/scrollback.c
U xsrc/external/mit/xterm/dist/graphics.c
U xsrc/external/mit/xterm/dist/ctlseqs.ms
U xsrc/external/mit/xterm/dist/version.h
U xsrc/external/mit/xterm/dist/ptydata.c
U xsrc/external/mit/xterm/dist/aclocal.m4
C xsrc/external/mit/xterm/dist/ptyx.h
U xsrc/external/mit/xterm/dist/trace.h
U xsrc/external/mit/xterm/dist/button.c
U xsrc/external/mit/xterm/dist/xtermcap.c
U xsrc/external/mit/xterm/dist/charsets.c
U xsrc/external/mit/xterm/dist/xutf8.h
U xsrc/external/mit/xterm/dist/xterm.log.html
U xsrc/external/mit/xterm/dist/charproc.c
U xsrc/external/mit/xterm/dist/install-sh
U xsrc/external/mit/xterm/dist/plink.sh
U xsrc/external/mit/xterm/dist/Makefile.in
U xsrc/external/mit/xterm/dist/minstall.in
U xsrc/external/mit/xterm/dist/ctlseqs.txt
U xsrc/external/mit/xterm/dist/README
U xsrc/external/mit/xterm/dist/xstrings.c
U xsrc/external/mit/xterm/dist/xstrings.h
U xsrc/external/mit/xterm/dist/configure.in
U xsrc/external/mit/xterm/dist/Tekproc.c
U xsrc/external/mit/xterm/dist/vms.h
U xsrc/external/mit/xterm/dist/cachedGCs.c
U xsrc/external/mit/xterm/dist/uxterm.man
U xsrc/external/mit/xterm/dist/configure
U xsrc/external/mit/xterm/dist/resize.c
U xsrc/external/mit/xterm/dist/charclass.h
U xsrc/external/mit/xterm/dist/xutf8.c
N xsrc/external/mit/xterm/dist/NEWS
U xsrc/external/mit/xterm/dist/cursor.c
U xsrc/external/mit/xterm/dist/terminfo
U xsrc/external/mit/xterm/dist/xterm.dat
N xsrc/external/mit/xterm/dist/html.c
U xsrc/external/mit/xterm/dist/uxterm
U xsrc/external/mit/xterm/dist/graphics.h
C xsrc/external/mit/xterm/dist/XTerm.ad
U xsrc/external/mit/xterm/dist/df-install.in
U xsrc/external/mit/xterm/dist/termcap
U xsrc/external/mit/xterm/dist/256colres.h
U xsrc/external/mit/xterm/dist/menu.c
U xsrc/external/mit/xterm/dist/vms.c
U xsrc/external/mit/xterm/dist/88colres.h
U xsrc/external/mit/xterm/dist/TekPrsTbl.c
U xsrc/external/mit/xterm/dist/xterm.appdata.xml
U xsrc/external/mit/xterm/dist/AAA_README_VMS.txt
U xsrc/external/mit/xterm/dist/graphics_regis.h
U xsrc/external/mit/xterm/dist/koi8rxterm
U xsrc/external/mit/xterm/dist/xtermcap.h
U xsrc/external/mit/xterm/dist/scrollbar.c
U xsrc/external/mit/xterm/dist/link_axp.com
U xsrc/external/mit/xterm/dist/KOI8RXTerm.ad
U xsrc/external/mit/xterm/dist/88colres.pl
U xsrc/external/mit/xterm/dist/graphics_regis.c
U xsrc/external/mit/xterm/dist/run-tic.sh
U xsrc/external/mit/xterm/dist/VTPrsTbl.c
U xsrc/external/mit/xterm/dist/graphics_sixel.c
U xsrc/external/mit/xterm/dist/doublechr.c
U xsrc/external/mit/xterm/dist/xcharmouse.h
U xsrc/external/mit/xterm/dist/Tests
U xsrc/external/mit/xterm/dist/xterm_io.h
U xsrc/external/mit/xterm/dist/wcwidth.c
U xsrc/external/mit/xterm/dist/menu.h
U xsrc/external/mit/xterm/dist/keysym2ucs.h
U xsrc/external/mit/xterm/dist/resize.man
U xsrc/external/mit/xterm/dist/THANKS
U xsrc/external/mit/xterm/dist/config.sub
U xsrc/external/mit/xterm/dist/Imakefile
U xsrc/external/mit/xterm/dist/Tekparse.def
U xsrc/external/mit/xterm/dist/INSTALL
U xsrc/external/mit/xterm/dist/xterm.h
U xsrc/external/mit/xterm/dist/gen-pc-fkeys.pl
U xsrc/external/mit/xterm/dist/UXTerm.ad
U xsrc/external/mit/xterm/dist/main.c
U xsrc/external/mit/xterm/dist/input.c
U xsrc/external/mit/xterm/dist/README.os390
U xsrc/external/mit/xterm/dist/config.guess
U xsrc/external/mit/xterm/dist/wcwidth.h
N xsrc/external/mit/xterm/dist/svg.c
U xsrc/external/mit/xterm/dist/xterm_axp.opt
U xsrc/external/mit/xterm/dist/VTparse.h
U xsrc/external/mit/xterm/dist/MANIFEST
U xsrc/external/mit/xterm/dist/testxmc.c
U xsrc/external/mit/xterm/dist/util.c
U xsrc/external/mit/xter

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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar  8 00:39:57 UTC 2017

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

Log Message:
amend 1437


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.86 -r1.1.2.87 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.86 src/doc/CHANGES-6.0.7:1.1.2.87
--- src/doc/CHANGES-6.0.7:1.1.2.86	Tue Mar  7 20:58:48 2017
+++ src/doc/CHANGES-6.0.7	Wed Mar  8 00:39:57 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.86 2017/03/07 20:58:48 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.87 2017/03/08 00:39:57 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -10308,7 +10308,7 @@ sys/arch/x86/x86/pmap.c1.241 via pat
 
 libexec/httpd/CHANGES   up to 1.25
 libexec/httpd/bozohttpd.8   up to 1.65
-libexec/httpd/bozohttpd.c   up to 1.86
+libexec/httpd/bozohttpd.c   up to 1.86 via patch
 libexec/httpd/bozohttpd.h   up to 1.47
 libexec/httpd/cgi-bozo.cup to 1.37
 libexec/httpd/content-bozo.cup to 1.14



CVS commit: [netbsd-6-0] src/libexec/httpd

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar  8 00:39:44 UTC 2017

Modified Files:
src/libexec/httpd [netbsd-6-0]: bozohttpd.c

Log Message:
Put back a netbsd-6* workaround accidentally removed in ticket 1437:
Explicitly initialize uid to avoid a gcc warning.


To generate a diff of this commit:
cvs rdiff -u -r1.30.6.3 -r1.30.6.4 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.30.6.3 src/libexec/httpd/bozohttpd.c:1.30.6.4
--- src/libexec/httpd/bozohttpd.c:1.30.6.3	Tue Mar  7 07:16:08 2017
+++ src/libexec/httpd/bozohttpd.c	Wed Mar  8 00:39:44 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.30.6.3 2017/03/07 07:16:08 snj Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.30.6.4 2017/03/08 00:39:44 snj Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -2243,7 +2243,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 	struct passwd	 *pw;
 	extern char	**environ;
 	static char	 *cleanenv[1] = { NULL };
-	uid_t		  uid;
+	uid_t		  uid = 0;
 	int		  uidset = 0;
 	char		 *chrootdir;
 	char		 *username;



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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar  8 00:39:23 UTC 2017

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

Log Message:
amend 1437


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.84 -r1.1.2.85 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.84 src/doc/CHANGES-6.1.6:1.1.2.85
--- src/doc/CHANGES-6.1.6:1.1.2.84	Tue Mar  7 21:00:11 2017
+++ src/doc/CHANGES-6.1.6	Wed Mar  8 00:39:23 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.84 2017/03/07 21:00:11 snj Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.85 2017/03/08 00:39:23 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -10028,7 +10028,7 @@ sys/arch/x86/x86/pmap.c1.241 via pat
 
 libexec/httpd/CHANGES   up to 1.25
 libexec/httpd/bozohttpd.8   up to 1.65
-libexec/httpd/bozohttpd.c   up to 1.86
+libexec/httpd/bozohttpd.c   up to 1.86 via patch
 libexec/httpd/bozohttpd.h   up to 1.47
 libexec/httpd/cgi-bozo.cup to 1.37
 libexec/httpd/content-bozo.cup to 1.14



CVS commit: [netbsd-6-1] src/libexec/httpd

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar  8 00:39:06 UTC 2017

Modified Files:
src/libexec/httpd [netbsd-6-1]: bozohttpd.c

Log Message:
Put back a netbsd-6* workaround accidentally removed in ticket 1437:
Explicitly initialize uid to avoid a gcc warning.


To generate a diff of this commit:
cvs rdiff -u -r1.30.8.3 -r1.30.8.4 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.30.8.3 src/libexec/httpd/bozohttpd.c:1.30.8.4
--- src/libexec/httpd/bozohttpd.c:1.30.8.3	Tue Mar  7 07:21:53 2017
+++ src/libexec/httpd/bozohttpd.c	Wed Mar  8 00:39:06 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.30.8.3 2017/03/07 07:21:53 snj Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.30.8.4 2017/03/08 00:39:06 snj Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -2243,7 +2243,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 	struct passwd	 *pw;
 	extern char	**environ;
 	static char	 *cleanenv[1] = { NULL };
-	uid_t		  uid;
+	uid_t		  uid = 0;
 	int		  uidset = 0;
 	char		 *chrootdir;
 	char		 *username;



CVS commit: [netbsd-6] src/doc

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar  8 00:38:33 UTC 2017

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

Log Message:
amend 1437


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.275 -r1.1.2.276 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.275 src/doc/CHANGES-6.2:1.1.2.276
--- src/doc/CHANGES-6.2:1.1.2.275	Tue Mar  7 21:02:13 2017
+++ src/doc/CHANGES-6.2	Wed Mar  8 00:38:33 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.275 2017/03/07 21:02:13 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.276 2017/03/08 00:38:33 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -16387,7 +16387,7 @@ sys/arch/x86/x86/pmap.c1.241 via pat
 
 libexec/httpd/CHANGES   up to 1.25
 libexec/httpd/bozohttpd.8   up to 1.65
-libexec/httpd/bozohttpd.c   up to 1.86
+libexec/httpd/bozohttpd.c   up to 1.86 via patch
 libexec/httpd/bozohttpd.h   up to 1.47
 libexec/httpd/cgi-bozo.cup to 1.37
 libexec/httpd/content-bozo.cup to 1.14



CVS commit: [netbsd-6] src/libexec/httpd

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar  8 00:38:18 UTC 2017

Modified Files:
src/libexec/httpd [netbsd-6]: bozohttpd.c

Log Message:
Add back a netbsd-6* workaround accidentally removed in ticket 1437:
Explicitly initialize uid to avoid a gcc warning.


To generate a diff of this commit:
cvs rdiff -u -r1.30.2.4 -r1.30.2.5 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.30.2.4 src/libexec/httpd/bozohttpd.c:1.30.2.5
--- src/libexec/httpd/bozohttpd.c:1.30.2.4	Tue Mar  7 07:25:18 2017
+++ src/libexec/httpd/bozohttpd.c	Wed Mar  8 00:38:18 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.30.2.4 2017/03/07 07:25:18 snj Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.30.2.5 2017/03/08 00:38:18 snj Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -2243,7 +2243,7 @@ bozo_setup(bozohttpd_t *httpd, bozoprefs
 	struct passwd	 *pw;
 	extern char	**environ;
 	static char	 *cleanenv[1] = { NULL };
-	uid_t		  uid;
+	uid_t		  uid = 0;
 	int		  uidset = 0;
 	char		 *chrootdir;
 	char		 *username;



CVS commit: src/doc

2017-03-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Mar  7 23:35:50 UTC 2017

Modified Files:
src/doc: 3RDPARTY

Log Message:
binutils-2.28 released.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1420 src/doc/3RDPARTY:1.1421
--- src/doc/3RDPARTY:1.1420	Wed Mar  1 00:41:39 2017
+++ src/doc/3RDPARTY	Tue Mar  7 23:35:50 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1420 2017/03/01 00:41:39 kre Exp $
+#	$NetBSD: 3RDPARTY,v 1.1421 2017/03/07 23:35:50 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -186,7 +186,7 @@ Todo[5]: Reconcile the doc directory.
 
 Package:	binutils
 Version:	2.27
-Current Vers:	2.27
+Current Vers:	2.28
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
 Home Page:	http://www.gnu.org/software/binutils/



CVS commit: src/sys/dev/pci

2017-03-07 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Mar  7 22:03:04 UTC 2017

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

Log Message:
allocate bus dma maps during attachment, rather than creating and destroying
them for each request; besides being faster, bus_dmamap_destroy() is not
safe to be called from interrupt context

adresses PR kern/52034 by Benny Siegert


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

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

Modified files:

Index: src/sys/dev/pci/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.8 src/sys/dev/pci/vioscsi.c:1.9
--- src/sys/dev/pci/vioscsi.c:1.8	Tue Oct  4 18:23:24 2016
+++ src/sys/dev/pci/vioscsi.c	Tue Mar  7 22:03:04 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vioscsi.c,v 1.8 2016/10/04 18:23:24 jdolecek Exp $	*/
+/*	$NetBSD: vioscsi.c,v 1.9 2017/03/07 22:03:04 jdolecek Exp $	*/
 /*	$OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.8 2016/10/04 18:23:24 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.9 2017/03/07 22:03:04 jdolecek Exp $");
 
 #include 
 #include 
@@ -58,6 +58,7 @@ struct vioscsi_softc {
 
 	struct virtqueue	 sc_vqs[3];
 	struct vioscsi_req	*sc_reqs;
+	int			 sc_nreqs;
 	bus_dma_segment_tsc_reqs_segs[1];
 
 	u_int32_t		 sc_seg_max;
@@ -470,47 +471,17 @@ vioscsi_req_get(struct vioscsi_softc *sc
 
 	if ((r = virtio_enqueue_prep(vsc, vq, &slot)) != 0) {
 		DPRINTF(("%s: virtio_enqueue_get error %d\n", __func__, r));
-		goto err1;
+		return NULL;
 	}
+	KASSERT(slot < sc->sc_nreqs);
 	vr = &sc->sc_reqs[slot];
 
 	vr->vr_req.id = slot;
 	vr->vr_req.task_attr = VIRTIO_SCSI_S_SIMPLE;
 
-	r = bus_dmamap_create(vsc->sc_dmat,
-	offsetof(struct vioscsi_req, vr_xs), 1,
-	offsetof(struct vioscsi_req, vr_xs), 0,
-	BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &vr->vr_control);
-	if (r != 0) {
-		DPRINTF(("%s: bus_dmamap_create xs error %d\n", __func__, r));
-		goto err2;
-	}
-	r = bus_dmamap_create(vsc->sc_dmat, MAXPHYS, sc->sc_seg_max,
-	MAXPHYS, 0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &vr->vr_data);
-	if (r != 0) {
-		DPRINTF(("%s: bus_dmamap_create data error %d\n", __func__, r));
-		goto err3;
-	}
-	r = bus_dmamap_load(vsc->sc_dmat, vr->vr_control,
-	vr, offsetof(struct vioscsi_req, vr_xs), NULL,
-	BUS_DMA_NOWAIT);
-	if (r != 0) {
-		DPRINTF(("%s: bus_dmamap_create ctrl error %d\n", __func__, r));
-		goto err4;
-	}
-
 	DPRINTF(("%s: %p, %d\n", __func__, vr, slot));
 
 	return vr;
-
-err4:
-	bus_dmamap_destroy(vsc->sc_dmat, vr->vr_data);
-err3:
-	bus_dmamap_destroy(vsc->sc_dmat, vr->vr_control);
-err2:
-	virtio_enqueue_abort(vsc, vq, slot);
-err1:
-	return NULL;
 }
 
 static void
@@ -522,8 +493,7 @@ vioscsi_req_put(struct vioscsi_softc *sc
 
 	DPRINTF(("%s: %p, %d\n", __func__, vr, slot));
 
-	bus_dmamap_destroy(vsc->sc_dmat, vr->vr_control);
-	bus_dmamap_destroy(vsc->sc_dmat, vr->vr_data);
+	bus_dmamap_unload(vsc->sc_dmat, vr->vr_data);
 
 	virtio_dequeue_commit(vsc, vq, slot);
 }
@@ -533,8 +503,9 @@ vioscsi_alloc_reqs(struct vioscsi_softc 
 int qsize, uint32_t seg_max)
 {
 	size_t allocsize;
-	int r, rsegs;
+	int r, rsegs, slot;
 	void *vaddr;
+	struct vioscsi_req *vr;
 
 	allocsize = qsize * sizeof(struct vioscsi_req);
 	r = bus_dmamem_alloc(vsc->sc_dmat, allocsize, 0, 0,
@@ -543,7 +514,7 @@ vioscsi_alloc_reqs(struct vioscsi_softc 
 		aprint_error_dev(sc->sc_dev,
 		"%s: bus_dmamem_alloc, size %zu, error %d\n", __func__,
 		allocsize, r);
-		return 1;
+		return r;
 	}
 	r = bus_dmamem_map(vsc->sc_dmat, &sc->sc_reqs_segs[0], 1,
 	allocsize, &vaddr, BUS_DMA_NOWAIT);
@@ -551,9 +522,68 @@ vioscsi_alloc_reqs(struct vioscsi_softc 
 		aprint_error_dev(sc->sc_dev,
 		"%s: bus_dmamem_map failed, error %d\n", __func__, r);
 		bus_dmamem_free(vsc->sc_dmat, &sc->sc_reqs_segs[0], 1);
-		return 1;
+		return r;
 	}
-	sc->sc_reqs = vaddr;
 	memset(vaddr, 0, allocsize);
+
+	sc->sc_reqs = vaddr;
+	sc->sc_nreqs = qsize;
+
+	/* Prepare maps for the requests */ 
+	for (slot=0; slot < qsize; slot++) {
+		vr = &sc->sc_reqs[slot];
+
+		r = bus_dmamap_create(vsc->sc_dmat,
+		offsetof(struct vioscsi_req, vr_xs), 1,
+		offsetof(struct vioscsi_req, vr_xs), 0,
+		BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &vr->vr_control);
+		if (r != 0) {
+			aprint_error_dev(sc->sc_dev,
+			"%s: bus_dmamem_create failed, error %d\n",
+			__func__, r);
+			goto cleanup;
+		}
+
+		r = bus_dmamap_create(vsc->sc_dmat, MAXPHYS, sc->sc_seg_max,
+		MAXPHYS, 0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &vr->vr_data);
+		if (r != 0) {
+			aprint_error_dev(sc->sc_dev,
+			"%s: bus_dmamem_map failed, error %d\n",
+			__func__, r);
+			goto cleanup;
+		}
+
+		r = bus_dmamap_load(vsc->sc_dmat, vr->vr_control,
+		vr, offsetof(struct vioscsi_req, vr_xs), NULL,
+		BUS_DMA_NOWAIT);
+		if (r != 0) {
+			aprint_erro

CVS commit: [netbsd-6] src/doc

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 21:02:14 UTC 2017

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

Log Message:
1442


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.274 -r1.1.2.275 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.274 src/doc/CHANGES-6.2:1.1.2.275
--- src/doc/CHANGES-6.2:1.1.2.274	Tue Mar  7 07:25:56 2017
+++ src/doc/CHANGES-6.2	Tue Mar  7 21:02:13 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.274 2017/03/07 07:25:56 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.275 2017/03/07 21:02:13 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -16409,3 +16409,12 @@ libexec/httpd/testsuite/test-simple 
 	- add a bozo_get_version() function which returns the version number
 	[mrg, ticket #1437]
 
+xsrc/external/mit/libICE/dist/src/iceauth.c	patch
+xsrc/xfree/xc/lib/ICE/iceauth.c			patch
+external/mit/xorg/lib/libICE/Makefile		patch
+x11/lib/ICE/Makefilepatch
+
+	Use arc4random when available to produce the auth cookie.
+	(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)
+	[mrg, ticket #1442]
+



CVS commit: [netbsd-6] src

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 21:01:29 UTC 2017

Modified Files:
src/external/mit/xorg/lib/libICE [netbsd-6]: Makefile
src/x11/lib/ICE [netbsd-6]: Makefile

Log Message:
Apply patch (requested by mrg in ticket #1442):
Define HAVE_ARC4RANDOM_BUF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.24.1 src/external/mit/xorg/lib/libICE/Makefile
cvs rdiff -u -r1.2 -r1.2.56.1 src/x11/lib/ICE/Makefile

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/xorg/lib/libICE/Makefile
diff -u src/external/mit/xorg/lib/libICE/Makefile:1.2 src/external/mit/xorg/lib/libICE/Makefile:1.2.24.1
--- src/external/mit/xorg/lib/libICE/Makefile:1.2	Sat Sep 13 04:32:30 2008
+++ src/external/mit/xorg/lib/libICE/Makefile	Tue Mar  7 21:01:28 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/09/13 04:32:30 cube Exp $
+#	$NetBSD: Makefile,v 1.2.24.1 2017/03/07 21:01:28 snj Exp $
 
 .include 
 
@@ -17,6 +17,7 @@ CONN_DEFINES=	${X11FLAGS.CONNECTION} -DI
 SOCK_DEFINES=	-DBSD44SOCKETS
 
 CPPFLAGS+=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=	-DHAVE_ARC4RANDOM_BUF
 
 PKGDIST=	${LIB}
 

Index: src/x11/lib/ICE/Makefile
diff -u src/x11/lib/ICE/Makefile:1.2 src/x11/lib/ICE/Makefile:1.2.56.1
--- src/x11/lib/ICE/Makefile:1.2	Sat Sep 13 20:18:43 2003
+++ src/x11/lib/ICE/Makefile	Tue Mar  7 21:01:29 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2003/09/13 20:18:43 lukem Exp $
+#	$NetBSD: Makefile,v 1.2.56.1 2017/03/07 21:01:29 snj Exp $
 
 .include 
 
@@ -25,6 +25,7 @@ CPPFLAGS.listenwk.c=	$(TRANS_INCLUDES) $
 CPPFLAGS.misc.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.shutdown.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.transport.c=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=		-DHAVE_ARC4RANDOM_BUF
 
 .include 
 .include 



CVS commit: [netbsd-6] xsrc

2017-03-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Mar  7 21:00:47 UTC 2017

Modified Files:
xsrc/external/mit/libICE/dist/src [netbsd-6]: iceauth.c
xsrc/xfree/xc/lib/ICE [netbsd-6]: iceauth.c

Log Message:
Apply patch (requested by mrg in ticket #1442):
Use arc4random when available to produce the auth cookie.
(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.2.1 \
xsrc/external/mit/libICE/dist/src/iceauth.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.28.1 xsrc/xfree/xc/lib/ICE/iceauth.c

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

Modified files:

Index: xsrc/external/mit/libICE/dist/src/iceauth.c
diff -u xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3 xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3.2.1
--- xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3	Sun Nov 21 05:47:12 2010
+++ xsrc/external/mit/libICE/dist/src/iceauth.c	Tue Mar  7 21:00:47 2017
@@ -36,6 +36,10 @@ Author: Ralph Mor, X Consortium
 #include 
 #define Time_t time_t
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -50,14 +54,19 @@ IceGenerateMagicCookie (
 )
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -81,8 +90,8 @@ IceGenerateMagicCookie (
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 

Index: xsrc/xfree/xc/lib/ICE/iceauth.c
diff -u xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5 xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5.28.1
--- xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5	Fri Feb 28 13:18:45 2003
+++ xsrc/xfree/xc/lib/ICE/iceauth.c	Tue Mar  7 21:00:47 2017
@@ -37,6 +37,10 @@ Author: Ralph Mor, X Consortium
 
 static int binaryEqual ();
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -52,14 +56,19 @@ int len;
 
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -83,8 +92,8 @@ int len;
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 



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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 21:00:11 UTC 2017

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

Log Message:
1442


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.83 -r1.1.2.84 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.83 src/doc/CHANGES-6.1.6:1.1.2.84
--- src/doc/CHANGES-6.1.6:1.1.2.83	Tue Mar  7 07:22:48 2017
+++ src/doc/CHANGES-6.1.6	Tue Mar  7 21:00:11 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.83 2017/03/07 07:22:48 snj Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.84 2017/03/07 21:00:11 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -10050,3 +10050,12 @@ libexec/httpd/testsuite/test-simple 
 	- add a bozo_get_version() function which returns the version number
 	[mrg, ticket #1437]
 
+xsrc/external/mit/libICE/dist/src/iceauth.c	patch
+xsrc/xfree/xc/lib/ICE/iceauth.c			patch
+external/mit/xorg/lib/libICE/Makefile		patch
+x11/lib/ICE/Makefilepatch
+
+	Use arc4random when available to produce the auth cookie.
+	(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)
+	[mrg, ticket #1442]
+



CVS commit: [netbsd-6-1] src

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:59:51 UTC 2017

Modified Files:
src/external/mit/xorg/lib/libICE [netbsd-6-1]: Makefile
src/x11/lib/ICE [netbsd-6-1]: Makefile

Log Message:
Apply patch (requested by mrg in ticket #1442):
Define HAVE_ARC4RANDOM_BUF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.32.1 src/external/mit/xorg/lib/libICE/Makefile
cvs rdiff -u -r1.2 -r1.2.70.1 src/x11/lib/ICE/Makefile

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/xorg/lib/libICE/Makefile
diff -u src/external/mit/xorg/lib/libICE/Makefile:1.2 src/external/mit/xorg/lib/libICE/Makefile:1.2.32.1
--- src/external/mit/xorg/lib/libICE/Makefile:1.2	Sat Sep 13 04:32:30 2008
+++ src/external/mit/xorg/lib/libICE/Makefile	Tue Mar  7 20:59:51 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/09/13 04:32:30 cube Exp $
+#	$NetBSD: Makefile,v 1.2.32.1 2017/03/07 20:59:51 snj Exp $
 
 .include 
 
@@ -17,6 +17,7 @@ CONN_DEFINES=	${X11FLAGS.CONNECTION} -DI
 SOCK_DEFINES=	-DBSD44SOCKETS
 
 CPPFLAGS+=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=	-DHAVE_ARC4RANDOM_BUF
 
 PKGDIST=	${LIB}
 

Index: src/x11/lib/ICE/Makefile
diff -u src/x11/lib/ICE/Makefile:1.2 src/x11/lib/ICE/Makefile:1.2.70.1
--- src/x11/lib/ICE/Makefile:1.2	Sat Sep 13 20:18:43 2003
+++ src/x11/lib/ICE/Makefile	Tue Mar  7 20:59:51 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2003/09/13 20:18:43 lukem Exp $
+#	$NetBSD: Makefile,v 1.2.70.1 2017/03/07 20:59:51 snj Exp $
 
 .include 
 
@@ -25,6 +25,7 @@ CPPFLAGS.listenwk.c=	$(TRANS_INCLUDES) $
 CPPFLAGS.misc.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.shutdown.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.transport.c=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=		-DHAVE_ARC4RANDOM_BUF
 
 .include 
 .include 



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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:58:48 UTC 2017

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

Log Message:
1442


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.85 -r1.1.2.86 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.85 src/doc/CHANGES-6.0.7:1.1.2.86
--- src/doc/CHANGES-6.0.7:1.1.2.85	Tue Mar  7 07:16:38 2017
+++ src/doc/CHANGES-6.0.7	Tue Mar  7 20:58:48 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.85 2017/03/07 07:16:38 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.86 2017/03/07 20:58:48 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -10330,3 +10330,12 @@ libexec/httpd/testsuite/test-simple 
 	- add a bozo_get_version() function which returns the version number
 	[mrg, ticket #1437]
 
+xsrc/external/mit/libICE/dist/src/iceauth.c	patch
+xsrc/xfree/xc/lib/ICE/iceauth.c			patch
+external/mit/xorg/lib/libICE/Makefile		patch
+x11/lib/ICE/Makefilepatch
+
+	Use arc4random when available to produce the auth cookie.
+	(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)
+	[mrg, ticket #1442]
+



CVS commit: [netbsd-6-1] xsrc

2017-03-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Mar  7 20:59:18 UTC 2017

Modified Files:
xsrc/external/mit/libICE/dist/src [netbsd-6-1]: iceauth.c
xsrc/xfree/xc/lib/ICE [netbsd-6-1]: iceauth.c

Log Message:
Apply patch (requested by mrg in ticket #1442):
Use arc4random when available to produce the auth cookie.
(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.6.1 \
xsrc/external/mit/libICE/dist/src/iceauth.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.34.1 xsrc/xfree/xc/lib/ICE/iceauth.c

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

Modified files:

Index: xsrc/external/mit/libICE/dist/src/iceauth.c
diff -u xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3 xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3.6.1
--- xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3	Sun Nov 21 05:47:12 2010
+++ xsrc/external/mit/libICE/dist/src/iceauth.c	Tue Mar  7 20:59:18 2017
@@ -36,6 +36,10 @@ Author: Ralph Mor, X Consortium
 #include 
 #define Time_t time_t
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -50,14 +54,19 @@ IceGenerateMagicCookie (
 )
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -81,8 +90,8 @@ IceGenerateMagicCookie (
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 

Index: xsrc/xfree/xc/lib/ICE/iceauth.c
diff -u xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5 xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5.34.1
--- xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5	Fri Feb 28 13:18:45 2003
+++ xsrc/xfree/xc/lib/ICE/iceauth.c	Tue Mar  7 20:59:18 2017
@@ -37,6 +37,10 @@ Author: Ralph Mor, X Consortium
 
 static int binaryEqual ();
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -52,14 +56,19 @@ int len;
 
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -83,8 +92,8 @@ int len;
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 



CVS commit: [netbsd-6-0] src

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:56:08 UTC 2017

Modified Files:
src/external/mit/xorg/lib/libICE [netbsd-6-0]: Makefile
src/x11/lib/ICE [netbsd-6-0]: Makefile

Log Message:
Apply patch (requested by mrg in ticket #1442):
Define HAVE_ARC4RANDOM_BUF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.28.1 src/external/mit/xorg/lib/libICE/Makefile
cvs rdiff -u -r1.2 -r1.2.62.1 src/x11/lib/ICE/Makefile

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/xorg/lib/libICE/Makefile
diff -u src/external/mit/xorg/lib/libICE/Makefile:1.2 src/external/mit/xorg/lib/libICE/Makefile:1.2.28.1
--- src/external/mit/xorg/lib/libICE/Makefile:1.2	Sat Sep 13 04:32:30 2008
+++ src/external/mit/xorg/lib/libICE/Makefile	Tue Mar  7 20:56:08 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/09/13 04:32:30 cube Exp $
+#	$NetBSD: Makefile,v 1.2.28.1 2017/03/07 20:56:08 snj Exp $
 
 .include 
 
@@ -17,6 +17,7 @@ CONN_DEFINES=	${X11FLAGS.CONNECTION} -DI
 SOCK_DEFINES=	-DBSD44SOCKETS
 
 CPPFLAGS+=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=	-DHAVE_ARC4RANDOM_BUF
 
 PKGDIST=	${LIB}
 

Index: src/x11/lib/ICE/Makefile
diff -u src/x11/lib/ICE/Makefile:1.2 src/x11/lib/ICE/Makefile:1.2.62.1
--- src/x11/lib/ICE/Makefile:1.2	Sat Sep 13 20:18:43 2003
+++ src/x11/lib/ICE/Makefile	Tue Mar  7 20:56:08 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2003/09/13 20:18:43 lukem Exp $
+#	$NetBSD: Makefile,v 1.2.62.1 2017/03/07 20:56:08 snj Exp $
 
 .include 
 
@@ -25,6 +25,7 @@ CPPFLAGS.listenwk.c=	$(TRANS_INCLUDES) $
 CPPFLAGS.misc.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.shutdown.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.transport.c=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=		-DHAVE_ARC4RANDOM_BUF
 
 .include 
 .include 



CVS commit: [netbsd-6-0] xsrc

2017-03-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Mar  7 20:54:15 UTC 2017

Modified Files:
xsrc/external/mit/libICE/dist/src [netbsd-6-0]: iceauth.c
xsrc/xfree/xc/lib/ICE [netbsd-6-0]: iceauth.c

Log Message:
Apply patch (requested by mrg in ticket #1442):
Use arc4random when available to produce the auth cookie.
(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.4.1 \
xsrc/external/mit/libICE/dist/src/iceauth.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.30.1 xsrc/xfree/xc/lib/ICE/iceauth.c

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

Modified files:

Index: xsrc/external/mit/libICE/dist/src/iceauth.c
diff -u xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3 xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3.4.1
--- xsrc/external/mit/libICE/dist/src/iceauth.c:1.1.1.3	Sun Nov 21 05:47:12 2010
+++ xsrc/external/mit/libICE/dist/src/iceauth.c	Tue Mar  7 20:54:15 2017
@@ -36,6 +36,10 @@ Author: Ralph Mor, X Consortium
 #include 
 #define Time_t time_t
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -50,14 +54,19 @@ IceGenerateMagicCookie (
 )
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -81,8 +90,8 @@ IceGenerateMagicCookie (
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 

Index: xsrc/xfree/xc/lib/ICE/iceauth.c
diff -u xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5 xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5.30.1
--- xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5	Fri Feb 28 13:18:45 2003
+++ xsrc/xfree/xc/lib/ICE/iceauth.c	Tue Mar  7 20:54:15 2017
@@ -37,6 +37,10 @@ Author: Ralph Mor, X Consortium
 
 static int binaryEqual ();
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -52,14 +56,19 @@ int len;
 
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -83,8 +92,8 @@ int len;
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 



CVS commit: [netbsd-7] src/doc

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:36:55 UTC 2017

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

Log Message:
1328, 1380


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.158 -r1.1.2.159 src/doc/CHANGES-7.1

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

Modified files:

Index: src/doc/CHANGES-7.1
diff -u src/doc/CHANGES-7.1:1.1.2.158 src/doc/CHANGES-7.1:1.1.2.159
--- src/doc/CHANGES-7.1:1.1.2.158	Mon Mar  6 04:10:00 2017
+++ src/doc/CHANGES-7.1	Tue Mar  7 20:36:55 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.158 2017/03/06 04:10:00 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.159 2017/03/07 20:36:55 snj Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -8899,3 +8899,15 @@ sys/arch/x86/x86/pmap.c1.241 via pat
 	privilege separation between the kernel and userland.
 	[bouyer, ticket #1378]
 
+xsrc/xfree/xc/lib/ICE/iceauth.c			patch
+x11/lib/ICE/Makefilepatch
+
+	Use arc4random when available to produce the auth cookie.
+	(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)
+	[mrg, ticket #1380]
+
+sys/arch/xen/xen/hypervisor.c			1.67
+
+	add machdep.xen.version sysctl to easily get hypervisor version
+	[jnmeth, ticket #1328]
+



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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:26:12 UTC 2017

Modified Files:
src/sys/arch/xen/xen [netbsd-7]: hypervisor.c

Log Message:
Pull up following revision(s) (requested by jnmeth in ticket #1328):
sys/arch/xen/xen/hypervisor.c: revision 1.67
add machdep.xen.version sysctl to easily get hypervisor version


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.65.4.1 src/sys/arch/xen/xen/hypervisor.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/xen/xen/hypervisor.c
diff -u src/sys/arch/xen/xen/hypervisor.c:1.65 src/sys/arch/xen/xen/hypervisor.c:1.65.4.1
--- src/sys/arch/xen/xen/hypervisor.c:1.65	Sat Feb  1 20:07:07 2014
+++ src/sys/arch/xen/xen/hypervisor.c	Tue Mar  7 20:26:12 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.65 2014/02/01 20:07:07 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.65.4.1 2017/03/07 20:26:12 snj Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,12 +53,13 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.65 2014/02/01 20:07:07 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.65.4.1 2017/03/07 20:26:12 snj Exp $");
 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include "xenbus.h"
 #include "xencons.h"
@@ -203,14 +204,32 @@ hypervisor_attach(device_t parent, devic
 #endif /* NPCI */
 	union hypervisor_attach_cookie hac;
 	char xen_extra_version[XEN_EXTRAVERSION_LEN];
+	static char xen_version_string[20];
+	int rc;
+	const struct sysctlnode *node = NULL;
 
 	xenkernfs_init();
 
 	xen_version = HYPERVISOR_xen_version(XENVER_version, NULL);
 	memset(xen_extra_version, 0, sizeof(xen_extra_version));
 	HYPERVISOR_xen_version(XENVER_extraversion, xen_extra_version);
-	aprint_normal(": Xen version %d.%d%s\n", XEN_MAJOR(xen_version),
+	rc = snprintf(xen_version_string, 20, "%d.%d%s", XEN_MAJOR(xen_version),
 		XEN_MINOR(xen_version), xen_extra_version);
+	aprint_normal(": Xen version %s\n", xen_version_string);
+	if (rc >= 20)
+		aprint_debug(": xen_version_string truncated\n");
+
+	sysctl_createv(NULL, 0, NULL, &node, 0,
+	CTLTYPE_NODE, "xen",
+	SYSCTL_DESCR("Xen top level node"),
+	NULL, 0, NULL, 0, CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+
+	if (node != NULL) {
+		sysctl_createv(NULL, 0, &node, NULL, CTLFLAG_READONLY,
+		CTLTYPE_STRING, "version",
+		SYSCTL_DESCR("Xen hypervisor version"),
+		NULL, 0, xen_version_string, 0, CTL_CREATE, CTL_EOL);
+	}
 
 	xengnt_init();
 	events_init();



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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:20:24 UTC 2017

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

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.31 -r1.1.2.32 src/doc/CHANGES-7.0.3

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.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.31 src/doc/CHANGES-7.0.3:1.1.2.32
--- src/doc/CHANGES-7.0.3:1.1.2.31	Tue Mar  7 20:18:50 2017
+++ src/doc/CHANGES-7.0.3	Tue Mar  7 20:20:24 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.31 2017/03/07 20:18:50 snj Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.32 2017/03/07 20:20:24 snj Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -1269,8 +1269,8 @@ sys/arch/x86/x86/pmap.c1.241 via pat
 	no privilege separation between the kernel and userland.
 	[bouyer, ticket #1388]
 
-xsrc/xfree/xc/lib/ICE/iceauth.cpatch
-x11/lib/ICE/Makefile	patch
+xsrc/xfree/xc/lib/ICE/iceauth.c			patch
+x11/lib/ICE/Makefilepatch
 
 	Use arc4random when available to produce the auth cookie.
 	(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)



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

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:18:50 UTC 2017

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

Log Message:
1380


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-7.0.3

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.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.30 src/doc/CHANGES-7.0.3:1.1.2.31
--- src/doc/CHANGES-7.0.3:1.1.2.30	Mon Mar  6 03:34:33 2017
+++ src/doc/CHANGES-7.0.3	Tue Mar  7 20:18:50 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.30 2017/03/06 03:34:33 snj Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.31 2017/03/07 20:18:50 snj Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -1269,3 +1269,10 @@ sys/arch/x86/x86/pmap.c1.241 via pat
 	no privilege separation between the kernel and userland.
 	[bouyer, ticket #1388]
 
+xsrc/xfree/xc/lib/ICE/iceauth.cpatch
+x11/lib/ICE/Makefile	patch
+
+	Use arc4random when available to produce the auth cookie.
+	(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)
+	[mrg, ticket #1380]
+



CVS commit: [netbsd-7] src/x11/lib/ICE

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:17:58 UTC 2017

Modified Files:
src/x11/lib/ICE [netbsd-7]: Makefile

Log Message:
Apply patch (requested by mrg in ticket #1380):
Define HAVE_ARC4RANDOM_BUF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.74.1 src/x11/lib/ICE/Makefile

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

Modified files:

Index: src/x11/lib/ICE/Makefile
diff -u src/x11/lib/ICE/Makefile:1.2 src/x11/lib/ICE/Makefile:1.2.74.1
--- src/x11/lib/ICE/Makefile:1.2	Sat Sep 13 20:18:43 2003
+++ src/x11/lib/ICE/Makefile	Tue Mar  7 20:17:58 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2003/09/13 20:18:43 lukem Exp $
+#	$NetBSD: Makefile,v 1.2.74.1 2017/03/07 20:17:58 snj Exp $
 
 .include 
 
@@ -25,6 +25,7 @@ CPPFLAGS.listenwk.c=	$(TRANS_INCLUDES) $
 CPPFLAGS.misc.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.shutdown.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.transport.c=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=		-DHAVE_ARC4RANDOM_BUF
 
 .include 
 .include 



CVS commit: [netbsd-7-0] src/x11/lib/ICE

2017-03-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 20:18:25 UTC 2017

Modified Files:
src/x11/lib/ICE [netbsd-7-0]: Makefile

Log Message:
Apply patch (requested by mrg in ticket #1380):
Define HAVE_ARC4RANDOM_BUF.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.76.1 src/x11/lib/ICE/Makefile

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

Modified files:

Index: src/x11/lib/ICE/Makefile
diff -u src/x11/lib/ICE/Makefile:1.2 src/x11/lib/ICE/Makefile:1.2.76.1
--- src/x11/lib/ICE/Makefile:1.2	Sat Sep 13 20:18:43 2003
+++ src/x11/lib/ICE/Makefile	Tue Mar  7 20:18:25 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2003/09/13 20:18:43 lukem Exp $
+#	$NetBSD: Makefile,v 1.2.76.1 2017/03/07 20:18:25 snj Exp $
 
 .include 
 
@@ -25,6 +25,7 @@ CPPFLAGS.listenwk.c=	$(TRANS_INCLUDES) $
 CPPFLAGS.misc.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.shutdown.c=	$(TRANS_INCLUDES) $(CONN_DEFINES)
 CPPFLAGS.transport.c=	$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)
+CPPFLAGS+=		-DHAVE_ARC4RANDOM_BUF
 
 .include 
 .include 



CVS commit: [netbsd-7-0] xsrc/xfree/xc/lib/ICE

2017-03-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Mar  7 20:17:12 UTC 2017

Modified Files:
xsrc/xfree/xc/lib/ICE [netbsd-7-0]: iceauth.c

Log Message:
Apply patch (requested by mrg in ticket #1380):
Use arc4random when available to produce the auth cookie.
(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.40.1 xsrc/xfree/xc/lib/ICE/iceauth.c

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

Modified files:

Index: xsrc/xfree/xc/lib/ICE/iceauth.c
diff -u xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5 xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5.40.1
--- xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5	Fri Feb 28 13:18:45 2003
+++ xsrc/xfree/xc/lib/ICE/iceauth.c	Tue Mar  7 20:17:12 2017
@@ -37,6 +37,10 @@ Author: Ralph Mor, X Consortium
 
 static int binaryEqual ();
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -52,14 +56,19 @@ int len;
 
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -83,8 +92,8 @@ int len;
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 



CVS commit: [netbsd-7] xsrc/xfree/xc/lib/ICE

2017-03-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Mar  7 20:16:34 UTC 2017

Modified Files:
xsrc/xfree/xc/lib/ICE [netbsd-7]: iceauth.c

Log Message:
Apply patch (requested by mrg in ticket #1380):
Use arc4random when available to produce the auth cookie.
(80f62c54fbd50a3bbdf9c37258525098c9117830 upstream)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.38.1 xsrc/xfree/xc/lib/ICE/iceauth.c

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

Modified files:

Index: xsrc/xfree/xc/lib/ICE/iceauth.c
diff -u xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5 xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5.38.1
--- xsrc/xfree/xc/lib/ICE/iceauth.c:1.1.1.5	Fri Feb 28 13:18:45 2003
+++ xsrc/xfree/xc/lib/ICE/iceauth.c	Tue Mar  7 20:16:34 2017
@@ -37,6 +37,10 @@ Author: Ralph Mor, X Consortium
 
 static int binaryEqual ();
 
+#ifdef HAVE_LIBBSD
+#include 	/* for arc4random_buf() */
+#endif
+
 static int was_called_state;
 
 /*
@@ -52,14 +56,19 @@ int len;
 
 {
 char*auth;
+#ifndef HAVE_ARC4RANDOM_BUF
 longldata[2];
 int	seed;
 int	value;
 int	i;
+#endif
 
 if ((auth = (char *) malloc (len + 1)) == NULL)
 	return (NULL);
 
+#ifdef HAVE_ARC4RANDOM_BUF
+arc4random_buf(auth, len);
+#else
 #ifdef ITIMER_REAL
 {
 	struct timeval  now;
@@ -83,8 +92,8 @@ int len;
 	value = rand ();
 	auth[i] = value & 0xff;
 }
+#endif
 auth[len] = '\0';
-
 return (auth);
 }
 



CVS commit: src/common/lib/libprop

2017-03-07 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Mar  7 19:10:07 UTC 2017

Modified Files:
src/common/lib/libprop: prop_copyin_ioctl.9

Log Message:
Fix commas in NAME section.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/common/lib/libprop/prop_copyin_ioctl.9

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

Modified files:

Index: src/common/lib/libprop/prop_copyin_ioctl.9
diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.14 src/common/lib/libprop/prop_copyin_ioctl.9:1.15
--- src/common/lib/libprop/prop_copyin_ioctl.9:1.14	Sun Feb  5 00:47:33 2017
+++ src/common/lib/libprop/prop_copyin_ioctl.9	Tue Mar  7 19:10:07 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prop_copyin_ioctl.9,v 1.14 2017/02/05 00:47:33 pgoyette Exp $
+.\"	$NetBSD: prop_copyin_ioctl.9,v 1.15 2017/03/07 19:10:07 njoly Exp $
 .\"
 .\" Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -41,8 +41,8 @@
 .Nm prop_dictionary_copyin_size ,
 .Nm prop_dictionary_copyin_ioctl ,
 .Nm prop_dictionary_copyin_ioctl_size ,
-.Nm prop_dictionary_copyout
-.Nm prop_dictionary_copyout_ioctl ,
+.Nm prop_dictionary_copyout ,
+.Nm prop_dictionary_copyout_ioctl
 .Nd Copy property lists to and from kernel space
 .Sh SYNOPSIS
 .In prop/proplib.h



CVS commit: src/share/misc

2017-03-07 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Mar  7 16:40:16 UTC 2017

Modified Files:
src/share/misc: acronyms.comp

Log Message:
cve


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.176 src/share/misc/acronyms.comp:1.177
--- src/share/misc/acronyms.comp:1.176	Tue Mar  7 16:37:38 2017
+++ src/share/misc/acronyms.comp	Tue Mar  7 16:40:16 2017
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.176 2017/03/07 16:37:38 dholland Exp $
+$NetBSD: acronyms.comp,v 1.177 2017/03/07 16:40:16 dholland Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -262,6 +262,7 @@ CTS	clear to send
 CUA	common user access
 CUT	coordinated universal time
 CV	control voltage
+CVE	common vulnerabilities and exposures
 CVS	Concurrent Versions System
 DA	destination address
 DAA	distributed application architecture



CVS commit: src/share/misc

2017-03-07 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Mar  7 16:37:38 UTC 2017

Modified Files:
src/share/misc: acronyms.comp

Log Message:
qvl


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.175 src/share/misc/acronyms.comp:1.176
--- src/share/misc/acronyms.comp:1.175	Thu Feb 23 05:04:14 2017
+++ src/share/misc/acronyms.comp	Tue Mar  7 16:37:38 2017
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.175 2017/02/23 05:04:14 kamil Exp $
+$NetBSD: acronyms.comp,v 1.176 2017/03/07 16:37:38 dholland Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1030,6 +1030,7 @@ QBE	query by example
 QC	quality control
 QDI	quasi delay insensitive
 QOS	quality of service
+QVL	qualified vendor list
 R/O	read only
 R/W	read/write
 RA	receiver address



CVS commit: xsrc/external/mit/libdrm/dist

2017-03-07 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Tue Mar  7 16:28:42 UTC 2017

Modified Files:
xsrc/external/mit/libdrm/dist: libsync.h

Log Message:
we don't need both memset and 0


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libdrm/dist/libsync.h

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/libsync.h
diff -u xsrc/external/mit/libdrm/dist/libsync.h:1.2 xsrc/external/mit/libdrm/dist/libsync.h:1.3
--- xsrc/external/mit/libdrm/dist/libsync.h:1.2	Tue Mar  7 11:23:20 2017
+++ xsrc/external/mit/libdrm/dist/libsync.h	Tue Mar  7 11:28:42 2017
@@ -63,7 +63,6 @@ static inline int sync_wait(int fd, int 
 	struct pollfd fds;
 	int ret;
 
-	memset(&fds, 0, sizeof(fds));
 	fds.fd = fd;
 	fds.events = POLLIN;
 	fds.revents = 0;



CVS commit: src/external/gpl3/gcc/lib

2017-03-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  7 16:26:37 UTC 2017

Modified Files:
src/external/gpl3/gcc/lib: Makefile

Log Message:
need .WAIT before *san since they depend on libc++


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/lib/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/lib/Makefile
diff -u src/external/gpl3/gcc/lib/Makefile:1.12 src/external/gpl3/gcc/lib/Makefile:1.13
--- src/external/gpl3/gcc/lib/Makefile:1.12	Sat Jun  4 21:17:57 2016
+++ src/external/gpl3/gcc/lib/Makefile	Tue Mar  7 11:26:37 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2016/06/05 01:17:57 christos Exp $
+#	$NetBSD: Makefile,v 1.13 2017/03/07 16:26:37 christos Exp $
 
 .include 
 
@@ -12,6 +12,6 @@ SUBDIR+= liblto_plugin
 SUBDIR+= libsupc++ libstdc++-v3
 .endif
 
-SUBDIR+= libasan libubsan
+SUBDIR+= .WAIT libasan libubsan
 
 .include 



CVS commit: xsrc/external/mit/libdrm/dist

2017-03-07 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Tue Mar  7 16:23:20 UTC 2017

Modified Files:
xsrc/external/mit/libdrm/dist: libsync.h

Log Message:
fix incomplete initializers for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/libdrm/dist/libsync.h

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/libsync.h
diff -u xsrc/external/mit/libdrm/dist/libsync.h:1.1.1.1 xsrc/external/mit/libdrm/dist/libsync.h:1.2
--- xsrc/external/mit/libdrm/dist/libsync.h:1.1.1.1	Sat Mar  4 18:15:50 2017
+++ xsrc/external/mit/libdrm/dist/libsync.h	Tue Mar  7 11:23:20 2017
@@ -60,11 +60,13 @@ struct sync_merge_data {
 
 static inline int sync_wait(int fd, int timeout)
 {
-	struct pollfd fds = {0};
+	struct pollfd fds;
 	int ret;
 
+	memset(&fds, 0, sizeof(fds));
 	fds.fd = fd;
 	fds.events = POLLIN;
+	fds.revents = 0;
 
 	do {
 		ret = poll(&fds, 1, timeout);
@@ -85,11 +87,14 @@ static inline int sync_wait(int fd, int 
 
 static inline int sync_merge(const char *name, int fd1, int fd2)
 {
-	struct sync_merge_data data = {0};
+	struct sync_merge_data data;
 	int ret;
 
 	data.fd2 = fd2;
 	strncpy(data.name, name, sizeof(data.name));
+	data.fence = 0;
+	data.flags = 0;
+	data.pad = 0;
 
 	do {
 		ret = ioctl(fd1, SYNC_IOC_MERGE, &data);



CVS commit: src/sys/kern

2017-03-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Mar  7 11:54:17 UTC 2017

Modified Files:
src/sys/kern: vfs_syscalls.c

Log Message:
Fix a logic error introduced with Rev. 1.507: defer setting MNT_RDONLY
only if going from read-write to read-only.

Should fix PR kern/52045 (panic: ffs_sync: rofs mod, fs=/ after fsck)


To generate a diff of this commit:
cvs rdiff -u -r1.508 -r1.509 src/sys/kern/vfs_syscalls.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/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.508 src/sys/kern/vfs_syscalls.c:1.509
--- src/sys/kern/vfs_syscalls.c:1.508	Wed Mar  1 10:45:24 2017
+++ src/sys/kern/vfs_syscalls.c	Tue Mar  7 11:54:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.508 2017/03/01 10:45:24 hannken Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.509 2017/03/07 11:54:16 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.508 2017/03/01 10:45:24 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.509 2017/03/07 11:54:16 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -306,7 +306,10 @@ mount_update(struct lwp *l, struct vnode
 			mp->mnt_iflag |= IMNT_WANTRDWR;
 	}
 	mp->mnt_flag &= ~MNT_BASIC_FLAGS;
-	mp->mnt_flag |= (flags & ~MNT_RDONLY) & MNT_BASIC_FLAGS;
+	mp->mnt_flag |= flags & MNT_BASIC_FLAGS;
+	if ((mp->mnt_iflag & IMNT_WANTRDONLY))
+		mp->mnt_flag &= ~MNT_RDONLY;
+
 	error = VFS_MOUNT(mp, path, data, data_len);
 
 	if (error && data != NULL) {
@@ -329,8 +332,6 @@ mount_update(struct lwp *l, struct vnode
 
 	if (error == 0 && (mp->mnt_iflag & IMNT_WANTRDONLY))
 		mp->mnt_flag |= MNT_RDONLY;
-	else if (error == 0 && (mp->mnt_iflag & IMNT_WANTRDWR))
-		mp->mnt_flag &= ~MNT_RDONLY;
 	if (error)
 		mp->mnt_flag = saved_flags;
 	mp->mnt_flag &= ~MNT_OP_FLAGS;



CVS commit: src/lib/libm/gen

2017-03-07 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Mar  7 11:15:08 UTC 2017

Modified Files:
src/lib/libm/gen: nan.c

Log Message:
Remove redundant null check before free()
It is guaranteed to be fine also by C99


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/gen/nan.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/libm/gen/nan.c
diff -u src/lib/libm/gen/nan.c:1.2 src/lib/libm/gen/nan.c:1.3
--- src/lib/libm/gen/nan.c:1.2	Mon Apr 28 20:23:01 2008
+++ src/lib/libm/gen/nan.c	Tue Mar  7 11:15:08 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: nan.c,v 1.2 2008/04/28 20:23:01 martin Exp $ */
+/* $NetBSD: nan.c,v 1.3 2017/03/07 11:15:08 maya Exp $ */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint) && !defined(NAN_FUNCTION)
-__RCSID("$NetBSD: nan.c,v 1.2 2008/04/28 20:23:01 martin Exp $");
+__RCSID("$NetBSD: nan.c,v 1.3 2017/03/07 11:15:08 maya Exp $");
 #endif /* LIBM_SCCS and not lint */
 
 #include 
@@ -78,8 +78,7 @@ NAN_FUNCTION(const char *tagp)
 
 	res = NAN_STRTOD(nstr, NULL);
 
-	if (buf != NULL)
-		free(buf);
+	free(buf);
 
 	return res;
 }