From owner-svn-src-stable-10@freebsd.org Mon Aug 31 17:30:14 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCCFB9C685E; Mon, 31 Aug 2015 17:30:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC20792A; Mon, 31 Aug 2015 17:30:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7VHUEha002194; Mon, 31 Aug 2015 17:30:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7VHUE9Y002192; Mon, 31 Aug 2015 17:30:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201508311730.t7VHUE9Y002192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 31 Aug 2015 17:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287326 - stable/10/usr.bin/ar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 17:30:14 -0000 Author: emaste Date: Mon Aug 31 17:30:13 2015 New Revision: 287326 URL: https://svnweb.freebsd.org/changeset/base/287326 Log: MFC r285844: ar: add -U (unique) option to disable -D (deterministic) mode This is required in order for us to support deterministic mode by default. If multiple -D or -U options are specified on the command line, the final one takes precedence. GNU ar also uses -U for this. PR: 196929 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/ar/ar.1 stable/10/usr.bin/ar/ar.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ar/ar.1 ============================================================================== --- stable/10/usr.bin/ar/ar.1 Mon Aug 31 12:42:21 2015 (r287325) +++ stable/10/usr.bin/ar/ar.1 Mon Aug 31 17:30:13 2015 (r287326) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 22, 2011 +.Dd August 31, 2015 .Dt AR 1 .Os .Sh NAME @@ -66,6 +66,7 @@ .Op Fl D .Op Fl f .Op Fl s | Fl S +.Op Fl U .Op Fl v .Op Fl z .Ar archive @@ -82,6 +83,7 @@ .Op Fl j .Op Fl s | Fl S .Op Fl u +.Op Fl U .Op Fl v .Op Fl z .Ar archive @@ -112,6 +114,7 @@ .Fl M .Nm ranlib .Op Fl D +.Op Fl U .Ar archive ... .Sh DESCRIPTION The @@ -207,6 +210,11 @@ and 0644 instead of file mode from the m .Ar . This ensures that checksums on the resulting archives are reproducible when member contents are identical. +If multiple +.Fl D +and +.Fl U +options are specified on the command line, the final one takes precedence. .It Fl f Synonymous with option .Fl T . @@ -316,6 +324,19 @@ option, the members specified by argumen .Ar will be extracted only if they are newer than the corresponding files in the file system. +.It Fl U +When used in combination with the +.Fl r +or +.Fl q +option, insert the real mtime, uid and gid, and file mode values +from the members named by arguments +.Ar . +If multiple +.Fl D +and +.Fl U +options are specified on the command line, the final one takes precedence. .It Fl v Provide verbose output. When used with the Modified: stable/10/usr.bin/ar/ar.c ============================================================================== --- stable/10/usr.bin/ar/ar.c Mon Aug 31 12:42:21 2015 (r287325) +++ stable/10/usr.bin/ar/ar.c Mon Aug 31 17:30:13 2015 (r287326) @@ -113,7 +113,7 @@ main(int argc, char **argv) len = strlen(bsdar->progname); if (len >= strlen("ranlib") && strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) { - while ((opt = getopt_long(argc, argv, "tDV", longopts, + while ((opt = getopt_long(argc, argv, "tDUV", longopts, NULL)) != -1) { switch(opt) { case 't': @@ -122,6 +122,9 @@ main(int argc, char **argv) case 'D': bsdar->options |= AR_D; break; + case 'U': + bsdar->options &= ~AR_D; + break; case 'V': ranlib_version(); break; @@ -157,7 +160,7 @@ main(int argc, char **argv) } } - while ((opt = getopt_long(argc, argv, "abCcdDfijlMmopqrSsTtuVvxz", + while ((opt = getopt_long(argc, argv, "abCcdDfijlMmopqrSsTtUuVvxz", longopts, NULL)) != -1) { switch(opt) { case 'a': @@ -216,6 +219,9 @@ main(int argc, char **argv) case 't': set_mode(bsdar, opt); break; + case 'U': + bsdar->options &= ~AR_D; + break; case 'u': bsdar->options |= AR_U; break; @@ -364,9 +370,9 @@ bsdar_usage(void) (void)fprintf(stderr, "\tar -m [-Tjsvz] archive file ...\n"); (void)fprintf(stderr, "\tar -m [-Tabijsvz] position archive file ...\n"); (void)fprintf(stderr, "\tar -p [-Tv] archive [file ...]\n"); - (void)fprintf(stderr, "\tar -q [-TcDjsvz] archive file ...\n"); - (void)fprintf(stderr, "\tar -r [-TcDjsuvz] archive file ...\n"); - (void)fprintf(stderr, "\tar -r [-TabcDijsuvz] position archive file ...\n"); + (void)fprintf(stderr, "\tar -q [-TcDjsUvz] archive file ...\n"); + (void)fprintf(stderr, "\tar -r [-TcDjsUuvz] archive file ...\n"); + (void)fprintf(stderr, "\tar -r [-TabcDijsUuvz] position archive file ...\n"); (void)fprintf(stderr, "\tar -s [-jz] archive\n"); (void)fprintf(stderr, "\tar -t [-Tv] archive [file ...]\n"); (void)fprintf(stderr, "\tar -x [-CTouv] archive [file ...]\n"); @@ -378,7 +384,7 @@ static void ranlib_usage(void) { - (void)fprintf(stderr, "usage: ranlib [-t] archive ...\n"); + (void)fprintf(stderr, "usage: ranlib [-DtU] archive ...\n"); (void)fprintf(stderr, "\tranlib -V\n"); exit(EX_USAGE); } From owner-svn-src-stable-10@freebsd.org Mon Aug 31 18:53:42 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3DB69C6D7E; Mon, 31 Aug 2015 18:53:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAC5B1C99; Mon, 31 Aug 2015 18:53:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7VIrgpi040421; Mon, 31 Aug 2015 18:53:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7VIrgg6040419; Mon, 31 Aug 2015 18:53:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201508311853.t7VIrgg6040419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 31 Aug 2015 18:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287328 - stable/10/sbin/ping6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 18:53:43 -0000 Author: delphij Date: Mon Aug 31 18:53:41 2015 New Revision: 287328 URL: https://svnweb.freebsd.org/changeset/base/287328 Log: MFC r286834: Use arc4random_buf(). While there, unifdef the code for !HAVE_ARC4RANDOM. Modified: stable/10/sbin/ping6/Makefile stable/10/sbin/ping6/ping6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ping6/Makefile ============================================================================== --- stable/10/sbin/ping6/Makefile Mon Aug 31 18:07:17 2015 (r287327) +++ stable/10/sbin/ping6/Makefile Mon Aug 31 18:53:41 2015 (r287328) @@ -3,8 +3,7 @@ PROG= ping6 MAN= ping6.8 -CFLAGS+=-DIPSEC -DKAME_SCOPEID -DUSE_RFC2292BIS \ - -DHAVE_ARC4RANDOM +CFLAGS+=-DIPSEC -DKAME_SCOPEID -DUSE_RFC2292BIS WARNS?= 2 BINOWN= root Modified: stable/10/sbin/ping6/ping6.c ============================================================================== --- stable/10/sbin/ping6/ping6.c Mon Aug 31 18:07:17 2015 (r287327) +++ stable/10/sbin/ping6/ping6.c Mon Aug 31 18:53:41 2015 (r287328) @@ -289,9 +289,6 @@ main(int argc, char *argv[]) { struct timeval last, intvl; struct sockaddr_in6 from, *sin6; -#ifndef HAVE_ARC4RANDOM - struct timeval seed; -#endif struct addrinfo hints, *res; struct sigaction si_sa; int cc, i; @@ -743,17 +740,7 @@ main(int argc, char *argv[]) *datap++ = i; ident = getpid() & 0xFFFF; -#ifndef HAVE_ARC4RANDOM - gettimeofday(&seed, NULL); - srand((unsigned int)(seed.tv_sec ^ seed.tv_usec ^ (long)ident)); - memset(nonce, 0, sizeof(nonce)); - for (i = 0; i < sizeof(nonce); i += sizeof(int)) - *((int *)&nonce[i]) = rand(); -#else - memset(nonce, 0, sizeof(nonce)); - for (i = 0; i < sizeof(nonce); i += sizeof(u_int32_t)) - *((u_int32_t *)&nonce[i]) = arc4random(); -#endif + arc4random_buf(nonce, sizeof(nonce)); optval = 1; if (options & F_DONTFRAG) if (setsockopt(s, IPPROTO_IPV6, IPV6_DONTFRAG, From owner-svn-src-stable-10@freebsd.org Mon Aug 31 18:58:54 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 783A39C6F5D; Mon, 31 Aug 2015 18:58:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6884D1F33; Mon, 31 Aug 2015 18:58:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7VIwsU8040821; Mon, 31 Aug 2015 18:58:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7VIwsX4040820; Mon, 31 Aug 2015 18:58:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201508311858.t7VIwsX4040820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 31 Aug 2015 18:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287329 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 18:58:54 -0000 Author: delphij Date: Mon Aug 31 18:58:53 2015 New Revision: 287329 URL: https://svnweb.freebsd.org/changeset/base/287329 Log: MFC r286836: so_vnet is constant after creation and no locking is necessary, document this fact. Modified: stable/10/sys/sys/socketvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/socketvar.h ============================================================================== --- stable/10/sys/sys/socketvar.h Mon Aug 31 18:53:41 2015 (r287328) +++ stable/10/sys/sys/socketvar.h Mon Aug 31 18:58:53 2015 (r287329) @@ -76,7 +76,7 @@ struct socket { short so_state; /* (b) internal state flags SS_* */ int so_qstate; /* (e) internal state flags SQ_* */ void *so_pcb; /* protocol control block */ - struct vnet *so_vnet; /* network stack instance */ + struct vnet *so_vnet; /* (a) network stack instance */ struct protosw *so_proto; /* (a) protocol handle */ /* * Variables for connection queuing. From owner-svn-src-stable-10@freebsd.org Mon Aug 31 19:20:19 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6D589C77A6; Mon, 31 Aug 2015 19:20:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7049E41; Mon, 31 Aug 2015 19:20:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7VJKJgE049283; Mon, 31 Aug 2015 19:20:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7VJKJX0049281; Mon, 31 Aug 2015 19:20:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201508311920.t7VJKJX0049281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 31 Aug 2015 19:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287331 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 19:20:19 -0000 Author: emaste Date: Mon Aug 31 19:20:18 2015 New Revision: 287331 URL: https://svnweb.freebsd.org/changeset/base/287331 Log: MFC r282551: Remove historical GNUC test The requirement is for a GCC-compatible compiler and not necessarily GCC itself. However, we currently expect any compiler used for building the whole of FreeBSD to be GCC-compatible and many things will break if not; there's no longer a need to have an explicit test for this in rtld. Modified: stable/10/libexec/rtld-elf/debug.h stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/debug.h ============================================================================== --- stable/10/libexec/rtld-elf/debug.h Mon Aug 31 19:12:10 2015 (r287330) +++ stable/10/libexec/rtld-elf/debug.h Mon Aug 31 19:20:18 2015 (r287331) @@ -32,10 +32,6 @@ #ifndef DEBUG_H #define DEBUG_H 1 -#ifndef __GNUC__ -#error "This file must be compiled with GCC" -#endif - #include #include Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Mon Aug 31 19:12:10 2015 (r287330) +++ stable/10/libexec/rtld-elf/rtld.c Mon Aug 31 19:20:18 2015 (r287331) @@ -34,10 +34,6 @@ * John Polstra . */ -#ifndef __GNUC__ -#error "GCC is needed to compile this file" -#endif - #include #include #include From owner-svn-src-stable-10@freebsd.org Mon Aug 31 20:44:53 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A984A9C79EC; Mon, 31 Aug 2015 20:44:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 800221D29; Mon, 31 Aug 2015 20:44:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7VKirwN086147; Mon, 31 Aug 2015 20:44:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7VKir4Q086145; Mon, 31 Aug 2015 20:44:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201508312044.t7VKir4Q086145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 31 Aug 2015 20:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287334 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 20:44:53 -0000 Author: bdrewery Date: Mon Aug 31 20:44:52 2015 New Revision: 287334 URL: https://svnweb.freebsd.org/changeset/base/287334 Log: MFC r272282,r272363,r272383: r272282: Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR. This will only take effect if PORTSDIR is not set, as previously supported. r272363: Always resolve PORTSDIR to absolute paths using realpath(1). r272383: Revise r272363 by collapsing the tests into a for loop. Relnotes: yes Modified: stable/10/share/mk/bsd.port.mk stable/10/share/mk/bsd.port.subdir.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.port.mk ============================================================================== --- stable/10/share/mk/bsd.port.mk Mon Aug 31 20:30:06 2015 (r287333) +++ stable/10/share/mk/bsd.port.mk Mon Aug 31 20:44:52 2015 (r287334) @@ -1,6 +1,18 @@ # $FreeBSD$ -PORTSDIR?= /usr/ports +.if !defined(PORTSDIR) +# Autodetect if the command is being run in a ports tree that's not rooted +# in the default /usr/ports. The ../../.. case is in case ports ever grows +# a third level. +.for RELPATH in . .. ../.. ../../.. +.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk) +_PORTSDIR= ${.CURDIR}/${RELPATH} +.endif +.endfor +_PORTSDIR?= /usr/ports +PORTSDIR!= realpath ${_PORTSDIR} +.endif + BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk # Needed to keep bsd.own.mk from reading in /etc/src.conf Modified: stable/10/share/mk/bsd.port.subdir.mk ============================================================================== --- stable/10/share/mk/bsd.port.subdir.mk Mon Aug 31 20:30:06 2015 (r287333) +++ stable/10/share/mk/bsd.port.subdir.mk Mon Aug 31 20:44:52 2015 (r287334) @@ -1,6 +1,18 @@ # $FreeBSD$ -PORTSDIR?= /usr/ports +.if !defined(PORTSDIR) +# Autodetect if the command is being run in a ports tree that's not rooted +# in the default /usr/ports. The ../../.. case is in case ports ever grows +# a third level. +.for RELPATH in . .. ../.. ../../.. +.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk) +_PORTSDIR= ${.CURDIR}/${RELPATH} +.endif +.endfor +_PORTSDIR?= /usr/ports +PORTSDIR!= realpath ${_PORTSDIR} +.endif + BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk .include "${BSDPORTSUBDIRMK}" From owner-svn-src-stable-10@freebsd.org Tue Sep 1 01:01:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D3889C7BBE; Tue, 1 Sep 2015 01:01:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63754B0; Tue, 1 Sep 2015 01:01:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8111aV9092081; Tue, 1 Sep 2015 01:01:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8111Z0I092079; Tue, 1 Sep 2015 01:01:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509010101.t8111Z0I092079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 1 Sep 2015 01:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287338 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 01:01:36 -0000 Author: delphij Date: Tue Sep 1 01:01:35 2015 New Revision: 287338 URL: https://svnweb.freebsd.org/changeset/base/287338 Log: MFC r286894: Set curvnet context inside the RPC code in more places. Reviewed by: melifaro Modified: stable/10/sys/rpc/rpc_generic.c stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/rpc_generic.c ============================================================================== --- stable/10/sys/rpc/rpc_generic.c Mon Aug 31 23:10:42 2015 (r287337) +++ stable/10/sys/rpc/rpc_generic.c Tue Sep 1 01:01:35 2015 (r287338) @@ -703,7 +703,9 @@ __rpc_sockisbound(struct socket *so) struct sockaddr *sa; int error, bound; + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) return (0); @@ -791,7 +793,9 @@ bindresvport(struct socket *so, struct s socklen_t salen; if (sa == NULL) { + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) return (error); freesa = TRUE; Modified: stable/10/sys/rpc/svc_vc.c ============================================================================== --- stable/10/sys/rpc/svc_vc.c Mon Aug 31 23:10:42 2015 (r287337) +++ stable/10/sys/rpc/svc_vc.c Tue Sep 1 01:01:35 2015 (r287338) @@ -150,7 +150,9 @@ svc_vc_create(SVCPOOL *pool, struct sock SOCK_LOCK(so); if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) { SOCK_UNLOCK(so); + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa); + CURVNET_RESTORE(); if (error) return (NULL); xprt = svc_vc_create_conn(pool, so, sa); @@ -167,7 +169,9 @@ svc_vc_create(SVCPOOL *pool, struct sock xprt->xp_p2 = NULL; xprt->xp_ops = &svc_vc_rendezvous_ops; + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) { goto cleanup_svc_vc_create; } @@ -249,7 +253,9 @@ svc_vc_create_conn(SVCPOOL *pool, struct memcpy(&xprt->xp_rtaddr, raddr, raddr->sa_len); + CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); + CURVNET_RESTORE(); if (error) goto cleanup_svc_vc_create; From owner-svn-src-stable-10@freebsd.org Tue Sep 1 01:03:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33E6B9C7CF7; Tue, 1 Sep 2015 01:03:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23A022EA; Tue, 1 Sep 2015 01:03:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8113k0Z092890; Tue, 1 Sep 2015 01:03:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8113k3G092889; Tue, 1 Sep 2015 01:03:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509010103.t8113k3G092889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 1 Sep 2015 01:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287339 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 01:03:46 -0000 Author: delphij Date: Tue Sep 1 01:03:45 2015 New Revision: 287339 URL: https://svnweb.freebsd.org/changeset/base/287339 Log: MFC r286910: - ANSIfy - Remove the redundant _PATH_RSH definition (paths.h at r96194); - Use pid_t for PIDs - Note that we are at the same level of OpenBSD's counterpart of revision 1.7 (r94757). Modified: stable/10/lib/libc/net/rcmdsh.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/rcmdsh.c ============================================================================== --- stable/10/lib/libc/net/rcmdsh.c Tue Sep 1 01:01:35 2015 (r287338) +++ stable/10/lib/libc/net/rcmdsh.c Tue Sep 1 01:03:45 2015 (r287339) @@ -1,4 +1,4 @@ -/* $OpenBSD: rcmdsh.c,v 1.5 1998/04/25 16:23:58 millert Exp $ */ +/* $OpenBSD: rcmdsh.c,v 1.7 2002/03/12 00:05:44 millert Exp $ */ /* * Copyright (c) 2001, MagniComp @@ -49,23 +49,18 @@ __FBSDID("$FreeBSD$"); #include #include -#ifndef _PATH_RSH -#define _PATH_RSH "/usr/bin/rsh" -#endif - /* * This is a replacement rcmd() function that uses the rsh(1) * program in place of a direct rcmd(3) function call so as to * avoid having to be root. Note that rport is ignored. */ int -rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) - char **ahost; - int rport; - const char *locuser, *remuser, *cmd, *rshprog; +rcmdsh(char **ahost, int rport, const char *locuser, const char *remuser, + const char *cmd, const char *rshprog) { struct addrinfo hints, *res; - int cpid, sp[2], error; + int sp[2], error; + pid_t cpid; char *p; struct passwd *pw; char num[8]; From owner-svn-src-stable-10@freebsd.org Tue Sep 1 18:57:59 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CC3D9C7342; Tue, 1 Sep 2015 18:57:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 009F7B60; Tue, 1 Sep 2015 18:57:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t81IvwA8049252; Tue, 1 Sep 2015 18:57:58 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t81Ivw8U049249; Tue, 1 Sep 2015 18:57:58 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201509011857.t81Ivw8U049249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 1 Sep 2015 18:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287375 - stable/10/usr.sbin/ypserv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 18:57:59 -0000 Author: asomers Date: Tue Sep 1 18:57:57 2015 New Revision: 287375 URL: https://svnweb.freebsd.org/changeset/base/287375 Log: MFC r286892 Serve /etc/eui64 via NIS. The C library already knows how to lookup eui64 entries from NIS. For example, fwcontrol(8) does it. But /var/yp/Makefile.dist doesn't build the eui64 maps, and ypinit(8) doesn't push them to slaves. This change fixes that. Modified: stable/10/usr.sbin/ypserv/Makefile.yp stable/10/usr.sbin/ypserv/ypinit.8 stable/10/usr.sbin/ypserv/ypinit.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ypserv/Makefile.yp ============================================================================== --- stable/10/usr.sbin/ypserv/Makefile.yp Tue Sep 1 17:52:43 2015 (r287374) +++ stable/10/usr.sbin/ypserv/Makefile.yp Tue Sep 1 18:57:57 2015 (r287375) @@ -103,6 +103,7 @@ YPMAPDIR = $(YPDIR)/$(DOMAIN) # passwd file will be generated from the master.passwd file automagically. # ETHERS = $(YPSRCDIR)/ethers # ethernet addresses (for rarpd) +EUI64 = $(YPSRCDIR)/eui64 # eui64 addresses (for firewire) BOOTPARAMS= $(YPSRCDIR)/bootparams # for booting Sun boxes (bootparamd) HOSTS = $(YPSRCDIR)/hosts IPNODES = $(YPDIR)/ipnodes @@ -143,8 +144,8 @@ TARGETS= servers hosts networks protocol #TARGETS+= aliases # Sanity checks: filter out targets we can't build -# Note that we don't build the ethers or boorparams maps by default -# since /etc/ethers and /etc/bootparams are not likely to be present +# Note that we don't build the ethers, eui64, or boorparams maps by default +# since /etc/ethers, /etc/eui64 and /etc/bootparams are not likely to be present # on all systems. .if exists($(ETHERS)) TARGETS+= ethers @@ -152,6 +153,12 @@ TARGETS+= ethers ETHERS= /dev/null .endif +.if exists($(EUI64)) +TARGETS+= eui64 +.else +EUI64= /dev/null +.endif + .if exists($(BOOTPARAMS)) TARGETS+= bootparams .else @@ -195,6 +202,7 @@ IPNODES= /dev/null all: $(TARGETS) ethers: ethers.byname ethers.byaddr +eui64: eui64.byname eui64.byid bootparam: bootparams hosts: hosts.byname hosts.byaddr ipnodes: ipnodes.byname ipnodes.byaddr @@ -294,6 +302,32 @@ ethers.byaddr: $(ETHERS) @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi .endif +eui64.byname: $(EUI64) + @echo "Updating $@..." +.if ${EUI64} == "/dev/null" + @echo "EUI64 source file not found -- skipping" +.else + @$(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ + print $$2"\t"$$0 }' $(EUI64) | $(DBLOAD) -i $(EUI64) \ + -o $(YPMAPDIR)/$@ - $(TMP); $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +.endif + +eui64.byid: $(EUI64) + @echo "Updating $@..." +.if ${EUI64} == "/dev/null" + @echo "EUI64 source file not found -- skipping" +.else + @$(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \ + print $$1"\t"$$0 }' $(EUI64) | $(DBLOAD) -i $(EUI64) \ + -o $(YPMAPDIR)/$@ - $(TMP); $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +.endif + bootparams: $(BOOTPARAMS) @echo "Updating $@..." Modified: stable/10/usr.sbin/ypserv/ypinit.8 ============================================================================== --- stable/10/usr.sbin/ypserv/ypinit.8 Tue Sep 1 17:52:43 2015 (r287374) +++ stable/10/usr.sbin/ypserv/ypinit.8 Tue Sep 1 18:57:57 2015 (r287375) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 1997 +.Dd August 18, 2015 .Dt YPINIT 8 .Os .Sh NAME @@ -147,6 +147,8 @@ can propagate updates on the master to a Bootparams source file .It Pa /etc/ethers Ethers data source file +.It Pa /etc/eui64 +EUI64 data source file .It Pa /etc/group Group source file .It Pa /etc/hosts Modified: stable/10/usr.sbin/ypserv/ypinit.sh ============================================================================== --- stable/10/usr.sbin/ypserv/ypinit.sh Tue Sep 1 17:52:43 2015 (r287374) +++ stable/10/usr.sbin/ypserv/ypinit.sh Tue Sep 1 18:57:57 2015 (r287375) @@ -14,8 +14,9 @@ MAPLIST="master.passwd.byname master.pas group.byname group.bygid hosts.byname hosts.byaddr services.byname \ rpc.byname rpc.bynumber networks.byname networks.byaddr netgroup \ netgroup.byuser netgroup.byhost netid.byname publickey.byname \ - bootparams ethers.byname ethers.byaddr amd.host mail.aliases \ - ypservers protocols.byname protocols.bynumber netmasks.byaddr" + bootparams ethers.byname ethers.byaddr eui64.byname eui64.byid \ + amd.host mail.aliases ypservers protocols.byname protocols.bynumber \ + netmasks.byaddr" ERROR_EXISTS="NO" umask 077 From owner-svn-src-stable-10@freebsd.org Tue Sep 1 22:35:54 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 844449C77B8; Tue, 1 Sep 2015 22:35:54 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74E301722; Tue, 1 Sep 2015 22:35:54 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t81MZsxx043908; Tue, 1 Sep 2015 22:35:54 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t81MZsPf043907; Tue, 1 Sep 2015 22:35:54 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201509012235.t81MZsPf043907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Tue, 1 Sep 2015 22:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287388 - stable/10/sys/dev/sound/midi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 22:35:54 -0000 Author: avatar Date: Tue Sep 1 22:35:53 2015 New Revision: 287388 URL: https://svnweb.freebsd.org/changeset/base/287388 Log: MFC r286887: Using the error return code documented in the comment. Though there is no direct midi_uninit() caller amongst existing drivers at this moment, a quick experiment indicates that EBUSY gives users more precise error message once drivers start to honour this result. For example, emu_midi_detach() should check the result of mpu401_uninit() and block module unloading if there is any MIDI I/O in progress. Modified: stable/10/sys/dev/sound/midi/midi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/midi.c ============================================================================== --- stable/10/sys/dev/sound/midi/midi.c Tue Sep 1 22:28:23 2015 (r287387) +++ stable/10/sys/dev/sound/midi/midi.c Tue Sep 1 22:35:53 2015 (r287388) @@ -403,7 +403,7 @@ midi_uninit(struct snd_midi *m) { int err; - err = ENXIO; + err = EBUSY; mtx_lock(&midistat_lock); mtx_lock(&m->lock); if (m->busy) { From owner-svn-src-stable-10@freebsd.org Wed Sep 2 05:45:49 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BCB09C8C70; Wed, 2 Sep 2015 05:45:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFC1A4F; Wed, 2 Sep 2015 05:45:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t825jnYl022575; Wed, 2 Sep 2015 05:45:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t825jmpT022570; Wed, 2 Sep 2015 05:45:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201509020545.t825jmpT022570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 2 Sep 2015 05:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287392 - in stable/10: etc/mtree usr.bin usr.bin/timeout usr.bin/timeout/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2015 05:45:49 -0000 Author: bapt Date: Wed Sep 2 05:45:47 2015 New Revision: 287392 URL: https://svnweb.freebsd.org/changeset/base/287392 Log: MFC: r268745,r268746,r268747,r268748,r268749,r268861,r268750,r268751,r268763 r273769,r273771,r276771,r278810 New BSDL timeout(1) utility compatible with GNU timeout Relnotes: yes Added: stable/10/usr.bin/timeout/ - copied from r268745, head/usr.bin/timeout/ stable/10/usr.bin/timeout/tests/ - copied from r273771, head/usr.bin/timeout/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.bin/Makefile stable/10/usr.bin/timeout/Makefile stable/10/usr.bin/timeout/timeout.1 stable/10/usr.bin/timeout/timeout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed Sep 2 02:50:41 2015 (r287391) +++ stable/10/etc/mtree/BSD.tests.dist Wed Sep 2 05:45:47 2015 (r287392) @@ -323,6 +323,8 @@ .. .. .. + timeout + .. variables modifier_M .. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Sep 2 02:50:41 2015 (r287391) +++ stable/10/usr.bin/Makefile Wed Sep 2 05:45:47 2015 (r287392) @@ -157,6 +157,7 @@ SUBDIR= alias \ tee \ ${_tests} \ time \ + timeout \ tip \ top \ touch \ Modified: stable/10/usr.bin/timeout/Makefile ============================================================================== --- head/usr.bin/timeout/Makefile Wed Jul 16 09:55:36 2014 (r268745) +++ stable/10/usr.bin/timeout/Makefile Wed Sep 2 05:45:47 2015 (r287392) @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + PROG= timeout +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/usr.bin/timeout/timeout.1 ============================================================================== --- head/usr.bin/timeout/timeout.1 Wed Jul 16 09:55:36 2014 (r268745) +++ stable/10/usr.bin/timeout/timeout.1 Wed Sep 2 05:45:47 2015 (r287392) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2014 +.Dd Oct 28, 2014 .Dt TIMEOUT 1 .Os .Sh NAME @@ -44,12 +44,18 @@ starts the .Ar command with its -.Ar args -and kills if it is still runs after -.Ar duration . +.Ar args. +If +.Ar command +is still running after +.Ar duration , +it is killed. +By default, +.Ar SIGTERM. +is sent. .Bl -tag -width "-k time, --kill-after time" .It Fl -preserve-status -Always exist with the same status as +Always exits with the same status as .Ar command even if it times out. .It Fl -foreground @@ -57,14 +63,67 @@ Do not propagate timeout to the .Ar command children. .It Fl s Ar sig , Fl -signal Ar sig -Speficy the signal to send on timeout by default +Specify the signal to send on timeout. +By default, .Ar SIGTERM . +is sent. .It Fl k Ar time , Fl -kill-after Ar time -Send a second kill if the +Send a second kill signal if .Ar command is still running after .Ar time -seconds after the first signal was sent +after the first signal was sent. +.El +.Sh DURATION FORMAT +.Ar duration +and +.Ar time +can be integer or decimal numbers. +Values without unit symbols are interpreted as seconds. +.Pp +Supported unit symbols are: +.Bl -tag -width indent -compact +.It s +seconds +.It m +minutes +.It h +hours +.It d +days +.El +.Sh EXIT STATUS +If the timeout was not reached, the exit status of +.Ar command +is returned. +.Pp +If the timeout was reached and +.Fl -preserve-status +is set, the exit status of +.Ar command +is returned. +If +.Fl -preserve-status +is not set, an exit status of 124 is returned. +.Pp +If +.Ar command +exits after receiving a signal, the exit status returned is the signal number +plus 128. +.Pp +If +.Ar command +is an invalid command, the exit status returned is 126. +.Pp +If +.Ar command +is a non existing command, the exit status returned is 127. +.Pp +If an invalid parameter is passed to +.Fl s +or +.Fl k , +the exit status return is 125. .Sh SEE ALSO -.Xr signal 3 , -.Xr kill 1 +.Xr kill 1 , +.Xr signal 3 Modified: stable/10/usr.bin/timeout/timeout.c ============================================================================== --- head/usr.bin/timeout/timeout.c Wed Jul 16 09:55:36 2014 (r268745) +++ stable/10/usr.bin/timeout/timeout.c Wed Sep 2 05:45:47 2015 (r287392) @@ -2,7 +2,7 @@ * Copyright (c) 2014 Baptiste Daroussin * Copyright (c) 2014 Vsevolod Stakhov * All rights reserved. - *~ + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - *~ + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. @@ -28,20 +28,20 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include + +#include +#include +#include #include +#include #include #include #include #include #include -#include -#include -#include -#include -#include #define EXIT_TIMEOUT 124 @@ -53,6 +53,7 @@ static sig_atomic_t sig_ign = 0; static void usage(void) { + fprintf(stderr, "Usage: %s [--signal sig | -s sig] [--preserve-status]" " [--kill-after time | -k time] [--foreground] " " \n", getprogname()); @@ -68,7 +69,7 @@ parse_duration(const char *duration) ret = strtod(duration, &end); if (ret == 0 && end == duration) - errx(EXIT_FAILURE, "invalid duration"); + errx(125, "invalid duration"); if (end == NULL || *end == '\0') return (ret); @@ -89,11 +90,11 @@ parse_duration(const char *duration) ret *= 60 * 60 * 24; break; default: - errx(EX_USAGE, "invalid duration"); + errx(125, "invalid duration"); } - + if (ret < 0 || ret >= 100000000UL) - errx(EX_USAGE, "invalid duration"); + errx(125, "invalid duration"); return (ret); } @@ -102,11 +103,11 @@ static int parse_signal(const char *str) { int sig, i; - const char *err; + const char *errstr; - sig = strtonum(str, 0, sys_nsig, &err); + sig = strtonum(str, 0, sys_nsig, &errstr); - if (err == NULL) + if (errstr == NULL) return (sig); if (strncasecmp(str, "SIG", 3) == 0) str += 3; @@ -115,8 +116,8 @@ parse_signal(const char *str) if (strcasecmp(str, sys_signame[i]) == 0) return (i); } - - errx(EX_USAGE, "invalid signal"); + + errx(125, "invalid signal"); } static void @@ -166,13 +167,15 @@ main(int argc, char **argv) int foreground, preserve; int error, pstat, status; int killsig = SIGTERM; - int killedwith; - pid_t pgid, pid, cpid; + pid_t pid, cpid; double first_kill; double second_kill; bool timedout = false; bool do_second_kill = false; + bool child_done = false; struct sigaction signals; + struct procctl_reaper_status info; + struct procctl_reaper_kill killemall; int signums[] = { -1, SIGTERM, @@ -185,9 +188,8 @@ main(int argc, char **argv) foreground = preserve = 0; second_kill = 0; - cpid = -1; - struct option longopts[] = { + const struct option longopts[] = { { "preserve-status", no_argument, &preserve, 1 }, { "foreground", no_argument, &foreground, 1 }, { "kill-after", required_argument, NULL, 'k'}, @@ -225,10 +227,9 @@ main(int argc, char **argv) argv++; if (!foreground) { - pgid = setpgid(0,0); - - if (pgid == -1) - err(EX_OSERR, "setpgid()"); + /* Aquire a reaper */ + if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1) + err(EX_OSERR, "Fail to acquire the reaper"); } memset(&signals, 0, sizeof(signals)); @@ -260,8 +261,12 @@ main(int argc, char **argv) signal(SIGTTOU, SIG_DFL); error = execvp(argv[0], argv); - if (error == -1) - err(EX_UNAVAILABLE, "exec()"); + if (error == -1) { + if (errno == ENOENT) + err(127, "exec(%s)", argv[0]); + else + err(126, "exec(%s)", argv[0]); + } } if (sigprocmask(SIG_BLOCK, &signals.sa_mask, NULL) == -1) @@ -270,29 +275,44 @@ main(int argc, char **argv) /* parent continues here */ set_interval(first_kill); - sigemptyset(&signals.sa_mask); - for (;;) { - killedwith = killsig; sigemptyset(&signals.sa_mask); sigsuspend(&signals.sa_mask); if (sig_chld) { sig_chld = 0; - while (((cpid = wait(&status)) < 0) && errno != EINTR) - continue; - if (cpid == pid) { - pstat = status; - break; + while ((cpid = waitpid(-1, &status, WNOHANG)) != 0) { + if (cpid < 0) { + if (errno == EINTR) + continue; + else + break; + } else if (cpid == pid) { + pstat = status; + child_done = true; + } + } + if (child_done) { + if (foreground) { + break; + } else { + procctl(P_PID, getpid(), + PROC_REAP_STATUS, &info); + if (info.rs_children == 0) + break; + } } } else if (sig_alrm) { sig_alrm = 0; timedout = true; - if (!foreground) - killpg(pgid, killsig); - else + if (!foreground) { + killemall.rk_sig = killsig; + killemall.rk_flags = 0; + procctl(P_PID, getpid(), PROC_REAP_KILL, + &killemall); + } else kill(pid, killsig); if (do_second_kill) { @@ -304,9 +324,12 @@ main(int argc, char **argv) break; } else if (sig_term) { - if (!foreground) - killpg(pgid, killsig); - else + if (!foreground) { + killemall.rk_sig = sig_term; + killemall.rk_flags = 0; + procctl(P_PID, getpid(), PROC_REAP_KILL, + &killemall); + } else kill(pid, sig_term); if (do_second_kill) { @@ -319,18 +342,21 @@ main(int argc, char **argv) } } - while (cpid != pid && wait(&pstat) == -1) { + while (!child_done && wait(&pstat) == -1) { if (errno != EINTR) err(EX_OSERR, "waitpid()"); } + if (!foreground) + procctl(P_PID, getpid(), PROC_REAP_RELEASE, NULL); + if (WEXITSTATUS(pstat)) pstat = WEXITSTATUS(pstat); else if(WIFSIGNALED(pstat)) pstat = 128 + WTERMSIG(pstat); if (timedout && !preserve) - pstat = EXIT_TIMEOUT; + pstat = EXIT_TIMEOUT; return (pstat); } From owner-svn-src-stable-10@freebsd.org Wed Sep 2 05:55:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2EB59C7289; Wed, 2 Sep 2015 05:55:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7977A96; Wed, 2 Sep 2015 05:55:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t825twBw027172; Wed, 2 Sep 2015 05:55:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t825twGv027171; Wed, 2 Sep 2015 05:55:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201509020555.t825twGv027171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 2 Sep 2015 05:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287393 - stable/10/lib/libc/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2015 05:55:58 -0000 Author: bapt Date: Wed Sep 2 05:55:57 2015 New Revision: 287393 URL: https://svnweb.freebsd.org/changeset/base/287393 Log: MFC: r286490,r286491,r287125 Per rfc3629 value greater than 0x10ffff should be rejected (r286490,r286491) Make UTF-8 parsing and generation more strict. (r287125 by ed) - in mbrtowc() we need to disallow codepoints above 0x10ffff. - In wcrtomb() we need to disallow codepoints between 0xd800 and 0xdfff. Modified: stable/10/lib/libc/locale/utf8.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/locale/utf8.c ============================================================================== --- stable/10/lib/libc/locale/utf8.c Wed Sep 2 05:45:47 2015 (r287392) +++ stable/10/lib/libc/locale/utf8.c Wed Sep 2 05:55:57 2015 (r287393) @@ -145,14 +145,6 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, mask = 0x07; want = 4; lbound = 0x10000; - } else if ((ch & 0xfc) == 0xf8) { - mask = 0x03; - want = 5; - lbound = 0x200000; - } else if ((ch & 0xfe) == 0xfc) { - mask = 0x01; - want = 6; - lbound = 0x4000000; } else { /* * Malformed input; input is not UTF-8. @@ -199,7 +191,7 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, errno = EILSEQ; return ((size_t)-1); } - if (wch >= 0xd800 && wch <= 0xdfff) { + if ((wch >= 0xd800 && wch <= 0xdfff) || wch > 0x10ffff) { /* * Malformed input; invalid code points. */ @@ -326,17 +318,15 @@ _UTF8_wcrtomb(char * __restrict s, wchar lead = 0xc0; len = 2; } else if ((wc & ~0xffff) == 0) { + if (wc >= 0xd800 && wc <= 0xdfff) { + errno = EILSEQ; + return ((size_t)-1); + } lead = 0xe0; len = 3; - } else if ((wc & ~0x1fffff) == 0) { + } else if (wc >= 0 && wc <= 0x10ffff) { lead = 0xf0; len = 4; - } else if ((wc & ~0x3ffffff) == 0) { - lead = 0xf8; - len = 5; - } else if ((wc & ~0x7fffffff) == 0) { - lead = 0xfc; - len = 6; } else { errno = EILSEQ; return ((size_t)-1); From owner-svn-src-stable-10@freebsd.org Thu Sep 3 11:33:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A9199C9675; Thu, 3 Sep 2015 11:33:36 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A1321CC1; Thu, 3 Sep 2015 11:33:36 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83BXaTB010564; Thu, 3 Sep 2015 11:33:36 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83BXY45010556; Thu, 3 Sep 2015 11:33:34 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201509031133.t83BXY45010556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 3 Sep 2015 11:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287428 - in stable/10/kerberos5: . lib/libhdb libexec/digest-service libexec/kdc usr.bin/string2key usr.sbin/iprop-log X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 11:33:36 -0000 Author: ume Date: Thu Sep 3 11:33:33 2015 New Revision: 287428 URL: https://svnweb.freebsd.org/changeset/base/287428 Log: MFC r287208, r287216: Make it buildable with WITH_OPENLDAP, again. Modified: stable/10/kerberos5/Makefile.inc stable/10/kerberos5/lib/libhdb/Makefile stable/10/kerberos5/libexec/digest-service/Makefile stable/10/kerberos5/libexec/kdc/Makefile stable/10/kerberos5/usr.bin/string2key/Makefile stable/10/kerberos5/usr.sbin/iprop-log/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/kerberos5/Makefile.inc ============================================================================== --- stable/10/kerberos5/Makefile.inc Thu Sep 3 11:31:34 2015 (r287427) +++ stable/10/kerberos5/Makefile.inc Thu Sep 3 11:33:33 2015 (r287428) @@ -11,7 +11,7 @@ OPENLDAPBASE?= /usr/local LDAPLDADD= -lldap -llber LDAPDPADD= ${LDAPLDADD:C;^-l(.*)$;${OPENLDAPBASE}/lib/lib\1.a;} LDAPCFLAGS= -I${OPENLDAPBASE}/include -DOPENLDAP=1 -DLDAP_DEPRECATED=1 -LDAPLDFLAGS= -L${OPENLDAPBASE}/lib -Wl,-rpath,${OPENLDAPBASE}/lib +LDAPLDFLAGS= -L${OPENLDAPBASE}/lib -rpath ${OPENLDAPBASE}/lib .endif LIBVERS= ${.OBJDIR}/../../lib/libvers/libvers.a Modified: stable/10/kerberos5/lib/libhdb/Makefile ============================================================================== --- stable/10/kerberos5/lib/libhdb/Makefile Thu Sep 3 11:31:34 2015 (r287427) +++ stable/10/kerberos5/lib/libhdb/Makefile Thu Sep 3 11:33:33 2015 (r287428) @@ -1,9 +1,9 @@ # $FreeBSD$ LIB= hdb -LDFLAGS= -Wl,--no-undefined +LDFLAGS= -Wl,--no-undefined ${LDAPLDFLAGS} VERSION_MAP= ${KRB5DIR}/lib/hdb/version-script.map -LDADD= -lasn1 -lcom_err -lkrb5 -lroken -lheimsqlite +LDADD= -lasn1 -lcom_err -lkrb5 -lroken -lheimsqlite ${LDAPLDADD} DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} ${LIBHEIMSQLITE} ${LDAPDPADD} MAN= HDB.3 hdb_entry_ex.3 Modified: stable/10/kerberos5/libexec/digest-service/Makefile ============================================================================== --- stable/10/kerberos5/libexec/digest-service/Makefile Thu Sep 3 11:31:34 2015 (r287427) +++ stable/10/kerberos5/libexec/digest-service/Makefile Thu Sep 3 11:33:33 2015 (r287428) @@ -12,6 +12,7 @@ DPADD= ${LIBHDB} ${LIBKDC} ${LIBHEIMIPCS ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} LDADD= -lhdb -lkdc -lheimipcs -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -lheimntlm +LDFLAGS=${LDAPLDFLAGS} USEPRIVATELIB= heimipcs .include Modified: stable/10/kerberos5/libexec/kdc/Makefile ============================================================================== --- stable/10/kerberos5/libexec/kdc/Makefile Thu Sep 3 11:31:34 2015 (r287427) +++ stable/10/kerberos5/libexec/kdc/Makefile Thu Sep 3 11:33:33 2015 (r287428) @@ -13,6 +13,7 @@ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DI DPADD= ${LIBKDC} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \ ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} LDADD= -lkdc -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} +LDFLAGS=${LDAPLDFLAGS} .include Modified: stable/10/kerberos5/usr.bin/string2key/Makefile ============================================================================== --- stable/10/kerberos5/usr.bin/string2key/Makefile Thu Sep 3 11:31:34 2015 (r287427) +++ stable/10/kerberos5/usr.bin/string2key/Makefile Thu Sep 3 11:33:33 2015 (r287428) @@ -7,9 +7,9 @@ CFLAGS+= -I${KRB5DIR}/kdc \ -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/windc -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ +DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ ${LIBCRYPT} ${LIBVERS} -LDADD= -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} +LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} .include Modified: stable/10/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- stable/10/kerberos5/usr.sbin/iprop-log/Makefile Thu Sep 3 11:31:34 2015 (r287427) +++ stable/10/kerberos5/usr.sbin/iprop-log/Makefile Thu Sep 3 11:33:33 2015 (r287428) @@ -12,6 +12,7 @@ DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB ${LIBCRYPT} ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBEDIT} LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -lcrypto -lcrypt ${LIBSL} -lroken \ ${LIBVERS} -ledit +LDFLAGS=${LDAPLDFLAGS} iprop-commands.h: iprop-commands.in ${SLC} ${.ALLSRC:M*.in} From owner-svn-src-stable-10@freebsd.org Thu Sep 3 16:43:37 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F639C9A9A; Thu, 3 Sep 2015 16:43:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38EE7CD6; Thu, 3 Sep 2015 16:43:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83Ghb4e045861; Thu, 3 Sep 2015 16:43:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83GhaH2045857; Thu, 3 Sep 2015 16:43:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509031643.t83GhaH2045857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 3 Sep 2015 16:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287435 - in stable: 10/sys/dev/ipmi 9/sys/dev/ipmi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 16:43:37 -0000 Author: jhb Date: Thu Sep 3 16:43:35 2015 New Revision: 287435 URL: https://svnweb.freebsd.org/changeset/base/287435 Log: MFC 281941: Watchdog drivers need to support rearming the watchdog in contexts which are not permitted to sleep. Only use the IPMI watchdog with backends which poll driver-initiated requests to meet this requirement. In practice this means that watchdogs will no longer be used on systems that use the SSIF backend. Modified: stable/10/sys/dev/ipmi/ipmi.c stable/10/sys/dev/ipmi/ipmi_kcs.c stable/10/sys/dev/ipmi/ipmi_smic.c stable/10/sys/dev/ipmi/ipmivars.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/ipmi/ipmi.c stable/9/sys/dev/ipmi/ipmi_kcs.c stable/9/sys/dev/ipmi/ipmi_smic.c stable/9/sys/dev/ipmi/ipmivars.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/ipmi/ipmi.c ============================================================================== --- stable/10/sys/dev/ipmi/ipmi.c Thu Sep 3 16:38:26 2015 (r287434) +++ stable/10/sys/dev/ipmi/ipmi.c Thu Sep 3 16:43:35 2015 (r287435) @@ -756,17 +756,22 @@ ipmi_startup(void *arg) } device_printf(dev, "Number of channels %d\n", i); - /* probe for watchdog */ - IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), - IPMI_GET_WDOG, 0, 0); - - ipmi_submit_driver_request(sc, req, 0); - - if (req->ir_compcode == 0x00) { - device_printf(dev, "Attached watchdog\n"); - /* register the watchdog event handler */ - sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER(watchdog_list, - ipmi_wd_event, sc, 0); + /* + * Probe for watchdog, but only for backends which support + * polled driver requests. + */ + if (sc->ipmi_driver_requests_polled) { + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_GET_WDOG, 0, 0); + + ipmi_submit_driver_request(sc, req, 0); + + if (req->ir_compcode == 0x00) { + device_printf(dev, "Attached watchdog\n"); + /* register the watchdog event handler */ + sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER( + watchdog_list, ipmi_wd_event, sc, 0); + } } sc->ipmi_cdev = make_dev(&ipmi_cdevsw, device_get_unit(dev), Modified: stable/10/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- stable/10/sys/dev/ipmi/ipmi_kcs.c Thu Sep 3 16:38:26 2015 (r287434) +++ stable/10/sys/dev/ipmi/ipmi_kcs.c Thu Sep 3 16:43:35 2015 (r287435) @@ -520,6 +520,7 @@ ipmi_kcs_attach(struct ipmi_softc *sc) sc->ipmi_startup = kcs_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; sc->ipmi_driver_request = kcs_driver_request; + sc->ipmi_driver_requests_polled = 1; /* See if we can talk to the controller. */ status = INB(sc, KCS_CTL_STS); Modified: stable/10/sys/dev/ipmi/ipmi_smic.c ============================================================================== --- stable/10/sys/dev/ipmi/ipmi_smic.c Thu Sep 3 16:38:26 2015 (r287434) +++ stable/10/sys/dev/ipmi/ipmi_smic.c Thu Sep 3 16:43:35 2015 (r287435) @@ -415,6 +415,7 @@ ipmi_smic_attach(struct ipmi_softc *sc) sc->ipmi_startup = smic_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; sc->ipmi_driver_request = smic_driver_request; + sc->ipmi_driver_requests_polled = 1; /* See if we can talk to the controller. */ flags = INB(sc, SMIC_FLAGS); Modified: stable/10/sys/dev/ipmi/ipmivars.h ============================================================================== --- stable/10/sys/dev/ipmi/ipmivars.h Thu Sep 3 16:38:26 2015 (r287434) +++ stable/10/sys/dev/ipmi/ipmivars.h Thu Sep 3 16:43:35 2015 (r287435) @@ -105,6 +105,7 @@ struct ipmi_softc { int ipmi_opened; struct cdev *ipmi_cdev; TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; + int ipmi_driver_requests_polled; eventhandler_tag ipmi_watchdog_tag; int ipmi_watchdog_active; struct intr_config_hook ipmi_ich; From owner-svn-src-stable-10@freebsd.org Thu Sep 3 18:14:32 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9FD49CA2FA; Thu, 3 Sep 2015 18:14:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA869BBE; Thu, 3 Sep 2015 18:14:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83IEWGp084894; Thu, 3 Sep 2015 18:14:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83IEWYH084893; Thu, 3 Sep 2015 18:14:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201509031814.t83IEWYH084893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 3 Sep 2015 18:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287438 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 18:14:33 -0000 Author: imp Date: Thu Sep 3 18:14:31 2015 New Revision: 287438 URL: https://svnweb.freebsd.org/changeset/base/287438 Log: MFC: r287183, r287264, r287265 Export kern.features.invariants when kernel is compiled with invariants. Modified: stable/10/sys/kern/init_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/init_main.c ============================================================================== --- stable/10/sys/kern/init_main.c Thu Sep 3 17:46:57 2015 (r287437) +++ stable/10/sys/kern/init_main.c Thu Sep 3 18:14:31 2015 (r287438) @@ -115,6 +115,10 @@ int bootverbose = BOOTVERBOSE; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "Control the output of verbose kernel messages"); +#ifdef INVARIANTS +FEATURE(invariants, "Kernel compiled with INVARIANTS, may affect performance"); +#endif + /* * This ensures that there is at least one entry so that the sysinit_set * symbol is not undefined. A sybsystem ID of SI_SUB_DUMMY is never From owner-svn-src-stable-10@freebsd.org Thu Sep 3 18:23:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 985B09CA665; Thu, 3 Sep 2015 18:23:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4D584; Thu, 3 Sep 2015 18:23:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83IN9a1089027; Thu, 3 Sep 2015 18:23:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83IN8Ma089019; Thu, 3 Sep 2015 18:23:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509031823.t83IN8Ma089019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 3 Sep 2015 18:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287439 - in stable: 10/lib/libutil 9/lib/libutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 18:23:09 -0000 Author: jhb Date: Thu Sep 3 18:23:07 2015 New Revision: 287439 URL: https://svnweb.freebsd.org/changeset/base/287439 Log: MFC 283622: Add to the SYNOPSIS of the kinfo_get*() functions since these functions all return types that are defined in that header. Modified: stable/10/lib/libutil/kinfo_getallproc.3 stable/10/lib/libutil/kinfo_getfile.3 stable/10/lib/libutil/kinfo_getproc.3 stable/10/lib/libutil/kinfo_getvmmap.3 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libutil/kinfo_getallproc.3 stable/9/lib/libutil/kinfo_getfile.3 stable/9/lib/libutil/kinfo_getproc.3 stable/9/lib/libutil/kinfo_getvmmap.3 Directory Properties: stable/9/lib/libutil/ (props changed) Modified: stable/10/lib/libutil/kinfo_getallproc.3 ============================================================================== --- stable/10/lib/libutil/kinfo_getallproc.3 Thu Sep 3 18:14:31 2015 (r287438) +++ stable/10/lib/libutil/kinfo_getallproc.3 Thu Sep 3 18:23:07 2015 (r287439) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd May 27, 2015 .Dt KINFO_GETALLPROC 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Lb libutil .Sh SYNOPSIS .In sys/types.h +.In sys/user.h .In libutil.h .Ft struct kinfo_proc * .Fn kinfo_getallproc "int *cntp" Modified: stable/10/lib/libutil/kinfo_getfile.3 ============================================================================== --- stable/10/lib/libutil/kinfo_getfile.3 Thu Sep 3 18:14:31 2015 (r287438) +++ stable/10/lib/libutil/kinfo_getfile.3 Thu Sep 3 18:23:07 2015 (r287439) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 6, 2008 +.Dd May 27, 2015 .Dt KINFO_GETFILE 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Lb libutil .Sh SYNOPSIS .In sys/types.h +.In sys/user.h .In libutil.h .Ft struct kinfo_file * .Fn kinfo_getfile "pid_t pid" "int *cntp" Modified: stable/10/lib/libutil/kinfo_getproc.3 ============================================================================== --- stable/10/lib/libutil/kinfo_getproc.3 Thu Sep 3 18:14:31 2015 (r287438) +++ stable/10/lib/libutil/kinfo_getproc.3 Thu Sep 3 18:23:07 2015 (r287439) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2013 +.Dd May 27, 2015 .Dt KINFO_GETPROC 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Lb libutil .Sh SYNOPSIS .In sys/types.h +.In sys/user.h .In libutil.h .Ft struct kinfo_proc * .Fn kinfo_getproc "pid_t pid" Modified: stable/10/lib/libutil/kinfo_getvmmap.3 ============================================================================== --- stable/10/lib/libutil/kinfo_getvmmap.3 Thu Sep 3 18:14:31 2015 (r287438) +++ stable/10/lib/libutil/kinfo_getvmmap.3 Thu Sep 3 18:23:07 2015 (r287439) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 6, 2008 +.Dd May 27, 2015 .Dt KINFO_GETVMMAP 3 .Os .Sh NAME @@ -35,6 +35,7 @@ .Lb libutil .Sh SYNOPSIS .In sys/types.h +.In sys/user.h .In libutil.h .Ft struct kinfo_vmentry * .Fn kinfo_getvmmap "pid_t pid" "int *cntp" From owner-svn-src-stable-10@freebsd.org Thu Sep 3 18:59:37 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65F829C9555; Thu, 3 Sep 2015 18:59:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DA419; Thu, 3 Sep 2015 18:59:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by obqa2 with SMTP id a2so40575726obq.3; Thu, 03 Sep 2015 11:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1+sWQP9SksRP6JYz1LsGUoXnAhIJ+3vOYeaVl5kzqdQ=; b=GBe7j94LhgTl2x1m5dln+R9EfVFAL65YgqDYnfYQkT2ESFtPuikE9m/Coh5P/eF9Bv ueic8PunMZdG0UiUHcUYKf8+V2aDSqrXldHtmAB+QF5y//0ddTOU1JBlp7D1nvkvofIO TbHP8HmbNIMm6MLCrfc/HOFe+66/6KzlMSiIpKoV/yxrV4i5J3VfrseH+La+miyifVuh EU28+RGICDTYzKd5Wgtc8pqnZXVg6csTO4dhE4Vs1MAN9x9/nqn7Si+wRMQQw30zhs0A nUDHlC2b9W8jFa96JYY53ZKB/ZJSm6XWTZFi0/5Htd9eYkkOk2tKe37GldruUbmSUtOW 0U/w== MIME-Version: 1.0 X-Received: by 10.182.96.100 with SMTP id dr4mr14491993obb.49.1441306776330; Thu, 03 Sep 2015 11:59:36 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.202.79.140 with HTTP; Thu, 3 Sep 2015 11:59:36 -0700 (PDT) In-Reply-To: <201509020545.t825jmpT022570@repo.freebsd.org> References: <201509020545.t825jmpT022570@repo.freebsd.org> Date: Thu, 3 Sep 2015 12:59:36 -0600 X-Google-Sender-Auth: UTnswRGPgWWHxLdwXknGR4Adoqc Message-ID: Subject: Re: svn commit: r287392 - in stable/10: etc/mtree usr.bin usr.bin/timeout usr.bin/timeout/tests From: Alan Somers To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 18:59:37 -0000 On Tue, Sep 1, 2015 at 11:45 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Sep 2 05:45:47 2015 > New Revision: 287392 > URL: https://svnweb.freebsd.org/changeset/base/287392 > > Log: > MFC: r268745,r268746,r268747,r268748,r268749,r268861,r268750,r268751,r268763 > r273769,r273771,r276771,r278810 > > New BSDL timeout(1) utility compatible with GNU timeout > > Relnotes: yes > > Added: > stable/10/usr.bin/timeout/ > - copied from r268745, head/usr.bin/timeout/ > stable/10/usr.bin/timeout/tests/ > - copied from r273771, head/usr.bin/timeout/tests/ > Modified: > stable/10/etc/mtree/BSD.tests.dist > stable/10/usr.bin/Makefile > stable/10/usr.bin/timeout/Makefile > stable/10/usr.bin/timeout/timeout.1 > stable/10/usr.bin/timeout/timeout.c > Directory Properties: > stable/10/ (props changed) > It looks like you mismerged etc/mtree/BSD.tests.dist. Instead of creating "/usr/tests/usr.bin/timeout", you created "/usr/tests/usr.sbin/bmake/timeout". > Modified: stable/10/etc/mtree/BSD.tests.dist > ============================================================================== > --- stable/10/etc/mtree/BSD.tests.dist Wed Sep 2 02:50:41 2015 (r287391) > +++ stable/10/etc/mtree/BSD.tests.dist Wed Sep 2 05:45:47 2015 (r287392) > @@ -323,6 +323,8 @@ > .. > .. > .. > + timeout > + .. > variables > modifier_M > .. > From owner-svn-src-stable-10@freebsd.org Thu Sep 3 19:42:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 227AC9CA919; Thu, 3 Sep 2015 19:42:58 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 124B5DC0; Thu, 3 Sep 2015 19:42:58 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83JgvJu023305; Thu, 3 Sep 2015 19:42:57 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83JgvZo023303; Thu, 3 Sep 2015 19:42:57 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201509031942.t83JgvZo023303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 3 Sep 2015 19:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287441 - in stable/10: etc/mtree usr.sbin/fstyp usr.sbin/fstyp/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 19:42:58 -0000 Author: asomers Date: Thu Sep 3 19:42:56 2015 New Revision: 287441 URL: https://svnweb.freebsd.org/changeset/base/287441 Log: MFC r286964 Add ATF functional tests for fstyp(8). No ZFS or GELI tests yet. Added: stable/10/usr.sbin/fstyp/tests/ - copied from r286964, head/usr.sbin/fstyp/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/usr.sbin/fstyp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Sep 3 18:27:39 2015 (r287440) +++ stable/10/etc/mtree/BSD.tests.dist Thu Sep 3 19:42:56 2015 (r287441) @@ -388,6 +388,8 @@ usr.sbin etcupdate .. + fstyp + .. newsyslog .. nmtree Modified: stable/10/usr.sbin/fstyp/Makefile ============================================================================== --- stable/10/usr.sbin/fstyp/Makefile Thu Sep 3 18:27:39 2015 (r287440) +++ stable/10/usr.sbin/fstyp/Makefile Thu Sep 3 19:42:56 2015 (r287441) @@ -1,9 +1,15 @@ # $FreeBSD$ +.include + PROG= fstyp SRCS= fstyp.c ext2fs.c cd9660.c msdosfs.c ntfs.c ufs.c MAN= fstyp.8 WARNS= 6 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From owner-svn-src-stable-10@freebsd.org Thu Sep 3 20:47:14 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 087759CA733; Thu, 3 Sep 2015 20:47:14 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED06B2FB; Thu, 3 Sep 2015 20:47:13 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83KlDPX048396; Thu, 3 Sep 2015 20:47:13 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83KlDww048395; Thu, 3 Sep 2015 20:47:13 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509032047.t83KlDww048395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 3 Sep 2015 20:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287443 - stable/10/etc/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 20:47:14 -0000 Author: rodrigc Date: Thu Sep 3 20:47:13 2015 New Revision: 287443 URL: https://svnweb.freebsd.org/changeset/base/287443 Log: Put timeout directory in correct place Modified: stable/10/etc/mtree/BSD.tests.dist Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Sep 3 20:32:10 2015 (r287442) +++ stable/10/etc/mtree/BSD.tests.dist Thu Sep 3 20:47:13 2015 (r287443) @@ -323,8 +323,6 @@ .. .. .. - timeout - .. variables modifier_M .. @@ -370,6 +368,8 @@ regress.multitest.out .. .. + timeout + .. tr .. truncate From owner-svn-src-stable-10@freebsd.org Thu Sep 3 22:07:49 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A3F29CA840; Thu, 3 Sep 2015 22:07:49 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B53891B55; Thu, 3 Sep 2015 22:07:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicfx3 with SMTP id fx3so4350066wic.1; Thu, 03 Sep 2015 15:07:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=slOYgfhCl1yqIfqUj8pCVowOJC7OqJ9QPdDWnNihNN4=; b=V5ACO9oACmIB7UjvUBxKCzIrxx453+3MhlGiYl6gu2hE2R6UesBPmeNgqBmzM4Uy0f 5F2V0XkFlLF7W3WNBcn6HKbWDO8M3uMAgdrqjyuHw5g+IRl+rl0yqMp1JMdIcZfoH4Zv ht42Kli6kSvHosm1YlXKAExkPXbUHzP+3qldrmSHbAAAjq+su8f1GVdwCj1Y471yYvsn S7jAUYbs2qKfvLmPjaznCUbIgO+/uNfqf16rcJ+VeChrzUhplRf1DSvdBRdbcte4lFl4 l0eSxkNquLh/m3pf+6uClPKUSsuxhDqxBb91+zHQiTz+cVefxLIa60TfAHg3ERvhz0KG tQ7Q== X-Received: by 10.194.192.99 with SMTP id hf3mr404174wjc.78.1441318066851; Thu, 03 Sep 2015 15:07:46 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id f7sm421030wij.17.2015.09.03.15.07.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2015 15:07:46 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 4 Sep 2015 00:07:44 +0200 From: Baptiste Daroussin To: Craig Rodrigues Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287443 - stable/10/etc/mtree Message-ID: <20150903220744.GJ61752@ivaldir.etoilebsd.net> References: <201509032047.t83KlDww048395@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUvfsPTz/SzOZDdw" Content-Disposition: inline In-Reply-To: <201509032047.t83KlDww048395@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 22:07:49 -0000 --fUvfsPTz/SzOZDdw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 03, 2015 at 08:47:13PM +0000, Craig Rodrigues wrote: > Author: rodrigc > Date: Thu Sep 3 20:47:13 2015 > New Revision: 287443 > URL: https://svnweb.freebsd.org/changeset/base/287443 >=20 > Log: > Put timeout directory in correct place >=20 Thank you and also thanks to Alan Somers who reported me the issue when was about to fix when I noticed you just did it. Best regards, Bapt --fUvfsPTz/SzOZDdw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlXoxLAACgkQ8kTtMUmk6ExLPQCdGlOoq2VKqCmWJ6ELgEXIMrij RDgAn3qSlk2zOJksT18KIb1FqJ7J+wW9 =D1rr -----END PGP SIGNATURE----- --fUvfsPTz/SzOZDdw-- From owner-svn-src-stable-10@freebsd.org Fri Sep 4 00:41:30 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E6369C935A; Fri, 4 Sep 2015 00:41:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EF13204; Fri, 4 Sep 2015 00:41:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t840fTZN046981; Fri, 4 Sep 2015 00:41:29 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t840fTMS046980; Fri, 4 Sep 2015 00:41:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509040041.t840fTMS046980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 4 Sep 2015 00:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287446 - stable/10/usr.bin/bluetooth/btsockstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 00:41:30 -0000 Author: delphij Date: Fri Sep 4 00:41:29 2015 New Revision: 287446 URL: https://svnweb.freebsd.org/changeset/base/287446 Log: MFC r287345: Drop group privileges after opening the kvm descriptor, otherwise, the code would not drop privileges as expected. While there also add checks for the drop and bail out immediately if we failed. Modified: stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c ============================================================================== --- stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c Fri Sep 4 00:14:20 2015 (r287445) +++ stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c Fri Sep 4 00:41:29 2015 (r287446) @@ -154,9 +154,9 @@ main(int argc, char *argv[]) * Discard setgid privileges if not the running kernel so that * bad guys can't print interesting stuff from kernel memory. */ - if (memf != NULL) - setgid(getgid()); + if (setgid(getgid()) != 0) + err(1, "setgid"); kvmd = kopen(memf); if (kvmd == NULL) @@ -583,15 +583,9 @@ kopen(char const *memf) kvm_t *kvmd = NULL; char errbuf[_POSIX2_LINE_MAX]; - /* - * Discard setgid privileges if not the running kernel so that - * bad guys can't print interesting stuff from kernel memory. - */ - - if (memf != NULL) - setgid(getgid()); - kvmd = kvm_openfiles(NULL, memf, NULL, O_RDONLY, errbuf); + if (setgid(getgid()) != 0) + err(1, "setgid"); if (kvmd == NULL) { warnx("kvm_openfiles: %s", errbuf); return (NULL); From owner-svn-src-stable-10@freebsd.org Fri Sep 4 00:59:41 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18A489C9ACE; Fri, 4 Sep 2015 00:59:41 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x232.google.com (mail-yk0-x232.google.com [IPv6:2607:f8b0:4002:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6686AFA; Fri, 4 Sep 2015 00:59:40 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykei199 with SMTP id i199so6909674yke.0; Thu, 03 Sep 2015 17:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=A7KShMHVJOV1tFwCsG4Jbk8l10hC0FNvM1FskeTw+F4=; b=pj2IbMOoy4xo0Mi2lAzB1ymA/FOxfPcpEEUkHVSfw7NesQoYk/pkTji5BOqwJlfgmN 8YzrgFyZ94Gb7NrQ2/WxMg/k05LWrxR+pgr8NyixZn0OFG0INzjArVlpKfTKEj2d4AN+ KhIOm1HOBNOT/fGqmgFgPsMlMor0dgDGM5v3MR4An4QSCCk75IBWc8Cp6dEYtaICSTLh O/5mJC7l2CiJdH38NqdgdRPUeTEECj/MHsCjz3eraLaMdy+fGnt/av6bK2lWx/0rS+ub 9kydPMaoNu1wldiWtxGhPrp4j8o4WNVeS9xqqdVi5Vv/2ZsXFIICC2Fxt8gZaJpU0qgx UjwA== MIME-Version: 1.0 X-Received: by 10.170.123.83 with SMTP id p80mr967774ykb.127.1441328379344; Thu, 03 Sep 2015 17:59:39 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.37.99.3 with HTTP; Thu, 3 Sep 2015 17:59:39 -0700 (PDT) In-Reply-To: <20150903220744.GJ61752@ivaldir.etoilebsd.net> References: <201509032047.t83KlDww048395@repo.freebsd.org> <20150903220744.GJ61752@ivaldir.etoilebsd.net> Date: Thu, 3 Sep 2015 17:59:39 -0700 X-Google-Sender-Auth: 2WLGPhtBDrWP9YYmTKcF6kZXkhg Message-ID: Subject: Re: svn commit: r287443 - stable/10/etc/mtree From: Craig Rodrigues To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 00:59:41 -0000 On Thu, Sep 3, 2015 at 3:07 PM, Baptiste Daroussin wrote: > On Thu, Sep 03, 2015 at 08:47:13PM +0000, Craig Rodrigues wrote: > > Author: rodrigc > > Date: Thu Sep 3 20:47:13 2015 > > New Revision: 287443 > > URL: https://svnweb.freebsd.org/changeset/base/287443 > > > > Log: > > Put timeout directory in correct place > > > Thank you and also thanks to Alan Somers who reported me the issue when was > about to fix when I noticed you just did it. > > You are welcome. I put the fix in because of this Jenkins failure: https://jenkins.freebsd.org/job/Build-UFS-image/2256/console -- Craig From owner-svn-src-stable-10@freebsd.org Fri Sep 4 01:13:41 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4840F9CA209; Fri, 4 Sep 2015 01:13:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3901012F6; Fri, 4 Sep 2015 01:13:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t841Df27059376; Fri, 4 Sep 2015 01:13:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t841Df6x059375; Fri, 4 Sep 2015 01:13:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201509040113.t841Df6x059375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 4 Sep 2015 01:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287449 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 01:13:41 -0000 Author: gjb Date: Fri Sep 4 01:13:40 2015 New Revision: 287449 URL: https://svnweb.freebsd.org/changeset/base/287449 Log: MFC r287368: Remove '-' separating OSRELEASE and SNAPSHOT_DATE for vagrant builds, and prepend it to SNAPSHOT_DATE to prevent a trailing '-' in the final box name for a release build. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.vagrant Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.vagrant ============================================================================== --- stable/10/release/Makefile.vagrant Fri Sep 4 01:02:21 2015 (r287448) +++ stable/10/release/Makefile.vagrant Fri Sep 4 01:13:40 2015 (r287449) @@ -17,11 +17,11 @@ ATLAS${VAR}:= ${VAGRANT${VAR}} .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" -SNAPSHOT_DATE!= date +%Y%m%d +SNAPSHOT_DATE!= date +-%Y%m%d .endif VAGRANT_VERSION!= date +%Y.%m.%d -VAGRANT_TARGET:= ${OSRELEASE}-${SNAPSHOT_DATE} +VAGRANT_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} .if !empty(CLOUDWARE) . for _PROVIDER in ${CLOUDWARE} . if ${_PROVIDER:MVAGRANT*} From owner-svn-src-stable-10@freebsd.org Fri Sep 4 14:18:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A88779C910B for ; Fri, 4 Sep 2015 14:18:21 +0000 (UTC) (envelope-from s.tyshchenko@identika.pro) Received: from scale222.ru (scale222.ru [51.254.99.22]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5712B18B1 for ; Fri, 4 Sep 2015 14:18:20 +0000 (UTC) (envelope-from s.tyshchenko@identika.pro) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=scale222.ru; s=default; h=Content-Type:List-Unsubscribe:Message-ID:Sender:From:Date:MIME-Version:Subject:To; bh=nQMcKBBwSjnS3jpAKSEF3qWJtMhsp3VzPBJWC047ifQ=; b=FbTl/NlMcEvqo/lp6CyxAkG4At3WJa8Cx/bsNPJ5l7wKbxEKshrctrBF+1z1ZO0m4WoXO9mc1mf/y0vzS5KgiTLqZZCjYVVo98unsH0umcFkDvc8QqLhxBGszbZQDMofpyMmBO2dxD9AKRYqyDP2n42FxcCz/uDBzQiMjzU4zmM=; Received: from root by scale222.ru with local (Exim 4.80) (envelope-from ) id 1ZXron-0006w5-Oj for svn-src-stable-10@freebsd.org; Fri, 04 Sep 2015 16:18:17 +0200 To: svn-src-stable-10@freebsd.org Subject: Plastic ProductS MIME-Version: 1.0 Date: Fri, 4 Sep 2015 16:18:17 +0200 From: Sergey Tyshchenko Sender: s.tyshchenko@identika.pro Message-ID: <243144878.27121@scale222.ru> X-Priority: 3 X-Mailer: scale222.ru mailer. Ver. 1.1. Precedence: bulk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 14:18:21 -0000 TWFudWZhY3R1cmUgb2YgwqBwcmludGVkIHByb2R1Y3RzIGZyb20gQUJTIHBsYXN0aWMsIGFjcnls aWMsIFBFVCBtZXRob2Qgb2YgdmFjdXVtIGZvcm1pbmcuIFNlcmllcyBwcm9kdWN0aW9uIG9mIExl dHRlcnMsIHNpZ25zLCBsaWdodCBib3hlcyAobGlnaHRib3gpLCBQT1MgbWF0ZXJpYWwgZm9yIHJl dGFpbCBjaGFpbnMuRXhhbXBsZXMgb2Ygb3VyIHdvcms6wqBodHRwOi8vaWRlbnRpa2EucHJvL2Nv dW50ZXJfbGluay9wcmVzZW50YXRpb25fZW4ucGRm4oCLDQoJCQkJCQkJCQkJCQkJCQkJCQkJDQoJ CQkJCQkJCQkJCQkJCQkJCQkJDQoJCQkJCQkJCQkJCQkJCQkJCQkJCQ0KCQkJCQkJCQkJCQkJCQkJ CQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkJCQkJDQoJCQkJCQkJCQkJCQkJCQkJCQkJCQ0KCQkJCQkJ CQkJCQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkNCgkJCQkJ CQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkJDQoJCQkJCQkJ CQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkJCQkNCgkJCQkJCQkJCQkJCQkJCQkJCQkJU2Vy Z2V5IFR5c2hjaGVua29DRU8gfMKgSURFTlRJS0EuUFJPVmliZXI6wqArMzgwNTA1NTY2OTY1wqB8 IFdoYXRzQXBwOsKgKzM4MDUwNTU2Njk2NVNreXBlOiB0LnNlcmdleS5tcy50eXNoY2hlbmtvQGlk ZW50aWthLnBybyB8wqBpZGVudGlrYS5wcm8wMzA0MCB8IEdvbG9zaWl2c2t5aSBBdmUuIDcwIHwg b2ZmaWNlIDUwMiB8IEtpZXbCoA== From owner-svn-src-stable-10@freebsd.org Fri Sep 4 15:34:28 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EE619CAD2C; Fri, 4 Sep 2015 15:34:28 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F336FAF; Fri, 4 Sep 2015 15:34:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t84FYRa2015874; Fri, 4 Sep 2015 15:34:27 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t84FYRqP015873; Fri, 4 Sep 2015 15:34:27 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509041534.t84FYRqP015873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 4 Sep 2015 15:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287461 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 15:34:28 -0000 Author: sbruno Date: Fri Sep 4 15:34:27 2015 New Revision: 287461 URL: https://svnweb.freebsd.org/changeset/base/287461 Log: MFC r286238 A misplaced #endif in ixgbe_ioctl() causes interface MTU to become zero when INET and INET6 are undefined. PR: 162028 Submitted by: hoomanfazaeli@gmail.com pluknet Modified: stable/10/sys/dev/ixgbe/if_ix.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ix.c Fri Sep 4 12:02:12 2015 (r287460) +++ stable/10/sys/dev/ixgbe/if_ix.c Fri Sep 4 15:34:27 2015 (r287461) @@ -770,9 +770,9 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c struct ifreq *ifr = (struct ifreq *) data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; - bool avoid_reset = FALSE; #endif int error = 0; + bool avoid_reset = FALSE; switch (command) { @@ -785,7 +785,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c if (ifa->ifa_addr->sa_family == AF_INET6) avoid_reset = TRUE; #endif -#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -794,11 +793,12 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) ixgbe_init(adapter); +#if defined(INET) if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); -#endif break; case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); From owner-svn-src-stable-10@freebsd.org Fri Sep 4 15:40:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 138729CAFA8; Fri, 4 Sep 2015 15:40:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03272650; Fri, 4 Sep 2015 15:40:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t84FeKUP016214; Fri, 4 Sep 2015 15:40:20 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t84FeKIH016212; Fri, 4 Sep 2015 15:40:20 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509041540.t84FeKIH016212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 4 Sep 2015 15:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287462 - in stable/10/sys/x86: include x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 15:40:21 -0000 Author: sbruno Date: Fri Sep 4 15:40:19 2015 New Revision: 287462 URL: https://svnweb.freebsd.org/changeset/base/287462 Log: MFC r276834 Update Features2 to display SDBG capability of processor. This is showing up on Haswell-class CPUs From the Intel SDM, "Table 3-20. Feature Information Returned in the ECX Register" 11 | SDBG | A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE MSR for silicon debug. Submitted by: jiashiun@gmail.com Modified: stable/10/sys/x86/include/specialreg.h stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/specialreg.h ============================================================================== --- stable/10/sys/x86/include/specialreg.h Fri Sep 4 15:34:27 2015 (r287461) +++ stable/10/sys/x86/include/specialreg.h Fri Sep 4 15:40:19 2015 (r287462) @@ -157,6 +157,7 @@ #define CPUID2_TM2 0x00000100 #define CPUID2_SSSE3 0x00000200 #define CPUID2_CNXTID 0x00000400 +#define CPUID2_SDBG 0x00000800 #define CPUID2_FMA 0x00001000 #define CPUID2_CX16 0x00002000 #define CPUID2_XTPR 0x00004000 Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Fri Sep 4 15:34:27 2015 (r287461) +++ stable/10/sys/x86/x86/identcpu.c Fri Sep 4 15:40:19 2015 (r287462) @@ -781,7 +781,7 @@ printcpuinfo(void) "\011TM2" /* Thermal Monitor 2 */ "\012SSSE3" /* SSSE3 */ "\013CNXT-ID" /* L1 context ID available */ - "\014" + "\014SDBG" /* IA32 silicon debug */ "\015FMA" /* Fused Multiply Add */ "\016CX16" /* CMPXCHG16B Instruction */ "\017xTPR" /* Send Task Priority Messages*/ From owner-svn-src-stable-10@freebsd.org Fri Sep 4 15:45:43 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE55E9CA213; Fri, 4 Sep 2015 15:45:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E134A51; Fri, 4 Sep 2015 15:45:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t84FjhtF020112; Fri, 4 Sep 2015 15:45:43 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t84FjhSv020111; Fri, 4 Sep 2015 15:45:43 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509041545.t84FjhSv020111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 4 Sep 2015 15:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287463 - stable/10/usr.sbin/binmiscctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2015 15:45:43 -0000 Author: sbruno Date: Fri Sep 4 15:45:42 2015 New Revision: 287463 URL: https://svnweb.freebsd.org/changeset/base/287463 Log: MFC r277853 Check for invalid length or more than max length for the interpreter, instead of the validity of the string pointer holding the interpreter. Submitted by: sson Modified: stable/10/usr.sbin/binmiscctl/binmiscctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/binmiscctl/binmiscctl.c ============================================================================== --- stable/10/usr.sbin/binmiscctl/binmiscctl.c Fri Sep 4 15:40:19 2015 (r287462) +++ stable/10/usr.sbin/binmiscctl/binmiscctl.c Fri Sep 4 15:45:42 2015 (r287463) @@ -363,7 +363,7 @@ add_cmd(__unused int argc, char *argv[], usage("Error: Missing magic argument"); } - if (!xbe->xbe_interpreter) { + if (!strnlen(xbe->xbe_interpreter, IBE_INTERP_LEN_MAX)) { usage("Error: Missing 'interpreter' argument"); } From owner-svn-src-stable-10@freebsd.org Sat Sep 5 08:55:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7073C9CA42D; Sat, 5 Sep 2015 08:55:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55E2A1AFA; Sat, 5 Sep 2015 08:55:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t858twKR053429; Sat, 5 Sep 2015 08:55:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t858tqhN053404; Sat, 5 Sep 2015 08:55:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509050855.t858tqhN053404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 5 Sep 2015 08:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287480 - in stable/10/lib/libc: amd64/gen compat-43 db/btree db/hash gen i386/gen include net stdio stdlib sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2015 08:55:58 -0000 Author: kib Date: Sat Sep 5 08:55:51 2015 New Revision: 287480 URL: https://svnweb.freebsd.org/changeset/base/287480 Log: MFC r287292: Switch libc from using _sig{procmask,action,suspend} symbols, which are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. MFC r287300: Use libthr interposed functions instead of syscalls, in posix_spawn()' child. Modified: stable/10/lib/libc/amd64/gen/setjmp.S stable/10/lib/libc/amd64/gen/sigsetjmp.S stable/10/lib/libc/compat-43/sigcompat.c stable/10/lib/libc/db/btree/bt_open.c stable/10/lib/libc/db/hash/hash_page.c stable/10/lib/libc/gen/daemon.c stable/10/lib/libc/gen/posix_spawn.c stable/10/lib/libc/gen/readpassphrase.c stable/10/lib/libc/gen/setmode.c stable/10/lib/libc/gen/siginterrupt.c stable/10/lib/libc/gen/signal.c stable/10/lib/libc/gen/wordexp.c stable/10/lib/libc/i386/gen/setjmp.S stable/10/lib/libc/i386/gen/sigsetjmp.S stable/10/lib/libc/include/libc_private.h stable/10/lib/libc/net/rcmd.c stable/10/lib/libc/stdio/tmpfile.c stable/10/lib/libc/stdlib/abort.c stable/10/lib/libc/stdlib/system.c stable/10/lib/libc/sys/sigaction.c stable/10/lib/libc/sys/sigprocmask.c stable/10/lib/libc/sys/sigsuspend.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/amd64/gen/setjmp.S ============================================================================== --- stable/10/lib/libc/amd64/gen/setjmp.S Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/amd64/gen/setjmp.S Sat Sep 5 08:55:51 2015 (r287480) @@ -55,7 +55,7 @@ ENTRY(setjmp) movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */ /* stack is 16-byte aligned */ - call PIC_PLT(CNAME(_sigprocmask)) + call __libc_sigprocmask popq %rdi movq %rdi,%rcx movq 0(%rsp),%rdx /* retval */ @@ -83,7 +83,7 @@ ENTRY(__longjmp) leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ subq $0x8,%rsp /* make the stack 16-byte aligned */ - call PIC_PLT(CNAME(_sigprocmask)) + call __libc_sigprocmask addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ Modified: stable/10/lib/libc/amd64/gen/sigsetjmp.S ============================================================================== --- stable/10/lib/libc/amd64/gen/sigsetjmp.S Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/amd64/gen/sigsetjmp.S Sat Sep 5 08:55:51 2015 (r287480) @@ -63,7 +63,7 @@ ENTRY(sigsetjmp) movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10 (sigset_t*)oset */ /* stack is 16-byte aligned */ - call PIC_PLT(CNAME(_sigprocmask)) + call __libc_sigprocmask popq %rdi 2: movq %rdi,%rcx movq 0(%rsp),%rdx /* retval */ @@ -92,7 +92,7 @@ ENTRY(__siglongjmp) leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ subq $0x8,%rsp /* make the stack 16-byte aligned */ - call PIC_PLT(CNAME(_sigprocmask)) + call __libc_sigprocmask addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ Modified: stable/10/lib/libc/compat-43/sigcompat.c ============================================================================== --- stable/10/lib/libc/compat-43/sigcompat.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/compat-43/sigcompat.c Sat Sep 5 08:55:51 2015 (r287480) @@ -59,7 +59,7 @@ sigvec(signo, sv, osv) } else sap = NULL; osap = osv != NULL ? &osa : NULL; - ret = _sigaction(signo, sap, osap); + ret = __libc_sigaction(signo, sap, osap); if (ret == 0 && osv != NULL) { osv->sv_handler = osa.sa_handler; osv->sv_flags = osa.sa_flags ^ SV_INTERRUPT; @@ -77,7 +77,7 @@ sigsetmask(mask) sigemptyset(&set); set.__bits[0] = mask; - n = _sigprocmask(SIG_SETMASK, &set, &oset); + n = __libc_sigprocmask(SIG_SETMASK, &set, &oset); if (n) return (n); return (oset.__bits[0]); @@ -92,7 +92,7 @@ sigblock(mask) sigemptyset(&set); set.__bits[0] = mask; - n = _sigprocmask(SIG_BLOCK, &set, &oset); + n = __libc_sigprocmask(SIG_BLOCK, &set, &oset); if (n) return (n); return (oset.__bits[0]); @@ -105,7 +105,7 @@ sigpause(int mask) sigemptyset(&set); set.__bits[0] = mask; - return (_sigsuspend(&set)); + return (__libc_sigsuspend(&set)); } int @@ -113,11 +113,11 @@ xsi_sigpause(int sig) { sigset_t set; - if (_sigprocmask(SIG_BLOCK, NULL, &set) == -1) + if (__libc_sigprocmask(SIG_BLOCK, NULL, &set) == -1) return (-1); if (sigdelset(&set, sig) == -1) return (-1); - return (_sigsuspend(&set)); + return (__libc_sigsuspend(&set)); } int @@ -128,7 +128,7 @@ sighold(int sig) sigemptyset(&set); if (sigaddset(&set, sig) == -1) return (-1); - return (_sigprocmask(SIG_BLOCK, &set, NULL)); + return (__libc_sigprocmask(SIG_BLOCK, &set, NULL)); } int @@ -138,7 +138,7 @@ sigignore(int sig) bzero(&sa, sizeof(sa)); sa.sa_handler = SIG_IGN; - return (_sigaction(sig, &sa, NULL)); + return (__libc_sigaction(sig, &sa, NULL)); } int @@ -149,7 +149,7 @@ sigrelse(int sig) sigemptyset(&set); if (sigaddset(&set, sig) == -1) return (-1); - return (_sigprocmask(SIG_UNBLOCK, &set, NULL)); + return (__libc_sigprocmask(SIG_UNBLOCK, &set, NULL)); } void @@ -161,26 +161,26 @@ void sigemptyset(&set); if (sigaddset(&set, sig) == -1) return (SIG_ERR); - if (_sigprocmask(SIG_BLOCK, NULL, &pset) == -1) + if (__libc_sigprocmask(SIG_BLOCK, NULL, &pset) == -1) return (SIG_ERR); if ((__sighandler_t *)disp == SIG_HOLD) { - if (_sigprocmask(SIG_BLOCK, &set, &pset) == -1) + if (__libc_sigprocmask(SIG_BLOCK, &set, &pset) == -1) return (SIG_ERR); if (sigismember(&pset, sig)) return (SIG_HOLD); else { - if (_sigaction(sig, NULL, &psa) == -1) + if (__libc_sigaction(sig, NULL, &psa) == -1) return (SIG_ERR); return (psa.sa_handler); } } else { - if (_sigprocmask(SIG_UNBLOCK, &set, &pset) == -1) + if (__libc_sigprocmask(SIG_UNBLOCK, &set, &pset) == -1) return (SIG_ERR); } bzero(&sa, sizeof(sa)); sa.sa_handler = disp; - if (_sigaction(sig, &sa, &psa) == -1) + if (__libc_sigaction(sig, &sa, &psa) == -1) return (SIG_ERR); if (sigismember(&pset, sig)) return (SIG_HOLD); Modified: stable/10/lib/libc/db/btree/bt_open.c ============================================================================== --- stable/10/lib/libc/db/btree/bt_open.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/db/btree/bt_open.c Sat Sep 5 08:55:51 2015 (r287480) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include "libc_private.h" #include #include "btree.h" @@ -401,10 +402,10 @@ tmp(void) } (void)sigfillset(&set); - (void)_sigprocmask(SIG_BLOCK, &set, &oset); + (void)__libc_sigprocmask(SIG_BLOCK, &set, &oset); if ((fd = mkostemp(path, O_CLOEXEC)) != -1) (void)unlink(path); - (void)_sigprocmask(SIG_SETMASK, &oset, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oset, NULL); return(fd); } Modified: stable/10/lib/libc/db/hash/hash_page.c ============================================================================== --- stable/10/lib/libc/db/hash/hash_page.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/db/hash/hash_page.c Sat Sep 5 08:55:51 2015 (r287480) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include "un-namespace.h" +#include "libc_private.h" #include #include "hash.h" @@ -861,10 +862,10 @@ open_temp(HTAB *hashp) /* Block signals; make sure file goes away at process exit. */ (void)sigfillset(&set); - (void)_sigprocmask(SIG_BLOCK, &set, &oset); + (void)__libc_sigprocmask(SIG_BLOCK, &set, &oset); if ((hashp->fp = mkostemp(path, O_CLOEXEC)) != -1) (void)unlink(path); - (void)_sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL); return (hashp->fp != -1 ? 0 : -1); } Modified: stable/10/lib/libc/gen/daemon.c ============================================================================== --- stable/10/lib/libc/gen/daemon.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/daemon.c Sat Sep 5 08:55:51 2015 (r287480) @@ -41,10 +41,10 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include "libc_private.h" int -daemon(nochdir, noclose) - int nochdir, noclose; +daemon(int nochdir, int noclose) { struct sigaction osa, sa; int fd; @@ -56,7 +56,7 @@ daemon(nochdir, noclose) sigemptyset(&sa.sa_mask); sa.sa_handler = SIG_IGN; sa.sa_flags = 0; - osa_ok = _sigaction(SIGHUP, &sa, &osa); + osa_ok = __libc_sigaction(SIGHUP, &sa, &osa); switch (fork()) { case -1: @@ -74,7 +74,7 @@ daemon(nochdir, noclose) newgrp = setsid(); oerrno = errno; if (osa_ok != -1) - _sigaction(SIGHUP, &osa, NULL); + __libc_sigaction(SIGHUP, &osa, NULL); if (newgrp == -1) { errno = oerrno; Modified: stable/10/lib/libc/gen/posix_spawn.c ============================================================================== --- stable/10/lib/libc/gen/posix_spawn.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/posix_spawn.c Sat Sep 5 08:55:51 2015 (r287480) @@ -118,15 +118,18 @@ process_spawnattr(const posix_spawnattr_ return (errno); } - /* Set signal masks/defaults */ + /* + * Set signal masks/defaults. + * Use unwrapped syscall, libthr is in undefined state after vfork(). + */ if (sa->sa_flags & POSIX_SPAWN_SETSIGMASK) { - _sigprocmask(SIG_SETMASK, &sa->sa_sigmask, NULL); + __sys_sigprocmask(SIG_SETMASK, &sa->sa_sigmask, NULL); } if (sa->sa_flags & POSIX_SPAWN_SETSIGDEF) { for (i = 1; i <= _SIG_MAXSIG; i++) { if (sigismember(&sa->sa_sigdefault, i)) - if (_sigaction(i, &sigact, NULL) != 0) + if (__sys_sigaction(i, &sigact, NULL) != 0) return (errno); } } Modified: stable/10/lib/libc/gen/readpassphrase.c ============================================================================== --- stable/10/lib/libc/gen/readpassphrase.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/readpassphrase.c Sat Sep 5 08:55:51 2015 (r287480) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include "libc_private.h" static volatile sig_atomic_t signo[NSIG]; @@ -104,15 +105,15 @@ restart: sigemptyset(&sa.sa_mask); sa.sa_flags = 0; /* don't restart system calls */ sa.sa_handler = handler; - (void)_sigaction(SIGALRM, &sa, &savealrm); - (void)_sigaction(SIGHUP, &sa, &savehup); - (void)_sigaction(SIGINT, &sa, &saveint); - (void)_sigaction(SIGPIPE, &sa, &savepipe); - (void)_sigaction(SIGQUIT, &sa, &savequit); - (void)_sigaction(SIGTERM, &sa, &saveterm); - (void)_sigaction(SIGTSTP, &sa, &savetstp); - (void)_sigaction(SIGTTIN, &sa, &savettin); - (void)_sigaction(SIGTTOU, &sa, &savettou); + (void)__libc_sigaction(SIGALRM, &sa, &savealrm); + (void)__libc_sigaction(SIGHUP, &sa, &savehup); + (void)__libc_sigaction(SIGINT, &sa, &saveint); + (void)__libc_sigaction(SIGPIPE, &sa, &savepipe); + (void)__libc_sigaction(SIGQUIT, &sa, &savequit); + (void)__libc_sigaction(SIGTERM, &sa, &saveterm); + (void)__libc_sigaction(SIGTSTP, &sa, &savetstp); + (void)__libc_sigaction(SIGTTIN, &sa, &savettin); + (void)__libc_sigaction(SIGTTOU, &sa, &savettou); if (!(flags & RPP_STDIN)) (void)_write(output, prompt, strlen(prompt)); @@ -142,15 +143,15 @@ restart: errno == EINTR && !signo[SIGTTOU]) continue; } - (void)_sigaction(SIGALRM, &savealrm, NULL); - (void)_sigaction(SIGHUP, &savehup, NULL); - (void)_sigaction(SIGINT, &saveint, NULL); - (void)_sigaction(SIGQUIT, &savequit, NULL); - (void)_sigaction(SIGPIPE, &savepipe, NULL); - (void)_sigaction(SIGTERM, &saveterm, NULL); - (void)_sigaction(SIGTSTP, &savetstp, NULL); - (void)_sigaction(SIGTTIN, &savettin, NULL); - (void)_sigaction(SIGTTOU, &savettou, NULL); + (void)__libc_sigaction(SIGALRM, &savealrm, NULL); + (void)__libc_sigaction(SIGHUP, &savehup, NULL); + (void)__libc_sigaction(SIGINT, &saveint, NULL); + (void)__libc_sigaction(SIGQUIT, &savequit, NULL); + (void)__libc_sigaction(SIGPIPE, &savepipe, NULL); + (void)__libc_sigaction(SIGTERM, &saveterm, NULL); + (void)__libc_sigaction(SIGTSTP, &savetstp, NULL); + (void)__libc_sigaction(SIGTTIN, &savettin, NULL); + (void)__libc_sigaction(SIGTTOU, &savettou, NULL); if (input != STDIN_FILENO) (void)_close(input); Modified: stable/10/lib/libc/gen/setmode.c ============================================================================== --- stable/10/lib/libc/gen/setmode.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/setmode.c Sat Sep 5 08:55:51 2015 (r287480) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include "un-namespace.h" +#include "libc_private.h" #define SET_LEN 6 /* initial # of bitcmd struct to malloc */ #define SET_LEN_INCR 4 /* # of bitcmd structs to add as needed */ @@ -364,9 +365,9 @@ getumask(void) * handler, protect them as best we can. */ sigfillset(&sigset); - (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); + (void)__libc_sigprocmask(SIG_BLOCK, &sigset, &sigoset); (void)umask(mask = umask(0)); - (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &sigoset, NULL); return (mask); } Modified: stable/10/lib/libc/gen/siginterrupt.c ============================================================================== --- stable/10/lib/libc/gen/siginterrupt.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/siginterrupt.c Sat Sep 5 08:55:51 2015 (r287480) @@ -43,14 +43,13 @@ __FBSDID("$FreeBSD$"); * after an instance of the indicated signal. */ int -siginterrupt(sig, flag) - int sig, flag; +siginterrupt(int sig, int flag) { extern sigset_t _sigintr __hidden; struct sigaction sa; int ret; - if ((ret = _sigaction(sig, (struct sigaction *)0, &sa)) < 0) + if ((ret = __libc_sigaction(sig, (struct sigaction *)0, &sa)) < 0) return (ret); if (flag) { sigaddset(&_sigintr, sig); @@ -59,5 +58,5 @@ siginterrupt(sig, flag) sigdelset(&_sigintr, sig); sa.sa_flags |= SA_RESTART; } - return (_sigaction(sig, &sa, (struct sigaction *)0)); + return (__libc_sigaction(sig, &sa, (struct sigaction *)0)); } Modified: stable/10/lib/libc/gen/signal.c ============================================================================== --- stable/10/lib/libc/gen/signal.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/signal.c Sat Sep 5 08:55:51 2015 (r287480) @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); sigset_t _sigintr __hidden; /* shared with siginterrupt */ sig_t -signal(s, a) - int s; - sig_t a; +signal(int s, sig_t a) { struct sigaction sa, osa; @@ -55,7 +53,7 @@ signal(s, a) sa.sa_flags = 0; if (!sigismember(&_sigintr, s)) sa.sa_flags |= SA_RESTART; - if (_sigaction(s, &sa, &osa) < 0) + if (__libc_sigaction(s, &sa, &osa) < 0) return (SIG_ERR); return (osa.sa_handler); } Modified: stable/10/lib/libc/gen/wordexp.c ============================================================================== --- stable/10/lib/libc/gen/wordexp.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/gen/wordexp.c Sat Sep 5 08:55:51 2015 (r287480) @@ -38,6 +38,7 @@ #include #include #include "un-namespace.h" +#include "libc_private.h" __FBSDID("$FreeBSD$"); @@ -127,12 +128,12 @@ we_askshell(const char *words, wordexp_t return (WRDE_NOSPACE); /* XXX */ (void)sigemptyset(&newsigblock); (void)sigaddset(&newsigblock, SIGCHLD); - (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); + (void)__libc_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); if ((pid = fork()) < 0) { serrno = errno; _close(pdes[0]); _close(pdes[1]); - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); errno = serrno; return (WRDE_NOSPACE); /* XXX */ } @@ -141,7 +142,7 @@ we_askshell(const char *words, wordexp_t * We are the child; just get /bin/sh to run the wordexp * builtin on `words'. */ - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); if ((pdes[1] != STDOUT_FILENO ? _dup2(pdes[1], STDOUT_FILENO) : _fcntl(pdes[1], F_SETFD, 0)) < 0) @@ -210,7 +211,7 @@ cleanup: do wpid = _waitpid(pid, &status, 0); while (wpid < 0 && errno == EINTR); - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); if (error != 0) { errno = serrno; return (error); Modified: stable/10/lib/libc/i386/gen/setjmp.S ============================================================================== --- stable/10/lib/libc/i386/gen/setjmp.S Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/i386/gen/setjmp.S Sat Sep 5 08:55:51 2015 (r287480) @@ -50,21 +50,12 @@ __FBSDID("$FreeBSD$"); ENTRY(setjmp) movl 4(%esp),%ecx - PIC_PROLOGUE -#ifdef PIC - subl $12,%esp /* make the stack 16-byte aligned */ -#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ - call PIC_PLT(CNAME(_sigprocmask)) -#ifdef PIC - addl $24,%esp -#else + call __libc_sigprocmask addl $12,%esp -#endif - PIC_EPILOGUE movl 4(%esp),%ecx movl 0(%esp),%edx movl %edx, 0(%ecx) @@ -82,21 +73,12 @@ END(setjmp) .set CNAME(longjmp),CNAME(__longjmp) ENTRY(__longjmp) movl 4(%esp),%edx - PIC_PROLOGUE -#ifdef PIC - subl $12,%esp /* make the stack 16-byte aligned */ -#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ - call PIC_PLT(CNAME(_sigprocmask)) -#ifdef PIC - addl $24,%esp -#else + call __libc_sigprocmask addl $12,%esp -#endif - PIC_EPILOGUE movl 4(%esp),%edx movl 8(%esp),%eax movl 0(%edx),%ecx Modified: stable/10/lib/libc/i386/gen/sigsetjmp.S ============================================================================== --- stable/10/lib/libc/i386/gen/sigsetjmp.S Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/i386/gen/sigsetjmp.S Sat Sep 5 08:55:51 2015 (r287480) @@ -59,21 +59,12 @@ ENTRY(sigsetjmp) movl %eax,44(%ecx) testl %eax,%eax jz 2f - PIC_PROLOGUE -#ifdef PIC - subl $12,%esp /* make the stack 16-byte aligned */ -#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ - call PIC_PLT(CNAME(_sigprocmask)) -#ifdef PIC - addl $24,%esp -#else + call __libc_sigprocmask addl $12,%esp -#endif - PIC_EPILOGUE movl 4(%esp),%ecx 2: movl 0(%esp),%edx movl %edx, 0(%ecx) @@ -93,21 +84,12 @@ ENTRY(__siglongjmp) movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f - PIC_PROLOGUE -#ifdef PIC - subl $12,%esp /* make the stack 16-byte aligned */ -#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ - call PIC_PLT(CNAME(_sigprocmask)) -#ifdef PIC - addl $24,%esp -#else + call __libc_sigprocmask addl $12,%esp -#endif - PIC_EPILOGUE movl 4(%esp),%edx 2: movl 8(%esp),%eax movl 0(%edx),%ecx Modified: stable/10/lib/libc/include/libc_private.h ============================================================================== --- stable/10/lib/libc/include/libc_private.h Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/include/libc_private.h Sat Sep 5 08:55:51 2015 (r287480) @@ -368,6 +368,11 @@ __pid_t __sys_wait6(enum idtype, __id_t __ssize_t __sys_write(int, const void *, __size_t); __ssize_t __sys_writev(int, const struct iovec *, int); +int __libc_sigaction(int, const struct sigaction *, + struct sigaction *) __hidden; +int __libc_sigprocmask(int, const __sigset_t *, __sigset_t *) + __hidden; +int __libc_sigsuspend(const __sigset_t *) __hidden; int __libc_sigwait(const __sigset_t * __restrict, int * restrict sig); int __libc_system(const char *); Modified: stable/10/lib/libc/net/rcmd.c ============================================================================== --- stable/10/lib/libc/net/rcmd.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/net/rcmd.c Sat Sep 5 08:55:51 2015 (r287480) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include "un-namespace.h" +#include "libc_private.h" extern int innetgr( const char *, const char *, const char *, const char * ); @@ -148,7 +149,7 @@ rcmd_af(ahost, rport, locuser, remuser, refused = 0; sigemptyset(&newmask); sigaddset(&newmask, SIGURG); - _sigprocmask(SIG_BLOCK, (const sigset_t *)&newmask, &oldmask); + __libc_sigprocmask(SIG_BLOCK, (const sigset_t *)&newmask, &oldmask); for (timo = 1, lport = IPPORT_RESERVED - 1;;) { s = rresvport_af(&lport, ai->ai_family); if (s < 0) { @@ -163,7 +164,7 @@ rcmd_af(ahost, rport, locuser, remuser, (void)fprintf(stderr, "rcmd: socket: %s\n", strerror(errno)); freeaddrinfo(res); - _sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, + __libc_sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL); return (-1); } @@ -181,7 +182,7 @@ rcmd_af(ahost, rport, locuser, remuser, (void)fprintf(stderr, "%s: %s\n", *ahost, strerror(errno)); freeaddrinfo(res); - _sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, + __libc_sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL); return (-1); } @@ -306,7 +307,7 @@ again: } goto bad2; } - _sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL); + __libc_sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL); freeaddrinfo(res); return (s); bad2: @@ -314,7 +315,7 @@ bad2: (void)_close(*fd2p); bad: (void)_close(s); - _sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL); + __libc_sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL); freeaddrinfo(res); return (-1); } Modified: stable/10/lib/libc/stdio/tmpfile.c ============================================================================== --- stable/10/lib/libc/stdio/tmpfile.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/stdio/tmpfile.c Sat Sep 5 08:55:51 2015 (r287480) @@ -46,9 +46,10 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include "libc_private.h" FILE * -tmpfile() +tmpfile(void) { sigset_t set, oset; FILE *fp; @@ -69,7 +70,7 @@ tmpfile() return (NULL); sigfillset(&set); - (void)_sigprocmask(SIG_BLOCK, &set, &oset); + (void)__libc_sigprocmask(SIG_BLOCK, &set, &oset); fd = mkstemp(buf); if (fd != -1) @@ -77,7 +78,7 @@ tmpfile() free(buf); - (void)_sigprocmask(SIG_SETMASK, &oset, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oset, NULL); if (fd == -1) return (NULL); Modified: stable/10/lib/libc/stdlib/abort.c ============================================================================== --- stable/10/lib/libc/stdlib/abort.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/stdlib/abort.c Sat Sep 5 08:55:51 2015 (r287480) @@ -61,7 +61,7 @@ abort() * any errors -- ISO C doesn't allow abort to return anyway. */ sigdelset(&act.sa_mask, SIGABRT); - (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); (void)raise(SIGABRT); /* @@ -71,9 +71,9 @@ abort() act.sa_handler = SIG_DFL; act.sa_flags = 0; sigfillset(&act.sa_mask); - (void)_sigaction(SIGABRT, &act, NULL); + (void)__libc_sigaction(SIGABRT, &act, NULL); sigdelset(&act.sa_mask, SIGABRT); - (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); (void)raise(SIGABRT); exit(1); } Modified: stable/10/lib/libc/stdlib/system.c ============================================================================== --- stable/10/lib/libc/stdlib/system.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/stdlib/system.c Sat Sep 5 08:55:51 2015 (r287480) @@ -70,16 +70,20 @@ __libc_system(const char *command) (void)sigaddset(&newsigblock, SIGCHLD); (void)sigaddset(&newsigblock, SIGINT); (void)sigaddset(&newsigblock, SIGQUIT); - (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); + (void)__libc_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); switch(pid = vfork()) { + /* + * In the child, use unwrapped syscalls. libthr is in + * undefined state after vfork(). + */ case -1: /* error */ - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); return (-1); case 0: /* child */ /* * Restore original signal dispositions and exec the command. */ - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + (void)__sys_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); _exit(127); } @@ -92,16 +96,16 @@ __libc_system(const char *command) memset(&ign, 0, sizeof(ign)); ign.sa_handler = SIG_IGN; (void)sigemptyset(&ign.sa_mask); - (void)_sigaction(SIGINT, &ign, &intact); - (void)_sigaction(SIGQUIT, &ign, &quitact); + (void)__libc_sigaction(SIGINT, &ign, &intact); + (void)__libc_sigaction(SIGQUIT, &ign, &quitact); savedpid = pid; do { pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0); } while (pid == -1 && errno == EINTR); - (void)_sigaction(SIGINT, &intact, NULL); - (void)_sigaction(SIGQUIT, &quitact, NULL); - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); - return(pid == -1 ? -1 : pstat); + (void)__libc_sigaction(SIGINT, &intact, NULL); + (void)__libc_sigaction(SIGQUIT, &quitact, NULL); + (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + return (pid == -1 ? -1 : pstat); } __weak_reference(__libc_system, __system); Modified: stable/10/lib/libc/sys/sigaction.c ============================================================================== --- stable/10/lib/libc/sys/sigaction.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/sys/sigaction.c Sat Sep 5 08:55:51 2015 (r287480) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" __weak_reference(__sys_sigaction, __sigaction); +__weak_reference(sigaction, __libc_sigaction); #pragma weak sigaction int Modified: stable/10/lib/libc/sys/sigprocmask.c ============================================================================== --- stable/10/lib/libc/sys/sigprocmask.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/sys/sigprocmask.c Sat Sep 5 08:55:51 2015 (r287480) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" __weak_reference(__sys_sigprocmask, __sigprocmask); +__weak_reference(sigprocmask, __libc_sigprocmask); #pragma weak sigprocmask int Modified: stable/10/lib/libc/sys/sigsuspend.c ============================================================================== --- stable/10/lib/libc/sys/sigsuspend.c Sat Sep 5 08:48:24 2015 (r287479) +++ stable/10/lib/libc/sys/sigsuspend.c Sat Sep 5 08:55:51 2015 (r287480) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" __weak_reference(__sys_sigsuspend, __sigsuspend); +__weak_reference(sigsuspend, __libc_sigsuspend); #pragma weak sigsuspend int