From owner-svn-src-stable-9@freebsd.org Sun Jun 5 07:45:57 2016 Return-Path: Delivered-To: svn-src-stable-9@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 2D20BB68CF0; Sun, 5 Jun 2016 07:45:57 +0000 (UTC) (envelope-from dchagin@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 F218F1802; Sun, 5 Jun 2016 07:45:56 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u557ju61077915; Sun, 5 Jun 2016 07:45:56 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u557juhf077914; Sun, 5 Jun 2016 07:45:56 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201606050745.u557juhf077914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 5 Jun 2016 07:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301432 - stable/9/sys/compat/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2016 07:45:57 -0000 Author: dchagin Date: Sun Jun 5 07:45:55 2016 New Revision: 301432 URL: https://svnweb.freebsd.org/changeset/base/301432 Log: MFC r300569: Don't leak fp in case where fo_ioctl() returns an error. Reported by: C Turt Modified: stable/9/sys/compat/linux/linux_ioctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/9/sys/compat/linux/linux_ioctl.c Sun Jun 5 07:43:20 2016 (r301431) +++ stable/9/sys/compat/linux/linux_ioctl.c Sun Jun 5 07:45:55 2016 (r301432) @@ -974,7 +974,7 @@ linux_ioctl_termio(struct thread *td, st error = fo_ioctl(fp, TIOCGETD, (caddr_t)&bsd_line, td->td_ucred, td); if (error) - return (error); + break; switch (bsd_line) { case TTYDISC: linux_line = LINUX_N_TTY; From owner-svn-src-stable-9@freebsd.org Sun Jun 5 15:05:54 2016 Return-Path: Delivered-To: svn-src-stable-9@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 CF965B6AE33; Sun, 5 Jun 2016 15:05:54 +0000 (UTC) (envelope-from pfg@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 A04171C49; Sun, 5 Jun 2016 15:05:54 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u55F5rFb039902; Sun, 5 Jun 2016 15:05:53 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u55F5rUI039901; Sun, 5 Jun 2016 15:05:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606051505.u55F5rUI039901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 5 Jun 2016 15:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301447 - stable/9/sys/dev/usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2016 15:05:54 -0000 Author: pfg Date: Sun Jun 5 15:05:53 2016 New Revision: 301447 URL: https://svnweb.freebsd.org/changeset/base/301447 Log: MFC r301206: usb/uhso: Don't bail out on first USB error. CID: 1305680 Submitted by: hselasky MFC after: 3 days Modified: stable/9/sys/dev/usb/net/uhso.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/uhso.c ============================================================================== --- stable/9/sys/dev/usb/net/uhso.c Sun Jun 5 15:03:55 2016 (r301446) +++ stable/9/sys/dev/usb/net/uhso.c Sun Jun 5 15:05:53 2016 (r301447) @@ -1223,6 +1223,7 @@ uhso_mux_write_callback(struct usb_xfer ht->ht_muxport); /* FALLTHROUGH */ case USB_ST_SETUP: +tr_setup: pc = usbd_xfer_get_frame(xfer, 1); if (ucom_get_data(&sc->sc_ucom[ht->ht_muxport], pc, 0, 32, &actlen)) { @@ -1253,7 +1254,8 @@ uhso_mux_write_callback(struct usb_xfer UHSO_DPRINTF(0, "error: %s\n", usbd_errstr(error)); if (error == USB_ERR_CANCELLED) break; - break; + usbd_xfer_set_stall(xfer); + goto tr_setup; } } From owner-svn-src-stable-9@freebsd.org Mon Jun 6 13:32:16 2016 Return-Path: Delivered-To: svn-src-stable-9@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 B6417B6B3D9; Mon, 6 Jun 2016 13:32:16 +0000 (UTC) (envelope-from pfg@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 7BEDE1C8B; Mon, 6 Jun 2016 13:32:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u56DWFtN047235; Mon, 6 Jun 2016 13:32:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u56DWFpK047234; Mon, 6 Jun 2016 13:32:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606061332.u56DWFpK047234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Jun 2016 13:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301507 - stable/9/sbin/dhclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2016 13:32:16 -0000 Author: pfg Date: Mon Jun 6 13:32:15 2016 New Revision: 301507 URL: https://svnweb.freebsd.org/changeset/base/301507 Log: MFC r301235: dhclient(1): correct obvious mismatch in get_char(). Correct switch between current and previous line buffers when encountering a carriage return in the input. CID: 1305719 Obtained from: OpenBSD (CVS rev. 1.30) Modified: stable/9/sbin/dhclient/conflex.c Directory Properties: stable/9/sbin/dhclient/ (props changed) Modified: stable/9/sbin/dhclient/conflex.c ============================================================================== --- stable/9/sbin/dhclient/conflex.c Mon Jun 6 13:31:28 2016 (r301506) +++ stable/9/sbin/dhclient/conflex.c Mon Jun 6 13:32:15 2016 (r301507) @@ -97,8 +97,8 @@ get_char(FILE *cfile) cur_line = line2; prev_line = line1; } else { - cur_line = line2; - prev_line = line1; + cur_line = line1; + prev_line = line2; } line++; lpos = 1; From owner-svn-src-stable-9@freebsd.org Wed Jun 8 03:09:32 2016 Return-Path: Delivered-To: svn-src-stable-9@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 0690BB6E459; Wed, 8 Jun 2016 03:09:32 +0000 (UTC) (envelope-from cy@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 CCF381D9E; Wed, 8 Jun 2016 03:09:31 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5839V96098661; Wed, 8 Jun 2016 03:09:31 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5839VjX098660; Wed, 8 Jun 2016 03:09:31 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201606080309.u5839VjX098660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 8 Jun 2016 03:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301578 - stable/9/etc/periodic/daily X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 03:09:32 -0000 Author: cy Date: Wed Jun 8 03:09:30 2016 New Revision: 301578 URL: https://svnweb.freebsd.org/changeset/base/301578 Log: MFC r301102: Don't rely on $ntpd_enable to periodically fetch the latest leapfile. Suggested by: cperciva Modified: stable/9/etc/periodic/daily/480.leapfile-ntpd Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/daily/480.leapfile-ntpd ============================================================================== --- stable/9/etc/periodic/daily/480.leapfile-ntpd Wed Jun 8 03:08:37 2016 (r301577) +++ stable/9/etc/periodic/daily/480.leapfile-ntpd Wed Jun 8 03:09:30 2016 (r301578) @@ -16,10 +16,10 @@ case "$daily_ntpd_leapfile_enable" in case "$daily_ntpd_avoid_congestion" in [Yy][Ee][Ss]) # Avoid dogpiling - (sleep $(jot -r 1 0 86400); service ntpd fetch) & + (sleep $(jot -r 1 0 86400); service ntpd onefetch) & ;; *) - service ntpd fetch + service ntpd onefetch ;; esac ;; From owner-svn-src-stable-9@freebsd.org Wed Jun 8 13:22:27 2016 Return-Path: Delivered-To: svn-src-stable-9@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 1AA17B6F39A; Wed, 8 Jun 2016 13:22:27 +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 E00B4109D; Wed, 8 Jun 2016 13:22:26 +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 u58DMQBm035556; Wed, 8 Jun 2016 13:22:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58DMQ3P035555; Wed, 8 Jun 2016 13:22:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081322.u58DMQ3P035555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 13:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301609 - stable/9/sys/cddl/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 13:22:27 -0000 Author: ngie Date: Wed Jun 8 13:22:25 2016 New Revision: 301609 URL: https://svnweb.freebsd.org/changeset/base/301609 Log: MFstable/10 r301608: MFC r299657: Include arpa/inet.h to get the htonl(3) definition Modified: stable/9/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/9/sys/cddl/boot/zfs/lz4.c Wed Jun 8 13:21:17 2016 (r301608) +++ stable/9/sys/cddl/boot/zfs/lz4.c Wed Jun 8 13:22:25 2016 (r301609) @@ -34,6 +34,8 @@ * $FreeBSD$ */ +#include + static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 13:25:16 2016 Return-Path: Delivered-To: svn-src-stable-9@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 78104B6F49B; Wed, 8 Jun 2016 13:25:16 +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 48E7913C0; Wed, 8 Jun 2016 13:25:16 +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 u58DPFk4036396; Wed, 8 Jun 2016 13:25:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58DPFEw036395; Wed, 8 Jun 2016 13:25:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081325.u58DPFEw036395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 13:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301611 - stable/9/contrib/bsnmp/snmpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 13:25:16 -0000 Author: ngie Date: Wed Jun 8 13:25:15 2016 New Revision: 301611 URL: https://svnweb.freebsd.org/changeset/base/301611 Log: MFstable/10 r301610: MFC r299833: Fix fully canonicalized example for `myvariable.27...` `6` doesn't occur in the OID; it was spurious Bump .Dd for the change Modified: stable/9/contrib/bsnmp/snmpd/bsnmpd.1 Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) Modified: stable/9/contrib/bsnmp/snmpd/bsnmpd.1 ============================================================================== --- stable/9/contrib/bsnmp/snmpd/bsnmpd.1 Wed Jun 8 13:24:42 2016 (r301610) +++ stable/9/contrib/bsnmp/snmpd/bsnmpd.1 Wed Jun 8 13:25:15 2016 (r301611) @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $ .\" -.Dd September 9, 2010 +.Dd May 10, 2016 .Dt BSNMPD 1 .Os .Sh NAME @@ -227,7 +227,7 @@ myvariable.27.foooll.[localhost]."&^!" .Pp results in the oid .Bd -unfilled -offset indent -myvariable.27.6.102.111.111.111.108.108.127.0.0.1.38.94.33 +myvariable.27.102.111.111.111.108.108.127.0.0.1.38.94.33 .Ed .Pp The value of the assignment may be either empty, a string or a number. From owner-svn-src-stable-9@freebsd.org Wed Jun 8 13:37:19 2016 Return-Path: Delivered-To: svn-src-stable-9@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 886BAB6FA30; Wed, 8 Jun 2016 13:37:19 +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 592EB10D3; Wed, 8 Jun 2016 13:37:19 +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 u58DbIHh040259; Wed, 8 Jun 2016 13:37:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58DbIHH040257; Wed, 8 Jun 2016 13:37:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081337.u58DbIHH040257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 13:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301614 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 13:37:19 -0000 Author: ngie Date: Wed Jun 8 13:37:18 2016 New Revision: 301614 URL: https://svnweb.freebsd.org/changeset/base/301614 Log: MFstable/10 r301613: MFC r299843: Fix broken dependency with routed when MK_ROUTED != no Remove routed as a requirement in NETWORKING, and put it in routed as a BEFORE requirement instead Modified: stable/9/etc/rc.d/NETWORKING stable/9/etc/rc.d/routed Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/NETWORKING ============================================================================== --- stable/9/etc/rc.d/NETWORKING Wed Jun 8 13:34:52 2016 (r301613) +++ stable/9/etc/rc.d/NETWORKING Wed Jun 8 13:37:18 2016 (r301614) @@ -5,7 +5,7 @@ # PROVIDE: NETWORKING NETWORK # REQUIRE: netif netoptions routing ppp ipfw stf faith -# REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge +# REQUIRE: defaultroute mrouted route6d mroute6d resolv bridge # REQUIRE: static_arp static_ndp # This is a dummy dependency, for services which require networking Modified: stable/9/etc/rc.d/routed ============================================================================== --- stable/9/etc/rc.d/routed Wed Jun 8 13:34:52 2016 (r301613) +++ stable/9/etc/rc.d/routed Wed Jun 8 13:37:18 2016 (r301614) @@ -5,6 +5,7 @@ # PROVIDE: routed # REQUIRE: netif routing +# BEFORE: NETWORK # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-stable-9@freebsd.org Wed Jun 8 13:41:52 2016 Return-Path: Delivered-To: svn-src-stable-9@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 EB78AB6FBB3; Wed, 8 Jun 2016 13:41:52 +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 B914B18B7; Wed, 8 Jun 2016 13:41:52 +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 u58Dfp52043880; Wed, 8 Jun 2016 13:41:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58DfpKV043878; Wed, 8 Jun 2016 13:41:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081341.u58DfpKV043878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 13:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301616 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 13:41:53 -0000 Author: ngie Date: Wed Jun 8 13:41:51 2016 New Revision: 301616 URL: https://svnweb.freebsd.org/changeset/base/301616 Log: MFstable/10 r301615: MFC r299844,r300931: r299844: Make hostid_save depend on hostid r300931: Make netif REQUIRE hostid As noted in the PR, if etc/rc.d/zvol is removed, netif will be run before hostid, and the MAC address generated for any bridge devices will be non-deterministic. Make the MAC address generated be deterministic for bridge devices by explicitly REQUIRE'ing hostid. This fixes up the rest of the PR, inadvertently committed in r299844 PR: 195188 Modified: stable/9/etc/rc.d/hostid_save stable/9/etc/rc.d/netif Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/hostid_save ============================================================================== --- stable/9/etc/rc.d/hostid_save Wed Jun 8 13:40:07 2016 (r301615) +++ stable/9/etc/rc.d/hostid_save Wed Jun 8 13:41:51 2016 (r301616) @@ -4,7 +4,7 @@ # # PROVIDE: hostid_save -# REQUIRE: root +# REQUIRE: hostid root # KEYWORD: nojail . /etc/rc.subr Modified: stable/9/etc/rc.d/netif ============================================================================== --- stable/9/etc/rc.d/netif Wed Jun 8 13:40:07 2016 (r301615) +++ stable/9/etc/rc.d/netif Wed Jun 8 13:41:51 2016 (r301616) @@ -27,7 +27,7 @@ # PROVIDE: netif # REQUIRE: atm1 FILESYSTEMS serial sppp sysctl -# REQUIRE: ipfilter ipfs +# REQUIRE: hostid ipfilter ipfs # KEYWORD: nojailvnet . /etc/rc.subr From owner-svn-src-stable-9@freebsd.org Wed Jun 8 13:45:03 2016 Return-Path: Delivered-To: svn-src-stable-9@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 9BF39B6FE0F; Wed, 8 Jun 2016 13:45:03 +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 68EB11D38; Wed, 8 Jun 2016 13:45:03 +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 u58Dj24C044176; Wed, 8 Jun 2016 13:45:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58Dj2In044175; Wed, 8 Jun 2016 13:45:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081345.u58Dj2In044175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 13:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301618 - stable/9/usr.bin/kdump X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 13:45:03 -0000 Author: ngie Date: Wed Jun 8 13:45:02 2016 New Revision: 301618 URL: https://svnweb.freebsd.org/changeset/base/301618 Log: MFstable/10 r301617: MFC r300428: Fix humanized decoding of struct stat with respect to .st_mtim st_mtim was being incorrectly described as "stime=", not "mtime=". This was introduced with the original feature commit (r176471). PR: 209699 Modified: stable/9/usr.bin/kdump/kdump.c Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/kdump/ (props changed) Modified: stable/9/usr.bin/kdump/kdump.c ============================================================================== --- stable/9/usr.bin/kdump/kdump.c Wed Jun 8 13:44:01 2016 (r301617) +++ stable/9/usr.bin/kdump/kdump.c Wed Jun 8 13:45:02 2016 (r301618) @@ -1561,7 +1561,7 @@ ktrstat(struct stat *statp) printf(".%09ld, ", statp->st_atim.tv_nsec); else printf(", "); - printf("stime="); + printf("mtime="); if (resolv == 0) printf("%jd", (intmax_t)statp->st_mtim.tv_sec); else { From owner-svn-src-stable-9@freebsd.org Wed Jun 8 13:50:49 2016 Return-Path: Delivered-To: svn-src-stable-9@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 F1D24B6E1B6; Wed, 8 Jun 2016 13:50:49 +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 BF0C91239; Wed, 8 Jun 2016 13:50:49 +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 u58Domel044561; Wed, 8 Jun 2016 13:50:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58DomTb044560; Wed, 8 Jun 2016 13:50:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081350.u58DomTb044560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 13:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301620 - stable/9/usr.sbin/rpc.yppasswdd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 13:50:50 -0000 Author: ngie Date: Wed Jun 8 13:50:48 2016 New Revision: 301620 URL: https://svnweb.freebsd.org/changeset/base/301620 Log: MFstable/10 r301619: MFC r300430: Wrap EXPAND(..) macro with a do-while(0) loop and put a single statement on each line As a positive side-effect, this eliminates the double semicolons reported by Coverity: the macro contained a trailing semicolon, in addition to the semicolon placed on each line where EXPAND(..) was called. CID: 1194269 Modified: stable/9/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/rpc.yppasswdd/ (props changed) Modified: stable/9/usr.sbin/rpc.yppasswdd/yppasswdd_server.c ============================================================================== --- stable/9/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Wed Jun 8 13:49:59 2016 (r301619) +++ stable/9/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Wed Jun 8 13:50:48 2016 (r301620) @@ -103,7 +103,10 @@ copy_yp_pass(char *p, int x, int m) } t = buf; -#define EXPAND(e) e = t; while ((*t++ = *p++)); +#define EXPAND(e) do { \ + e = t; \ + while ((*t++ = *p++)); \ +} while (0) EXPAND(yp_password.pw_name); yp_password.pw_fields |= _PWF_NAME; EXPAND(yp_password.pw_passwd); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 14:20:56 2016 Return-Path: Delivered-To: svn-src-stable-9@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 1F3D1B6F190; Wed, 8 Jun 2016 14:20:56 +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 EE9651ABA; Wed, 8 Jun 2016 14:20:55 +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 u58EKtmr056810; Wed, 8 Jun 2016 14:20:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58EKse3056807; Wed, 8 Jun 2016 14:20:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081420.u58EKse3056807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 14:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301630 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 14:20:56 -0000 Author: ngie Date: Wed Jun 8 14:20:54 2016 New Revision: 301630 URL: https://svnweb.freebsd.org/changeset/base/301630 Log: MFstable/10 r301629: MFC r300387,r300388,r300389: r300387: getnetid(..): consistently fclose fd at the end of the function This mutes a false positive with cppcheck, but also helps eliminate future potential issues with this variable r300388: Call endnetconfig on nc_handle sooner to avoid leaking nc_handle if tmpnconf was NULL This would theoretically happen if the netconfig protocol family and protocol semantics were never matched. CID: 978179 r300389: nis_rpcent: don't leak resultbuf from yp_first(..)/yp_next(..) If the buffer couldn't be adequately resized to accomodate an additional "\n", it would leak resultbuf by breaking from the loop early CID: 1016702 Modified: stable/9/lib/libc/rpc/getrpcent.c stable/9/lib/libc/rpc/netnamer.c stable/9/lib/libc/rpc/rpcb_clnt.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/getrpcent.c ============================================================================== --- stable/9/lib/libc/rpc/getrpcent.c Wed Jun 8 14:18:47 2016 (r301629) +++ stable/9/lib/libc/rpc/getrpcent.c Wed Jun 8 14:20:54 2016 (r301630) @@ -512,6 +512,7 @@ nis_rpcent(void *retval, void *mdata, va sizeof(char *)) { *errnop = ERANGE; rv = NS_RETURN; + free(resultbuf); break; } @@ -521,6 +522,7 @@ nis_rpcent(void *retval, void *mdata, va if (aliases_size < 1) { *errnop = ERANGE; rv = NS_RETURN; + free(resultbuf); break; } Modified: stable/9/lib/libc/rpc/netnamer.c ============================================================================== --- stable/9/lib/libc/rpc/netnamer.c Wed Jun 8 14:18:47 2016 (r301629) +++ stable/9/lib/libc/rpc/netnamer.c Wed Jun 8 14:20:54 2016 (r301630) @@ -253,6 +253,9 @@ getnetid(key, ret) char *lookup; int len; #endif + int rv; + + rv = 0; fd = fopen(NETIDFILE, "r"); if (fd == NULL) { @@ -263,13 +266,11 @@ getnetid(key, ret) return (0); #endif } - for (;;) { - if (fd == NULL) - return (0); /* getnetidyp brings us here */ + while (fd != NULL) { res = fgets(buf, sizeof(buf), fd); if (res == NULL) { - fclose(fd); - return (0); + rv = 0; + goto done; } if (res[0] == '#') continue; @@ -292,9 +293,8 @@ getnetid(key, ret) lookup[len] = 0; strcpy(ret, lookup); free(lookup); - if (fd != NULL) - fclose(fd); - return (2); + rv = 2; + goto done; #else /* YP */ #ifdef DEBUG fprintf(stderr, @@ -320,10 +320,14 @@ getnetid(key, ret) } if (strcmp(mkey, key) == 0) { strcpy(ret, mval); - fclose(fd); - return (1); - + rv = 1; + goto done; } } } + +done: + if (fd != NULL) + fclose(fd); + return (rv); } Modified: stable/9/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/9/lib/libc/rpc/rpcb_clnt.c Wed Jun 8 14:18:47 2016 (r301629) +++ stable/9/lib/libc/rpc/rpcb_clnt.c Wed Jun 8 14:20:54 2016 (r301630) @@ -508,6 +508,7 @@ try_nconf: hostname = IN6_LOCALHOST_STRING; } } + endnetconfig(nc_handle); if (tmpnconf == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; mutex_unlock(&loopnconf_lock); @@ -515,7 +516,6 @@ try_nconf: } loopnconf = getnetconfigent(tmpnconf->nc_netid); /* loopnconf is never freed */ - endnetconfig(nc_handle); } mutex_unlock(&loopnconf_lock); client = getclnthandle(hostname, loopnconf, NULL); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 16:59:10 2016 Return-Path: Delivered-To: svn-src-stable-9@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 F01FAB6F31F; Wed, 8 Jun 2016 16:59:10 +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 CA3AD16BC; Wed, 8 Jun 2016 16:59:10 +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 u58Gx9aj015964; Wed, 8 Jun 2016 16:59:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58Gx9In015961; Wed, 8 Jun 2016 16:59:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081659.u58Gx9In015961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 16:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301642 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 16:59:11 -0000 Author: ngie Date: Wed Jun 8 16:59:09 2016 New Revision: 301642 URL: https://svnweb.freebsd.org/changeset/base/301642 Log: MFstable/10 r296994: r296994 (by asomers): MFC r293229, r293833 to usr.sbin/rpcbind r293833 | asomers | 2016-01-13 10:33:50 -0700 (Wed, 13 Jan 2016) | 16 lines Fix Coverity warnings regarding r293229 rpcbind/check_bound.c Fix CID1347798, a memory leak in mergeaddr. rpcbind/tests/addrmerge_test.c Fix CID1347800 through CID1347803, memory leaks in ATF tests. They are harmless because each ATF test case runs in its own process, but they are trivial to fix. Fix a few other leaks that Coverity didn't detect, too. r293229 | asomers | 2016-01-05 17:00:11 -0700 (Tue, 05 Jan 2016) | 36 lines "source routing" in rpcbind Fix a bug in rpcbind for multihomed hosts. If the server had interfaces on two separate subnets, and a client on the first subnet contacted rpcbind at the address on the second subnet, rpcbind would advertise addresses on the first subnet. This is a bug, because it should prefer to advertise the address where it was contacted. The requested service might be firewalled off from the address on the first subnet, for example. usr.sbin/rpcbind/check_bound.c If the address on which a request was received is known, pass that to addrmerge as the clnt_uaddr parameter. That is what addrmerge's comment indicates the parameter is supposed to mean. The previous behavior is that clnt_uaddr would contain the address from which the client sent the request. usr.sbin/rpcbind/util.c Modify addrmerge to prefer to use an IP that is equal to clnt_uaddr, if one is found. Refactor the relevant portion of the function for clarity, and to reduce the number of ifdefs. etc/mtree/BSD.tests.dist usr.sbin/rpcbind/tests/Makefile usr.sbin/rpcbind/tests/addrmerge_test.c Add unit tests for usr.sbin/rpcbind/util.c:addrmerge. usr.sbin/rpcbind/check_bound.c usr.sbin/rpcbind/rpcbind.h usr.sbin/rpcbind/util.c Constify some function arguments Modified: stable/9/usr.sbin/rpcbind/check_bound.c stable/9/usr.sbin/rpcbind/rpcbind.h stable/9/usr.sbin/rpcbind/util.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/check_bound.c ============================================================================== --- stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun 8 16:26:44 2016 (r301641) +++ stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun 8 16:59:09 2016 (r301642) @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)check_bound. #include #include #include +#include #include #include #include @@ -160,6 +161,7 @@ char * mergeaddr(SVCXPRT *xprt, char *netid, char *uaddr, char *saddr) { struct fdlist *fdl; + struct svc_dg_data *dg_data; char *c_uaddr, *s_uaddr, *m_uaddr, *allocated_uaddr = NULL; for (fdl = fdhead; fdl; fdl = fdl->next) @@ -171,21 +173,31 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch /* that server died */ return (nullstring); /* + * Try to determine the local address on which the client contacted us, + * so we can send a reply from the same address. If it's unknown, then + * try to determine which address the client used, and pick a nearby + * local address. + * * If saddr is not NULL, the remote client may have included the * address by which it contacted us. Use that for the "client" uaddr, * otherwise use the info from the SVCXPRT. */ - if (saddr != NULL) { + dg_data = (struct svc_dg_data*)xprt->xp_p2; + if (dg_data != NULL && dg_data->su_srcaddr.buf != NULL) { + c_uaddr = taddr2uaddr(fdl->nconf, &dg_data->su_srcaddr); + allocated_uaddr = c_uaddr; + } + else if (saddr != NULL) { c_uaddr = saddr; } else { c_uaddr = taddr2uaddr(fdl->nconf, svc_getrpccaller(xprt)); - if (c_uaddr == NULL) { - syslog(LOG_ERR, "taddr2uaddr failed for %s", - fdl->nconf->nc_netid); - return (NULL); - } allocated_uaddr = c_uaddr; } + if (c_uaddr == NULL) { + syslog(LOG_ERR, "taddr2uaddr failed for %s", + fdl->nconf->nc_netid); + return (NULL); + } #ifdef ND_DEBUG if (debugging) { @@ -218,7 +230,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch * structure should not be freed. */ struct netconfig * -rpcbind_get_conf(char *netid) +rpcbind_get_conf(const char *netid) { struct fdlist *fdl; Modified: stable/9/usr.sbin/rpcbind/rpcbind.h ============================================================================== --- stable/9/usr.sbin/rpcbind/rpcbind.h Wed Jun 8 16:26:44 2016 (r301641) +++ stable/9/usr.sbin/rpcbind/rpcbind.h Wed Jun 8 16:59:09 2016 (r301642) @@ -83,7 +83,7 @@ extern char *tcp_uaddr; /* Universal TC int add_bndlist(struct netconfig *, struct netbuf *); bool_t is_bound(char *, char *); char *mergeaddr(SVCXPRT *, char *, char *, char *); -struct netconfig *rpcbind_get_conf(char *); +struct netconfig *rpcbind_get_conf(const char *); void rpcbs_init(void); void rpcbs_procinfo(rpcvers_t, rpcproc_t); @@ -132,8 +132,8 @@ extern void pmap_service(struct svc_req void write_warmstart(void); void read_warmstart(void); -char *addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, - char *netid); +char *addrmerge(struct netbuf *caller, const char *serv_uaddr, + const char *clnt_uaddr, char const *netid); int listen_addr(const struct sockaddr *sa); void network_init(void); struct sockaddr *local_sa(int); Modified: stable/9/usr.sbin/rpcbind/util.c ============================================================================== --- stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 16:26:44 2016 (r301641) +++ stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 16:59:09 2016 (r301642) @@ -56,7 +56,7 @@ static struct sockaddr_in *local_in4; static struct sockaddr_in6 *local_in6; #endif -static int bitmaskcmp(void *, void *, void *, int); +static int bitmaskcmp(struct sockaddr *, struct sockaddr *, struct sockaddr *); #ifdef INET6 static void in6_fillscopeid(struct sockaddr_in6 *); #endif @@ -67,10 +67,34 @@ static void in6_fillscopeid(struct socka * match. */ static int -bitmaskcmp(void *dst, void *src, void *mask, int bytelen) +bitmaskcmp(struct sockaddr *dst, struct sockaddr *src, struct sockaddr *mask) { int i; - u_int8_t *p1 = dst, *p2 = src, *netmask = mask; + u_int8_t *p1, *p2, *netmask; + int bytelen; + + if (dst->sa_family != src->sa_family || + dst->sa_family != mask->sa_family) + return (1); + + switch (dst->sa_family) { + case AF_INET: + p1 = (uint8_t*) &SA2SINADDR(dst); + p2 = (uint8_t*) &SA2SINADDR(src); + netmask = (uint8_t*) &SA2SINADDR(mask); + bytelen = sizeof(struct in_addr); + break; +#ifdef INET6 + case AF_INET6: + p1 = (uint8_t*) &SA2SIN6ADDR(dst); + p2 = (uint8_t*) &SA2SIN6ADDR(src); + netmask = (uint8_t*) &SA2SIN6ADDR(mask); + bytelen = sizeof(struct in6_addr); + break; +#endif + default: + return (1); + } for (i = 0; i < bytelen; i++) if ((p1[i] & netmask[i]) != (p2[i] & netmask[i])) @@ -109,16 +133,18 @@ in6_fillscopeid(struct sockaddr_in6 *sin * string which should be freed by the caller. On error, returns NULL. */ char * -addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, - char *netid) +addrmerge(struct netbuf *caller, const char *serv_uaddr, const char *clnt_uaddr, + const char *netid) { struct ifaddrs *ifap, *ifp = NULL, *bestif; struct netbuf *serv_nbp = NULL, *hint_nbp = NULL, tbuf; struct sockaddr *caller_sa, *hint_sa, *ifsa, *ifmasksa, *serv_sa; struct sockaddr_storage ss; struct netconfig *nconf; - char *caller_uaddr = NULL, *hint_uaddr = NULL; + char *caller_uaddr = NULL; + const char *hint_uaddr = NULL; char *ret = NULL; + int bestif_goodness; #ifdef ND_DEBUG if (debugging) @@ -162,19 +188,29 @@ addrmerge(struct netbuf *caller, char *s goto freeit; /* - * Loop through all interfaces. For each interface, see if it - * is either the loopback interface (which we always listen - * on) or is one of the addresses the program bound to (the - * wildcard by default, or a subset if -h is specified) and - * the network portion of its address is equal to that of the - * client. If so, we have found the interface that we want to - * use. + * Loop through all interface addresses. We are listening to an address + * if any of the following are true: + * a) It's a loopback address + * b) It was specified with the -h command line option + * c) There were no -h command line options. + * + * Among addresses on which we are listening, choose in order of + * preference an address that is: + * + * a) Equal to the hint + * b) A link local address with the same scope ID as the client's + * address, if the client's address is also link local + * c) An address on the same subnet as the client's address + * d) A non-localhost, non-p2p address + * e) Any usable address */ bestif = NULL; + bestif_goodness = 0; for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) { ifsa = ifap->ifa_addr; ifmasksa = ifap->ifa_netmask; + /* Skip addresses where we don't listen */ if (ifsa == NULL || ifsa->sa_family != hint_sa->sa_family || !(ifap->ifa_flags & IFF_UP)) continue; @@ -182,21 +218,29 @@ addrmerge(struct netbuf *caller, char *s if (!(ifap->ifa_flags & IFF_LOOPBACK) && !listen_addr(ifsa)) continue; - switch (hint_sa->sa_family) { - case AF_INET: - /* - * If the hint address matches this interface - * address/netmask, then we're done. - */ - if (!bitmaskcmp(&SA2SINADDR(ifsa), - &SA2SINADDR(hint_sa), &SA2SINADDR(ifmasksa), - sizeof(struct in_addr))) { - bestif = ifap; - goto found; - } - break; + if ((hint_sa->sa_family == AF_INET) && + ((((struct sockaddr_in*)hint_sa)->sin_addr.s_addr == + ((struct sockaddr_in*)ifsa)->sin_addr.s_addr))) { + const int goodness = 4; + + bestif_goodness = goodness; + bestif = ifap; + goto found; + } #ifdef INET6 - case AF_INET6: + if ((hint_sa->sa_family == AF_INET6) && + (0 == memcmp(&((struct sockaddr_in6*)hint_sa)->sin6_addr, + &((struct sockaddr_in6*)ifsa)->sin6_addr, + sizeof(struct in6_addr))) && + (((struct sockaddr_in6*)hint_sa)->sin6_scope_id == + (((struct sockaddr_in6*)ifsa)->sin6_scope_id))) { + const int goodness = 4; + + bestif_goodness = goodness; + bestif = ifap; + goto found; + } + if (hint_sa->sa_family == AF_INET6) { /* * For v6 link local addresses, if the caller is on * a link-local address then use the scope id to see @@ -208,28 +252,33 @@ addrmerge(struct netbuf *caller, char *s IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(hint_sa))) { if (SA2SIN6(ifsa)->sin6_scope_id == SA2SIN6(caller_sa)->sin6_scope_id) { - bestif = ifap; - goto found; + const int goodness = 3; + + if (bestif_goodness < goodness) { + bestif = ifap; + bestif_goodness = goodness; + } } - } else if (!bitmaskcmp(&SA2SIN6ADDR(ifsa), - &SA2SIN6ADDR(hint_sa), &SA2SIN6ADDR(ifmasksa), - sizeof(struct in6_addr))) { + } + } +#endif /* INET6 */ + if (0 == bitmaskcmp(hint_sa, ifsa, ifmasksa)) { + const int goodness = 2; + + if (bestif_goodness < goodness) { bestif = ifap; - goto found; + bestif_goodness = goodness; } - break; -#endif - default: - continue; } + if (!(ifap->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) { + const int goodness = 1; - /* - * Remember the first possibly useful interface, preferring - * "normal" to point-to-point and loopback ones. - */ - if (bestif == NULL || - (!(ifap->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) && - (bestif->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)))) + if (bestif_goodness < goodness) { + bestif = ifap; + bestif_goodness = goodness; + } + } + if (bestif == NULL) bestif = ifap; } if (bestif == NULL) From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:04:16 2016 Return-Path: Delivered-To: svn-src-stable-9@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 A9B50B6F73F; Wed, 8 Jun 2016 17:04:16 +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 6A6451D37; Wed, 8 Jun 2016 17:04:16 +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 u58H4FFl019465; Wed, 8 Jun 2016 17:04:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58H4Fou019464; Wed, 8 Jun 2016 17:04:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081704.u58H4Fou019464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301643 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:04:16 -0000 Author: ngie Date: Wed Jun 8 17:04:15 2016 New Revision: 301643 URL: https://svnweb.freebsd.org/changeset/base/301643 Log: MFC r300932,r300934,r300941,r300972,r300973: r300932: Catch malloc(3) errors and socket(2) errors - malloc failing will result in a delayed segfault - socket failing will result in delayed failures with setsockopt Exit in the event that either of these high-level conditions are met. CID: 976288, 976321, 976858 r300934: Plug leak with ifp by calling freeifaddrs after calling getifaddrs Obtained from: NetBSD v1.18 r300941: Don't leak res in network_init(..) Call freeaddrinfo on it after it's been used CID: 1225050 r300972 (by markj): Fix rpcbind init after r300941. - getaddrinfo() sets res = NULL on failure and freeaddrinfo() always dereferences its argument, so we should only free the address list after a successful call. - Address a second potential leak caused by getaddrinfo(AF_INET6) overwriting the address list returned by getaddrinfo(AF_INET). X-MFC-With: r300941 r300973: Follow up to r300932 In the event MK_INET6 != no in userspace, but is disabled in the kernel, or if there aren't any IPv6 addresses configured in userspace (for lo0 and all physical interfaces), rpcbind would terminate immediately instead of silently failing on Skip over the IPv6 block to its respective cleanup with freeifaddrs if creating the socket failed instead of terminating rpcbind immediately Modified: stable/9/usr.sbin/rpcbind/util.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/util.c ============================================================================== --- stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 16:59:09 2016 (r301642) +++ stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 17:04:15 2016 (r301643) @@ -354,8 +354,10 @@ network_init(void) if (local_in4 == NULL) { if (debugging) fprintf(stderr, "can't alloc local ip4 addr\n"); + exit(1); } memcpy(local_in4, res->ai_addr, sizeof *local_in4); + freeaddrinfo(res); } #ifdef INET6 @@ -369,8 +371,10 @@ network_init(void) if (local_in6 == NULL) { if (debugging) fprintf(stderr, "can't alloc local ip6 addr\n"); + exit(1); } memcpy(local_in6, res->ai_addr, sizeof *local_in6); + freeaddrinfo(res); } /* @@ -383,6 +387,11 @@ network_init(void) inet_pton(AF_INET6, RPCB_MULTICAST_ADDR, &mreq6.ipv6mr_multiaddr); s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); + if (s == -1) { + if (debugging) + fprintf(stderr, "couldn't create ip6 socket"); + goto done_inet6; + } /* * Loop through all interfaces. For each IPv6 multicast-capable @@ -404,6 +413,8 @@ network_init(void) if (debugging) perror("setsockopt v6 multicast"); } +done_inet6: + freeifaddrs(ifp); #endif /* close(s); */ From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:10:44 2016 Return-Path: Delivered-To: svn-src-stable-9@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 E523FB6F9D4; Wed, 8 Jun 2016 17:10:44 +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 B780311FB; Wed, 8 Jun 2016 17:10:44 +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 u58HAhYT019993; Wed, 8 Jun 2016 17:10:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HAhsH019992; Wed, 8 Jun 2016 17:10:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081710.u58HAhsH019992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301645 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:10:45 -0000 Author: ngie Date: Wed Jun 8 17:10:43 2016 New Revision: 301645 URL: https://svnweb.freebsd.org/changeset/base/301645 Log: MFstable/10 r301644: MFC r300942: Remove a useless if (x != NULL) check before calling free on allocated_uaddr Modified: stable/9/usr.sbin/rpcbind/check_bound.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/check_bound.c ============================================================================== --- stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun 8 17:09:47 2016 (r301644) +++ stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun 8 17:10:43 2016 (r301645) @@ -220,8 +220,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch fprintf(stderr, "mergeaddr: uaddr = %s, merged uaddr = %s\n", uaddr, m_uaddr); #endif - if (allocated_uaddr != NULL) - free(allocated_uaddr); + free(allocated_uaddr); return (m_uaddr); } From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:12:38 2016 Return-Path: Delivered-To: svn-src-stable-9@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 A7733B6FB00; Wed, 8 Jun 2016 17:12:38 +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 778A719AC; Wed, 8 Jun 2016 17:12:38 +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 u58HCbrM023535; Wed, 8 Jun 2016 17:12:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HCb88023534; Wed, 8 Jun 2016 17:12:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081712.u58HCb88023534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301647 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:12:38 -0000 Author: ngie Date: Wed Jun 8 17:12:37 2016 New Revision: 301647 URL: https://svnweb.freebsd.org/changeset/base/301647 Log: MFstable/10 r301646: MFC r300945: Remove unnecessary caller_uaddr != NULL test before calling free on it Modified: stable/9/usr.sbin/rpcbind/util.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/util.c ============================================================================== --- stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 17:11:42 2016 (r301646) +++ stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 17:12:37 2016 (r301647) @@ -311,8 +311,7 @@ found: ret = taddr2uaddr(nconf, &tbuf); freeit: - if (caller_uaddr != NULL) - free(caller_uaddr); + free(caller_uaddr); if (hint_nbp != NULL) { free(hint_nbp->buf); free(hint_nbp); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:13:58 2016 Return-Path: Delivered-To: svn-src-stable-9@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 A59B5B6FC0B; Wed, 8 Jun 2016 17:13:58 +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 7337C1D78; Wed, 8 Jun 2016 17:13:58 +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 u58HDvOx023791; Wed, 8 Jun 2016 17:13:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HDvt7023790; Wed, 8 Jun 2016 17:13:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081713.u58HDvt7023790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301649 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:13:58 -0000 Author: ngie Date: Wed Jun 8 17:13:57 2016 New Revision: 301649 URL: https://svnweb.freebsd.org/changeset/base/301649 Log: MFstable/10 r301648: MFC r300947: Staticize variables only used in rpcbind.c This is some low hanging fruit necessary for making this WARNS?= 6 clean Modified: stable/9/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/9/usr.sbin/rpcbind/rpcbind.c Wed Jun 8 17:13:28 2016 (r301648) +++ stable/9/usr.sbin/rpcbind/rpcbind.c Wed Jun 8 17:13:57 2016 (r301649) @@ -86,17 +86,17 @@ rpcblist_ptr list_rbl; /* A list of vers #define RPCBINDDLOCK "/var/run/rpcbind.lock" -int runasdaemon = 0; +static int runasdaemon = 0; int insecure = 0; int oldstyle_local = 0; int verboselog = 0; -char **hosts = NULL; -struct sockaddr **bound_sa; -int ipv6_only = 0; -int nhosts = 0; -int on = 1; -int rpcbindlockfd; +static char **hosts = NULL; +static struct sockaddr **bound_sa; +static int ipv6_only = 0; +static int nhosts = 0; +static int on = 1; +static int rpcbindlockfd; #ifdef WARMSTART /* Local Variable */ From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:17:04 2016 Return-Path: Delivered-To: svn-src-stable-9@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 E6C96B6FD6F; Wed, 8 Jun 2016 17:17:04 +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 A65521205; Wed, 8 Jun 2016 17:17:04 +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 u58HH3fP024407; Wed, 8 Jun 2016 17:17:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HH3ei024406; Wed, 8 Jun 2016 17:17:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081717.u58HH3ei024406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301650 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:17:05 -0000 Author: ngie Date: Wed Jun 8 17:17:03 2016 New Revision: 301650 URL: https://svnweb.freebsd.org/changeset/base/301650 Log: MFstable/10 r301636: MFC r300867,r300932,r300934,r300941,r300972,r300973: r300867: Only expose `hint_uaddr` in the ND_DEBUG case This fixes a -Wunused-but-set-variable warning with gcc r300932: Catch malloc(3) errors and socket(2) errors - malloc failing will result in a delayed segfault - socket failing will result in delayed failures with setsockopt Exit in the event that either of these high-level conditions are met. CID: 976288, 976321, 976858 r300934: Plug leak with ifp by calling freeifaddrs after calling getifaddrs Obtained from: NetBSD v1.18 r300941: Don't leak res in network_init(..) Call freeaddrinfo on it after it's been used CID: 1225050 r300972 (by markj): Fix rpcbind init after r300941. - getaddrinfo() sets res = NULL on failure and freeaddrinfo() always dereferences its argument, so we should only free the address list after a successful call. - Address a second potential leak caused by getaddrinfo(AF_INET6) overwriting the address list returned by getaddrinfo(AF_INET). X-MFC-With: r300941 r300973: Follow up to r300932 In the event MK_INET6 != no in userspace, but is disabled in the kernel, or if there aren't any IPv6 addresses configured in userspace (for lo0 and all physical interfaces), rpcbind would terminate immediately instead of silently failing on Skip over the IPv6 block to its respective cleanup with freeifaddrs if creating the socket failed instead of terminating rpcbind immediately Modified: stable/9/usr.sbin/rpcbind/util.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/util.c ============================================================================== --- stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 17:13:57 2016 (r301649) +++ stable/9/usr.sbin/rpcbind/util.c Wed Jun 8 17:17:03 2016 (r301650) @@ -142,7 +142,9 @@ addrmerge(struct netbuf *caller, const c struct sockaddr_storage ss; struct netconfig *nconf; char *caller_uaddr = NULL; +#ifdef ND_DEBUG const char *hint_uaddr = NULL; +#endif char *ret = NULL; int bestif_goodness; @@ -163,13 +165,17 @@ addrmerge(struct netbuf *caller, const c */ hint_sa = NULL; if (clnt_uaddr != NULL) { +#ifdef ND_DEBUG hint_uaddr = clnt_uaddr; +#endif if ((hint_nbp = uaddr2taddr(nconf, clnt_uaddr)) == NULL) goto freeit; hint_sa = hint_nbp->buf; } if (hint_sa == NULL || hint_sa->sa_family != caller_sa->sa_family) { +#ifdef ND_DEBUG hint_uaddr = caller_uaddr; +#endif hint_sa = caller->buf; } From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:24:58 2016 Return-Path: Delivered-To: svn-src-stable-9@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 32ACEB6F0BE; Wed, 8 Jun 2016 17:24:58 +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 0E3D61D4D; Wed, 8 Jun 2016 17:24:57 +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 u58HOvwV028833; Wed, 8 Jun 2016 17:24:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HOvqW028832; Wed, 8 Jun 2016 17:24:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081724.u58HOvqW028832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301652 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:24:58 -0000 Author: ngie Date: Wed Jun 8 17:24:57 2016 New Revision: 301652 URL: https://svnweb.freebsd.org/changeset/base/301652 Log: MFstable/10 r300475: MFC r299710,r299711,r299763,r299783,r299811: r299710: Staticize global variables only used in bsnmpimport.c to fix -Wmissing-variable-declarations warnings r299711: Fold two malloc + memset(.., 0, ..) calls into equivalent calloc calls r299763: Mute -Wstrlcpy-strlcat-size warning by using nitems with the size of the buffer This is a no-op as the malloc above set the size of the buffer to the size used below, but this keeps things consistent in case the malloc call changes somehow. r299783: Convert tok from enum tok to int32_t in function calls get_token(..) returns int32_t, not enum tok, and in many cases tests for items not in enum tok (e.g. '('). Make the typing consistent with get_token, which includes a domino effect of changing enum tok to int32_t. r299811: Use strdup instead of malloc + strlcpy Fix error messages on failure for calloc/strdup Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c Wed Jun 8 17:21:15 2016 (r301651) +++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c Wed Jun 8 17:24:57 2016 (r301652) @@ -140,9 +140,9 @@ struct input { LIST_ENTRY(input) link; }; -LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs); -struct input *input = NULL; -int32_t pbchar = -1; +static LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs); +static struct input *input = NULL; +static int32_t pbchar = -1; #define MAX_PATHS 100 @@ -301,18 +301,18 @@ static const struct { { NULL, 0, 0 } }; -struct { +static struct { /* Current OID type, regarding table membership. */ enum snmp_tbl_entry tbl_type; /* A pointer to a structure in table list to add to its members. */ struct snmp_index_entry *table_idx; } table_data; -struct asn_oid current_oid; -char nexttok[MAXSTR]; -u_long val; /* integer values */ -int32_t all_cond; /* all conditions are true */ -int32_t saved_token = -1; +static struct asn_oid current_oid; +static char nexttok[MAXSTR]; +static u_long val; /* integer values */ +static int32_t all_cond; /* all conditions are true */ +static int32_t saved_token = -1; /* Prepare the global data before parsing a new file. */ static void @@ -513,7 +513,7 @@ snmp_import_update_table(enum snmp_tbl_e } static int32_t -parse_enum(struct snmp_toolinfo *snmptoolctx, enum tok *tok, +parse_enum(struct snmp_toolinfo *snmptoolctx, int32_t *tok, struct enum_pairs *enums) { while ((*tok = gettoken(snmptoolctx)) == TOK_STR) { @@ -532,7 +532,7 @@ parse_enum(struct snmp_toolinfo *snmptoo } static int32_t -parse_subtype(struct snmp_toolinfo *snmptoolctx, enum tok *tok, +parse_subtype(struct snmp_toolinfo *snmptoolctx, int32_t *tok, enum snmp_tc *tc) { if ((*tok = gettoken(snmptoolctx)) != TOK_STR) { @@ -547,7 +547,7 @@ parse_subtype(struct snmp_toolinfo *snmp } static int32_t -parse_type(struct snmp_toolinfo *snmptoolctx, enum tok *tok, +parse_type(struct snmp_toolinfo *snmptoolctx, int32_t *tok, enum snmp_tc *tc, struct enum_pairs **snmp_enum) { int32_t syntax, mem; @@ -630,17 +630,15 @@ snmp_import_head(struct snmp_toolinfo *s static int32_t snmp_import_table(struct snmp_toolinfo *snmptoolctx, struct snmp_oid2str *obj) { - int32_t i; + int32_t i, tok; enum snmp_tc tc; - enum tok tok; struct snmp_index_entry *entry; - if ((entry = malloc(sizeof(struct snmp_index_entry))) == NULL) { + if ((entry = calloc(1, sizeof(struct snmp_index_entry))) == NULL) { syslog(LOG_ERR, "malloc() failed: %s", strerror(errno)); return (-1); } - memset(entry, 0, sizeof(struct snmp_index_entry)); STAILQ_INIT(&(entry->index_list)); for (i = 0, tok = gettoken(snmptoolctx); i < SNMP_INDEXES_MAX; i++) { @@ -705,7 +703,7 @@ snmp_import_table(struct snmp_toolinfo * * Read everything after the syntax type that is certainly a leaf OID info. */ static int32_t -snmp_import_leaf(struct snmp_toolinfo *snmptoolctx, enum tok *tok, +snmp_import_leaf(struct snmp_toolinfo *snmptoolctx, int32_t *tok, struct snmp_oid2str *oid2str) { int32_t i, syntax; @@ -758,25 +756,23 @@ snmp_import_object(struct snmp_toolinfo { char *string; int i; - enum tok tok; + int32_t tok; struct snmp_oid2str *oid2str; if (snmp_import_head(snmptoolctx) < 0) return (-1); - if ((oid2str = malloc(sizeof(struct snmp_oid2str))) == NULL) { - syslog(LOG_ERR, "malloc() failed: %s", strerror(errno)); + if ((oid2str = calloc(1, sizeof(struct snmp_oid2str))) == NULL) { + syslog(LOG_ERR, "calloc() failed: %s", strerror(errno)); return (-1); } - if ((string = malloc(strlen(nexttok) + 1)) == NULL) { - syslog(LOG_ERR, "malloc() failed: %s", strerror(errno)); + if ((string = strdup(nexttok)) == NULL) { + syslog(LOG_ERR, "strdup() failed: %s", strerror(errno)); free(oid2str); return (-1); } - memset(oid2str, 0, sizeof(struct snmp_oid2str)); - strlcpy(string, nexttok, strlen(nexttok) + 1); oid2str->string = string; oid2str->strlen = strlen(nexttok); @@ -857,7 +853,7 @@ error: } static int32_t -snmp_import_tree(struct snmp_toolinfo *snmptoolctx, enum tok *tok) +snmp_import_tree(struct snmp_toolinfo *snmptoolctx, int32_t *tok) { while (*tok != TOK_EOF) { switch (*tok) { @@ -883,7 +879,7 @@ snmp_import_tree(struct snmp_toolinfo *s } static int32_t -snmp_import_top(struct snmp_toolinfo *snmptoolctx, enum tok *tok) +snmp_import_top(struct snmp_toolinfo *snmptoolctx, int32_t *tok) { enum snmp_tc tc; struct enum_type *t; @@ -940,7 +936,7 @@ static int32_t snmp_import(struct snmp_toolinfo *snmptoolctx) { int i; - enum tok tok; + int32_t tok; tok = gettoken(snmptoolctx); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:29:08 2016 Return-Path: Delivered-To: svn-src-stable-9@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 73E6AB6F20F; Wed, 8 Jun 2016 17:29:08 +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 2C2CA1183; Wed, 8 Jun 2016 17:29:08 +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 u58HT7EI029239; Wed, 8 Jun 2016 17:29:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HT7pG029237; Wed, 8 Jun 2016 17:29:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081729.u58HT7pG029237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301654 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:29:08 -0000 Author: ngie Date: Wed Jun 8 17:29:07 2016 New Revision: 301654 URL: https://svnweb.freebsd.org/changeset/base/301654 Log: MFstable/10 r301653: MFC r299810: Correct function names that failed in error messages It should be calloc/strdup, not malloc Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun 8 17:27:38 2016 (r301653) +++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun 8 17:29:07 2016 (r301654) @@ -269,12 +269,12 @@ enum_pair_insert(struct enum_pairs *head struct enum_pair *e_new; if ((e_new = calloc(1, sizeof(struct enum_pair))) == NULL) { - syslog(LOG_ERR, "malloc() failed: %s", strerror(errno)); + syslog(LOG_ERR, "calloc() failed: %s", strerror(errno)); return (-1); } if ((e_new->enum_str = strdup(enum_str)) == NULL) { - syslog(LOG_ERR, "malloc() failed: %s", strerror(errno)); + syslog(LOG_ERR, "strdup() failed: %s", strerror(errno)); free(e_new); return (-1); } Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jun 8 17:27:38 2016 (r301653) +++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jun 8 17:29:07 2016 (r301654) @@ -251,12 +251,12 @@ add_filename(struct snmp_toolinfo *snmpt } if ((fstring = strdup(filename)) == NULL) { - warnx("malloc() failed - %s", strerror(errno)); + warnx("strdup() failed - %s", strerror(errno)); return (-1); } if ((entry = calloc(1, sizeof(struct fname))) == NULL) { - warnx("malloc() failed - %s", strerror(errno)); + warnx("calloc() failed - %s", strerror(errno)); free(fstring); return (-1); } From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:36:00 2016 Return-Path: Delivered-To: svn-src-stable-9@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 8D6F2B6F5D8; Wed, 8 Jun 2016 17:36:00 +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 464931E03; Wed, 8 Jun 2016 17:36:00 +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 u58HZxWh033194; Wed, 8 Jun 2016 17:35:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HZxN8033192; Wed, 8 Jun 2016 17:35:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081735.u58HZxN8033192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301659 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:36:00 -0000 Author: ngie Date: Wed Jun 8 17:35:59 2016 New Revision: 301659 URL: https://svnweb.freebsd.org/changeset/base/301659 Log: MFstable/10 r301657: MFC r299701: Move _bsnmptools_debug extern from bsnmpmap.c to bsnmptools.h It was used in bsnmpmap.c but was stored in bsnmptools.c; moving the extern to the header allows us to cover all of our bases for the variable, and allows _bsnmptools_debug to be used in the future elsewhere -- not just bsnmpmap.c. Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun 8 17:35:13 2016 (r301658) +++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun 8 17:35:59 2016 (r301659) @@ -47,7 +47,6 @@ #include "bsnmptc.h" #include "bsnmptools.h" -extern int _bsnmptools_debug; #define DEBUG if (_bsnmptools_debug) fprintf /* Allocate memory and initialize list. */ Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h Wed Jun 8 17:35:13 2016 (r301658) +++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h Wed Jun 8 17:35:59 2016 (r301659) @@ -229,7 +229,7 @@ extern struct snmp_toolinfo snmptool; #define SET_NONREP(ctx, i) (((ctx)->flags |= (((i) & 0xff) << 24))) #define GET_NONREP(ctx) (((ctx)->flags & NONREP_BITS) >> 24) - +extern int _bsnmptools_debug; extern const struct asn_oid IsoOrgDod_OID; int snmptool_init(struct snmp_toolinfo *); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:44:24 2016 Return-Path: Delivered-To: svn-src-stable-9@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 42F3BB6F9D1; Wed, 8 Jun 2016 17:44: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 02A531724; Wed, 8 Jun 2016 17:44:23 +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 u58HiN2a036987; Wed, 8 Jun 2016 17:44:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HiMvO036981; Wed, 8 Jun 2016 17:44:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081744.u58HiMvO036981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301662 - in stable/9/contrib/bsnmp: lib snmp_mibII snmp_target X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:44:24 -0000 Author: ngie Date: Wed Jun 8 17:44:22 2016 New Revision: 301662 URL: https://svnweb.freebsd.org/changeset/base/301662 Log: MFstable/10 r301661: MFC r256678,r256680,r260986,r272878,r286402: r256678 (by syrinx): Fix SNMP Error response PDUs and properly encode them when using v3 auth/encryption. r256680 (by syrinx): Fix the -Wconversion warnings produced when compiling the SNMP agent. r260986 (by harti): Fix a problem with OBJECT IDENTIFIER encoding: need to check the second subid to be less than 40, not the first when the first subid is 0 or 1. r272878 (by syrinx): Fix a bug in decoding string indexes in snmp_target(3), thus causing bsnmpd(1) to not send v3 notifications properly; while here add two missing return statements which could lead to abort() in case of a rollback r286402 (by araujo): Fix variable 'old' is used uninitialized whenever '&&' condition is false. Spotted by clang. Modified: stable/9/contrib/bsnmp/lib/asn1.c stable/9/contrib/bsnmp/lib/snmp.c stable/9/contrib/bsnmp/lib/snmp.h stable/9/contrib/bsnmp/lib/snmpagent.c stable/9/contrib/bsnmp/snmp_mibII/mibII_ip.c stable/9/contrib/bsnmp/snmp_target/target_snmp.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) stable/9/contrib/bsnmp/snmp_mibII/ (props changed) Modified: stable/9/contrib/bsnmp/lib/asn1.c ============================================================================== --- stable/9/contrib/bsnmp/lib/asn1.c Wed Jun 8 17:43:04 2016 (r301661) +++ stable/9/contrib/bsnmp/lib/asn1.c Wed Jun 8 17:44:22 2016 (r301662) @@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s err = ASN_ERR_RANGE; } if (oid->subs[0] > 2 || - (oid->subs[0] < 2 && oid->subs[0] >= 40)) { + (oid->subs[0] < 2 && oid->subs[1] >= 40)) { asn_error(NULL, "oid out of range (%u,%u)", oid->subs[0], oid->subs[1]); err = ASN_ERR_RANGE; Modified: stable/9/contrib/bsnmp/lib/snmp.c ============================================================================== --- stable/9/contrib/bsnmp/lib/snmp.c Wed Jun 8 17:43:04 2016 (r301661) +++ stable/9/contrib/bsnmp/lib/snmp.c Wed Jun 8 17:44:22 2016 (r301662) @@ -288,11 +288,13 @@ parse_secparams(struct asn_buf *b, struc memset(buf, 0, 256); tb.asn_ptr = buf; tb.asn_len = 256; + u_int len; - if (asn_get_octetstring(b, buf, &tb.asn_len) != ASN_ERR_OK) { + if (asn_get_octetstring(b, buf, &len) != ASN_ERR_OK) { snmp_error("cannot parse usm header"); return (ASN_ERR_FAILED); } + tb.asn_len = len; if (asn_get_sequence(&tb, &octs_len) != ASN_ERR_OK) { snmp_error("cannot decode usm header"); @@ -864,7 +866,7 @@ snmp_fix_encoding(struct asn_buf *b, str return (SNMP_CODE_FAILED); pdu->scoped_len = b->asn_ptr - pdu->scoped_ptr; - if ((code = snmp_pdu_fix_padd(b, pdu))!= ASN_ERR_OK) + if (snmp_pdu_fix_padd(b, pdu) != ASN_ERR_OK) return (SNMP_CODE_FAILED); if (pdu->security_model != SNMP_SECMODEL_USM) @@ -997,7 +999,7 @@ snmp_pdu_encode(struct snmp_pdu *pdu, st if ((err = snmp_pdu_encode_header(resp_b, pdu)) != SNMP_CODE_OK) return (err); for (idx = 0; idx < pdu->nbindings; idx++) - if ((err = snmp_binding_encode(resp_b, &pdu->bindings[idx])) + if (snmp_binding_encode(resp_b, &pdu->bindings[idx]) != ASN_ERR_OK) return (SNMP_CODE_FAILED); Modified: stable/9/contrib/bsnmp/lib/snmp.h ============================================================================== --- stable/9/contrib/bsnmp/lib/snmp.h Wed Jun 8 17:43:04 2016 (r301661) +++ stable/9/contrib/bsnmp/lib/snmp.h Wed Jun 8 17:44:22 2016 (r301662) @@ -182,7 +182,7 @@ struct snmp_pdu { /* fixes for encoding */ size_t outer_len; - size_t scoped_len; + asn_len_t scoped_len; u_char *outer_ptr; u_char *digest_ptr; u_char *encrypted_ptr; Modified: stable/9/contrib/bsnmp/lib/snmpagent.c ============================================================================== --- stable/9/contrib/bsnmp/lib/snmpagent.c Wed Jun 8 17:43:04 2016 (r301661) +++ stable/9/contrib/bsnmp/lib/snmpagent.c Wed Jun 8 17:44:22 2016 (r301662) @@ -166,7 +166,7 @@ find_subnode(const struct snmp_value *va } static void -snmp_pdu_create_response(struct snmp_pdu *pdu, struct snmp_pdu *resp) +snmp_pdu_create_response(const struct snmp_pdu *pdu, struct snmp_pdu *resp) { memset(resp, 0, sizeof(*resp)); strcpy(resp->community, pdu->community); @@ -276,7 +276,12 @@ snmp_get(struct snmp_pdu *pdu, struct as } } - return (snmp_fix_encoding(resp_b, resp)); + if (snmp_fix_encoding(resp_b, resp) != SNMP_CODE_OK) { + snmp_debug("get: failed to encode PDU"); + return (SNMP_RET_ERR); + } + + return (SNMP_RET_OK); } static struct snmp_node * @@ -438,7 +443,13 @@ snmp_getnext(struct snmp_pdu *pdu, struc return (SNMP_RET_ERR); } } - return (snmp_fix_encoding(resp_b, resp)); + + if (snmp_fix_encoding(resp_b, resp) != SNMP_CODE_OK) { + snmp_debug("getnext: failed to encode PDU"); + return (SNMP_RET_ERR); + } + + return (SNMP_RET_OK); } enum snmp_ret @@ -542,7 +553,12 @@ snmp_getbulk(struct snmp_pdu *pdu, struc } done: - return (snmp_fix_encoding(resp_b, resp)); + if (snmp_fix_encoding(resp_b, resp) != SNMP_CODE_OK) { + snmp_debug("getnext: failed to encode PDU"); + return (SNMP_RET_ERR); + } + + return (SNMP_RET_OK); } /* @@ -957,18 +973,57 @@ enum snmp_ret snmp_make_errresp(const struct snmp_pdu *pdu, struct asn_buf *pdu_b, struct asn_buf *resp_b) { + u_char type; asn_len_t len; struct snmp_pdu resp; enum asn_err err; enum snmp_code code; - memset(&resp, 0, sizeof(resp)); + snmp_pdu_create_response(pdu, &resp); + if ((code = snmp_pdu_decode_header(pdu_b, &resp)) != SNMP_CODE_OK) return (SNMP_RET_IGN); - if (pdu_b->asn_len < len) + if (pdu->version == SNMP_V3) { + if (resp.user.priv_proto != SNMP_PRIV_NOPRIV && + (asn_get_header(pdu_b, &type, &resp.scoped_len) != ASN_ERR_OK + || type != ASN_TYPE_OCTETSTRING)) { + snmp_error("cannot decode encrypted pdu"); + return (SNMP_RET_IGN); + } + + if (asn_get_sequence(pdu_b, &len) != ASN_ERR_OK) { + snmp_error("cannot decode scoped pdu header"); + return (SNMP_RET_IGN); + } + + len = SNMP_ENGINE_ID_SIZ; + if (asn_get_octetstring(pdu_b, (u_char *)resp.context_engine, + &len) != ASN_ERR_OK) { + snmp_error("cannot decode msg context engine"); + return (SNMP_RET_IGN); + } + resp.context_engine_len = len; + len = SNMP_CONTEXT_NAME_SIZ; + if (asn_get_octetstring(pdu_b, (u_char *)resp.context_name, + &len) != ASN_ERR_OK) { + snmp_error("cannot decode msg context name"); + return (SNMP_RET_IGN); + } + resp.context_name[len] = '\0'; + } + + + if (asn_get_header(pdu_b, &type, &len) != ASN_ERR_OK) { + snmp_error("cannot get pdu header"); return (SNMP_RET_IGN); - pdu_b->asn_len = len; + } + + if ((type & ~ASN_TYPE_MASK) != + (ASN_TYPE_CONSTRUCTED | ASN_CLASS_CONTEXT)) { + snmp_error("bad pdu header tag"); + return (SNMP_RET_IGN); + } err = snmp_parse_pdus_hdr(pdu_b, &resp, &len); if (ASN_ERR_STOPPED(err)) Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII_ip.c ============================================================================== --- stable/9/contrib/bsnmp/snmp_mibII/mibII_ip.c Wed Jun 8 17:43:04 2016 (r301661) +++ stable/9/contrib/bsnmp/snmp_mibII/mibII_ip.c Wed Jun 8 17:44:22 2016 (r301662) @@ -151,7 +151,7 @@ int op_ip(struct snmp_context *ctx, struct snmp_value *value, u_int sub, u_int idx __unused, enum snmp_op op) { - int old; + int old = 0; switch (op) { Modified: stable/9/contrib/bsnmp/snmp_target/target_snmp.c ============================================================================== --- stable/9/contrib/bsnmp/snmp_target/target_snmp.c Wed Jun 8 17:43:04 2016 (r301661) +++ stable/9/contrib/bsnmp/snmp_target/target_snmp.c Wed Jun 8 17:44:22 2016 (r301662) @@ -301,6 +301,7 @@ op_snmp_target_addrs(struct snmp_context default: break; } + return (SNMP_ERR_NOERROR); default: abort(); @@ -625,6 +626,7 @@ op_snmp_notify(struct snmp_context *ctx default: break; } + return (SNMP_ERR_NOERROR); default: abort(); @@ -663,13 +665,14 @@ target_append_index(struct asn_oid *oid, static int target_decode_index(const struct asn_oid *oid, uint sub, char *name) { - uint32_t i, len; + uint32_t i; - if ((len = oid->len - sub) >= SNMP_ADM_STR32_SIZ) + if (oid->len - sub != oid->subs[sub] + 1 || oid->subs[sub] >= + SNMP_ADM_STR32_SIZ) return (-1); - for (i = 0; i < len; i++) - name[i] = oid->subs[sub + i]; + for (i = 0; i < oid->subs[sub]; i++) + name[i] = oid->subs[sub + i + 1]; name[i] = '\0'; return (0); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 17:50:53 2016 Return-Path: Delivered-To: svn-src-stable-9@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 4B522B6FC10; Wed, 8 Jun 2016 17:50:53 +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 2369D1BC2; Wed, 8 Jun 2016 17:50:53 +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 u58Hoqau037415; Wed, 8 Jun 2016 17:50:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58HopMR037411; Wed, 8 Jun 2016 17:50:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081750.u58HopMR037411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 17:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301664 - in stable/9/contrib/bsnmp: snmp_mibII snmpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:50:53 -0000 Author: ngie Date: Wed Jun 8 17:50:51 2016 New Revision: 301664 URL: https://svnweb.freebsd.org/changeset/base/301664 Log: MFstable/10 r301663: MFC r294507,r294567,r299466: r294507 (by harti): Fill the ifAlias leaf of the ifXTable with the interface description if there is one available and it fits into the maximum size (64 characters). r294567 (by bz): Change the variable to a #define in order to make gcc happy which otherwise will complain about "variably modified 'alias' at file scope". Unbreaks the build on gcc platforms. r299466 (by cem): bsnmpd: Fix size of trapsink::comm to match other community arrays This fixes a number of possible strcpy() buffer overruns between the various community strings in trap.c. CIDs: 1006820, 1006821, 1006822 Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII.c stable/9/contrib/bsnmp/snmp_mibII/mibII.h stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c stable/9/contrib/bsnmp/snmpd/snmpd.h Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) stable/9/contrib/bsnmp/snmp_mibII/ (props changed) Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- stable/9/contrib/bsnmp/snmp_mibII/mibII.c Wed Jun 8 17:49:03 2016 (r301663) +++ stable/9/contrib/bsnmp/snmp_mibII/mibII.c Wed Jun 8 17:50:51 2016 (r301664) @@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp) size_t len; void *newmib; struct ifmibdata oldmib = ifp->mib; + struct ifreq irr; if (fetch_generic_mib(ifp, &oldmib) == -1) return (-1); @@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp) } out: + strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name)); + irr.ifr_buffer.buffer = MIBIF_PRIV(ifp)->alias; + irr.ifr_buffer.length = sizeof(MIBIF_PRIV(ifp)->alias); + if (ioctl(mib_netsock, SIOCGIFDESCR, &irr) == -1) { + MIBIF_PRIV(ifp)->alias[0] = 0; + if (errno != ENOMSG) + syslog(LOG_WARNING, "SIOCGIFDESCR (%s): %m", ifp->name); + } else if (irr.ifr_buffer.buffer == NULL) { + MIBIF_PRIV(ifp)->alias[0] = 0; + syslog(LOG_WARNING, "SIOCGIFDESCR (%s): too long (%zu)", + ifp->name, irr.ifr_buffer.length); + } ifp->mibtick = get_ticks(); return (0); } Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII.h ============================================================================== --- stable/9/contrib/bsnmp/snmp_mibII/mibII.h Wed Jun 8 17:49:03 2016 (r301663) +++ stable/9/contrib/bsnmp/snmp_mibII/mibII.h Wed Jun 8 17:50:51 2016 (r301664) @@ -56,6 +56,9 @@ #include "snmp_mibII.h" #include "mibII_tree.h" +/* maximum size of the interface alias */ +#define MIBIF_ALIAS_SIZE (64 + 1) + /* * Interface list and flags. */ @@ -76,6 +79,9 @@ struct mibif_private { uint64_t hc_opackets; uint64_t hc_imcasts; uint64_t hc_ipackets; + + /* this should be made public */ + char alias[MIBIF_ALIAS_SIZE]; }; #define MIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private)) Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c ============================================================================== --- stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Wed Jun 8 17:49:03 2016 (r301663) +++ stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Wed Jun 8 17:50:51 2016 (r301664) @@ -528,7 +528,7 @@ op_ifxtable(struct snmp_context *ctx, st break; case LEAF_ifAlias: - ret = string_get(value, "", -1); + ret = string_get(value, MIBIF_PRIV(ifp)->alias, -1); break; case LEAF_ifCounterDiscontinuityTime: Modified: stable/9/contrib/bsnmp/snmpd/snmpd.h ============================================================================== --- stable/9/contrib/bsnmp/snmpd/snmpd.h Wed Jun 8 17:49:03 2016 (r301663) +++ stable/9/contrib/bsnmp/snmpd/snmpd.h Wed Jun 8 17:50:51 2016 (r301664) @@ -307,7 +307,7 @@ struct trapsink { struct asn_oid index; u_int status; int socket; - u_char comm[SNMP_COMMUNITY_MAXLEN]; + u_char comm[SNMP_COMMUNITY_MAXLEN + 1]; int version; }; enum { From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:00:08 2016 Return-Path: Delivered-To: svn-src-stable-9@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 B7AA6B6FEF6; Wed, 8 Jun 2016 18:00:08 +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 8995A145E; Wed, 8 Jun 2016 18:00:08 +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 u58I07mZ041403; Wed, 8 Jun 2016 18:00:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58I07ve041402; Wed, 8 Jun 2016 18:00:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081800.u58I07ve041402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301668 - stable/9/contrib/bsnmp/snmpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:00:08 -0000 Author: ngie Date: Wed Jun 8 18:00:07 2016 New Revision: 301668 URL: https://svnweb.freebsd.org/changeset/base/301668 Log: MFstable/10 r301667: MFC r299834: Fix .Dd Today is the 14th, not the 10th of May Modified: stable/9/contrib/bsnmp/snmpd/bsnmpd.1 Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) Modified: stable/9/contrib/bsnmp/snmpd/bsnmpd.1 ============================================================================== --- stable/9/contrib/bsnmp/snmpd/bsnmpd.1 Wed Jun 8 17:59:21 2016 (r301667) +++ stable/9/contrib/bsnmp/snmpd/bsnmpd.1 Wed Jun 8 18:00:07 2016 (r301668) @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $ .\" -.Dd May 10, 2016 +.Dd May 14, 2016 .Dt BSNMPD 1 .Os .Sh NAME From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:07:52 2016 Return-Path: Delivered-To: svn-src-stable-9@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 D0996B6F12E; Wed, 8 Jun 2016 18:07:52 +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 A17D01BCB; Wed, 8 Jun 2016 18:07:52 +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 u58I7pMC045137; Wed, 8 Jun 2016 18:07:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58I7pTB045136; Wed, 8 Jun 2016 18:07:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081807.u58I7pTB045136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301670 - stable/9/usr.sbin/bsnmpd/tools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:07:52 -0000 Author: ngie Date: Wed Jun 8 18:07:51 2016 New Revision: 301670 URL: https://svnweb.freebsd.org/changeset/base/301670 Log: MFstable/10 r301669: MFC r299806: Bump WARNS to 6 Modified: stable/9/usr.sbin/bsnmpd/tools/Makefile.inc Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/tools/Makefile.inc ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/Makefile.inc Wed Jun 8 18:05:52 2016 (r301669) +++ stable/9/usr.sbin/bsnmpd/tools/Makefile.inc Wed Jun 8 18:07:51 2016 (r301670) @@ -11,3 +11,5 @@ LIBBSNMPTOOLSDIR= ${.OBJDIR}/../lib LIBBSNMPTOOLSDIR= ${.CURDIR}/../libbsnmptools .endif LIBBSNMPTOOLS= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a + +WARNS?= 6 From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:09:41 2016 Return-Path: Delivered-To: svn-src-stable-9@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 C3DF3B6F229; Wed, 8 Jun 2016 18:09:41 +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 951AC1EAC; Wed, 8 Jun 2016 18:09:41 +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 u58I9eKV045317; Wed, 8 Jun 2016 18:09:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58I9egU045316; Wed, 8 Jun 2016 18:09:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081809.u58I9egU045316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301672 - stable/9/usr.sbin/bsnmpd/modules/snmp_mibII X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:09:41 -0000 Author: ngie Date: Wed Jun 8 18:09:40 2016 New Revision: 301672 URL: https://svnweb.freebsd.org/changeset/base/301672 Log: MFstable/10 r301671: MFC r299815: Remove NO_WERROR.clang from this Makefile This compiles with clang without warnings Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Wed Jun 8 18:08:06 2016 (r301671) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Wed Jun 8 18:09:40 2016 (r301672) @@ -15,8 +15,6 @@ MAN= snmp_mibII.3 CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd CFLAGS+= -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY -DHAVE_SYS_TREE_H -# XXX Work around clang warning, until maintainer approves fix. -NO_WERROR.clang= DEFS= ${MOD}_tree.def INCS= snmp_${MOD}.h From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:15:14 2016 Return-Path: Delivered-To: svn-src-stable-9@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 EDA74B6F6F2; Wed, 8 Jun 2016 18:15:14 +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 BAF9E166A; Wed, 8 Jun 2016 18:15:14 +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 u58IFDEB049230; Wed, 8 Jun 2016 18:15:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58IFDs0049229; Wed, 8 Jun 2016 18:15:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081815.u58IFDs0049229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301674 - stable/9/lib/libbsnmp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:15:15 -0000 Author: ngie Date: Wed Jun 8 18:15:13 2016 New Revision: 301674 URL: https://svnweb.freebsd.org/changeset/base/301674 Log: MFstable/10 r301673: MFC r299699: Remove NO_WERROR from libbsnmp/Makefile.inc This has been compiling without warnings with clang/gcc for a while now Tested with: clang 3.8.0, gcc 4.2.x, gcc 5.x Modified: stable/9/lib/libbsnmp/Makefile.inc Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) Modified: stable/9/lib/libbsnmp/Makefile.inc ============================================================================== --- stable/9/lib/libbsnmp/Makefile.inc Wed Jun 8 18:14:06 2016 (r301673) +++ stable/9/lib/libbsnmp/Makefile.inc Wed Jun 8 18:15:13 2016 (r301674) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_WERROR= INCSDIR= ${INCLUDEDIR}/bsnmp .include "../Makefile.inc" From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:16:35 2016 Return-Path: Delivered-To: svn-src-stable-9@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 CC72CB6F814; Wed, 8 Jun 2016 18:16:35 +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 9DF7519BD; Wed, 8 Jun 2016 18:16:35 +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 u58IGYiQ049417; Wed, 8 Jun 2016 18:16:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58IGYDm049416; Wed, 8 Jun 2016 18:16:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081816.u58IGYDm049416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301676 - stable/9/contrib/top X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:16:35 -0000 Author: ngie Date: Wed Jun 8 18:16:34 2016 New Revision: 301676 URL: https://svnweb.freebsd.org/changeset/base/301676 Log: MFstable/10 r301675: MFC r300714: The readme provides a high-level overview of how to upgrade top(1). Reviewed By: ngie Added: stable/9/contrib/top/FREEBSD-upgrade - copied unchanged from r301675, stable/10/contrib/top/FREEBSD-upgrade Modified: Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/top/ (props changed) Copied: stable/9/contrib/top/FREEBSD-upgrade (from r301675, stable/10/contrib/top/FREEBSD-upgrade) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/top/FREEBSD-upgrade Wed Jun 8 18:16:34 2016 (r301676, copy of r301675, stable/10/contrib/top/FREEBSD-upgrade) @@ -0,0 +1,22 @@ +$FreeBSD$ + +This file contains notes regarding the upgrade of top(1). See the vendor +import instructions at: + + https://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html#svn-advanced-use-vendor-imports + +The upstream project pages for top(1) are: + + http://www.unixtop.org/ + + https://sourceforge.net/projects/unixtop/ + +contrib/top/machine.h specifies an interface that must be provided by the +target OS. That interface is implemented in usr.bin/top/machine.c + +To enable building on case-insensitive filesystems, the following files were +renamed: + + contrib/top/top.X -> contrib/top/top.xs + contrib/top/top.local.H -> contrib/top/top.local.hs + From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:23:34 2016 Return-Path: Delivered-To: svn-src-stable-9@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 B8726B6FBD4; Wed, 8 Jun 2016 18:23:34 +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 8A693142F; Wed, 8 Jun 2016 18:23:34 +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 u58INXSu053445; Wed, 8 Jun 2016 18:23:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58INXvL053444; Wed, 8 Jun 2016 18:23:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081823.u58INXvL053444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301681 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:23:34 -0000 Author: ngie Date: Wed Jun 8 18:23:33 2016 New Revision: 301681 URL: https://svnweb.freebsd.org/changeset/base/301681 Log: MFstable/10 r301680: MFC r300625: Remove unnecessary memset(.., 0, ..)'s The mem_alloc macro calls calloc (userspace) / malloc(.., M_WAITOK|M_ZERO) under the covers, so zeroing out memory is already handled by the underlying calls Modified: stable/9/sys/rpc/svc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Wed Jun 8 18:22:54 2016 (r301680) +++ stable/9/sys/rpc/svc.c Wed Jun 8 18:23:33 2016 (r301681) @@ -848,9 +848,7 @@ svc_xprt_alloc() SVCXPRT_EXT *ext; xprt = mem_alloc(sizeof(SVCXPRT)); - memset(xprt, 0, sizeof(SVCXPRT)); ext = mem_alloc(sizeof(SVCXPRT_EXT)); - memset(ext, 0, sizeof(SVCXPRT_EXT)); xprt->xp_p3 = ext; refcount_init(&xprt->xp_refs, 1); From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:43:12 2016 Return-Path: Delivered-To: svn-src-stable-9@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 5E9FBB6F40D; Wed, 8 Jun 2016 18:43: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 2F96F17B5; Wed, 8 Jun 2016 18:43:12 +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 u58IhBaP060971; Wed, 8 Jun 2016 18:43:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58IhBRG060970; Wed, 8 Jun 2016 18:43:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081843.u58IhBRG060970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301685 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:43:12 -0000 Author: ngie Date: Wed Jun 8 18:43:11 2016 New Revision: 301685 URL: https://svnweb.freebsd.org/changeset/base/301685 Log: MFstable/10 r301682: MFC r300386: Don't leak `handle` if svc_tp_create(..) succeeds and allocating a new struct xlist object fails CID: 978277 Modified: stable/9/lib/libc/rpc/svc_generic.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/svc_generic.c ============================================================================== --- stable/9/lib/libc/rpc/svc_generic.c Wed Jun 8 18:41:49 2016 (r301684) +++ stable/9/lib/libc/rpc/svc_generic.c Wed Jun 8 18:43:11 2016 (r301685) @@ -121,7 +121,8 @@ svc_create(dispatch, prognum, versnum, n if (l == NULL) { warnx("svc_create: no memory"); mutex_unlock(&xprtlist_lock); - return (0); + num = 0; + goto done; } l->xprt = xprt; l->next = xprtlist; @@ -131,6 +132,7 @@ svc_create(dispatch, prognum, versnum, n } mutex_unlock(&xprtlist_lock); } +done: __rpc_endconf(handle); /* * In case of num == 0; the error messages are generated by the From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:43:57 2016 Return-Path: Delivered-To: svn-src-stable-9@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 53068B6F49D; Wed, 8 Jun 2016 18:43:57 +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 1EB0219B2; Wed, 8 Jun 2016 18:43:57 +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 u58Ihug4061054; Wed, 8 Jun 2016 18:43:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58Ihu1j061053; Wed, 8 Jun 2016 18:43:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081843.u58Ihu1j061053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301686 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:43:57 -0000 Author: ngie Date: Wed Jun 8 18:43:56 2016 New Revision: 301686 URL: https://svnweb.freebsd.org/changeset/base/301686 Log: MFstable/10 r301684: MFC r300385: Don't leak `tmp` if `p->nc_lookups` can't be malloced Modified: stable/9/lib/libc/rpc/getnetconfig.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/9/lib/libc/rpc/getnetconfig.c Wed Jun 8 18:43:11 2016 (r301685) +++ stable/9/lib/libc/rpc/getnetconfig.c Wed Jun 8 18:43:56 2016 (r301686) @@ -727,6 +727,7 @@ struct netconfig *ncp; if (p->nc_lookups == NULL) { free(p->nc_netid); free(p); + free(tmp); return(NULL); } for (i=0; i < p->nc_nlookups; i++) { From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:47:01 2016 Return-Path: Delivered-To: svn-src-stable-9@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 5BA00B6F5A8; Wed, 8 Jun 2016 18:47:01 +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 2B1851CC1; Wed, 8 Jun 2016 18:47:01 +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 u58Il0iY061330; Wed, 8 Jun 2016 18:47:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58Il02l061329; Wed, 8 Jun 2016 18:47:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081847.u58Il02l061329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301688 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:47:01 -0000 Author: ngie Date: Wed Jun 8 18:47:00 2016 New Revision: 301688 URL: https://svnweb.freebsd.org/changeset/base/301688 Log: MFstable/10 r301687: MFC r300624: Fix up r300385 I accidentally glossed over the fact that tmp is manipulated via strchr, so if we tried to free `tmp` after r300385, it would have crashed. Create a separate pointer (tmp2) to track the original allocation of `tmp`, and free `tmp2` if `p->nc_lookups` can't be malloced CID: 1356026 Modified: stable/9/lib/libc/rpc/getnetconfig.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/getnetconfig.c ============================================================================== --- stable/9/lib/libc/rpc/getnetconfig.c Wed Jun 8 18:46:10 2016 (r301687) +++ stable/9/lib/libc/rpc/getnetconfig.c Wed Jun 8 18:47:00 2016 (r301688) @@ -697,7 +697,7 @@ dup_ncp(ncp) struct netconfig *ncp; { struct netconfig *p; - char *tmp; + char *tmp, *tmp2; u_int i; if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL) @@ -706,6 +706,7 @@ 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 @@ -727,7 +728,7 @@ struct netconfig *ncp; if (p->nc_lookups == NULL) { free(p->nc_netid); free(p); - free(tmp); + free(tmp2); return(NULL); } for (i=0; i < p->nc_nlookups; i++) { From owner-svn-src-stable-9@freebsd.org Wed Jun 8 18:51:06 2016 Return-Path: Delivered-To: svn-src-stable-9@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 CC25CB6F684; Wed, 8 Jun 2016 18:51:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6441EC0; Wed, 8 Jun 2016 18:51:05 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id AiZ6b7cGiN9d0AiZ7bMtkt; Wed, 08 Jun 2016 12:50:58 -0600 X-Authority-Analysis: v=2.2 cv=QZUkhYTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=pD_ry4oyNxEA:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=2vG8vXjW7PKQqCZgPe0A:9 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5CEF213751; Wed, 8 Jun 2016 11:50:56 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u58IotT0022829; Wed, 8 Jun 2016 11:50:55 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201606081850.u58IotT0022829@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Garrett Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r301681 - stable/9/sys/rpc In-Reply-To: Message from Garrett Cooper of "Wed, 08 Jun 2016 18:23:33 -0000." <201606081823.u58INXvL053444@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 08 Jun 2016 11:50:55 -0700 X-CMAE-Envelope: MS4wfLkGcghhioN3ch2uo+lkjjcBeKz7bz4NIEfL2bLYdnUVguekJu+w4vx0jEzKuc1VFWGhKUASfrTvVG1srnpahRzRcxEHNuydy2Nufcxb3BJcno5X/D+S NDbB6X0SbXPO7C+AmSkxGW+69sucfBXvFN0RdTXpzsqaQwzL2xU4Y1GZ2F2JK6PiONbxjfKjZWhdip0UyigcgpQJarcwAOPWBubaE5LEF28USxLKRuwVpdYH DTCHJQKX7m5g/8uMf/PTEOrXNFboB53D8SY5lGIxi4+S4cAbnzpvGJ5unokR2wjM/zw+kLmHsv7BdNxuqMRJwQ08BDOEIzvY+IGfFHx3rUY= X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:51:06 -0000 In message <201606081823.u58INXvL053444@repo.freebsd.org>, Garrett Cooper write s: > Author: ngie > Date: Wed Jun 8 18:23:33 2016 > New Revision: 301681 > URL: https://svnweb.freebsd.org/changeset/base/301681 > > Log: > MFstable/10 r301680: > > MFC r300625: Why MFC to stable/10 and then to stable/9. Doesn't that make stable/10 stable/9's ancestor? When stable/9 was first branched,HEAD was its ancestor. Doesn't this cause confusing ancestry in the branch? -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-stable-9@freebsd.org Wed Jun 8 19:03:44 2016 Return-Path: Delivered-To: svn-src-stable-9@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 EEFE0B6FA50; Wed, 8 Jun 2016 19:03:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (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 B10B41860; Wed, 8 Jun 2016 19:03:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x22f.google.com with SMTP id a5so18374970ita.1; Wed, 08 Jun 2016 12:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=rY2gUYBLgGoqVQ8NtgrEkrTYkVW+hlB6sNlRTDqEmQ4=; b=cOdKKQhg4JdfF6OnnX67QjTCGMdsZFwnVzhFA3Zm/RBrK11TEk09MpI9pZhUP/LXwY lvLbHkAumEjbX6dgASmEBRqJ1a8eJwgcq/3P/lIWXR7ltx/sns5GY1y8PNsIv2aTrmXs riXZTvsY9ufzqg1sQL0qLsbe4Y0DgOKfmfTv/FmR7rfsXPOBXOcTfDQDSxqbZOHxwrZi 0i+5ByHgREM4+8Tq3GXCZfUwttkcZbx8/a0shCPyTbCsDhOs9rnC27DDu5Ngjwnxr/ep q0+H8UA4Jy/SIkEuzEAUSaqnOIrmcXAGY1lYnOQLP3afxo+C8+Z6Sn0OJ1rO65/NPvTW UDiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=rY2gUYBLgGoqVQ8NtgrEkrTYkVW+hlB6sNlRTDqEmQ4=; b=MWxwIc8e+xPP0UKbAKvEudYouysBApoMZvK30vY4GZZ0+68f6g0dmi65IACpNoQzw4 +qokyIyw+BtmIGCl7F9Dm4S2SxrFpMJTI3/0d2W5FlicSgNWb+IvonzazqoY+H/oiD58 adkfw09qMThCigenskZVidHq3hW+kyKkWL9Hm4pHgZby4RuFFA/esbLTfj7SnlMb7JhV P3RFr437HwSZfjTIkLTk8gPNa/+1K7UlH9a8XBHV36wZXHocVtQA7TmRxjItxL6sbaic LB/j+5oyb7pXjM5nLeEkqBtzZ/w0hqasp4BqSW2xj/hujUWWxKAIyCooZZ9hDZJqhYOm QQzQ== X-Gm-Message-State: ALyK8tKJZ+UpyzlNhHKFgxCsyWlwGfwS3mTURlLPC3pU2rT+Kp/uEbtxioJ4Qh2rznkOZQ== X-Received: by 10.36.69.216 with SMTP id c85mr15152521itd.75.1465412623970; Wed, 08 Jun 2016 12:03:43 -0700 (PDT) Received: from [10.65.210.108] ([137.122.64.8]) by smtp.gmail.com with ESMTPSA id o127sm1364159ith.7.2016.06.08.12.03.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Jun 2016 12:03:43 -0700 (PDT) Subject: Re: svn commit: r301681 - stable/9/sys/rpc Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E2FD5B9F-B5F2-4190-AF23-7486FD515491"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201606081850.u58IotT0022829@slippy.cwsent.com> Date: Wed, 8 Jun 2016 15:03:41 -0400 Cc: Garrett Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Message-Id: <0DFEB3AC-B864-47B5-8261-83E68989385A@gmail.com> References: <201606081850.u58IotT0022829@slippy.cwsent.com> To: Cy Schubert X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 19:03:45 -0000 --Apple-Mail=_E2FD5B9F-B5F2-4190-AF23-7486FD515491 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 8, 2016, at 14:50, Cy Schubert = wrote: >=20 > In message <201606081823.u58INXvL053444@repo.freebsd.org>, Garrett = Cooper > write > s: >> Author: ngie >> Date: Wed Jun 8 18:23:33 2016 >> New Revision: 301681 >> URL: https://svnweb.freebsd.org/changeset/base/301681 >>=20 >> Log: >> MFstable/10 r301680: >>=20 >> MFC r300625: >=20 > Why MFC to stable/10 and then to stable/9. Doesn't that make stable/10 > stable/9's ancestor? When stable/9 was first branched,HEAD was its > ancestor. Doesn't this cause confusing ancestry in the branch? Good question! Yes; it makes ^/stable/10 ^/stable/9=E2=80=99s ancestor for changes from = ^/head, even though the ancestry was the other way around (^/stable/9 is = ^/stable/10=E2=80=99s ancestor, chronologically=E2=80=A6 but = content-wise ^/stable/9 is a subset really of everything in ^/stable/10 = and ^/head). There have been a few discussions about this on the = developer=E2=80=99s list, and the general consensus was a trickle down = method, i.e. =E2=80=9Cmerge from head to head-1; merge from head-1 to = head-2; etc=E2=80=9D. There=E2=80=99s some minor disagreement on content in the MFC messages, = but the way I have things right now is the preferred format AFAIK, i.e. = less people have nitpicked the messages, content-wise. After I fix the small formatting annoyance with my MFCs vs others, I was = thinking of putting out the scripts I use for CR; it would be nice for = everyone to be using the same tools. Thanks! -Ngie --Apple-Mail=_E2FD5B9F-B5F2-4190-AF23-7486FD515491 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXWGwNAAoJEPWDqSZpMIYVUk4P/RfKlkREJILEM5Q/njQbabPk eSDQw0I+8EYkfGPxbd1E15CXE44R2424gck0r4mdFm11Pm2puGIuC+4aipuggMV+ 3MN7nZgQAstIRZHUGII9TSTFyWpE8zvbkZuOkl75YlHTd0U0bj7gCuMyXrA7+ub0 NxSFm22OeqSayeysd2aut4UUCgD6gm7Pde36fZG/ZebVOLz+WEIVzklkOSpiE7X6 UfvH0qoW4WarnhNC6mTnc7fFH1RYvThRNxS5diqvVzUsCjFiOfvr6ifmHlT+p2b+ 7qxd5mQiSN8QbnEMmwIBYFaZgHFC8z5bQaMBO5R1KaKXkxO5oBfHAqI+77bfJNXy eDNIRR+Cwwebxzpg4NEexnnAfUOJC1A6UOxvHzr578+QVfWPlYd1l8o2m2u6641R nFC037FiHvUuf0frQk1r7c4ftNsoo+9qwv9u1ldTue+Yha5VAQI8/kpBZFVo5U7U 4d9k7kPnrI+3ly5lOHA8B3kxRvvxR1VYiQemKI3iyX3qZ7IkU9XtncR0hXZbxOin txjyHFsHHTqwE/2jZMLEOqzoBSyGdlqOXc2LC1NeCEHJiJMFrq3OyGxni4Lv41uh yX0IYFGR5AtNKCPhxqh2CxmQ34K8WQPgLmQgno044FKHRgknlZ38Z3FJH7hxlJt6 ZulGKhQqDq0x5bEy71Nh =RdbN -----END PGP SIGNATURE----- --Apple-Mail=_E2FD5B9F-B5F2-4190-AF23-7486FD515491-- From owner-svn-src-stable-9@freebsd.org Wed Jun 8 19:31:13 2016 Return-Path: Delivered-To: svn-src-stable-9@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 48FDAB70812; Wed, 8 Jun 2016 19:31:13 +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 1A1461F3B; Wed, 8 Jun 2016 19:31:13 +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 u58JVCxS076809; Wed, 8 Jun 2016 19:31:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58JVCBG076808; Wed, 8 Jun 2016 19:31:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081931.u58JVCBG076808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 19:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301690 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 19:31:13 -0000 Author: ngie Date: Wed Jun 8 19:31:12 2016 New Revision: 301690 URL: https://svnweb.freebsd.org/changeset/base/301690 Log: MFstable/10 r301655: MFC r299766: Fix logically dead code pointed out by clang/Coverity parse_context, parse_user_security: test for validity of results from parse_ascii(..) with by casting to int32_t and comparing to -1; comparing unsigned types to negative values will always be false. CID: 1011432, 1011433 Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jun 8 19:24:48 2016 (r301689) +++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jun 8 19:31:12 2016 (r301690) @@ -614,8 +614,8 @@ parse_context(struct snmp_toolinfo *snmp warnx("Suboption 'context-engine' - no argument"); return (-1); } - if ((snmp_client.clen = parse_ascii(val, - snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) < 0) { + if ((int32_t)(snmp_client.clen = parse_ascii(val, + snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) == -1) { warnx("Bad EngineID - %s", val); return (-1); } @@ -653,7 +653,7 @@ parse_user_security(struct snmp_toolinfo } snmp_client.engine.engine_len = parse_ascii(val, snmp_client.engine.engine_id, SNMP_ENGINE_ID_SIZ); - if (snmp_client.engine.engine_len < 0) { + if ((int32_t)snmp_client.engine.engine_len == -1) { warnx("Bad EngineID - %s", val); return (-1); } From owner-svn-src-stable-9@freebsd.org Wed Jun 8 22:28:58 2016 Return-Path: Delivered-To: svn-src-stable-9@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 97085B6F01B; Wed, 8 Jun 2016 22:28:58 +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 49D591770; Wed, 8 Jun 2016 22:28:58 +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 u58MSvui042832; Wed, 8 Jun 2016 22:28:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58MSv35042830; Wed, 8 Jun 2016 22:28:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606082228.u58MSv35042830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 22:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301699 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 22:28:58 -0000 Author: ngie Date: Wed Jun 8 22:28:57 2016 New Revision: 301699 URL: https://svnweb.freebsd.org/changeset/base/301699 Log: MFstable/10 r301695: MFC r300870,r300884: r300870: Unbreak the zfs(4) build vm/vm_pageout.h grew a dependency on the bool typedef in r300865 arc.c didn't include sys/types.h, which included the definition for the typedef Other items (ofed, drm2) might need to be chased for this commit. Pointyhat to: alc r300884: Fix up r300870 The sys/types.h fix I proposed was only tested with zfs(4), not with libzpool, which is where the build failure actually existed Remove vm/vm_pageout.h from arc.c and zfs_vnops.c because they're both unneeded In collaboration with: kib Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jun 8 21:38:51 2016 (r301698) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jun 8 22:28:57 2016 (r301699) @@ -137,7 +137,6 @@ #include #include -#include #ifdef illumos #ifndef _KERNEL Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jun 8 21:38:51 2016 (r301698) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jun 8 22:28:57 2016 (r301699) @@ -72,7 +72,6 @@ #include #include #include -#include /* * Programming rules. From owner-svn-src-stable-9@freebsd.org Thu Jun 9 16:30:28 2016 Return-Path: Delivered-To: svn-src-stable-9@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 919B8B700EA; Thu, 9 Jun 2016 16:30:28 +0000 (UTC) (envelope-from pfg@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 63BBD1DEA; Thu, 9 Jun 2016 16:30:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u59GURPJ045177; Thu, 9 Jun 2016 16:30:27 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u59GURdu045176; Thu, 9 Jun 2016 16:30:27 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606091630.u59GURdu045176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 9 Jun 2016 16:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301744 - stable/9/usr.bin/indent X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 16:30:28 -0000 Author: pfg Date: Thu Jun 9 16:30:27 2016 New Revision: 301744 URL: https://svnweb.freebsd.org/changeset/base/301744 Log: MFC r301513: indent(1): Fix old typo. It's typedef, not typdef. Obtained from: NetBSD (CVS rev. 1.14) Modified: stable/9/usr.bin/indent/lexi.c Directory Properties: stable/9/usr.bin/indent/ (props changed) Modified: stable/9/usr.bin/indent/lexi.c ============================================================================== --- stable/9/usr.bin/indent/lexi.c Thu Jun 9 16:29:19 2016 (r301743) +++ stable/9/usr.bin/indent/lexi.c Thu Jun 9 16:30:27 2016 (r301744) @@ -79,7 +79,7 @@ struct templ specials[1000] = {"double", 4}, {"long", 4}, {"short", 4}, - {"typdef", 4}, + {"typedef", 4}, {"unsigned", 4}, {"register", 4}, {"static", 4}, From owner-svn-src-stable-9@freebsd.org Fri Jun 10 14:06:17 2016 Return-Path: Delivered-To: svn-src-stable-9@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 561B6B7077C; Fri, 10 Jun 2016 14:06:17 +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 23DC31B13; Fri, 10 Jun 2016 14:06:17 +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 u5AE6GnB030146; Fri, 10 Jun 2016 14:06:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AE6GiF030145; Fri, 10 Jun 2016 14:06:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101406.u5AE6GiF030145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 14:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301781 - stable/9/sys/netipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 14:06:17 -0000 Author: ngie Date: Fri Jun 10 14:06:16 2016 New Revision: 301781 URL: https://svnweb.freebsd.org/changeset/base/301781 Log: MFstable/10 r301780: MFC r299387: r299387 (by cem): netipsec: Fix minor style nit Coverity points out that 'continue' is equivalent to 'break' in a do {} while(false) loop. CID: 1354983 Modified: stable/9/sys/netipsec/key.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/key.c ============================================================================== --- stable/9/sys/netipsec/key.c Fri Jun 10 13:57:56 2016 (r301780) +++ stable/9/sys/netipsec/key.c Fri Jun 10 14:06:16 2016 (r301781) @@ -347,7 +347,7 @@ do { \ if ((head) != (sav)) { \ ipseclog((LOG_DEBUG, "%s: state mismatched (TREE=%d SA=%d)\n", \ (name), (head), (sav))); \ - continue; \ + break; \ } \ } while (0) From owner-svn-src-stable-9@freebsd.org Fri Jun 10 14:10:52 2016 Return-Path: Delivered-To: svn-src-stable-9@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 7171AB70A3B; Fri, 10 Jun 2016 14:10:52 +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 421381F73; Fri, 10 Jun 2016 14:10:52 +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 u5AEApIW031192; Fri, 10 Jun 2016 14:10:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AEApbx031191; Fri, 10 Jun 2016 14:10:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101410.u5AEApbx031191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 14:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301783 - stable/9/sbin/fsck_ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 14:10:52 -0000 Author: ngie Date: Fri Jun 10 14:10:51 2016 New Revision: 301783 URL: https://svnweb.freebsd.org/changeset/base/301783 Log: MFstable/10 r301782: MFC r299460: r299460 (by cem): fsck_ffs: Don't overrun mount device buffer Maybe this case is impossible. Either way, when attempting to "/dev/"-prefix a non-global device name, check that we do not overrun the f_mntfromname buffer. In this case, truncating (with strlcpy or similar) would not be useful, since the f_mntfromname result of getmntpt() is passed directly to open(2) later. CID: 1006789 Modified: stable/9/sbin/fsck_ffs/main.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/fsck_ffs/ (props changed) Modified: stable/9/sbin/fsck_ffs/main.c ============================================================================== --- stable/9/sbin/fsck_ffs/main.c Fri Jun 10 14:08:41 2016 (r301782) +++ stable/9/sbin/fsck_ffs/main.c Fri Jun 10 14:10:51 2016 (r301783) @@ -627,6 +627,9 @@ getmntpt(const char *name) statfsp = &mntbuf[i]; ddevname = statfsp->f_mntfromname; if (*ddevname != '/') { + if (strlen(_PATH_DEV) + strlen(ddevname) + 1 > + sizeof(statfsp->f_mntfromname)) + continue; strcpy(device, _PATH_DEV); strcat(device, ddevname); strcpy(statfsp->f_mntfromname, device); From owner-svn-src-stable-9@freebsd.org Fri Jun 10 14:27:57 2016 Return-Path: Delivered-To: svn-src-stable-9@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 66538B70E20; Fri, 10 Jun 2016 14:27:57 +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 2CB5C1CF6; Fri, 10 Jun 2016 14:27:57 +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 u5AERutd038226; Fri, 10 Jun 2016 14:27:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AERuVS038225; Fri, 10 Jun 2016 14:27:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101427.u5AERuVS038225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 14:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301785 - stable/9/usr.sbin/makefs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 14:27:57 -0000 Author: ngie Date: Fri Jun 10 14:27:56 2016 New Revision: 301785 URL: https://svnweb.freebsd.org/changeset/base/301785 Log: MFstable/10 r301784: MFC r299461: r299461 (by cem): ffs_bswap: Copy one UFS dinode member at a time No functional change. CIDs: 974635, 974636, 977396, 977397, 977398, 977399 Modified: stable/9/usr.sbin/makefs/ffs/ffs_bswap.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/ffs/ffs_bswap.c ============================================================================== --- stable/9/usr.sbin/makefs/ffs/ffs_bswap.c Fri Jun 10 14:13:24 2016 (r301784) +++ stable/9/usr.sbin/makefs/ffs/ffs_bswap.c Fri Jun 10 14:27:56 2016 (r301785) @@ -135,7 +135,8 @@ ffs_dinode1_swap(struct ufs1_dinode *o, n->di_mtimensec = bswap32(o->di_mtimensec); n->di_ctime = bswap32(o->di_ctime); n->di_ctimensec = bswap32(o->di_ctimensec); - memcpy(n->di_db, o->di_db, (NDADDR + NIADDR) * sizeof(u_int32_t)); + memcpy(n->di_db, o->di_db, sizeof(n->di_db)); + memcpy(n->di_ib, o->di_ib, sizeof(n->di_ib)); n->di_flags = bswap32(o->di_flags); n->di_blocks = bswap32(o->di_blocks); n->di_gen = bswap32(o->di_gen); @@ -165,7 +166,9 @@ ffs_dinode2_swap(struct ufs2_dinode *o, n->di_kernflags = bswap32(o->di_kernflags); n->di_flags = bswap32(o->di_flags); n->di_extsize = bswap32(o->di_extsize); - memcpy(n->di_extb, o->di_extb, (NXADDR + NDADDR + NIADDR) * 8); + memcpy(n->di_extb, o->di_extb, sizeof(n->di_extb)); + memcpy(n->di_db, o->di_db, sizeof(n->di_db)); + memcpy(n->di_ib, o->di_ib, sizeof(n->di_ib)); } void From owner-svn-src-stable-9@freebsd.org Fri Jun 10 14:42:38 2016 Return-Path: Delivered-To: svn-src-stable-9@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 132F3B714CD; Fri, 10 Jun 2016 14:42:38 +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 D66B91EFA; Fri, 10 Jun 2016 14:42:37 +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 u5AEgbbc045725; Fri, 10 Jun 2016 14:42:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AEgb3T045724; Fri, 10 Jun 2016 14:42:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101442.u5AEgb3T045724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 14:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301790 - stable/9/usr.sbin/route6d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 14:42:38 -0000 Author: ngie Date: Fri Jun 10 14:42:36 2016 New Revision: 301790 URL: https://svnweb.freebsd.org/changeset/base/301790 Log: MFstable/10 r301789: MFC r299491: r299491 (by cem): route6d(8): Fix potential double-free In the case that the subsequent sysctl(3) call failed, 'buf' could be free(3)ed repeatedly. It isn't clear to me that that case is possible, but be clear and do the right thing in case it is. CID: 272537 Modified: stable/9/usr.sbin/route6d/route6d.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/route6d/ (props changed) Modified: stable/9/usr.sbin/route6d/route6d.c ============================================================================== --- stable/9/usr.sbin/route6d/route6d.c Fri Jun 10 14:40:41 2016 (r301789) +++ stable/9/usr.sbin/route6d/route6d.c Fri Jun 10 14:42:36 2016 (r301790) @@ -2646,8 +2646,10 @@ krtread(int again) sleep(1); retry++; errmsg = NULL; - if (buf) + if (buf) { free(buf); + buf = NULL; + } if (sysctl(mib, 6, NULL, &msize, NULL, 0) < 0) { errmsg = "sysctl estimate"; continue; From owner-svn-src-stable-9@freebsd.org Fri Jun 10 15:03:47 2016 Return-Path: Delivered-To: svn-src-stable-9@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 377DCB71AFE; Fri, 10 Jun 2016 15:03:47 +0000 (UTC) (envelope-from cy@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 0525C1319; Fri, 10 Jun 2016 15:03:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5AF3kma055667; Fri, 10 Jun 2016 15:03:46 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AF3k9t055666; Fri, 10 Jun 2016 15:03:46 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201606101503.u5AF3k9t055666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 10 Jun 2016 15:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301796 - stable/9/etc/defaults X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 15:03:47 -0000 Author: cy Date: Fri Jun 10 15:03:45 2016 New Revision: 301796 URL: https://svnweb.freebsd.org/changeset/base/301796 Log: MFC r301295: Enable daily_ntpd_leapfile_enable by default. Otherwise an expired leapfile will be ignored and ntpd will behave as if it has no leapfile. While here, remove an extraneous blank line. Suggested by: ache Modified: stable/9/etc/defaults/periodic.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/defaults/periodic.conf ============================================================================== --- stable/9/etc/defaults/periodic.conf Fri Jun 10 15:03:18 2016 (r301795) +++ stable/9/etc/defaults/periodic.conf Fri Jun 10 15:03:45 2016 (r301796) @@ -143,7 +143,7 @@ daily_status_named_enable="YES" daily_status_named_usedns="YES" # DNS lookups are ok # 480.leapfile-ntpd -daily_ntpd_leapfile_enable="NO" # Fetch NTP leapfile +daily_ntpd_leapfile_enable="YES" # Fetch NTP leapfile daily_ntpd_avoid_congestion="YES" # Avoid congesting # 480.status-ntpd From owner-svn-src-stable-9@freebsd.org Fri Jun 10 17:59:32 2016 Return-Path: Delivered-To: svn-src-stable-9@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 2ACA2AD9C39; Fri, 10 Jun 2016 17:59:32 +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 D69D62A93; Fri, 10 Jun 2016 17:59:31 +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 u5AHxVxx018639; Fri, 10 Jun 2016 17:59:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AHxVLR018638; Fri, 10 Jun 2016 17:59:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101759.u5AHxVLR018638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 17:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301802 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 17:59:32 -0000 Author: ngie Date: Fri Jun 10 17:59:30 2016 New Revision: 301802 URL: https://svnweb.freebsd.org/changeset/base/301802 Log: MFstable/10 r301801: MFC r300836: Quell false positives in svc_vc_create and svc_vc_create_conn with cd and xprt Both cd and xprt will be non-NULL after their respective malloc(9) wrappers are called (mem_alloc and svc_xprt_alloc, which calls mem_alloc) as mem_alloc always gets called with M_WAITOK|M_ZERO today. Thus, testing for them being non-NULL is incorrect -- it misleads Coverity and it misleads the reader. Remove some unnecessary NULL initializations as a follow up to help solidify the fact that these pointers will be initialized properly in sys/rpc/.. with the interfaces the way they are currently. CID: 1007338, 1007339, 1007340 Modified: stable/9/sys/rpc/svc_vc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc_vc.c ============================================================================== --- stable/9/sys/rpc/svc_vc.c Fri Jun 10 17:57:50 2016 (r301801) +++ stable/9/sys/rpc/svc_vc.c Fri Jun 10 17:59:30 2016 (r301802) @@ -186,11 +186,11 @@ svc_vc_create(SVCPOOL *pool, struct sock SOCKBUF_UNLOCK(&so->so_rcv); return (xprt); + cleanup_svc_vc_create: - if (xprt) { - sx_destroy(&xprt->xp_lock); - svc_xprt_free(xprt); - } + sx_destroy(&xprt->xp_lock); + svc_xprt_free(xprt); + return (NULL); } @@ -200,8 +200,8 @@ cleanup_svc_vc_create: SVCXPRT * svc_vc_create_conn(SVCPOOL *pool, struct socket *so, struct sockaddr *raddr) { - SVCXPRT *xprt = NULL; - struct cf_conn *cd = NULL; + SVCXPRT *xprt; + struct cf_conn *cd; struct sockaddr* sa = NULL; struct sockopt opt; int one = 1; @@ -274,12 +274,10 @@ svc_vc_create_conn(SVCPOOL *pool, struct return (xprt); cleanup_svc_vc_create: - if (xprt) { - sx_destroy(&xprt->xp_lock); - svc_xprt_free(xprt); - } - if (cd) - mem_free(cd, sizeof(*cd)); + sx_destroy(&xprt->xp_lock); + svc_xprt_free(xprt); + mem_free(cd, sizeof(*cd)); + return (NULL); } From owner-svn-src-stable-9@freebsd.org Fri Jun 10 18:04:56 2016 Return-Path: Delivered-To: svn-src-stable-9@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 3270DAD9ECC; Fri, 10 Jun 2016 18:04:56 +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 DDCB92F69; Fri, 10 Jun 2016 18:04:55 +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 u5AI4tSG022159; Fri, 10 Jun 2016 18:04:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AI4tBQ022158; Fri, 10 Jun 2016 18:04:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101804.u5AI4tBQ022158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 18:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301804 - stable/9/usr.sbin/rtadvd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 18:04:56 -0000 Author: ngie Date: Fri Jun 10 18:04:54 2016 New Revision: 301804 URL: https://svnweb.freebsd.org/changeset/base/301804 Log: MFstable/10 r301803: MFC r299507: r299507 (by cem): rtadvd(8): Fix a typo in full msg receive logic Check against the size of the struct, not the pointer. Previously, a message with a cm_len between 9 and 23 (inclusive) could cause int msglen to underflow and read(2) to be invoked with msglen size (implicitly cast to signed), overrunning the caller-provided buffer. All users of cm_recv() supply a stack buffer. On the other hand, the rtadvd control socket appears to only be writable by the owner, who is probably root. While here, correct some types to be size_t or ssize_t. CID: 1008477 Security: unix socket remotes may overflow stack in rtadvd Modified: stable/9/usr.sbin/rtadvd/control.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/rtadvd/ (props changed) Modified: stable/9/usr.sbin/rtadvd/control.c ============================================================================== --- stable/9/usr.sbin/rtadvd/control.c Fri Jun 10 18:02:51 2016 (r301803) +++ stable/9/usr.sbin/rtadvd/control.c Fri Jun 10 18:04:54 2016 (r301804) @@ -59,7 +59,7 @@ int cm_recv(int fd, char *buf) { - int n; + ssize_t n; struct ctrl_msg_hdr *cm; char *msg; struct pollfd pfds[1]; @@ -98,7 +98,7 @@ cm_recv(int fd, char *buf) } } - if (n != sizeof(*cm)) { + if (n != (ssize_t)sizeof(*cm)) { syslog(LOG_WARNING, "<%s> received a too small message.", __func__); goto cm_recv_err; @@ -123,11 +123,11 @@ cm_recv(int fd, char *buf) "<%s> ctrl msg received: type=%d", __func__, cm->cm_type); - if (cm->cm_len > sizeof(cm)) { - int msglen = cm->cm_len - sizeof(*cm); + if (cm->cm_len > sizeof(*cm)) { + size_t msglen = cm->cm_len - sizeof(*cm); syslog(LOG_DEBUG, - "<%s> ctrl msg has payload (len=%d)", __func__, + "<%s> ctrl msg has payload (len=%zu)", __func__, msglen); for (;;) { @@ -153,7 +153,7 @@ cm_recv(int fd, char *buf) } break; } - if (n != msglen) { + if (n != (ssize_t)msglen) { syslog(LOG_WARNING, "<%s> payload size mismatch.", __func__); goto cm_recv_err; From owner-svn-src-stable-9@freebsd.org Fri Jun 10 18:12:12 2016 Return-Path: Delivered-To: svn-src-stable-9@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 9CA9BADA29E; Fri, 10 Jun 2016 18:12: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 6DA982694; Fri, 10 Jun 2016 18:12:12 +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 u5AICBkf025800; Fri, 10 Jun 2016 18:12:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AICB5j025799; Fri, 10 Jun 2016 18:12:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101812.u5AICB5j025799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 18:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301807 - stable/9/lib/libmp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 18:12:12 -0000 Author: ngie Date: Fri Jun 10 18:12:11 2016 New Revision: 301807 URL: https://svnweb.freebsd.org/changeset/base/301807 Log: MFstable/10 r301806: MFC r299510: r299510 (by cem): libmp: Fix trivial buffer overrun fgetln yields a non-NUL-terminated buffer and its length. This routine attempted to NUL-terminate it, but did not allocate space for the NUL. So, allocate space for the NUL. CID: 1017457 Modified: stable/9/lib/libmp/mpasbn.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) Modified: stable/9/lib/libmp/mpasbn.c ============================================================================== --- stable/9/lib/libmp/mpasbn.c Fri Jun 10 18:10:32 2016 (r301806) +++ stable/9/lib/libmp/mpasbn.c Fri Jun 10 18:12:11 2016 (r301807) @@ -286,10 +286,10 @@ mp_min(MINT *mp) line = fgetln(stdin, &linelen); if (line == NULL) MPERR(("min")); - nline = malloc(linelen); + nline = malloc(linelen + 1); if (nline == NULL) MPERR(("min")); - strncpy(nline, line, linelen); + memcpy(nline, line, linelen); nline[linelen] = '\0'; rmp = _dtom("min", nline); _movem("min", rmp, mp); From owner-svn-src-stable-9@freebsd.org Fri Jun 10 18:22:22 2016 Return-Path: Delivered-To: svn-src-stable-9@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 D27D5ADA605; Fri, 10 Jun 2016 18:22: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 87E092E58; Fri, 10 Jun 2016 18:22:22 +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 u5AIMLHS029126; Fri, 10 Jun 2016 18:22:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AIMLhp029124; Fri, 10 Jun 2016 18:22:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101822.u5AIMLhp029124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 18:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301810 - stable/9/usr.sbin/rtadvd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 18:22:22 -0000 Author: ngie Date: Fri Jun 10 18:22:21 2016 New Revision: 301810 URL: https://svnweb.freebsd.org/changeset/base/301810 Log: MFstable/10 r301809: MFC r299513,r299515: r299513 (by cem): rtadvd(8): Don't use-after-free This whole block of code as committed fully formed in r224144. I'm not really sure what the intent was, but it seems plausible that !persist ifis could need other member cleanup. Don't free the object until after we've finished cleaning its members. CID: 1006079 r299515 (by cem): rtadvd(8): Fix use-after-close in cm_handler_client cm_send() closes 'fd' on error. In that case, bail out early without trying to recv from or close 'fd' again. CID: 1006078 Modified: stable/9/usr.sbin/rtadvd/config.c stable/9/usr.sbin/rtadvd/control_client.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/rtadvd/ (props changed) Modified: stable/9/usr.sbin/rtadvd/config.c ============================================================================== --- stable/9/usr.sbin/rtadvd/config.c Fri Jun 10 18:21:05 2016 (r301809) +++ stable/9/usr.sbin/rtadvd/config.c Fri Jun 10 18:22:21 2016 (r301810) @@ -229,7 +229,6 @@ rm_ifinfo(struct ifinfo *ifi) TAILQ_REMOVE(&ifilist, ifi, ifi_next); syslog(LOG_DEBUG, "<%s>: ifinfo (idx=%d) removed.", __func__, ifi->ifi_ifindex); - free(ifi); } else { /* recreate an empty entry */ update_persist_ifinfo(&ifilist, ifi->ifi_ifname); @@ -273,6 +272,8 @@ rm_ifinfo(struct ifinfo *ifi) } syslog(LOG_DEBUG, "<%s> leave (%s).", __func__, ifi->ifi_ifname); + if (!ifi->ifi_persist) + free(ifi); return (0); } Modified: stable/9/usr.sbin/rtadvd/control_client.c ============================================================================== --- stable/9/usr.sbin/rtadvd/control_client.c Fri Jun 10 18:21:05 2016 (r301809) +++ stable/9/usr.sbin/rtadvd/control_client.c Fri Jun 10 18:22:21 2016 (r301810) @@ -92,9 +92,11 @@ cm_handler_client(int fd, int state, cha case CM_STATE_MSG_DISPATCH: cm->cm_version = CM_VERSION; error = cm_send(fd, buf); - if (error) + if (error) { syslog(LOG_WARNING, "<%s> cm_send()", __func__); + return (-1); + } state = CM_STATE_ACK_WAIT; break; case CM_STATE_ACK_WAIT: From owner-svn-src-stable-9@freebsd.org Sat Jun 11 01:35:35 2016 Return-Path: Delivered-To: svn-src-stable-9@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 79C17AD9C6B; Sat, 11 Jun 2016 01:35:35 +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 494322A60; Sat, 11 Jun 2016 01:35:35 +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 u5B1ZYFu089173; Sat, 11 Jun 2016 01:35:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5B1ZYRG089172; Sat, 11 Jun 2016 01:35:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606110135.u5B1ZYRG089172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Jun 2016 01:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301819 - stable/9/etc/defaults X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 01:35:35 -0000 Author: ngie Date: Sat Jun 11 01:35:34 2016 New Revision: 301819 URL: https://svnweb.freebsd.org/changeset/base/301819 Log: MFstable/10 r301818: MFC r301683: Fix typo with description for $ipv6_cpe_wanif (upstram -> upstream) PR: 210146 Modified: stable/9/etc/defaults/rc.conf Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) Modified: stable/9/etc/defaults/rc.conf ============================================================================== --- stable/9/etc/defaults/rc.conf Sat Jun 11 01:34:41 2016 (r301818) +++ stable/9/etc/defaults/rc.conf Sat Jun 11 01:35:34 2016 (r301819) @@ -483,7 +483,7 @@ ipv6_static_routes="" # Set to static r # route toward loopback interface. #ipv6_route_xxx="fec0:0000:0000:0006:: -prefixlen 64 ::1" ipv6_gateway_enable="NO" # Set to YES if this host will be a gateway. -ipv6_cpe_wanif="NO" # Set to the upstram interface name if this +ipv6_cpe_wanif="NO" # Set to the upstream interface name if this # node will work as a router to forward IPv6 # packets not explicitly addressed to itself. ipv6_privacy="NO" # Use privacy address on RA-receiving IFs From owner-svn-src-stable-9@freebsd.org Sat Jun 11 01:44:28 2016 Return-Path: Delivered-To: svn-src-stable-9@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 75FB3AD9F8B; Sat, 11 Jun 2016 01:44: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 480FD2F96; Sat, 11 Jun 2016 01:44: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 u5B1iRtM092787; Sat, 11 Jun 2016 01:44:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5B1iRIQ092786; Sat, 11 Jun 2016 01:44:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606110144.u5B1iRIQ092786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Jun 2016 01:44:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301821 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 01:44:28 -0000 Author: ngie Date: Sat Jun 11 01:44:27 2016 New Revision: 301821 URL: https://svnweb.freebsd.org/changeset/base/301821 Log: MFstable/10 r301820: MFC r301704: Test for strchr(3) returning NULL, not 0 Modified: stable/9/lib/libc/rpc/getnetpath.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/getnetpath.c ============================================================================== --- stable/9/lib/libc/rpc/getnetpath.c Sat Jun 11 01:37:59 2016 (r301820) +++ stable/9/lib/libc/rpc/getnetpath.c Sat Jun 11 01:44:27 2016 (r301821) @@ -265,7 +265,7 @@ int token; /* char to parse string for *cp++ = '\0'; /* null-terminate token */ /* get rid of any backslash escapes */ ep = npp; - while ((np = strchr(ep, '\\')) != 0) { + while ((np = strchr(ep, '\\')) != NULL) { if (np[1] == '\\') np++; strcpy(np, (ep = &np[1])); /* XXX: overlapping string copy */ From owner-svn-src-stable-9@freebsd.org Sat Jun 11 03:59:45 2016 Return-Path: Delivered-To: svn-src-stable-9@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 D9AF3AEF56F; Sat, 11 Jun 2016 03:59:45 +0000 (UTC) (envelope-from pfg@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 A6FEB2CD1; Sat, 11 Jun 2016 03:59:45 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5B3xicr041341; Sat, 11 Jun 2016 03:59:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5B3xiL2041340; Sat, 11 Jun 2016 03:59:44 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606110359.u5B3xiL2041340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 11 Jun 2016 03:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301823 - stable/9/gnu/lib/libsupc++ X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 03:59:46 -0000 Author: pfg Date: Sat Jun 11 03:59:44 2016 New Revision: 301823 URL: https://svnweb.freebsd.org/changeset/base/301823 Log: MFC r301570: libsupc++: Fix typo in symbol map. This went mostly unnoticed with the deprecation of the GNU toolchain in tier 1 platforms. Fix it now for the rest. PR: 169901 Modified: stable/9/gnu/lib/libsupc++/Version.map Directory Properties: stable/9/gnu/lib/libsupc++/ (props changed) Modified: stable/9/gnu/lib/libsupc++/Version.map ============================================================================== --- stable/9/gnu/lib/libsupc++/Version.map Sat Jun 11 03:58:59 2016 (r301822) +++ stable/9/gnu/lib/libsupc++/Version.map Sat Jun 11 03:59:44 2016 (r301823) @@ -132,7 +132,7 @@ CXXABI_1.3 { GLIBCXX_3.4 { # operator new and new[] - _Znai[jm]; + _Zna[jm]; _Zna[jm]RKSt9nothrow_t; _Znw[jm]; _Znw[jm]RKSt9nothrow_t; From owner-svn-src-stable-9@freebsd.org Sat Jun 11 05:58:52 2016 Return-Path: Delivered-To: svn-src-stable-9@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 9395BAEF8AA; Sat, 11 Jun 2016 05:58:52 +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 59DF02733; Sat, 11 Jun 2016 05:58:52 +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 u5B5wpIK085269; Sat, 11 Jun 2016 05:58:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5B5wpCb085268; Sat, 11 Jun 2016 05:58:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201606110558.u5B5wpCb085268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 11 Jun 2016 05:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301825 - stable/9/release/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 05:58:52 -0000 Author: delphij Date: Sat Jun 11 05:58:51 2016 New Revision: 301825 URL: https://svnweb.freebsd.org/changeset/base/301825 Log: MFC r301584: Apply mergemaster r255428: Pass -n (do not emit comments) when saving mtree information for future mergemaster(8) runs. Modified: stable/9/release/scripts/mm-mtree.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/scripts/mm-mtree.sh ============================================================================== --- stable/9/release/scripts/mm-mtree.sh Sat Jun 11 05:53:50 2016 (r301824) +++ stable/9/release/scripts/mm-mtree.sh Sat Jun 11 05:58:51 2016 (r301825) @@ -142,7 +142,7 @@ find -d ${TEMPROOT} -type d -empty -dele # Build the mtree database in a temporary location. MTREENEW=`mktemp -t mergemaster.mtree` -mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null +mtree -nci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null if [ -s "${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades"