From owner-svn-src-stable-10@freebsd.org Sun Jul 2 03:50:23 2017 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 73010D9BFA3; Sun, 2 Jul 2017 03:50:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 324BA7E409; Sun, 2 Jul 2017 03:50:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v623oMnj079425; Sun, 2 Jul 2017 03:50:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v623oM2j079424; Sun, 2 Jul 2017 03:50:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707020350.v623oM2j079424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 2 Jul 2017 03:50:22 +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: r320565 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 320565 X-SVN-Commit-Repository: base 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.23 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: Sun, 02 Jul 2017 03:50:23 -0000 Author: kib Date: Sun Jul 2 03:50:22 2017 New Revision: 320565 URL: https://svnweb.freebsd.org/changeset/base/320565 Log: MFC r320332: Style. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sun Jul 2 03:47:56 2017 (r320564) +++ stable/10/sys/vm/vm_map.c Sun Jul 2 03:50:22 2017 (r320565) @@ -2637,9 +2637,9 @@ vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset * If VM_MAP_WIRE_HOLESOK was specified, skip this check. */ next_entry: - if (((flags & VM_MAP_WIRE_HOLESOK) == 0) && - (entry->end < end && (entry->next == &map->header || - entry->next->start > entry->end))) { + if ((flags & VM_MAP_WIRE_HOLESOK) == 0 && + entry->end < end && (entry->next == &map->header || + entry->next->start > entry->end)) { end = entry->end; rv = KERN_INVALID_ADDRESS; goto done; From owner-svn-src-stable-10@freebsd.org Mon Jul 3 02:14:44 2017 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 244419DB775; Mon, 3 Jul 2017 02:14:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DBC7E7DBB5; Mon, 3 Jul 2017 02:14:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v632Eh4H033630; Mon, 3 Jul 2017 02:14:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v632EhVc033629; Mon, 3 Jul 2017 02:14:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707030214.v632EhVc033629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 3 Jul 2017 02:14: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: r320582 - stable/10/lib/libc/rpc X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/lib/libc/rpc X-SVN-Commit-Revision: 320582 X-SVN-Commit-Repository: base 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.23 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, 03 Jul 2017 02:14:44 -0000 Author: delphij Date: Mon Jul 3 02:14:42 2017 New Revision: 320582 URL: https://svnweb.freebsd.org/changeset/base/320582 Log: MFC r320494: Fix double free by reverting r300385 and r300624 which was false positive reported by cppcheck. Modified: stable/10/lib/libc/rpc/getnetconfig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/10/lib/libc/rpc/getnetconfig.c Mon Jul 3 02:11:14 2017 (r320581) +++ stable/10/lib/libc/rpc/getnetconfig.c Mon Jul 3 02:14:42 2017 (r320582) @@ -692,7 +692,7 @@ static struct netconfig * dup_ncp(struct netconfig *ncp) { struct netconfig *p; - char *tmp, *tmp2; + char *tmp; u_int i; if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL) @@ -701,7 +701,6 @@ dup_ncp(struct netconfig *ncp) free(tmp); return(NULL); } - tmp2 = tmp; /* * First we dup all the data from matched netconfig buffer. Then we * adjust some of the member pointer to a pre-allocated buffer where @@ -723,7 +722,6 @@ dup_ncp(struct netconfig *ncp) if (p->nc_lookups == NULL) { free(p->nc_netid); free(p); - free(tmp2); return(NULL); } for (i=0; i < p->nc_nlookups; i++) { From owner-svn-src-stable-10@freebsd.org Mon Jul 3 05:30:33 2017 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 3D4F69DE5F2; Mon, 3 Jul 2017 05:30:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0952182BDC; Mon, 3 Jul 2017 05:30:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v635UWYR011922; Mon, 3 Jul 2017 05:30:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v635UWYw011921; Mon, 3 Jul 2017 05:30:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707030530.v635UWYw011921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 3 Jul 2017 05:30: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: r320587 - stable/10/usr.sbin/rpc.lockd X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/usr.sbin/rpc.lockd X-SVN-Commit-Revision: 320587 X-SVN-Commit-Repository: base 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.23 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, 03 Jul 2017 05:30:33 -0000 Author: delphij Date: Mon Jul 3 05:30:31 2017 New Revision: 320587 URL: https://svnweb.freebsd.org/changeset/base/320587 Log: MFC r320093: Check return value of seteuid() and bail out if we fail. Modified: stable/10/usr.sbin/rpc.lockd/lock_proc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpc.lockd/lock_proc.c ============================================================================== --- stable/10/usr.sbin/rpc.lockd/lock_proc.c Mon Jul 3 05:22:10 2017 (r320586) +++ stable/10/usr.sbin/rpc.lockd/lock_proc.c Mon Jul 3 05:30:31 2017 (r320587) @@ -283,7 +283,10 @@ get_client(host_addr, vers) /* Regain root privileges, for bindresvport. */ old_euid = geteuid(); - seteuid(0); + if (seteuid(0) != 0) { + syslog(LOG_ERR, "seteuid(0) failed"); + return NULL; + } /* * Bind the client FD to a reserved port. @@ -292,7 +295,10 @@ get_client(host_addr, vers) bindresvport(clnt_fd, NULL); /* Drop root privileges again. */ - seteuid(old_euid); + if (seteuid(old_euid) != 0) { + syslog(LOG_ERR, "seteuid(%d) failed", old_euid); + return NULL; + } /* Success - update the cache entry */ clnt_cache_ptr[clnt_cache_next_to_use] = client; From owner-svn-src-stable-10@freebsd.org Mon Jul 3 13:02:22 2017 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 C4AB79E655D; Mon, 3 Jul 2017 13:02:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 925026F573; Mon, 3 Jul 2017 13:02:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63D2Lcj002933; Mon, 3 Jul 2017 13:02:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63D2LV7002932; Mon, 3 Jul 2017 13:02:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707031302.v63D2LV7002932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 3 Jul 2017 13:02:21 +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: r320596 - in stable: 10/sys/sys 11/sys/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/sys/sys 11/sys/sys X-SVN-Commit-Revision: 320596 X-SVN-Commit-Repository: base 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.23 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, 03 Jul 2017 13:02:22 -0000 Author: gjb Date: Mon Jul 3 13:02:21 2017 New Revision: 320596 URL: https://svnweb.freebsd.org/changeset/base/320596 Log: MFC r320488: Correct the branch naming convention in param.h. While here, consistently use upper-case 'X' to represent the version number. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/sys/param.h Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Mon Jul 3 10:24:49 2017 (r320595) +++ stable/10/sys/sys/param.h Mon Jul 3 13:02:21 2017 (r320596) @@ -54,7 +54,7 @@ * * scheme is: Rxx * 'R' is in the range 0 to 4 if this is a release branch or - * x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is + * X.0-CURRENT before releng/X.0 is created, otherwise 'R' is * in the range 5 to 9. */ #undef __FreeBSD_version From owner-svn-src-stable-10@freebsd.org Mon Jul 3 15:34:21 2017 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 1C8D99E8FEE; Mon, 3 Jul 2017 15:34:21 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E199374771; Mon, 3 Jul 2017 15:34:20 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63FYKl9065613; Mon, 3 Jul 2017 15:34:20 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63FYK4b065612; Mon, 3 Jul 2017 15:34:20 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201707031534.v63FYK4b065612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 3 Jul 2017 15:34: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: r320601 - stable/10/sys/cam X-SVN-Group: stable-10 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: stable/10/sys/cam X-SVN-Commit-Revision: 320601 X-SVN-Commit-Repository: base 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.23 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, 03 Jul 2017 15:34:21 -0000 Author: ken Date: Mon Jul 3 15:34:19 2017 New Revision: 320601 URL: https://svnweb.freebsd.org/changeset/base/320601 Log: MFC r320421: ------------------------------------------------------------------------ r320421 | ken | 2017-06-27 13:26:02 -0600 (Tue, 27 Jun 2017) | 37 lines Fix a panic in camperiphfree(). If a peripheral driver (e.g. da, sa, cd) is added or removed from the peripheral driver list while an unrelated peripheral driver instance (e.g. da0, sa5, cd2) is going away and is inside camperiphfree(), we could dereference an invalid pointer. When peripheral drivers are added or removed (see periphdriver_register() and periphdriver_unregister()), the peripheral driver array is resized and existing entries are moved. Although we hold the topology lock while we traverse the peripheral driver list, we retain a pointer to the location of the peripheral driver pointer and then drop the topology lock. So we are still vulnerable to the list getting moved around while the lock is dropped. To solve the problem, cache a copy of the peripheral driver pointer. If its storage location in the list changes while we have the lock dropped, it won't have any effect. This doesn't solve the issue that peripheral drivers ("da", "cd", as opposed to individual instances like "da0", "cd0") are not generally part of a reference counting scheme to guard against deregistering them while there are instances active. The caller (generally the person unloading a module) has to be aware of active drivers and not unload something that is in use. sys/cam/cam_periph.c: In camperiphfree(), cache a pointer to the peripheral driver instance to avoid holding a pointer to an invalid memory location in the event that the peripheral driver list changes while we have the topology lock dropped. PR: kern/219701 Submitted by: avg Sponsored by: Spectra Logic ------------------------------------------------------------------------ PR: kern/219701 Sponsored by: Spectra Logic Modified: stable/10/sys/cam/cam_periph.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Mon Jul 3 15:10:16 2017 (r320600) +++ stable/10/sys/cam/cam_periph.c Mon Jul 3 15:34:19 2017 (r320601) @@ -622,6 +622,7 @@ static void camperiphfree(struct cam_periph *periph) { struct periph_driver **p_drv; + struct periph_driver *drv; cam_periph_assert(periph, MA_OWNED); KASSERT(periph->periph_allocating == 0, ("%s%d: freed while allocating", @@ -634,6 +635,15 @@ camperiphfree(struct cam_periph *periph) printf("camperiphfree: attempt to free non-existant periph\n"); return; } + /* + * Cache a pointer to the periph_driver structure. If a + * periph_driver is added or removed from the array (see + * periphdriver_register()) while we drop the toplogy lock + * below, p_drv may change. This doesn't protect against this + * particular periph_driver going away. That will require full + * reference counting in the periph_driver infrastructure. + */ + drv = *p_drv; /* * We need to set this flag before dropping the topology lock, to @@ -669,8 +679,8 @@ camperiphfree(struct cam_periph *periph) */ xpt_lock_buses(); - TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links); - (*p_drv)->generation++; + TAILQ_REMOVE(&drv->units, periph, unit_links); + drv->generation++; xpt_remove_periph(periph); From owner-svn-src-stable-10@freebsd.org Mon Jul 3 20:12:32 2017 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 AF80B9EF2E2; Mon, 3 Jul 2017 20:12:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 78A417FFFF; Mon, 3 Jul 2017 20:12:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63KCVKb085020; Mon, 3 Jul 2017 20:12:31 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63KCVat085019; Mon, 3 Jul 2017 20:12:31 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707032012.v63KCVat085019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 3 Jul 2017 20:12:31 +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: r320617 - stable/10/sys/fs/nfs X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/10/sys/fs/nfs X-SVN-Commit-Revision: 320617 X-SVN-Commit-Repository: base 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.23 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, 03 Jul 2017 20:12:32 -0000 Author: rmacklem Date: Mon Jul 3 20:12:31 2017 New Revision: 320617 URL: https://svnweb.freebsd.org/changeset/base/320617 Log: MFC: r319882 Define NFS_MAXXDR as the upper bound on XDR overhead in an NFS RPC. This definition is a part of the maxiotune2 patch that will be committed soon. Modified: stable/10/sys/fs/nfs/nfsproto.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfsproto.h ============================================================================== --- stable/10/sys/fs/nfs/nfsproto.h Mon Jul 3 19:49:25 2017 (r320616) +++ stable/10/sys/fs/nfs/nfsproto.h Mon Jul 3 20:12:31 2017 (r320617) @@ -56,8 +56,22 @@ #define NFS_MAXDGRAMDATA 16384 #define NFS_MAXPATHLEN 1024 #define NFS_MAXNAMLEN 255 +/* + * Calculating the maximum XDR overhead for an NFS RPC isn't easy. + * NFS_MAXPKTHDR is antiquated and assumes AUTH_SYS over UDP. + * NFS_MAXXDR should be sufficient for all NFS versions over TCP. + * It includes: + * - Maximum RPC message header. It can include 2 400byte authenticators plus + * a machine name of unlimited length, although it is usually relatively + * small. + * - XDR overheads for the NFSv4 compound. This can include Owner and + * Owner_group strings, which are usually fairly small, but are allowed + * to be up to 1024 bytes each. + * 4096 is overkill, but should always be sufficient. + */ #define NFS_MAXPKTHDR 404 -#define NFS_MAXPACKET (NFS_SRVMAXIO + 2048) +#define NFS_MAXXDR 4096 +#define NFS_MAXPACKET (NFS_SRVMAXIO + NFS_MAXXDR) #define NFS_MINPACKET 20 #define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */ #define NFSV4_MINORVERSION 0 /* V4 Minor version */ From owner-svn-src-stable-10@freebsd.org Mon Jul 3 22:21:45 2017 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 C07579F0ED2; Mon, 3 Jul 2017 22:21:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9904B83A6C; Mon, 3 Jul 2017 22:21:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63MLiqT040307; Mon, 3 Jul 2017 22:21:44 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63MLitR040305; Mon, 3 Jul 2017 22:21:44 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707032221.v63MLitR040305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 3 Jul 2017 22:21:44 +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: r320622 - in stable/10/sys: kern sys X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/10/sys: kern sys X-SVN-Commit-Revision: 320622 X-SVN-Commit-Repository: base 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.23 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, 03 Jul 2017 22:21:45 -0000 Author: alc Date: Mon Jul 3 22:21:44 2017 New Revision: 320622 URL: https://svnweb.freebsd.org/changeset/base/320622 Log: MFC r319699 When allocating swap blocks, if the available number of free blocks in a subtree is already zero, then setting the "largest contiguous free block" hint for that subtree to anything other than zero makes no sense. (To be clear, assigning a value to the hint that is too large is not a correctness problem, only a pessimization.) MFC r319755 blist_fill()'s return type is too narrow. blist_fill() accepts a 64-bit quantity as the size of the range to fill, but returns a 32-bit quantity as the number of blocks that were allocated to fill that range. This revision corrects that mismatch. MFC r319793 Remove an unnecessary field from struct blist. (The comment describing what this field represented was also inaccurate.) In r178792, blist_create() grew a malloc flag, allowing M_NOWAIT to be specified. However, blist_create() was not modified to handle the possibility that a malloc() call failed. Address this omission. Increase the width of the local variable "radix" to 64 bits. This matches the width of the corresponding field in struct blist. Modified: stable/10/sys/kern/subr_blist.c stable/10/sys/sys/blist.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_blist.c ============================================================================== --- stable/10/sys/kern/subr_blist.c Mon Jul 3 22:20:42 2017 (r320621) +++ stable/10/sys/kern/subr_blist.c Mon Jul 3 22:21:44 2017 (r320622) @@ -127,8 +127,8 @@ static void blst_meta_free(blmeta_t *scan, daddr_t fre daddr_t radix, int skip, daddr_t blk); static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, blist_t dest, daddr_t count); -static int blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); -static int blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, +static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); +static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, int skip, daddr_t blk); static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, int skip, daddr_t count); @@ -156,7 +156,7 @@ blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; - int radix; + daddr_t nodes, radix; int skip = 0; /* @@ -170,13 +170,19 @@ blist_create(daddr_t blocks, int flags) } bl = malloc(sizeof(struct blist), M_SWAP, flags | M_ZERO); + if (bl == NULL) + return (NULL); bl->bl_blocks = blocks; bl->bl_radix = radix; bl->bl_skip = skip; - bl->bl_rootblks = 1 + - blst_radix_init(NULL, bl->bl_radix, bl->bl_skip, blocks); - bl->bl_root = malloc(sizeof(blmeta_t) * bl->bl_rootblks, M_SWAP, flags); + nodes = 1 + blst_radix_init(NULL, radix, bl->bl_skip, blocks); + bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); + if (bl->bl_root == NULL) { + free(bl, M_SWAP); + return (NULL); + } + blst_radix_init(bl->bl_root, radix, bl->bl_skip, blocks); #if defined(BLIST_DEBUG) printf( @@ -184,14 +190,13 @@ blist_create(daddr_t blocks, int flags) ", requiring %lldK of ram\n", (long long)bl->bl_blocks, (long long)bl->bl_blocks * 4 / 1024, - (long long)(bl->bl_rootblks * sizeof(blmeta_t) + 1023) / 1024 + (long long)(nodes * sizeof(blmeta_t) + 1023) / 1024 ); printf("BLIST raw radix tree contains %lld records\n", - (long long)bl->bl_rootblks); + (long long)nodes); #endif - blst_radix_init(bl->bl_root, bl->bl_radix, bl->bl_skip, blocks); - return(bl); + return (bl); } void @@ -248,10 +253,10 @@ blist_free(blist_t bl, daddr_t blkno, daddr_t count) * actually filled that were free before the call. */ -int +daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { - int filled; + daddr_t filled; if (bl) { if (bl->bl_radix == BLIST_BMAP_RADIX) @@ -419,7 +424,7 @@ blst_meta_alloc( /* * ALL-ALLOCATED special case */ - scan->bm_bighint = count; + scan->bm_bighint = 0; return(SWAPBLK_NONE); } @@ -726,11 +731,11 @@ static void blst_copy( * the number of blocks allocated by the call. */ -static int +static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) { int n = blk & (BLIST_BMAP_RADIX - 1); - int nblks; + daddr_t nblks; u_daddr_t mask, bitmap; mask = ((u_daddr_t)-1 << n) & @@ -753,7 +758,7 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) * range must be within the extent of this node. Returns the * number of blocks allocated by the call. */ -static int +static daddr_t blst_meta_fill( blmeta_t *scan, daddr_t allocBlk, @@ -764,7 +769,7 @@ blst_meta_fill( ) { int i; int next_skip = ((u_int)skip / BLIST_META_RADIX); - int nblks = 0; + daddr_t nblks = 0; if (count > radix) panic("blist_meta_fill: allocation too large"); @@ -774,7 +779,7 @@ blst_meta_fill( */ nblks = scan->u.bmu_avail; scan->u.bmu_avail = 0; - scan->bm_bighint = count; + scan->bm_bighint = 0; return nblks; } @@ -1047,8 +1052,8 @@ main(int ac, char **av) break; case 'l': if (sscanf(buf + 1, "%llx %lld", &da, &count) == 2) { - printf(" n=%d\n", - blist_fill(bl, da, count)); + printf(" n=%jd\n", + (intmax_t)blist_fill(bl, da, count)); } else { printf("?\n"); } Modified: stable/10/sys/sys/blist.h ============================================================================== --- stable/10/sys/sys/blist.h Mon Jul 3 22:20:42 2017 (r320621) +++ stable/10/sys/sys/blist.h Mon Jul 3 22:21:44 2017 (r320622) @@ -84,7 +84,6 @@ typedef struct blist { daddr_t bl_skip; /* starting skip */ daddr_t bl_free; /* number of free blocks */ blmeta_t *bl_root; /* root of radix tree */ - daddr_t bl_rootblks; /* daddr_t blks allocated for tree */ } *blist_t; #define BLIST_META_RADIX 16 @@ -96,7 +95,7 @@ extern blist_t blist_create(daddr_t blocks, int flags) extern void blist_destroy(blist_t blist); extern daddr_t blist_alloc(blist_t blist, daddr_t count); extern void blist_free(blist_t blist, daddr_t blkno, daddr_t count); -extern int blist_fill(blist_t bl, daddr_t blkno, daddr_t count); +extern daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count); extern void blist_print(blist_t blist); extern void blist_resize(blist_t *pblist, daddr_t count, int freenew, int flags); From owner-svn-src-stable-10@freebsd.org Tue Jul 4 01:28:18 2017 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 D1A969F3B70; Tue, 4 Jul 2017 01:28:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 AD7B564604; Tue, 4 Jul 2017 01:28:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v641SHjK016543; Tue, 4 Jul 2017 01:28:17 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v641SHCx016540; Tue, 4 Jul 2017 01:28:17 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707040128.v641SHCx016540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 4 Jul 2017 01:28:17 +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: r320637 - in stable/10/sys: fs/nfs fs/nfsclient sys X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in stable/10/sys: fs/nfs fs/nfsclient sys X-SVN-Commit-Revision: 320637 X-SVN-Commit-Repository: base 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.23 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, 04 Jul 2017 01:28:18 -0000 Author: rmacklem Date: Tue Jul 4 01:28:17 2017 New Revision: 320637 URL: https://svnweb.freebsd.org/changeset/base/320637 Log: MFC: r320062, r320070, r320126 This is a partial merge of only the NFS changes and not the maxbcachebuf tunable. The NFS client changes make the code handle different I/O sizes more correctly. However, with the limit at 64K, they are not actually necessary. This MFC is mainly being done so that subsequent MFCs to the NFS code will merge easily. Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c stable/10/sys/fs/nfsclient/nfs_clrpcops.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonkrpc.c Tue Jul 4 01:23:36 2017 (r320636) +++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Tue Jul 4 01:28:17 2017 (r320637) @@ -162,7 +162,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq struct ucred *cred, NFSPROC_T *p, int callback_retry_mult) { int rcvreserve, sndreserve; - int pktscale; + int pktscale, pktscalesav; struct sockaddr *saddr; struct ucred *origcred; CLIENT *client; @@ -211,6 +211,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq pktscale = 2; if (pktscale > 64) pktscale = 64; + pktscalesav = pktscale; /* * soreserve() can fail if sb_max is too small, so shrink pktscale * and try again if there is an error. @@ -229,8 +230,12 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq goto out; } do { - if (error != 0 && pktscale > 2) + if (error != 0 && pktscale > 2) { + if (nmp != NULL && nrp->nr_sotype == SOCK_STREAM && + pktscale == pktscalesav) + printf("Consider increasing kern.ipc.maxsockbuf\n"); pktscale--; + } if (nrp->nr_sotype == SOCK_DGRAM) { if (nmp != NULL) { sndreserve = (NFS_MAXDGRAMDATA + NFS_MAXPKTHDR) * @@ -244,15 +249,19 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq if (nrp->nr_sotype != SOCK_STREAM) panic("nfscon sotype"); if (nmp != NULL) { - sndreserve = (NFS_MAXBSIZE + NFS_MAXPKTHDR + + sndreserve = (NFS_MAXBSIZE + NFS_MAXXDR + sizeof (u_int32_t)) * pktscale; - rcvreserve = (NFS_MAXBSIZE + NFS_MAXPKTHDR + + rcvreserve = (NFS_MAXBSIZE + NFS_MAXXDR + sizeof (u_int32_t)) * pktscale; } else { sndreserve = rcvreserve = 1024 * pktscale; } } error = soreserve(so, sndreserve, rcvreserve); + if (error != 0 && nmp != NULL && nrp->nr_sotype == SOCK_STREAM && + pktscale <= 2) + printf("Must increase kern.ipc.maxsockbuf or reduce" + " rsize, wsize\n"); } while (error != 0 && pktscale > 2); soclose(so); if (error) { Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 4 01:23:36 2017 (r320636) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 4 01:28:17 2017 (r320637) @@ -4612,7 +4612,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc struct nfssockreq *nrp, uint32_t sequenceid, int mds, struct ucred *cred, NFSPROC_T *p) { - uint32_t crflags, *tl; + uint32_t crflags, maxval, *tl; struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; int error, irdcnt; @@ -4630,8 +4630,8 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc /* Fill in fore channel attributes. */ NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED); *tl++ = 0; /* Header pad size */ - *tl++ = txdr_unsigned(100000); /* Max request size */ - *tl++ = txdr_unsigned(100000); /* Max response size */ + *tl++ = txdr_unsigned(nmp->nm_wsize + NFS_MAXXDR);/* Max request size */ + *tl++ = txdr_unsigned(nmp->nm_rsize + NFS_MAXXDR);/* Max reply size */ *tl++ = txdr_unsigned(4096); /* Max response size cached */ *tl++ = txdr_unsigned(20); /* Max operations */ *tl++ = txdr_unsigned(64); /* Max slots */ @@ -4678,7 +4678,26 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc /* Get the fore channel slot count. */ NFSM_DISSECT(tl, uint32_t *, 7 * NFSX_UNSIGNED); - tl += 3; /* Skip the other counts. */ + tl++; /* Skip the header pad size. */ + + /* Make sure nm_wsize is small enough. */ + maxval = fxdr_unsigned(uint32_t, *tl++); + while (maxval < nmp->nm_wsize + NFS_MAXXDR) { + if (nmp->nm_wsize > 8096) + nmp->nm_wsize /= 2; + else + break; + } + + /* Make sure nm_rsize is small enough. */ + maxval = fxdr_unsigned(uint32_t, *tl++); + while (maxval < nmp->nm_rsize + NFS_MAXXDR) { + if (nmp->nm_rsize > 8096) + nmp->nm_rsize /= 2; + else + break; + } + sep->nfsess_maxcache = fxdr_unsigned(int, *tl++); tl++; sep->nfsess_foreslots = fxdr_unsigned(uint16_t, *tl++); Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Tue Jul 4 01:23:36 2017 (r320636) +++ stable/10/sys/sys/param.h Tue Jul 4 01:28:17 2017 (r320637) @@ -242,9 +242,7 @@ * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). * The default value here can be overridden on a per-architecture - * basis by defining it in . This should - * probably be done to increase its value, when MAXBCACHEBUF is - * defined as a larger value in . + * basis by defining it in . * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you From owner-svn-src-stable-10@freebsd.org Tue Jul 4 02:11:39 2017 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 8719A9F4A47; Tue, 4 Jul 2017 02:11:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC8065757; Tue, 4 Jul 2017 02:11:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v642Bc6h048574; Mon, 3 Jul 2017 19:11:38 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v642BcKX048573; Mon, 3 Jul 2017 19:11:38 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707040211.v642BcKX048573@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd In-Reply-To: To: John Baldwin Date: Mon, 3 Jul 2017 19:11:38 -0700 (PDT) CC: "Ngie Cooper (yaneurabeya)" , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 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, 04 Jul 2017 02:11:39 -0000 > On 6/22/17 4:02 AM, Ngie Cooper (yaneurabeya) wrote: > > > >> On Jun 22, 2017, at 00:35, John Baldwin wrote: > > > > ? > > > >> Please revert the breakout of the existing config files. I think that splitting > >> up the conf files is too disruptive of a change (POLA) for stable branches. > > > > Done in r320229 and r320230. > > I haven't checked if this was merged to 11, but if so, I think they should also > stay a single conf file in 11 for the same reason. I believe it WAS merged to 10, since that didnt get gated by a request to RE@, can we please get the splitting of these files backed out of the stable/10 branch? > >> This was agreed to by other folks in the followup thread to the commits in > >> head that you continue to ignore. > > > > > >> In head please either fully split up the files or revert to a single file > >> (another part of that thread you continue to ignore). > > > > My eyes glazed over trying to read through all of the posts. I seem to have missed the point where a proposed change was made to split up the config files further. Could this please be summarized again? > > I think that having the files partially split up is the worst of both > worlds as folks writing config management rules, etc. have to use > different approaches depending on the rule. I think that is a headache > and would rather have the config either be all in a single file, or all > be split up into conf.d/ so that it is consistent. I also think that > when splitting up a conf file we should do it all at once so that there is > only one painful /etc merge instead of several of them. > > -- > John Baldwin > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-10@freebsd.org Tue Jul 4 02:35:02 2017 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 E20299F4F5B; Tue, 4 Jul 2017 02:35:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 9C5EE6605E; Tue, 4 Jul 2017 02:35:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x244.google.com with SMTP id 188so10225257itx.0; Mon, 03 Jul 2017 19:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6YTkbG1h+KN8l6o76YVCxh/zbeA/qJ9nCRo/MdT3YrM=; b=d5RrRQhgUDofEvF5ac5SjyKcgDk1ppfxjsv4bZICiYUrd4yfOfBMsrGtMsCG0c3yIW 4DLehh31UKZEXCw9n0l36nNp0HQxq5/Ki5h4gryeKu9drWQv6AuWRLMbgoicpuZGxj2P FBed/pSVu78iFyyBxaG/awzc3WhD+oc9Cl1tFs5GJp6w+puRl2QJ/W176/lck4KdkrRW PDmEqC1G5+9GdHieH/bPd1vAXQTKXnJqPVu/wzn7rCPm/CDM7kLrBr5CAHVm1rv5z3lx 8dCVGrJtFkqRWt3KryfkcyQ6Xkt+HlnSPINX9aaIykVDa0rGuPxxuLGfwHnaP+0YEurH 6cPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6YTkbG1h+KN8l6o76YVCxh/zbeA/qJ9nCRo/MdT3YrM=; b=AQEjpEX8DgF6LuZbs1ag3C8vA8HE7TfGit8GO4wVV3df1SOccHRw6jeFQocRBM+oJ3 UG1QeZ2Jvp5F2u96GxOT1Cxzamll+ktON2ErH0gUpbYft8SDeZxYD12MIAbU8jJ1QPp6 RlNBi5KFIKgtQ8Fy+FDwuE8bmF/ohrCQqwimmXUDtXzZol/OtsNXSsTtAkBC7eGXJdf2 Ns9N0bzs02O77Ddv/k3AII0lwC+TBImb0Gw9s+jP+F9mFnrQm1WF2N+oER/uRcT9CRz5 UfmbjJSNj6QjENQ4p6lB3QrzC/M6lRlgEuYYMrRF1c9NCwSl23d+DqoUGCXzGTL3VsAq 8XuQ== X-Gm-Message-State: AKS2vOwMBghtNh44qp96ps0RFqxZj1CDzzKYoiCtfvJipHzUu1RM3MUC ERA3JCmGYZ1keCFPCDM= X-Received: by 10.36.172.7 with SMTP id s7mr31864014ite.67.1499135701855; Mon, 03 Jul 2017 19:35:01 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id n19sm8462983ioe.3.2017.07.03.19.35.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 19:35:00 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <201707040211.v642BcKX048573@pdx.rh.CN85.dnsmgr.net> Date: Mon, 3 Jul 2017 19:34:59 -0700 Cc: John Baldwin , Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201707040211.v642BcKX048573@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 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, 04 Jul 2017 02:35:03 -0000 On Jul 3, 2017, at 19:11, Rodney W. Grimes w= rote: ... > I believe it WAS merged to 10, since that didnt get gated by a request > to RE@, can we please get the splitting of these files backed out > of the stable/10 branch? Please check again. It was backed out--just not in the same order/way. Cheers, -Ngie= From owner-svn-src-stable-10@freebsd.org Tue Jul 4 15:53:56 2017 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 95496D94992; Tue, 4 Jul 2017 15:53:56 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 711F17F463; Tue, 4 Jul 2017 15:53:56 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64FrtQq082793; Tue, 4 Jul 2017 15:53:55 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64FrsE0082785; Tue, 4 Jul 2017 15:53:54 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201707041553.v64FrsE0082785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 4 Jul 2017 15:53: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: r320646 - in stable/10: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod X-SVN-Group: stable-10 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in stable/10: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod X-SVN-Commit-Revision: 320646 X-SVN-Commit-Repository: base 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.23 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, 04 Jul 2017 15:53:56 -0000 Author: allanjude Date: Tue Jul 4 15:53:54 2017 New Revision: 320646 URL: https://svnweb.freebsd.org/changeset/base/320646 Log: MFC r320644: Add deprecation notices for all rcmd tools Modified: stable/10/bin/rcp/rcp.1 stable/10/libexec/rlogind/rlogind.8 stable/10/libexec/rshd/rshd.8 stable/10/usr.bin/rlogin/rlogin.1 stable/10/usr.bin/rsh/rsh.1 stable/10/usr.bin/ruptime/ruptime.1 stable/10/usr.bin/rwho/rwho.1 stable/10/usr.sbin/rwhod/rwhod.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/rcp/rcp.1 ============================================================================== --- stable/10/bin/rcp/rcp.1 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/bin/rcp/rcp.1 Tue Jul 4 15:53:54 2017 (r320646) @@ -29,7 +29,7 @@ .\" @(#)rcp.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd October 16, 2002 +.Dd July 3, 2017 .Dt RCP 1 .Os .Sh NAME @@ -43,6 +43,15 @@ .Op Fl 46pr .Ar .Ar directory +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/libexec/rlogind/rlogind.8 ============================================================================== --- stable/10/libexec/rlogind/rlogind.8 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/libexec/rlogind/rlogind.8 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)rlogind.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 9, 2005 +.Dd July 3, 2017 .Dt RLOGIND 8 .Os .Sh NAME @@ -37,6 +37,15 @@ .Sh SYNOPSIS .Nm .Op Fl Daln +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/libexec/rshd/rshd.8 ============================================================================== --- stable/10/libexec/rshd/rshd.8 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/libexec/rshd/rshd.8 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)rshd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd July 3, 2017 .Dt RSHD 8 .Os .Sh NAME @@ -37,6 +37,15 @@ .Sh SYNOPSIS .Nm .Op Fl aDLln +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/usr.bin/rlogin/rlogin.1 ============================================================================== --- stable/10/usr.bin/rlogin/rlogin.1 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/usr.bin/rlogin/rlogin.1 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)rlogin.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 26, 2003 +.Dd July 3, 2017 .Dt RLOGIN 1 .Os .Sh NAME @@ -41,6 +41,15 @@ .Op Fl i Ar localname .Op Fl l Ar username .Ar host +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/usr.bin/rsh/rsh.1 ============================================================================== --- stable/10/usr.bin/rsh/rsh.1 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/usr.bin/rsh/rsh.1 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)rsh.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd October 16, 2002 +.Dd July 3, 2017 .Dt RSH 1 .Os .Sh NAME @@ -41,6 +41,15 @@ .Op Fl t Ar timeout .Ar host .Op command +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/usr.bin/ruptime/ruptime.1 ============================================================================== --- stable/10/usr.bin/ruptime/ruptime.1 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/usr.bin/ruptime/ruptime.1 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)ruptime.1 8.2 (Berkeley) 4/5/94 .\" $FreeBSD$ .\" -.Dd March 1, 2003 +.Dd July 3, 2017 .Dt RUPTIME 1 .Os .Sh NAME @@ -38,6 +38,15 @@ .Nm .Op Fl alrtu .Op Ar host ... +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/usr.bin/rwho/rwho.1 ============================================================================== --- stable/10/usr.bin/rwho/rwho.1 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/usr.bin/rwho/rwho.1 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)rwho.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd July 3, 2017 .Dt RWHO 1 .Os .Sh NAME @@ -37,6 +37,15 @@ .Sh SYNOPSIS .Nm .Op Fl a +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/10/usr.sbin/rwhod/rwhod.8 ============================================================================== --- stable/10/usr.sbin/rwhod/rwhod.8 Tue Jul 4 15:53:23 2017 (r320645) +++ stable/10/usr.sbin/rwhod/rwhod.8 Tue Jul 4 15:53:54 2017 (r320646) @@ -28,7 +28,7 @@ .\" @(#)rwhod.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd January 21, 2010 +.Dd July 3, 2017 .Dt RWHOD 8 .Os .Sh NAME @@ -40,6 +40,15 @@ .Op Fl p .Op Fl l .Op Fl m Op Ar ttl +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm From owner-svn-src-stable-10@freebsd.org Wed Jul 5 19:06:13 2017 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 BE5A8D8D846; Wed, 5 Jul 2017 19:06:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8ACE267BB3; Wed, 5 Jul 2017 19:06:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65J6CUd055516; Wed, 5 Jul 2017 19:06:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65J6CAB055515; Wed, 5 Jul 2017 19:06:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707051906.v65J6CAB055515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 5 Jul 2017 19:06:12 +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: r320691 - stable/10 X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10 X-SVN-Commit-Revision: 320691 X-SVN-Commit-Repository: base 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.23 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, 05 Jul 2017 19:06:13 -0000 Author: bdrewery Date: Wed Jul 5 19:06:12 2017 New Revision: 320691 URL: https://svnweb.freebsd.org/changeset/base/320691 Log: MFC r289861: native-xtools: Replace common path with NXBDESTDIR. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Jul 5 17:39:17 2017 (r320690) +++ stable/10/Makefile.inc1 Wed Jul 5 19:06:12 2017 (r320691) @@ -1555,12 +1555,13 @@ cross-tools: .MAKE .PHONY ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor +NXBDESTDIR= ${OBJTREE}/nxb-bin NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ VERSION="${VERSION}" NXBMAKE= ${NXBENV} ${MAKE} \ - TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ - CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ + TBLGEN=${NXBDESTDIR}/usr/bin/tblgen \ + CLANG_TBLGEN=${NXBDESTDIR}/usr/bin/clang-tblgen \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ -DWITHOUT_GDB -DNO_TESTS \ SSP_CFLAGS= \ @@ -1570,13 +1571,11 @@ NXBMAKE= ${NXBENV} ${MAKE} \ -DWITHOUT_CLANG_FULL -DWITHOUT_LLDB native-xtools: .PHONY - mkdir -p ${OBJTREE}/nxb-bin/bin - mkdir -p ${OBJTREE}/nxb-bin/sbin - mkdir -p ${OBJTREE}/nxb-bin/usr + mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ - -p ${OBJTREE}/nxb-bin/usr >/dev/null + -p ${NXBDESTDIR}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ - -p ${OBJTREE}/nxb-bin/usr/include >/dev/null + -p ${NXBDESTDIR}/usr/include >/dev/null .for _tool in \ bin/cat \ bin/chmod \ @@ -1640,7 +1639,7 @@ native-xtools: .PHONY ${NXBMAKE} DIRPRFX=${_tool}/ obj; \ ${NXBMAKE} DIRPRFX=${_tool}/ depend; \ ${NXBMAKE} DIRPRFX=${_tool}/ all; \ - ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install + ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor # From owner-svn-src-stable-10@freebsd.org Thu Jul 6 00:43:44 2017 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 A3AB9D96132; Thu, 6 Jul 2017 00:43:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7E1C87782A; Thu, 6 Jul 2017 00:43:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v660hhLc095947; Thu, 6 Jul 2017 00:43:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v660hhuM095946; Thu, 6 Jul 2017 00:43:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707060043.v660hhuM095946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 6 Jul 2017 00:43: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: r320697 - in stable: 10/release/scripts 11/release/scripts X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/scripts 11/release/scripts X-SVN-Commit-Revision: 320697 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 00:43:44 -0000 Author: gjb Date: Thu Jul 6 00:43:43 2017 New Revision: 320697 URL: https://svnweb.freebsd.org/changeset/base/320697 Log: MFC r320599: Fix Vagrant image upload after recent API changes. - Update ATLAS_UPLOAD_URL to avoid various regular expressions from failing to match due to redirections. - Use ATLAS_UPLOAD_URL throughout the script. - Adjust several regular expression patterns. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/scripts/atlas-upload.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/scripts/atlas-upload.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/release/scripts/atlas-upload.sh ============================================================================== --- stable/10/release/scripts/atlas-upload.sh Wed Jul 5 20:00:58 2017 (r320696) +++ stable/10/release/scripts/atlas-upload.sh Thu Jul 6 00:43:43 2017 (r320697) @@ -27,7 +27,7 @@ # ATLAS_API_URL='' -ATLAS_UPLOAD_URL='https://binstore.hashicorp.com' +ATLAS_UPLOAD_URL='https://app.vagrantup.com' DESCRIPTION="FreeBSD Snapshot Build" usage() { @@ -76,7 +76,7 @@ main () { fi # Check to see if the box exists or create it - BOXRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}?access_token=${KEY}") + BOXRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to connect to the API" exit 2; @@ -84,26 +84,26 @@ main () { echo $BOXRESULT | grep "\"name\":\"${BOX}\"" > /dev/null if [ $? != 0 ]; then echo "Creating box: ${BOX}" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/boxes -X POST -d "box[name]=${BOX}" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[is_private]=false" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[description]='${DESCRIPTION}'" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/boxes -X POST -d "box[name]=${BOX}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[is_private]=false" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[description]='${DESCRIPTION}'" -d "access_token=${KEY}" > /dev/null else echo "Box already exists" fi # Check to see if the version exists or create it - VERSIONRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") + VERSIONRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to connect to the API" exit 2; fi - echo $VERSIONRESULT | grep "\"version\":\"${VERSION}\"" > /dev/null + echo $VERSIONRESULT | grep "version/${VERSION}" > /dev/null if [ $? != 0 ]; then echo "Creating version: ${VERSION}" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/versions -X POST -d "version[version]=${VERSION}" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION} -X PUT -d "version[description]=${DESCRIPTION}" -d "access_token=${KEY}" > /dev/null - VERSIONRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") - echo $VERSIONRESULT | grep "\"version\":\"${VERSION}\"" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/versions -X POST -d "version[version]=${VERSION}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION} -X PUT -d "version[description]=${DESCRIPTION}" -d "access_token=${KEY}" > /dev/null + VERSIONRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") + echo $VERSIONRESULT | grep "version/${VERSION}" > /dev/null if [ $? != 0 ]; then echo "Failed to create version" exit 2 @@ -113,37 +113,37 @@ main () { fi # Check to see if the provider exists or create it - PROVIDERRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") + PROVIDERRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to connect to the API" exit 2; fi - echo $PROVIDERRESULT | grep "\"name\":\"${PROVIDER}\"" > /dev/null + echo $PROVIDERRESULT | grep "provider/${PROVIDER}" > /dev/null if [ $? != 0 ]; then echo "Creating provider: ${PROVIDER}" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/providers -X POST -d "provider[name]=${PROVIDER}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/providers -X POST -d "provider[name]=${PROVIDER}" -d "access_token=${KEY}" > /dev/null else echo "Provider already exists" fi # Request an upload token - TOKENRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}/upload?access_token=${KEY}") + TOKENRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}/upload?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null + echo ${TOKENRESULT} | grep -E "upload_path" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} "${TOKEN}") # Validate the Upload echo "Validating" - VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") + VALIDRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." @@ -152,7 +152,7 @@ main () { # Release the version echo "Releasing ${VERSION} of ${BOX} in Atlas" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/release -X PUT -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/release -X PUT -d "access_token=${KEY}" > /dev/null fi } From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:20:31 2017 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 3FB1DD9EB8E; Thu, 6 Jul 2017 05:20:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0DC07806DD; Thu, 6 Jul 2017 05:20:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665KUfS010071; Thu, 6 Jul 2017 05:20:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665KU3m010070; Thu, 6 Jul 2017 05:20:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060520.v665KU3m010070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:20:30 +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: r320706 - stable/10/usr.bin/pr/tests X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/usr.bin/pr/tests X-SVN-Commit-Revision: 320706 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:20:31 -0000 Author: ngie Date: Thu Jul 6 05:20:30 2017 New Revision: 320706 URL: https://svnweb.freebsd.org/changeset/base/320706 Log: Fix up r319257 PACKAGE support doesn't exist on ^/stable/10, so FILES must be used instead. Furthermore, BINDIR isn't automatically set to ${TESTSDIR} on this branch. This is a direct commit to ^/stable/10. Modified: stable/10/usr.bin/pr/tests/Makefile Modified: stable/10/usr.bin/pr/tests/Makefile ============================================================================== --- stable/10/usr.bin/pr/tests/Makefile Thu Jul 6 05:16:06 2017 (r320705) +++ stable/10/usr.bin/pr/tests/Makefile Thu Jul 6 05:20:30 2017 (r320706) @@ -1,16 +1,16 @@ # $FreeBSD$ -PACKAGE= tests - ATF_TESTS_SH+= basic2_test NETBSD_ATF_TESTS_SH= basic -${PACKAGE}FILES+= across.out -${PACKAGE}FILES+= d_basic.in -${PACKAGE}FILES+= d_basic.out -${PACKAGE}FILES+= merge.out -${PACKAGE}FILES+= other.in -${PACKAGE}FILES+= threecol.out +FILES+= across.out +FILES+= d_basic.in +FILES+= d_basic.out +FILES+= merge.out +FILES+= other.in +FILES+= threecol.out + +BINDIR= ${TESTSDIR} .include From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:22:12 2017 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 07522D9EFC2; Thu, 6 Jul 2017 05:22:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D66DD80A53; Thu, 6 Jul 2017 05:22:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665MBDZ014063; Thu, 6 Jul 2017 05:22:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665MAWc014040; Thu, 6 Jul 2017 05:22:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060522.v665MAWc014040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:22:10 +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: r320708 - in stable/10: bin/cat/tests contrib/netbsd-tests/bin/cat X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/10: bin/cat/tests contrib/netbsd-tests/bin/cat X-SVN-Commit-Revision: 320708 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:22:12 -0000 Author: ngie Date: Thu Jul 6 05:22:10 2017 New Revision: 320708 URL: https://svnweb.freebsd.org/changeset/base/320708 Log: MFC r319634: Add additional testcases for cat(1) Verify the following additional cases: - -s (in isolation, in addition to the -se testcase obtained via the NetBSD test). - -vt Added: stable/10/contrib/netbsd-tests/bin/cat/d_s_output.in - copied unchanged from r319634, head/contrib/netbsd-tests/bin/cat/d_s_output.in stable/10/contrib/netbsd-tests/bin/cat/d_s_output.out - copied unchanged from r319634, head/contrib/netbsd-tests/bin/cat/d_s_output.out stable/10/contrib/netbsd-tests/bin/cat/d_vt_output.in - copied unchanged from r319634, head/contrib/netbsd-tests/bin/cat/d_vt_output.in stable/10/contrib/netbsd-tests/bin/cat/d_vt_output.out - copied unchanged from r319634, head/contrib/netbsd-tests/bin/cat/d_vt_output.out Modified: stable/10/bin/cat/tests/Makefile stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cat/tests/Makefile ============================================================================== --- stable/10/bin/cat/tests/Makefile Thu Jul 6 05:22:02 2017 (r320707) +++ stable/10/bin/cat/tests/Makefile Thu Jul 6 05:22:10 2017 (r320708) @@ -3,6 +3,10 @@ NETBSD_ATF_TESTS_SH= cat_test FILESDIR= ${TESTSDIR} +${PACKAGE}FILES+= d_s_output.in +${PACKAGE}FILES+= d_s_output.out +${PACKAGE}FILES+= d_vt_output.in +${PACKAGE}FILES+= d_vt_output.out FILES+= d_align.in FILES+= d_align.out Copied: stable/10/contrib/netbsd-tests/bin/cat/d_s_output.in (from r319634, head/contrib/netbsd-tests/bin/cat/d_s_output.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_s_output.in Thu Jul 6 05:22:10 2017 (r320708, copy of r319634, head/contrib/netbsd-tests/bin/cat/d_s_output.in) @@ -0,0 +1,6 @@ +a b c + + +1 2 3 + +x y z Copied: stable/10/contrib/netbsd-tests/bin/cat/d_s_output.out (from r319634, head/contrib/netbsd-tests/bin/cat/d_s_output.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_s_output.out Thu Jul 6 05:22:10 2017 (r320708, copy of r319634, head/contrib/netbsd-tests/bin/cat/d_s_output.out) @@ -0,0 +1,5 @@ +a b c + +1 2 3 + +x y z Copied: stable/10/contrib/netbsd-tests/bin/cat/d_vt_output.in (from r319634, head/contrib/netbsd-tests/bin/cat/d_vt_output.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_vt_output.in Thu Jul 6 05:22:10 2017 (r320708, copy of r319634, head/contrib/netbsd-tests/bin/cat/d_vt_output.in) @@ -0,0 +1,3 @@ + + +á Copied: stable/10/contrib/netbsd-tests/bin/cat/d_vt_output.out (from r319634, head/contrib/netbsd-tests/bin/cat/d_vt_output.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_vt_output.out Thu Jul 6 05:22:10 2017 (r320708, copy of r319634, head/contrib/netbsd-tests/bin/cat/d_vt_output.out) @@ -0,0 +1,3 @@ +^I +^X +M-a Modified: stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh ============================================================================== --- stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Thu Jul 6 05:22:02 2017 (r320707) +++ stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Thu Jul 6 05:22:10 2017 (r320708) @@ -63,9 +63,50 @@ se_output_body() { -x "cat -se $(atf_get_srcdir)/d_se_output.in" } +# Begin FreeBSD +atf_test_case s_output +s_output_head() { + atf_set "descr" "Test that cat(1) squeezes multiple adjacent " \ + "empty lines producing a single spaced output with option '-s'" +} + +s_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_s_output.out \ + cat -s $(atf_get_srcdir)/d_s_output.in +} + +atf_test_case e_output +e_output_head() { + atf_set "descr" "Test that cat(1) prints a $ sign " \ + "on blank lines with option '-e'" +} + +e_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_se_output.out \ + cat -e $(atf_get_srcdir)/d_se_output.in +} + +atf_test_case vt_output +vt_output_head() { + atf_set "descr" "Test that cat(1) displays non-printing characters, " \ + "namely control characters, tab character and meta-characters " \ + "using options '-vt'" +} + +vt_output_body() { + atf_check -s ignore -o file:$(atf_get_srcdir)/d_vt_output.out \ + cat -vt $(atf_get_srcdir)/d_vt_output.in +} +# End FreeBSD + atf_init_test_cases() { atf_add_test_case align atf_add_test_case nonexistent atf_add_test_case se_output +# Begin FreeBSD + atf_add_test_case s_output + atf_add_test_case e_output + atf_add_test_case vt_output +# End FreeBSD } From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:28:36 2017 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 E6627DA0989; Thu, 6 Jul 2017 05:28:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B3179814FA; Thu, 6 Jul 2017 05:28:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665SZiq014569; Thu, 6 Jul 2017 05:28:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665SZsa014567; Thu, 6 Jul 2017 05:28:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060528.v665SZsa014567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:28: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: r320712 - in stable/10: bin/echo bin/echo/tests etc/mtree X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/10: bin/echo bin/echo/tests etc/mtree X-SVN-Commit-Revision: 320712 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:28:37 -0000 Author: ngie Date: Thu Jul 6 05:28:35 2017 New Revision: 320712 URL: https://svnweb.freebsd.org/changeset/base/320712 Log: MFC r319626: Add basic tests for echo(1) Verify that echo(1) does not... - ... print the trailing newline character with option '-n'. - ... print the trailing newline character when '\c' is appended to the end of the string. Added: stable/10/bin/echo/tests/ - copied from r319626, head/bin/echo/tests/ Modified: stable/10/bin/echo/Makefile stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/echo/Makefile ============================================================================== --- stable/10/bin/echo/Makefile Thu Jul 6 05:28:32 2017 (r320711) +++ stable/10/bin/echo/Makefile Thu Jul 6 05:28:35 2017 (r320712) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= echo + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Jul 6 05:28:32 2017 (r320711) +++ stable/10/etc/mtree/BSD.tests.dist Thu Jul 6 05:28:35 2017 (r320712) @@ -14,6 +14,8 @@ .. dd .. + echo + .. expr .. ls From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:26:29 2017 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 815BFDA075C; Thu, 6 Jul 2017 05:26:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5B12B8133A; Thu, 6 Jul 2017 05:26:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665QSHs014339; Thu, 6 Jul 2017 05:26:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665QSAi014336; Thu, 6 Jul 2017 05:26:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060526.v665QSAi014336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:26:28 +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: r320710 - in stable/10: bin/cat/tests contrib/netbsd-tests/bin/cat X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/10: bin/cat/tests contrib/netbsd-tests/bin/cat X-SVN-Commit-Revision: 320710 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:26:29 -0000 Author: ngie Date: Thu Jul 6 05:26:27 2017 New Revision: 320710 URL: https://svnweb.freebsd.org/changeset/base/320710 Log: MFC r319637: Add testcases for `cat -b` Added: stable/10/contrib/netbsd-tests/bin/cat/d_b_output.in - copied unchanged from r319637, head/contrib/netbsd-tests/bin/cat/d_b_output.in stable/10/contrib/netbsd-tests/bin/cat/d_b_output.out - copied unchanged from r319637, head/contrib/netbsd-tests/bin/cat/d_b_output.out Modified: stable/10/bin/cat/tests/Makefile stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cat/tests/Makefile ============================================================================== --- stable/10/bin/cat/tests/Makefile Thu Jul 6 05:26:24 2017 (r320709) +++ stable/10/bin/cat/tests/Makefile Thu Jul 6 05:26:27 2017 (r320710) @@ -3,15 +3,17 @@ NETBSD_ATF_TESTS_SH= cat_test FILESDIR= ${TESTSDIR} -${PACKAGE}FILES+= d_s_output.in -${PACKAGE}FILES+= d_s_output.out -${PACKAGE}FILES+= d_vt_output.in -${PACKAGE}FILES+= d_vt_output.out FILES+= d_align.in FILES+= d_align.out +FILES+= d_b_output.in +FILES+= d_b_output.out FILES+= d_se_output.in FILES+= d_se_output.out +FILES+= d_s_output.in +FILES+= d_s_output.out +FILES+= d_vt_output.in +FILES+= d_vt_output.out .include Copied: stable/10/contrib/netbsd-tests/bin/cat/d_b_output.in (from r319637, head/contrib/netbsd-tests/bin/cat/d_b_output.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_b_output.in Thu Jul 6 05:26:27 2017 (r320710, copy of r319637, head/contrib/netbsd-tests/bin/cat/d_b_output.in) @@ -0,0 +1,4 @@ +This is a line + +The line before this was a blank line. + This line has leading whitespace. Copied: stable/10/contrib/netbsd-tests/bin/cat/d_b_output.out (from r319637, head/contrib/netbsd-tests/bin/cat/d_b_output.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/netbsd-tests/bin/cat/d_b_output.out Thu Jul 6 05:26:27 2017 (r320710, copy of r319637, head/contrib/netbsd-tests/bin/cat/d_b_output.out) @@ -0,0 +1,4 @@ + 1 This is a line + + 2 The line before this was a blank line. + 3 This line has leading whitespace. Modified: stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh ============================================================================== --- stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Thu Jul 6 05:26:24 2017 (r320709) +++ stable/10/contrib/netbsd-tests/bin/cat/t_cat.sh Thu Jul 6 05:26:27 2017 (r320710) @@ -52,6 +52,19 @@ nonexistent_body() { -x "cat /some/name/that/does/not/exist" } +# Begin FreeBSD +atf_test_case b_output +b_output_head() { + atf_set "descr" "Test that cat(1) prints out numbers on non-blank "\ + "lines with '-b'" +} + +b_output_body() { + atf_check -o file:$(atf_get_srcdir)/d_b_output.out \ + cat -b $(atf_get_srcdir)/d_b_output.in +} +# End FreeBSD + atf_test_case se_output se_output_head() { atf_set "descr" "Test that cat(1) prints a $ sign " \ @@ -103,6 +116,9 @@ atf_init_test_cases() { atf_add_test_case align atf_add_test_case nonexistent +# Begin FreeBSD + atf_add_test_case b_output +# End FreeBSD atf_add_test_case se_output # Begin FreeBSD atf_add_test_case s_output From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:53:24 2017 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 A1DE2DA319A; Thu, 6 Jul 2017 05:53:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6E263827CE; Thu, 6 Jul 2017 05:53:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665rN3k027268; Thu, 6 Jul 2017 05:53:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665rNc0027267; Thu, 6 Jul 2017 05:53:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060553.v665rNc0027267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:53:23 +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: r320719 - stable/10/share/man/man5 X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/share/man/man5 X-SVN-Commit-Revision: 320719 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:53:24 -0000 Author: ngie Date: Thu Jul 6 05:53:23 2017 New Revision: 320719 URL: https://svnweb.freebsd.org/changeset/base/320719 Log: Regenerate src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Thu Jul 6 05:51:23 2017 (r320718) +++ stable/10/share/man/man5/src.conf.5 Thu Jul 6 05:53:23 2017 (r320719) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd June 1, 2017 +.Dd July 5, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -966,8 +966,9 @@ Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe -Set to avoid compiling profiled libraries. +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_PROFILE 320717 2017-07-06 05:51:20Z ngie +Set to not build profiled libraries for use with +.Xr gprof 8 . .It Va WITHOUT_QUOTAS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam Set to not build From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:59:28 2017 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 D6A99DA3894; Thu, 6 Jul 2017 05:59:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 A394082A5B; Thu, 6 Jul 2017 05:59:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665xRg3027839; Thu, 6 Jul 2017 05:59:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665xRg3027838; Thu, 6 Jul 2017 05:59:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060559.v665xRg3027838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:59: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: r320722 - stable/10/usr.bin/which X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/usr.bin/which X-SVN-Commit-Revision: 320722 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:59:28 -0000 Author: ngie Date: Thu Jul 6 05:59:27 2017 New Revision: 320722 URL: https://svnweb.freebsd.org/changeset/base/320722 Log: MFC r317161: which(1): sort #includes No functional change [intended]. Modified: stable/10/usr.bin/which/which.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/which/which.c ============================================================================== --- stable/10/usr.bin/which/which.c Thu Jul 6 05:59:22 2017 (r320721) +++ stable/10/usr.bin/which/which.c Thu Jul 6 05:59:27 2017 (r320722) @@ -28,9 +28,8 @@ __FBSDID("$FreeBSD$"); -#include #include - +#include #include #include #include From owner-svn-src-stable-10@freebsd.org Thu Jul 6 05:51:22 2017 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 1F530DA2E5A; Thu, 6 Jul 2017 05:51:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E0888824BF; Thu, 6 Jul 2017 05:51:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665pLiM023926; Thu, 6 Jul 2017 05:51:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665pKnD023912; Thu, 6 Jul 2017 05:51:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060551.v665pKnD023912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:51: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: r320717 - stable/10/tools/build/options X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/tools/build/options X-SVN-Commit-Revision: 320717 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 05:51:22 -0000 Author: ngie Date: Thu Jul 6 05:51:20 2017 New Revision: 320717 URL: https://svnweb.freebsd.org/changeset/base/320717 Log: MFC r317179: Clean up WITH*_PROFILE - Clarify that profiled libraries are usable with gprof(8). - Add WITH_PROFILE to complement WITHOUT_PROFILE and placate makeman. Added: stable/10/tools/build/options/WITH_PROFILE - copied unchanged from r317179, head/tools/build/options/WITH_PROFILE Modified: stable/10/tools/build/options/WITHOUT_PROFILE Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/options/WITHOUT_PROFILE ============================================================================== --- stable/10/tools/build/options/WITHOUT_PROFILE Thu Jul 6 05:43:04 2017 (r320716) +++ stable/10/tools/build/options/WITHOUT_PROFILE Thu Jul 6 05:51:20 2017 (r320717) @@ -1,2 +1,3 @@ .\" $FreeBSD$ -Set to avoid compiling profiled libraries. +Set to not build profiled libraries for use with +.Xr gprof 8 . Copied: stable/10/tools/build/options/WITH_PROFILE (from r317179, head/tools/build/options/WITH_PROFILE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITH_PROFILE Thu Jul 6 05:51:20 2017 (r320717, copy of r317179, head/tools/build/options/WITH_PROFILE) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build profiled libraries for use with +.Xr gprof 8 . From owner-svn-src-stable-10@freebsd.org Thu Jul 6 18:46:34 2017 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 CA4C4D8D18D; Thu, 6 Jul 2017 18:46:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 979C07A9AB; Thu, 6 Jul 2017 18:46:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66IkXpu046907; Thu, 6 Jul 2017 18:46:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66IkXFX046906; Thu, 6 Jul 2017 18:46:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707061846.v66IkXFX046906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 6 Jul 2017 18:46:33 +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: r320753 - in stable: 10/release 11/release X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release 11/release X-SVN-Commit-Revision: 320753 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 18:46:34 -0000 Author: gjb Date: Thu Jul 6 18:46:33 2017 New Revision: 320753 URL: https://svnweb.freebsd.org/changeset/base/320753 Log: MFC r320748: Allow passing NOPKG= to make(1) to enable the pkg-stage target from getting executed when NOPKG is defined but empty. Approved by: re (kib, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu Jul 6 18:33:33 2017 (r320752) +++ stable/10/release/Makefile Thu Jul 6 18:46:33 2017 (r320753) @@ -306,7 +306,7 @@ packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} touch ${.TARGET} pkg-stage: -.if !defined(NOPKG) +.if !defined(NOPKG) || empty(NOPKG) env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ From owner-svn-src-stable-10@freebsd.org Thu Jul 6 22:03:59 2017 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 CCA51D93292; Thu, 6 Jul 2017 22:03:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9FCA48176C; Thu, 6 Jul 2017 22:03:59 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66M3w52031687; Thu, 6 Jul 2017 22:03:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66M3wGi031686; Thu, 6 Jul 2017 22:03:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201707062203.v66M3wGi031686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 6 Jul 2017 22:03: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: r320756 - stable/10/sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/10/sys/kern X-SVN-Commit-Revision: 320756 X-SVN-Commit-Repository: base 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.23 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, 06 Jul 2017 22:03:59 -0000 Author: mjg Date: Thu Jul 6 22:03:58 2017 New Revision: 320756 URL: https://svnweb.freebsd.org/changeset/base/320756 Log: MFC r293295: cache: ansify functions and fix some style issues No functional changes. Modified: stable/10/sys/kern/vfs_cache.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_cache.c ============================================================================== --- stable/10/sys/kern/vfs_cache.c Thu Jul 6 21:47:17 2017 (r320755) +++ stable/10/sys/kern/vfs_cache.c Thu Jul 6 22:03:58 2017 (r320756) @@ -289,7 +289,7 @@ static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, & "Number of cache misses"); static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, "Number of cache misses we do not want to cache"); -static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, +static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, "Number of cache hits (positive) we do not want to cache"); static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, "Number of cache hits (positive)"); @@ -304,8 +304,6 @@ SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_ &nchstats, sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); - - static void cache_zap(struct namecache *ncp); static int vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf, u_int *buflen); @@ -411,8 +409,7 @@ SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE * pointer to a vnode or if it is just a negative cache entry. */ static void -cache_zap(ncp) - struct namecache *ncp; +cache_zap(struct namecache *ncp) { struct vnode *vp; @@ -447,7 +444,7 @@ cache_zap(ncp) } numcache--; cache_free(ncp); - if (vp) + if (vp != NULL) vdrop(vp); } @@ -469,12 +466,8 @@ cache_zap(ncp) */ int -cache_lookup(dvp, vpp, cnp, tsp, ticksp) - struct vnode *dvp; - struct vnode **vpp; - struct componentname *cnp; - struct timespec *tsp; - int *ticksp; +cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, + struct timespec *tsp, int *ticksp) { struct namecache *ncp; uint32_t hash; @@ -702,12 +695,8 @@ unlock: * Add an entry to the cache. */ void -cache_enter_time(dvp, vp, cnp, tsp, dtsp) - struct vnode *dvp; - struct vnode *vp; - struct componentname *cnp; - struct timespec *tsp; - struct timespec *dtsp; +cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp, + struct timespec *tsp, struct timespec *dtsp) { struct namecache *ncp, *n2; struct namecache_ts *n3; @@ -837,9 +826,9 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp) * has populated v_cache_dd pointer already. */ if (dvp->v_cache_dd != NULL) { - CACHE_WUNLOCK(); - cache_free(ncp); - return; + CACHE_WUNLOCK(); + cache_free(ncp); + return; } KASSERT(vp == NULL || vp->v_type == VDIR, ("wrong vnode type %p", vp)); @@ -847,7 +836,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp) } numcache++; - if (!vp) { + if (vp == NULL) { numneg++; if (cnp->cn_flags & ISWHITEOUT) ncp->nc_flag |= NCF_WHITE; @@ -885,7 +874,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp) * "negative" cache queue, otherwise, we place it into the * destination vnode's cache entries queue. */ - if (vp) { + if (vp != NULL) { TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst); SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp), vp); @@ -976,8 +965,7 @@ cache_changesize(int newmaxvnodes) * Invalidate all entries to a particular vnode. */ void -cache_purge(vp) - struct vnode *vp; +cache_purge(struct vnode *vp) { CTR1(KTR_VFS, "cache_purge(%p)", vp); @@ -1000,8 +988,7 @@ cache_purge(vp) * Invalidate all negative entries for a particular directory vnode. */ void -cache_purge_negative(vp) - struct vnode *vp; +cache_purge_negative(struct vnode *vp) { struct namecache *cp, *ncp; @@ -1019,8 +1006,7 @@ cache_purge_negative(vp) * Flush all entries referencing a particular filesystem. */ void -cache_purgevfs(mp) - struct mount *mp; +cache_purgevfs(struct mount *mp) { struct nchashhead *ncpp; struct namecache *ncp, *nnp; @@ -1043,12 +1029,7 @@ cache_purgevfs(mp) */ int -vfs_cache_lookup(ap) - struct vop_lookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; +vfs_cache_lookup(struct vop_lookup_args *ap) { struct vnode *dvp; int error; @@ -1089,9 +1070,7 @@ SYSCTL_INT(_debug, OID_AUTO, disablecwd, CTLFLAG_RW, & /* Implementation of the getcwd syscall. */ int -sys___getcwd(td, uap) - struct thread *td; - struct __getcwd_args *uap; +sys___getcwd(struct thread *td, struct __getcwd_args *uap) { return (kern___getcwd(td, uap->buf, UIO_USERSPACE, uap->buflen)); From owner-svn-src-stable-10@freebsd.org Fri Jul 7 09:38:41 2017 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 BAD6FD9ECF3; Fri, 7 Jul 2017 09:38:41 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 86D3573301; Fri, 7 Jul 2017 09:38:41 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v679cekl020002; Fri, 7 Jul 2017 09:38:40 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v679ceQL020001; Fri, 7 Jul 2017 09:38:40 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201707070938.v679ceQL020001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 7 Jul 2017 09:38:40 +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: r320766 - stable/10/sys/dev/hyperv/input X-SVN-Group: stable-10 X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: stable/10/sys/dev/hyperv/input X-SVN-Commit-Revision: 320766 X-SVN-Commit-Repository: base 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.23 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, 07 Jul 2017 09:38:41 -0000 Author: sephe Date: Fri Jul 7 09:38:40 2017 New Revision: 320766 URL: https://svnweb.freebsd.org/changeset/base/320766 Log: MFC 320490 hyperv/input: Remove unnecessary inclusion. The unbreaks gcc compilation. Submitted by: Ryan Libby Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11415 Modified: stable/10/sys/dev/hyperv/input/hv_kbdc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/input/hv_kbdc.c ============================================================================== --- stable/10/sys/dev/hyperv/input/hv_kbdc.c Fri Jul 7 08:49:37 2017 (r320765) +++ stable/10/sys/dev/hyperv/input/hv_kbdc.c Fri Jul 7 09:38:40 2017 (r320766) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From owner-svn-src-stable-10@freebsd.org Fri Jul 7 11:54:47 2017 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 11C06DA1153; Fri, 7 Jul 2017 11:54:47 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E17D5771E7; Fri, 7 Jul 2017 11:54:46 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67Bskfu077811; Fri, 7 Jul 2017 11:54:46 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67Bsk3a077810; Fri, 7 Jul 2017 11:54:46 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201707071154.v67Bsk3a077810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 7 Jul 2017 11:54:46 +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: r320772 - stable/10/usr.sbin/syslogd X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/usr.sbin/syslogd X-SVN-Commit-Revision: 320772 X-SVN-Commit-Repository: base 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.23 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, 07 Jul 2017 11:54:47 -0000 Author: eugen (ports committer) Date: Fri Jul 7 11:54:45 2017 New Revision: 320772 URL: https://svnweb.freebsd.org/changeset/base/320772 Log: MFC r310888: Retry to open an F_PIPE process when it dies unexpectedly. PR: 215335 Reviewed by: ae Approved by: az (mentor) Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Fri Jul 7 11:27:12 2017 (r320771) +++ stable/10/usr.sbin/syslogd/syslogd.c Fri Jul 7 11:54:45 2017 (r320772) @@ -349,9 +349,19 @@ close_filed(struct filed *f) if (f == NULL || f->f_file == -1) return; + switch (f->f_type) { + case F_FILE: + case F_TTY: + case F_CONSOLE: + case F_FORW: + f->f_type = F_UNUSED; + break; + case F_PIPE: + f->f_un.f_pipe.f_pid = 0; + break; + } (void)close(f->f_file); f->f_file = -1; - f->f_type = F_UNUSED; } int @@ -1311,18 +1321,16 @@ fprintlog(struct filed *f, int flags, const char *msg) if (f->f_un.f_pipe.f_pid == 0) { if ((f->f_file = p_open(f->f_un.f_pipe.f_pname, &f->f_un.f_pipe.f_pid)) < 0) { - f->f_type = F_UNUSED; logerror(f->f_un.f_pipe.f_pname); break; } } if (writev(f->f_file, iov, IOV_SIZE) < 0) { int e = errno; + close_filed(f); - if (f->f_un.f_pipe.f_pid > 0) - deadq_enter(f->f_un.f_pipe.f_pid, - f->f_un.f_pipe.f_pname); - f->f_un.f_pipe.f_pid = 0; + deadq_enter(f->f_un.f_pipe.f_pid, + f->f_un.f_pipe.f_pname); errno = e; logerror(f->f_un.f_pipe.f_pname); } @@ -1427,7 +1435,6 @@ reapchild(int signo __unused) if (f->f_type == F_PIPE && f->f_un.f_pipe.f_pid == pid) { close_filed(f); - f->f_un.f_pipe.f_pid = 0; log_deadchild(pid, status, f->f_un.f_pipe.f_pname); break; @@ -1529,10 +1536,8 @@ die(int signo) /* flush any pending output */ if (f->f_prevcount) fprintlog(f, 0, (char *)NULL); - if (f->f_type == F_PIPE && f->f_un.f_pipe.f_pid > 0) { + if (f->f_type == F_PIPE && f->f_un.f_pipe.f_pid > 0) close_filed(f); - f->f_un.f_pipe.f_pid = 0; - } } Initialized = was_initialized; if (signo) { @@ -1599,12 +1604,9 @@ init(int signo) close_filed(f); break; case F_PIPE: - if (f->f_un.f_pipe.f_pid > 0) { - close_filed(f); - deadq_enter(f->f_un.f_pipe.f_pid, - f->f_un.f_pipe.f_pname); - } - f->f_un.f_pipe.f_pid = 0; + close_filed(f); + deadq_enter(f->f_un.f_pipe.f_pid, + f->f_un.f_pipe.f_pname); break; } next = f->f_next; @@ -2582,6 +2584,8 @@ deadq_enter(pid_t pid, const char *name) dq_t p; int status; + if (pid == 0) + return; /* * Be paranoid, if we can't signal the process, don't enter it * into the dead queue (perhaps it's already dead). If possible, From owner-svn-src-stable-10@freebsd.org Fri Jul 7 15:09:09 2017 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 F360FDA5390; Fri, 7 Jul 2017 15:09:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BBA627D948; Fri, 7 Jul 2017 15:09:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67F982P057908; Fri, 7 Jul 2017 15:09:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67F98Z7057907; Fri, 7 Jul 2017 15:09:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707071509.v67F98Z7057907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 7 Jul 2017 15:09: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: r320780 - stable/10/usr.sbin/bootparamd/bootparamd X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/usr.sbin/bootparamd/bootparamd X-SVN-Commit-Revision: 320780 X-SVN-Commit-Repository: base 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.23 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, 07 Jul 2017 15:09:10 -0000 Author: asomers Date: Fri Jul 7 15:09:08 2017 New Revision: 320780 URL: https://svnweb.freebsd.org/changeset/base/320780 Log: MFC r318790, r319336 r318790: Fix a buffer overflow in bootparamd(8) If /etc/bootparams contains a line with an excessively long pathname, and a client asks for that path, then bootparamd will overflow a buffer and crash while parsing that line. This is not remotely exploitable since it requires a malformed /etc/bootparams file. Reported by: Coverity CID: 1305954 Sponsored by: Spectra Logic Corp r319336: Fix uninitialized variable in bootparamd.c Restore line that was accidentally deleted in change 318790 Reported by: Coverity CID: 1375855 X-MFC-With: 318790 Sponsored by: Spectra Logic Corp Modified: stable/10/usr.sbin/bootparamd/bootparamd/bootparamd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bootparamd/bootparamd/bootparamd.c ============================================================================== --- stable/10/usr.sbin/bootparamd/bootparamd/bootparamd.c Fri Jul 7 15:01:10 2017 (r320779) +++ stable/10/usr.sbin/bootparamd/bootparamd/bootparamd.c Fri Jul 7 15:09:08 2017 (r320780) @@ -199,7 +199,10 @@ int blen; int ch, pch, fid_len, res = 0; int match = 0; - char info[MAX_FILEID + MAX_PATH_LEN+MAX_MACHINE_NAME + 3]; +#define INFOLEN 1343 + _Static_assert(INFOLEN >= MAX_FILEID + MAX_PATH_LEN+MAX_MACHINE_NAME + 3, + "INFOLEN isn't large enough"); + char info[INFOLEN + 1]; bpf = fopen(bootpfile, "r"); if ( ! bpf ) @@ -252,7 +255,9 @@ int blen; if (match) { fid_len = strlen(fileid); - while ( ! res && (fscanf(bpf,"%s", info)) > 0) { /* read a string */ +#define AS_FORMAT(d) "%" #d "s" +#define REXPAND(d) AS_FORMAT(d) /* Force another preprocessor expansion */ + while ( ! res && (fscanf(bpf, REXPAND(INFOLEN), info)) > 0) { ch = getc(bpf); /* and a character */ if ( *info != '#' ) { /* Comment ? */ if (! strncmp(info, fileid, fid_len) && *(info + fid_len) == '=') { From owner-svn-src-stable-10@freebsd.org Fri Jul 7 15:22:30 2017 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 4AC03DA5943; Fri, 7 Jul 2017 15:22:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 17D417E3D3; Fri, 7 Jul 2017 15:22:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67FMTUI066083; Fri, 7 Jul 2017 15:22:29 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67FMTs9066082; Fri, 7 Jul 2017 15:22:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707071522.v67FMTs9066082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 7 Jul 2017 15:22: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: r320781 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/sbin/camcontrol X-SVN-Commit-Revision: 320781 X-SVN-Commit-Repository: base 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.23 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, 07 Jul 2017 15:22:30 -0000 Author: asomers Date: Fri Jul 7 15:22:29 2017 New Revision: 320781 URL: https://svnweb.freebsd.org/changeset/base/320781 Log: MFC r319337: Fix integer overflow in "camcontrol format" Reported by: Coverity CID: 1011426 Sponsored by: Spectra Logic Corp Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Fri Jul 7 15:09:08 2017 (r320780) +++ stable/10/sbin/camcontrol/camcontrol.c Fri Jul 7 15:22:29 2017 (r320781) @@ -6044,15 +6044,15 @@ doreport: if ((scsi_get_sks(sense, ccb->csio.sense_len - ccb->csio.sense_resid, sks) == 0) && (quiet == 0)) { - int val; + uint32_t val; u_int64_t percentage; val = scsi_2btoul(&sks[1]); - percentage = 10000 * val; + percentage = 10000ull * val; fprintf(stdout, "\rFormatting: %ju.%02u %% " - "(%d/%d) done", + "(%u/%d) done", (uintmax_t)(percentage / (0x10000 * 100)), (unsigned)((percentage / From owner-svn-src-stable-10@freebsd.org Fri Jul 7 15:35:43 2017 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 848C0DA5F41; Fri, 7 Jul 2017 15:35:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 57DF67EBF1; Fri, 7 Jul 2017 15:35:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67FZgKT070880; Fri, 7 Jul 2017 15:35:42 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67FZg4t070879; Fri, 7 Jul 2017 15:35:42 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707071535.v67FZg4t070879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 7 Jul 2017 15:35: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: r320782 - stable/10/sbin/ipfw X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/sbin/ipfw X-SVN-Commit-Revision: 320782 X-SVN-Commit-Repository: base 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.23 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, 07 Jul 2017 15:35:43 -0000 Author: asomers Date: Fri Jul 7 15:35:42 2017 New Revision: 320782 URL: https://svnweb.freebsd.org/changeset/base/320782 Log: MFC r319900: sbin/ipfw: strcpy, strncpy => strlcpy Reported by: Coverity CID: 1356162, 1356166 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10662 Modified: stable/10/sbin/ipfw/dummynet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/dummynet.c ============================================================================== --- stable/10/sbin/ipfw/dummynet.c Fri Jul 7 15:22:29 2017 (r320781) +++ stable/10/sbin/ipfw/dummynet.c Fri Jul 7 15:35:42 2017 (r320782) @@ -799,8 +799,7 @@ read_bandwidth(char *arg, int *bandwidth, char *if_nam warn("interface name truncated"); namelen--; /* interface name */ - strncpy(if_name, arg, namelen); - if_name[namelen] = '\0'; + strlcpy(if_name, arg, namelen); *bandwidth = 0; } else { /* read bandwidth value */ int bw; @@ -927,8 +926,7 @@ load_extra_delays(const char *filename, struct dn_prof } else if (!strcasecmp(name, ED_TOK_NAME)) { if (profile_name[0] != '\0') errx(ED_EFMT("duplicated token: %s"), name); - strncpy(profile_name, arg, sizeof(profile_name) - 1); - profile_name[sizeof(profile_name)-1] = '\0'; + strlcpy(profile_name, arg, sizeof(profile_name)); do_points = 0; } else if (!strcasecmp(name, ED_TOK_DELAY)) { if (do_points) @@ -999,7 +997,7 @@ load_extra_delays(const char *filename, struct dn_prof } p->samples_no = samples; p->loss_level = loss * samples; - strncpy(p->name, profile_name, sizeof(p->name)); + strlcpy(p->name, profile_name, sizeof(p->name)); } #ifdef NEW_AQM @@ -1562,7 +1560,8 @@ end_mask: fs->flags &= ~(DN_IS_RED|DN_IS_GENTLE_RED); fs->flags |= DN_IS_AQM; - strcpy(aqm_extra->name,av[-1]); + strlcpy(aqm_extra->name, av[-1], + sizeof(aqm_extra->name)); aqm_extra->oid.subtype = DN_AQM_PARAMS; process_extra_parms(&ac, av, aqm_extra, tok); @@ -1574,7 +1573,8 @@ end_mask: errx(EX_DATAERR, "use type before fq_codel/fq_pie"); NEED(sch, "fq_codel/fq_pie is only for schd"); - strcpy(sch_extra->name,av[-1]); + strlcpy(sch_extra->name, av[-1], + sizeof(sch_extra->name)); sch_extra->oid.subtype = DN_SCH_PARAMS; process_extra_parms(&ac, av, sch_extra, tok); break; @@ -1643,14 +1643,15 @@ end_mask: l = strlen(av[0]); if (l == 0 || l > 15) errx(1, "type %s too long\n", av[0]); - strcpy(sch->name, av[0]); + strlcpy(sch->name, av[0], sizeof(sch->name)); sch->oid.subtype = 0; /* use string */ #ifdef NEW_AQM /* if fq_codel is selected, consider all tokens after it * as parameters */ if (!strcasecmp(av[0],"fq_codel") || !strcasecmp(av[0],"fq_pie")){ - strcpy(sch_extra->name,av[0]); + strlcpy(sch_extra->name, av[0], + sizeof(sch_extra->name)); sch_extra->oid.subtype = DN_SCH_PARAMS; process_extra_parms(&ac, av, sch_extra, tok); } else { From owner-svn-src-stable-10@freebsd.org Fri Jul 7 21:33:07 2017 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 9A2B8DAC0F2; Fri, 7 Jul 2017 21:33:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6AF866431B; Fri, 7 Jul 2017 21:33:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67LX6PF020733; Fri, 7 Jul 2017 21:33:06 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67LX64I020732; Fri, 7 Jul 2017 21:33:06 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707072133.v67LX64I020732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 7 Jul 2017 21:33:06 +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: r320795 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/10/sys/fs/nfsclient X-SVN-Commit-Revision: 320795 X-SVN-Commit-Repository: base 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.23 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, 07 Jul 2017 21:33:07 -0000 Author: rmacklem Date: Fri Jul 7 21:33:06 2017 New Revision: 320795 URL: https://svnweb.freebsd.org/changeset/base/320795 Log: MFC: r320208 Ensure that the credentials field of the NFSv4 client open structure is initialized. bdrewery@ has reported panics "newnfs_copycred: negative nfsc_ngroups". The only way I can see that this occurs is that the credentials field of the open structure gets used before being filled in. I am not sure quite how this happens, but for the file create case, the code is serialized via the vnode lock on the directory. If, somehow, a link to the same file gets created just after file creation, this might occur. This patch ensures that the credentials field is initialized to a reasonable set of credentials before the structure is linked into any list, so I this should ensure it is initialized before use. I am committing the patch now, since bdrewery@ notes that the panics are intermittent and it may be months before he knows if the patch fixes his problem. Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Fri Jul 7 21:26:27 2017 (r320794) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Fri Jul 7 21:33:06 2017 (r320795) @@ -133,7 +133,7 @@ static int nfscl_localconflict(struct nfsclclient *, u struct nfscllock *, u_int8_t *, struct nfscldeleg *, struct nfscllock **); static void nfscl_newopen(struct nfsclclient *, struct nfscldeleg *, struct nfsclowner **, struct nfsclowner **, struct nfsclopen **, - struct nfsclopen **, u_int8_t *, u_int8_t *, int, int *); + struct nfsclopen **, u_int8_t *, u_int8_t *, int, struct ucred *, int *); static int nfscl_moveopen(vnode_t , struct nfsclclient *, struct nfsmount *, struct nfsclopen *, struct nfsclowner *, struct nfscldeleg *, struct ucred *, NFSPROC_T *); @@ -287,7 +287,7 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, int fhlen, u_in * Create a new open, as required. */ nfscl_newopen(clp, dp, &owp, &nowp, &op, &nop, own, nfhp, fhlen, - newonep); + cred, newonep); /* * Now, check the mode on the open and return the appropriate @@ -346,7 +346,7 @@ static void nfscl_newopen(struct nfsclclient *clp, struct nfscldeleg *dp, struct nfsclowner **owpp, struct nfsclowner **nowpp, struct nfsclopen **opp, struct nfsclopen **nopp, u_int8_t *own, u_int8_t *fhp, int fhlen, - int *newonep) + struct ucred *cred, int *newonep) { struct nfsclowner *owp = *owpp, *nowp; struct nfsclopen *op, *nop; @@ -399,6 +399,8 @@ nfscl_newopen(struct nfsclclient *clp, struct nfscldel nop->nfso_stateid.other[0] = 0; nop->nfso_stateid.other[1] = 0; nop->nfso_stateid.other[2] = 0; + KASSERT(cred != NULL, ("%s: cred NULL\n", __func__)); + newnfs_copyincred(cred, &nop->nfso_cred); if (dp != NULL) { TAILQ_REMOVE(&clp->nfsc_deleg, dp, nfsdl_list); TAILQ_INSERT_HEAD(&clp->nfsc_deleg, dp, @@ -3970,7 +3972,7 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsm M_WAITOK); nfscl_newopen(clp, NULL, &owp, &nowp, &op, NULL, lowp->nfsow_owner, dp->nfsdl_fh, - dp->nfsdl_fhlen, NULL); + dp->nfsdl_fhlen, NULL, NULL); newnfs_copycred(&dp->nfsdl_cred, cred); ret = nfscl_moveopen(vp, clp, nmp, lop, owp, dp, cred, p); @@ -4052,7 +4054,7 @@ nfscl_moveopen(vnode_t vp, struct nfsclclient *clp, st lop->nfso_fhlen - 1, M_NFSCLOPEN, M_WAITOK); newone = 0; nfscl_newopen(clp, NULL, &owp, NULL, &op, &nop, owp->nfsow_owner, - lop->nfso_fh, lop->nfso_fhlen, &newone); + lop->nfso_fh, lop->nfso_fhlen, cred, &newone); ndp = dp; error = nfscl_tryopen(nmp, vp, np->n_v4->n4_data, np->n_v4->n4_fhlen, lop->nfso_fh, lop->nfso_fhlen, lop->nfso_mode, op, @@ -4061,8 +4063,6 @@ nfscl_moveopen(vnode_t vp, struct nfsclclient *clp, st if (newone) nfscl_freeopen(op, 0); } else { - if (newone) - newnfs_copyincred(cred, &op->nfso_cred); op->nfso_mode |= lop->nfso_mode; op->nfso_opencnt += lop->nfso_opencnt; nfscl_freeopen(lop, 1);