From owner-svn-src-projects@freebsd.org Mon Dec 12 13:13:49 2016 Return-Path: Delivered-To: svn-src-projects@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 BEF9AC7343F for ; Mon, 12 Dec 2016 13:13:49 +0000 (UTC) (envelope-from ae@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 8EE4E8EC; Mon, 12 Dec 2016 13:13:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCDDmAx036334; Mon, 12 Dec 2016 13:13:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCDDmLE036333; Mon, 12 Dec 2016 13:13:48 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612121313.uBCDDmLE036333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 12 Dec 2016 13:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r309889 - projects/ipsec/share/man/man4 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 13:13:49 -0000 Author: ae Date: Mon Dec 12 13:13:48 2016 New Revision: 309889 URL: https://svnweb.freebsd.org/changeset/base/309889 Log: Document UDP_ENCAP socket option. Modified: projects/ipsec/share/man/man4/udp.4 Modified: projects/ipsec/share/man/man4/udp.4 ============================================================================== --- projects/ipsec/share/man/man4/udp.4 Mon Dec 12 11:26:59 2016 (r309888) +++ projects/ipsec/share/man/man4/udp.4 Mon Dec 12 13:13:48 2016 (r309889) @@ -28,7 +28,7 @@ .\" @(#)udp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd December 12, 2016 .Dt UDP 4 .Os .Sh NAME @@ -99,6 +99,17 @@ transport level may be used with .Tn UDP ; see .Xr ip 4 . +.Tn UDP_ENCAP +socket option may be used at the +.Tn IPPROTO_UDP +level to encapsulate +.Tn ESP +packets in +.Tn UDP . +The only one supported value for this option is +.Tn UDP_ENCAP_ESPINUDP +from RFC 3948 defined in +.In netinet/udp.h . .Sh MIB VARIABLES The .Nm @@ -158,7 +169,8 @@ exists. .Xr blackhole 4 , .Xr inet 4 , .Xr intro 4 , -.Xr ip 4 +.Xr ip 4 , +.Xr udplite 4 .Sh HISTORY The .Nm From owner-svn-src-projects@freebsd.org Tue Dec 13 20:54:39 2016 Return-Path: Delivered-To: svn-src-projects@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 CA4E6C7627B for ; Tue, 13 Dec 2016 20:54:39 +0000 (UTC) (envelope-from ae@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 8B4F81386; Tue, 13 Dec 2016 20:54:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDKscme023804; Tue, 13 Dec 2016 20:54:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDKscTw023801; Tue, 13 Dec 2016 20:54:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612132054.uBDKscTw023801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Dec 2016 20:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310034 - projects/ipsec/sys/netipsec X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 20:54:39 -0000 Author: ae Date: Tue Dec 13 20:54:38 2016 New Revision: 310034 URL: https://svnweb.freebsd.org/changeset/base/310034 Log: Fix possible bug in udp_ipsec_output(). m_makespace() returns mbuf where UDP header is stored. And it is possible, that it is not the same mbuf where IP header is. So, don't touch original mbuf, just return error code. Modified: projects/ipsec/sys/netipsec/ipsec.h projects/ipsec/sys/netipsec/ipsec_output.c projects/ipsec/sys/netipsec/udpencap.c Modified: projects/ipsec/sys/netipsec/ipsec.h ============================================================================== --- projects/ipsec/sys/netipsec/ipsec.h Tue Dec 13 20:35:57 2016 (r310033) +++ projects/ipsec/sys/netipsec/ipsec.h Tue Dec 13 20:54:38 2016 (r310034) @@ -325,7 +325,7 @@ int tcp_ipsec_output(struct mbuf *, stru int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *); int udp_ipsec_input(struct mbuf *, int, int); void udp_ipsec_adjust_cksum(struct mbuf *, struct secasvar *, int, int); -int udp_ipsec_output(struct mbuf **, struct secasvar *); +int udp_ipsec_output(struct mbuf *, struct secasvar *); int ipsec_chkreplay(uint32_t, struct secasvar *); int ipsec_updatereplay(uint32_t, struct secasvar *); Modified: projects/ipsec/sys/netipsec/ipsec_output.c ============================================================================== --- projects/ipsec/sys/netipsec/ipsec_output.c Tue Dec 13 20:35:57 2016 (r310033) +++ projects/ipsec/sys/netipsec/ipsec_output.c Tue Dec 13 20:54:38 2016 (r310034) @@ -599,7 +599,7 @@ ipsec_process_done(struct mbuf *m, struc * Do UDP encapsulation if SA requires it. */ if (sav->natt != NULL) { - error = udp_ipsec_output(&m, sav); + error = udp_ipsec_output(m, sav); if (error != 0) goto bad; } Modified: projects/ipsec/sys/netipsec/udpencap.c ============================================================================== --- projects/ipsec/sys/netipsec/udpencap.c Tue Dec 13 20:35:57 2016 (r310033) +++ projects/ipsec/sys/netipsec/udpencap.c Tue Dec 13 20:54:38 2016 (r310034) @@ -211,10 +211,10 @@ udp_ipsec_input(struct mbuf *m, int off, } int -udp_ipsec_output(struct mbuf **mp, struct secasvar *sav) +udp_ipsec_output(struct mbuf *m, struct secasvar *sav) { struct udphdr *udp; - struct mbuf *m; + struct mbuf *n; struct ip *ip; int hlen, off; @@ -223,16 +223,19 @@ udp_ipsec_output(struct mbuf **mp, struc if (sav->sah->saidx.dst.sa.sa_family == AF_INET6) return (EAFNOSUPPORT); - ip = mtod(*mp, struct ip *); + ip = mtod(m, struct ip *); hlen = ip->ip_hl << 2; - m = m_makespace(*mp, hlen, sizeof(*udp), &off); - if (m == NULL) { + n = m_makespace(m, hlen, sizeof(*udp), &off); + if (n == NULL) { DPRINTF(("%s: m_makespace for udphdr failed\n", __func__)); return (ENOBUFS); } - *mp = m; - ip = mtod(m, struct ip *); - udp = mtodo(m, off); + /* + * IP header should stay in the same place of mbuf m. + * m_makespace() can add new mbuf or move the remaining data into + * the end of mbuf space. Thus mtod() isn't required for ip pointer. + */ + udp = mtodo(n, off); udp->uh_dport = sav->natt->dport; udp->uh_sport = sav->natt->sport; udp->uh_sum = 0; From owner-svn-src-projects@freebsd.org Tue Dec 13 22:40:11 2016 Return-Path: Delivered-To: svn-src-projects@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 21ED0C7624A for ; Tue, 13 Dec 2016 22:40:11 +0000 (UTC) (envelope-from ae@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 E60011B16; Tue, 13 Dec 2016 22:40:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDMeApq064313; Tue, 13 Dec 2016 22:40:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDMeAfP064312; Tue, 13 Dec 2016 22:40:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612132240.uBDMeAfP064312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Dec 2016 22:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310039 - projects/ipsec/sys/netipsec X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 22:40:11 -0000 Author: ae Date: Tue Dec 13 22:40:09 2016 New Revision: 310039 URL: https://svnweb.freebsd.org/changeset/base/310039 Log: Fix the problem with SP PCB cache. tcp_input() uses ipsec[46]_in_reject() to check mbuf agaist inbound security policies. We use SP PCB cache to store result of policy lookup in the given inpcb. If inpcb belongs to listening socket that is bound to ANY address, the lookup result for another connection may differs. Thus cached policy will prevent another connection establishing. Store inbound policy in the cache only if local address in PCB isn't equal to INADDR_ANY. Modified: projects/ipsec/sys/netipsec/ipsec.c Modified: projects/ipsec/sys/netipsec/ipsec.c ============================================================================== --- projects/ipsec/sys/netipsec/ipsec.c Tue Dec 13 22:31:49 2016 (r310038) +++ projects/ipsec/sys/netipsec/ipsec.c Tue Dec 13 22:40:09 2016 (r310039) @@ -1349,9 +1349,15 @@ ipsec_in_reject(struct secpolicy *sp, st if (inp != NULL && (inp->inp_sp->flags & INP_INBOUND_POLICY) == 0 && - inp->inp_sp->sp_in == NULL) { + inp->inp_sp->sp_in == NULL && + inp->inp_laddr.s_addr != INADDR_ANY) { /* * Save found INBOUND policy into PCB SP cache. + * NOTE: We do this only if local address isn't INADDR_ANY, + * because a cached policy for listen socket, that bound to + * ANY address, may prevent to establish another connection. + * We don't check address family, since both INADDR_ANY and + * UNSPECIFIED IPv6 address contains all zeroes. */ genid = key_getspgen(); inp->inp_sp->sp_in = sp; From owner-svn-src-projects@freebsd.org Thu Dec 15 05:36:27 2016 Return-Path: Delivered-To: svn-src-projects@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 370BAC77B64 for ; Thu, 15 Dec 2016 05:36: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 D61C9FA7; Thu, 15 Dec 2016 05:36: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 uBF5aQEE024954; Thu, 15 Dec 2016 05:36:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBF5aQNo024953; Thu, 15 Dec 2016 05:36:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201612150536.uBF5aQNo024953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 15 Dec 2016 05:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310102 - projects/bsnmp-improved-ipv6-support X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 05:36:27 -0000 Author: ngie Date: Thu Dec 15 05:36:25 2016 New Revision: 310102 URL: https://svnweb.freebsd.org/changeset/base/310102 Log: Nuke for repave again Deleted: projects/bsnmp-improved-ipv6-support/ From owner-svn-src-projects@freebsd.org Thu Dec 15 05:36:50 2016 Return-Path: Delivered-To: svn-src-projects@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 3DCD9C77BBD for ; Thu, 15 Dec 2016 05:36:50 +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 E831C10C8; Thu, 15 Dec 2016 05:36: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 uBF5an8V025012; Thu, 15 Dec 2016 05:36:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBF5anLU025011; Thu, 15 Dec 2016 05:36:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201612150536.uBF5anLU025011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 15 Dec 2016 05:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310103 - projects/bsnmp-improved-ipv6-support X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 05:36:50 -0000 Author: ngie Date: Thu Dec 15 05:36:48 2016 New Revision: 310103 URL: https://svnweb.freebsd.org/changeset/base/310103 Log: Redo branch (again) Copy ^/head to work on importing the improvements made by shonali@ in GSoC 2014 for improving IPv6 with bsnmpd More information about the project content being imported can be found here: https://wiki.freebsd.org/SummerOfCode2014/BSNMPEnhancements Added: - copied from r310102, head/ Directory Properties: projects/bsnmp-improved-ipv6-support/ (props changed) From owner-svn-src-projects@freebsd.org Thu Dec 15 10:36:35 2016 Return-Path: Delivered-To: svn-src-projects@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 D5BBCC81EC4 for ; Thu, 15 Dec 2016 10:36:35 +0000 (UTC) (envelope-from ae@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 A5C6C1C59; Thu, 15 Dec 2016 10:36:35 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFAaYDZ045582; Thu, 15 Dec 2016 10:36:34 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFAaYmH045581; Thu, 15 Dec 2016 10:36:34 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612151036.uBFAaYmH045581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 15 Dec 2016 10:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310107 - projects/ipsec/sys/netipsec X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 10:36:35 -0000 Author: ae Date: Thu Dec 15 10:36:34 2016 New Revision: 310107 URL: https://svnweb.freebsd.org/changeset/base/310107 Log: Count the replay counter overflow in corresponding counters. Modified: projects/ipsec/sys/netipsec/ipsec.c Modified: projects/ipsec/sys/netipsec/ipsec.c ============================================================================== --- projects/ipsec/sys/netipsec/ipsec.c Thu Dec 15 08:11:32 2016 (r310106) +++ projects/ipsec/sys/netipsec/ipsec.c Thu Dec 15 10:36:34 2016 (r310107) @@ -1647,8 +1647,13 @@ ok: replay->overflow++; /* Don't increment, no more packets accepted. */ - if ((sav->flags & SADB_X_EXT_CYCSEQ) == 0) + if ((sav->flags & SADB_X_EXT_CYCSEQ) == 0) { + if (sav->sah->saidx.proto == IPPROTO_AH) + AHSTAT_INC(ahs_wrap); + else if (sav->sah->saidx.proto == IPPROTO_ESP) + ESPSTAT_INC(esps_wrap); return (1); + } ipseclog((LOG_WARNING, "%s: replay counter made %d cycle. %s\n", __func__, replay->overflow, From owner-svn-src-projects@freebsd.org Thu Dec 15 17:34:19 2016 Return-Path: Delivered-To: svn-src-projects@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 862AAC81DAD for ; Thu, 15 Dec 2016 17:34:19 +0000 (UTC) (envelope-from ae@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 544E41F13; Thu, 15 Dec 2016 17:34:19 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFHYINK015915; Thu, 15 Dec 2016 17:34:18 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFHYIw5015912; Thu, 15 Dec 2016 17:34:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612151734.uBFHYIw5015912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 15 Dec 2016 17:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310123 - in projects/ipsec/sys: conf netipsec X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 17:34:19 -0000 Author: ae Date: Thu Dec 15 17:34:18 2016 New Revision: 310123 URL: https://svnweb.freebsd.org/changeset/base/310123 Log: Add ipsec_pcb.c file and move all PCB-related function into it. Added: projects/ipsec/sys/netipsec/ipsec_pcb.c (contents, props changed) Modified: projects/ipsec/sys/conf/files projects/ipsec/sys/netipsec/ipsec.c Modified: projects/ipsec/sys/conf/files ============================================================================== --- projects/ipsec/sys/conf/files Thu Dec 15 17:26:16 2016 (r310122) +++ projects/ipsec/sys/conf/files Thu Dec 15 17:34:18 2016 (r310123) @@ -4150,6 +4150,7 @@ netipsec/ipsec.c optional ipsec inet | netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 +netipsec/ipsec_pcb.c optional ipsec inet | ipsec inet6 netipsec/key.c optional ipsec inet | ipsec inet6 netipsec/key_debug.c optional ipsec inet | ipsec inet6 netipsec/keysock.c optional ipsec inet | ipsec inet6 Modified: projects/ipsec/sys/netipsec/ipsec.c ============================================================================== --- projects/ipsec/sys/netipsec/ipsec.c Thu Dec 15 17:26:16 2016 (r310122) +++ projects/ipsec/sys/netipsec/ipsec.c Thu Dec 15 17:34:18 2016 (r310123) @@ -889,287 +889,6 @@ ipsec_run_hhooks(struct ipsec_ctx_data * return (0); } -/* Initialize PCB policy. */ -int -ipsec_init_pcbpolicy(struct inpcb *inp) -{ - - IPSEC_ASSERT(inp != NULL, ("null inp")); - IPSEC_ASSERT(inp->inp_sp == NULL, ("inp_sp already initialized")); - - inp->inp_sp = malloc(sizeof(struct inpcbpolicy), M_IPSEC_INPCB, - M_NOWAIT | M_ZERO); - if (inp->inp_sp == NULL) { - ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); - return (ENOBUFS); - } - return (0); -} - -/* Delete PCB policy. */ -int -ipsec_delete_pcbpolicy(struct inpcb *inp) -{ - - if (inp->inp_sp == NULL) - return (0); - - if (inp->inp_sp->flags & INP_INBOUND_POLICY) - key_freesp(&inp->inp_sp->sp_in); - - if (inp->inp_sp->flags & INP_OUTBOUND_POLICY) - key_freesp(&inp->inp_sp->sp_out); - - free(inp->inp_sp, M_IPSEC_INPCB); - inp->inp_sp = NULL; - return (0); -} - -/* Deep-copy a policy in PCB. */ -static struct secpolicy * -ipsec_deepcopy_pcbpolicy(struct secpolicy *src) -{ - struct secpolicy *dst; - int i; - - if (src == NULL) - return (NULL); - - IPSEC_ASSERT(src->state == IPSEC_SPSTATE_PCB, ("SP isn't PCB")); - - dst = key_newsp(); - if (dst == NULL) - return (NULL); - - dst->policy = src->policy; - dst->state = src->state; - dst->priority = src->priority; - /* Do not touch the refcnt field. */ - - /* Copy IPsec request chain. */ - for (i = 0; i < src->tcount; i++) { - dst->req[i] = ipsec_newisr(); - if (dst->req[i] == NULL) { - key_freesp(&dst); - return (NULL); - } - bcopy(src->req[i], dst->req[i], sizeof(struct ipsecrequest)); - dst->tcount++; - } - KEYDBG(IPSEC_DUMP, - printf("%s: copied SP(%p) -> SP(%p)\n", __func__, src, dst); - kdebug_secpolicy(dst)); - return (dst); -} - -/* Copy old IPsec policy into new. */ -int -ipsec_copy_pcbpolicy(struct inpcb *old, struct inpcb *new) -{ - struct secpolicy *sp; - - /* - * old->inp_sp can be NULL if PCB was created when an IPsec - * support was unavailable. This is not an error, we don't have - * policies in this PCB, so nothing to copy. - */ - if (old->inp_sp == NULL) - return (0); - - IPSEC_ASSERT(new->inp_sp != NULL, ("new inp_sp is NULL")); - INP_WLOCK_ASSERT(new); - - if (old->inp_sp->flags & INP_INBOUND_POLICY) { - sp = ipsec_deepcopy_pcbpolicy(old->inp_sp->sp_in); - if (sp == NULL) - return (ENOBUFS); - } else - sp = NULL; - - if (new->inp_sp->flags & INP_INBOUND_POLICY) - key_freesp(&new->inp_sp->sp_in); - - new->inp_sp->sp_in = sp; - if (sp != NULL) - new->inp_sp->flags |= INP_INBOUND_POLICY; - else - new->inp_sp->flags &= ~INP_INBOUND_POLICY; - - if (old->inp_sp->flags & INP_OUTBOUND_POLICY) { - sp = ipsec_deepcopy_pcbpolicy(old->inp_sp->sp_out); - if (sp == NULL) - return (ENOBUFS); - } else - sp = NULL; - - if (new->inp_sp->flags & INP_OUTBOUND_POLICY) - key_freesp(&new->inp_sp->sp_out); - - new->inp_sp->sp_out = sp; - if (sp != NULL) - new->inp_sp->flags |= INP_OUTBOUND_POLICY; - else - new->inp_sp->flags &= ~INP_OUTBOUND_POLICY; - return (0); -} - -static int -ipsec_set_pcbpolicy(struct inpcb *inp, struct ucred *cred, - void *request, size_t len) -{ - struct sadb_x_policy *xpl; - struct secpolicy **spp, *newsp; - int error, flags; - - xpl = (struct sadb_x_policy *)request; - /* Select direction. */ - switch (xpl->sadb_x_policy_dir) { - case IPSEC_DIR_INBOUND: - spp = &inp->inp_sp->sp_in; - flags = INP_INBOUND_POLICY; - break; - case IPSEC_DIR_OUTBOUND: - spp = &inp->inp_sp->sp_out; - flags = INP_OUTBOUND_POLICY; - break; - default: - ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, - xpl->sadb_x_policy_dir)); - return (EINVAL); - } - /* - * Privileged sockets are allowed to set own security policy - * and configure IPsec bypass. Unprivileged sockets only can - * have ENTRUST policy. - */ - switch (xpl->sadb_x_policy_type) { - case IPSEC_POLICY_IPSEC: - case IPSEC_POLICY_BYPASS: - if (cred != NULL && - priv_check_cred(cred, PRIV_NETINET_IPSEC, 0) != 0) - return (EACCES); - /* Allocate new SP entry. */ - newsp = key_msg2sp(xpl, len, &error); - if (newsp == NULL) - return (error); - newsp->state = IPSEC_SPSTATE_PCB; - break; - case IPSEC_POLICY_ENTRUST: - /* We just use NULL pointer for ENTRUST policy */ - newsp = NULL; - break; - default: - /* Other security policy types aren't allowed for PCB */ - return (EINVAL); - } - - /* Clear old SP and set new SP. */ - if (*spp != NULL) - key_freesp(spp); - *spp = newsp; - KEYDBG(IPSEC_DUMP, - printf("%s: new SP(%p)\n", __func__, newsp)); - if (newsp == NULL) - inp->inp_sp->flags &= ~flags; - else { - inp->inp_sp->flags |= flags; - KEYDBG(IPSEC_DUMP, kdebug_secpolicy(newsp)); - } - return (0); -} - -static int -ipsec_get_pcbpolicy(struct inpcb *inp, void *request, size_t *len) -{ - struct sadb_x_policy *xpl; - struct secpolicy *sp; - int error, flags; - - xpl = (struct sadb_x_policy *)request; - flags = inp->inp_sp->flags; - /* Select direction. */ - switch (xpl->sadb_x_policy_dir) { - case IPSEC_DIR_INBOUND: - sp = inp->inp_sp->sp_in; - flags &= INP_INBOUND_POLICY; - break; - case IPSEC_DIR_OUTBOUND: - sp = inp->inp_sp->sp_out; - flags &= INP_OUTBOUND_POLICY; - break; - default: - ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, - xpl->sadb_x_policy_dir)); - return (EINVAL); - } - - if (flags == 0) { - /* Return ENTRUST policy */ - xpl->sadb_x_policy_exttype = SADB_X_EXT_POLICY; - xpl->sadb_x_policy_type = IPSEC_POLICY_ENTRUST; - xpl->sadb_x_policy_id = 0; - xpl->sadb_x_policy_priority = 0; - xpl->sadb_x_policy_len = PFKEY_UNIT64(sizeof(*xpl)); - *len = sizeof(*xpl); - return (0); - } - - IPSEC_ASSERT(sp != NULL, - ("sp is NULL, but flags is 0x%04x", inp->inp_sp->flags)); - - key_addref(sp); - error = key_sp2msg(sp, request, len); - key_freesp(&sp); - if (error == EINVAL) - return (error); - /* - * We return "success", but user should check *len. - * *len will be set to size of valid data and - * sadb_x_policy_len will contain needed size. - */ - return (0); -} - -/* Handle socket option control request for PCB */ -int -ipsec_control_pcbpolicy(struct inpcb *inp, struct sockopt *sopt) -{ - void *optdata; - size_t optlen; - int error; - - if (inp->inp_sp == NULL) - return (ENOPROTOOPT); - - /* Limit maximum request size to PAGE_SIZE */ - optlen = sopt->sopt_valsize; - if (optlen < sizeof(struct sadb_x_policy) || optlen > PAGE_SIZE) - return (EINVAL); - - optdata = malloc(optlen, M_TEMP, sopt->sopt_td ? M_WAITOK: M_NOWAIT); - if (optdata == NULL) - return (ENOBUFS); - /* - * We need a hint from the user, what policy is requested - input - * or output? User should specify it in the buffer, even for - * setsockopt(). - */ - error = sooptcopyin(sopt, optdata, optlen, optlen); - if (error == 0) { - if (sopt->sopt_dir == SOPT_SET) - error = ipsec_set_pcbpolicy(inp, - sopt->sopt_td ? sopt->sopt_td->td_ucred: NULL, - optdata, optlen); - else { - error = ipsec_get_pcbpolicy(inp, optdata, &optlen); - if (error == 0) - error = sooptcopyout(sopt, optdata, optlen); - } - } - free(optdata, M_TEMP); - return (error); -} - struct ipsecrequest * ipsec_newisr(void) { Added: projects/ipsec/sys/netipsec/ipsec_pcb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/ipsec/sys/netipsec/ipsec_pcb.c Thu Dec 15 17:34:18 2016 (r310123) @@ -0,0 +1,329 @@ +/*- + * Copyright (c) 2016 Andrey V. Elsukov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +/* Initialize PCB policy. */ +int +ipsec_init_pcbpolicy(struct inpcb *inp) +{ + + IPSEC_ASSERT(inp != NULL, ("null inp")); + IPSEC_ASSERT(inp->inp_sp == NULL, ("inp_sp already initialized")); + + inp->inp_sp = malloc(sizeof(struct inpcbpolicy), M_IPSEC_INPCB, + M_NOWAIT | M_ZERO); + if (inp->inp_sp == NULL) { + ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); + return (ENOBUFS); + } + return (0); +} + +/* Delete PCB policy. */ +int +ipsec_delete_pcbpolicy(struct inpcb *inp) +{ + + if (inp->inp_sp == NULL) + return (0); + + if (inp->inp_sp->flags & INP_INBOUND_POLICY) + key_freesp(&inp->inp_sp->sp_in); + + if (inp->inp_sp->flags & INP_OUTBOUND_POLICY) + key_freesp(&inp->inp_sp->sp_out); + + free(inp->inp_sp, M_IPSEC_INPCB); + inp->inp_sp = NULL; + return (0); +} + +/* Deep-copy a policy in PCB. */ +static struct secpolicy * +ipsec_deepcopy_pcbpolicy(struct secpolicy *src) +{ + struct secpolicy *dst; + int i; + + if (src == NULL) + return (NULL); + + IPSEC_ASSERT(src->state == IPSEC_SPSTATE_PCB, ("SP isn't PCB")); + + dst = key_newsp(); + if (dst == NULL) + return (NULL); + + dst->policy = src->policy; + dst->state = src->state; + dst->priority = src->priority; + /* Do not touch the refcnt field. */ + + /* Copy IPsec request chain. */ + for (i = 0; i < src->tcount; i++) { + dst->req[i] = ipsec_newisr(); + if (dst->req[i] == NULL) { + key_freesp(&dst); + return (NULL); + } + bcopy(src->req[i], dst->req[i], sizeof(struct ipsecrequest)); + dst->tcount++; + } + KEYDBG(IPSEC_DUMP, + printf("%s: copied SP(%p) -> SP(%p)\n", __func__, src, dst); + kdebug_secpolicy(dst)); + return (dst); +} + +/* Copy old IPsec policy into new. */ +int +ipsec_copy_pcbpolicy(struct inpcb *old, struct inpcb *new) +{ + struct secpolicy *sp; + + /* + * old->inp_sp can be NULL if PCB was created when an IPsec + * support was unavailable. This is not an error, we don't have + * policies in this PCB, so nothing to copy. + */ + if (old->inp_sp == NULL) + return (0); + + IPSEC_ASSERT(new->inp_sp != NULL, ("new inp_sp is NULL")); + INP_WLOCK_ASSERT(new); + + if (old->inp_sp->flags & INP_INBOUND_POLICY) { + sp = ipsec_deepcopy_pcbpolicy(old->inp_sp->sp_in); + if (sp == NULL) + return (ENOBUFS); + } else + sp = NULL; + + if (new->inp_sp->flags & INP_INBOUND_POLICY) + key_freesp(&new->inp_sp->sp_in); + + new->inp_sp->sp_in = sp; + if (sp != NULL) + new->inp_sp->flags |= INP_INBOUND_POLICY; + else + new->inp_sp->flags &= ~INP_INBOUND_POLICY; + + if (old->inp_sp->flags & INP_OUTBOUND_POLICY) { + sp = ipsec_deepcopy_pcbpolicy(old->inp_sp->sp_out); + if (sp == NULL) + return (ENOBUFS); + } else + sp = NULL; + + if (new->inp_sp->flags & INP_OUTBOUND_POLICY) + key_freesp(&new->inp_sp->sp_out); + + new->inp_sp->sp_out = sp; + if (sp != NULL) + new->inp_sp->flags |= INP_OUTBOUND_POLICY; + else + new->inp_sp->flags &= ~INP_OUTBOUND_POLICY; + return (0); +} + +static int +ipsec_set_pcbpolicy(struct inpcb *inp, struct ucred *cred, + void *request, size_t len) +{ + struct sadb_x_policy *xpl; + struct secpolicy **spp, *newsp; + int error, flags; + + xpl = (struct sadb_x_policy *)request; + /* Select direction. */ + switch (xpl->sadb_x_policy_dir) { + case IPSEC_DIR_INBOUND: + spp = &inp->inp_sp->sp_in; + flags = INP_INBOUND_POLICY; + break; + case IPSEC_DIR_OUTBOUND: + spp = &inp->inp_sp->sp_out; + flags = INP_OUTBOUND_POLICY; + break; + default: + ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, + xpl->sadb_x_policy_dir)); + return (EINVAL); + } + /* + * Privileged sockets are allowed to set own security policy + * and configure IPsec bypass. Unprivileged sockets only can + * have ENTRUST policy. + */ + switch (xpl->sadb_x_policy_type) { + case IPSEC_POLICY_IPSEC: + case IPSEC_POLICY_BYPASS: + if (cred != NULL && + priv_check_cred(cred, PRIV_NETINET_IPSEC, 0) != 0) + return (EACCES); + /* Allocate new SP entry. */ + newsp = key_msg2sp(xpl, len, &error); + if (newsp == NULL) + return (error); + newsp->state = IPSEC_SPSTATE_PCB; + break; + case IPSEC_POLICY_ENTRUST: + /* We just use NULL pointer for ENTRUST policy */ + newsp = NULL; + break; + default: + /* Other security policy types aren't allowed for PCB */ + return (EINVAL); + } + + /* Clear old SP and set new SP. */ + if (*spp != NULL) + key_freesp(spp); + *spp = newsp; + KEYDBG(IPSEC_DUMP, + printf("%s: new SP(%p)\n", __func__, newsp)); + if (newsp == NULL) + inp->inp_sp->flags &= ~flags; + else { + inp->inp_sp->flags |= flags; + KEYDBG(IPSEC_DUMP, kdebug_secpolicy(newsp)); + } + return (0); +} + +static int +ipsec_get_pcbpolicy(struct inpcb *inp, void *request, size_t *len) +{ + struct sadb_x_policy *xpl; + struct secpolicy *sp; + int error, flags; + + xpl = (struct sadb_x_policy *)request; + flags = inp->inp_sp->flags; + /* Select direction. */ + switch (xpl->sadb_x_policy_dir) { + case IPSEC_DIR_INBOUND: + sp = inp->inp_sp->sp_in; + flags &= INP_INBOUND_POLICY; + break; + case IPSEC_DIR_OUTBOUND: + sp = inp->inp_sp->sp_out; + flags &= INP_OUTBOUND_POLICY; + break; + default: + ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, + xpl->sadb_x_policy_dir)); + return (EINVAL); + } + + if (flags == 0) { + /* Return ENTRUST policy */ + xpl->sadb_x_policy_exttype = SADB_X_EXT_POLICY; + xpl->sadb_x_policy_type = IPSEC_POLICY_ENTRUST; + xpl->sadb_x_policy_id = 0; + xpl->sadb_x_policy_priority = 0; + xpl->sadb_x_policy_len = PFKEY_UNIT64(sizeof(*xpl)); + *len = sizeof(*xpl); + return (0); + } + + IPSEC_ASSERT(sp != NULL, + ("sp is NULL, but flags is 0x%04x", inp->inp_sp->flags)); + + key_addref(sp); + error = key_sp2msg(sp, request, len); + key_freesp(&sp); + if (error == EINVAL) + return (error); + /* + * We return "success", but user should check *len. + * *len will be set to size of valid data and + * sadb_x_policy_len will contain needed size. + */ + return (0); +} + +/* Handle socket option control request for PCB */ +int +ipsec_control_pcbpolicy(struct inpcb *inp, struct sockopt *sopt) +{ + void *optdata; + size_t optlen; + int error; + + if (inp->inp_sp == NULL) + return (ENOPROTOOPT); + + /* Limit maximum request size to PAGE_SIZE */ + optlen = sopt->sopt_valsize; + if (optlen < sizeof(struct sadb_x_policy) || optlen > PAGE_SIZE) + return (EINVAL); + + optdata = malloc(optlen, M_TEMP, sopt->sopt_td ? M_WAITOK: M_NOWAIT); + if (optdata == NULL) + return (ENOBUFS); + /* + * We need a hint from the user, what policy is requested - input + * or output? User should specify it in the buffer, even for + * setsockopt(). + */ + error = sooptcopyin(sopt, optdata, optlen, optlen); + if (error == 0) { + if (sopt->sopt_dir == SOPT_SET) + error = ipsec_set_pcbpolicy(inp, + sopt->sopt_td ? sopt->sopt_td->td_ucred: NULL, + optdata, optlen); + else { + error = ipsec_get_pcbpolicy(inp, optdata, &optlen); + if (error == 0) + error = sooptcopyout(sopt, optdata, optlen); + } + } + free(optdata, M_TEMP); + return (error); +} + From owner-svn-src-projects@freebsd.org Thu Dec 15 17:41:31 2016 Return-Path: Delivered-To: svn-src-projects@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 8879BC8139D for ; Thu, 15 Dec 2016 17:41:31 +0000 (UTC) (envelope-from ae@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 635E9B95; Thu, 15 Dec 2016 17:41:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFHfUQR018531; Thu, 15 Dec 2016 17:41:30 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFHfU51018528; Thu, 15 Dec 2016 17:41:30 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612151741.uBFHfU51018528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 15 Dec 2016 17:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310125 - projects/ipsec/sys/netipsec X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 17:41:31 -0000 Author: ae Date: Thu Dec 15 17:41:30 2016 New Revision: 310125 URL: https://svnweb.freebsd.org/changeset/base/310125 Log: Move xform_register() and xform_init() into key.c Modified: projects/ipsec/sys/netipsec/ipsec.c projects/ipsec/sys/netipsec/key.c projects/ipsec/sys/netipsec/xform.h Modified: projects/ipsec/sys/netipsec/ipsec.c ============================================================================== --- projects/ipsec/sys/netipsec/ipsec.c Thu Dec 15 17:36:54 2016 (r310124) +++ projects/ipsec/sys/netipsec/ipsec.c Thu Dec 15 17:41:30 2016 (r310125) @@ -1504,35 +1504,3 @@ def_policy_init(const void *unused __unu } VNET_SYSINIT(def_policy_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, def_policy_init, NULL); - - -/* XXX This stuff doesn't belong here... */ - -static struct xformsw* xforms = NULL; - -/* - * Register a transform; typically at system startup. - */ -void -xform_register(struct xformsw* xsp) -{ - - xsp->xf_next = xforms; - xforms = xsp; -} - -/* - * Initialize transform support in an sav. - */ -int -xform_init(struct secasvar *sav, int xftype) -{ - struct xformsw *xsp; - - if (sav->tdb_xform != NULL) /* Previously initialized. */ - return (0); - for (xsp = xforms; xsp; xsp = xsp->xf_next) - if (xsp->xf_type == xftype) - return ((*xsp->xf_init)(sav, xsp)); - return (EINVAL); -} Modified: projects/ipsec/sys/netipsec/key.c ============================================================================== --- projects/ipsec/sys/netipsec/key.c Thu Dec 15 17:36:54 2016 (r310124) +++ projects/ipsec/sys/netipsec/key.c Thu Dec 15 17:41:30 2016 (r310125) @@ -448,6 +448,8 @@ MALLOC_DEFINE(M_IPSEC_SAR, "ipsec-reg", static VNET_DEFINE(uma_zone_t, key_lft_zone); #define V_key_lft_zone VNET(key_lft_zone) +static struct xformsw* xforms = NULL; + /* * set parameters into secpolicyindex buffer. * Must allocate secpolicyindex buffer passed to this function. @@ -608,9 +610,9 @@ static int key_promisc(struct socket *, static int key_senderror(struct socket *, struct mbuf *, int); static int key_validate_ext(const struct sadb_ext *, int); static int key_align(struct mbuf *, struct sadb_msghdr *); -static struct mbuf *key_setlifetime(struct seclifetime *src, - u_int16_t exttype); -static struct mbuf *key_setkey(struct seckey *src, u_int16_t exttype); +static struct mbuf *key_setlifetime(struct seclifetime *, uint16_t); +static struct mbuf *key_setkey(struct seckey *, uint16_t); +static int xform_init(struct secasvar *, int); #define DBG_IPSEC_INITREF(t, p) do { \ refcount_init(&(p)->refcnt, 1); \ @@ -7805,7 +7807,7 @@ key_sa_recordxfer(struct secasvar *sav, */ static struct mbuf * -key_setkey(struct seckey *src, u_int16_t exttype) +key_setkey(struct seckey *src, uint16_t exttype) { struct mbuf *m; struct sadb_key *p; @@ -7845,7 +7847,7 @@ key_setkey(struct seckey *src, u_int16_t */ static struct mbuf * -key_setlifetime(struct seclifetime *src, u_int16_t exttype) +key_setlifetime(struct seclifetime *src, uint16_t exttype) { struct mbuf *m = NULL; struct sadb_lifetime *p; @@ -7872,3 +7874,30 @@ key_setlifetime(struct seclifetime *src, return m; } + +/* + * Register a transform; typically at system startup. + */ +void +xform_register(struct xformsw* xsp) +{ + + xsp->xf_next = xforms; + xforms = xsp; +} + +/* + * Initialize transform support in an sav. + */ +static int +xform_init(struct secasvar *sav, int xftype) +{ + struct xformsw *xsp; + + if (sav->tdb_xform != NULL) /* Previously initialized. */ + return (0); + for (xsp = xforms; xsp; xsp = xsp->xf_next) + if (xsp->xf_type == xftype) + return ((*xsp->xf_init)(sav, xsp)); + return (EINVAL); +} Modified: projects/ipsec/sys/netipsec/xform.h ============================================================================== --- projects/ipsec/sys/netipsec/xform.h Thu Dec 15 17:36:54 2016 (r310124) +++ projects/ipsec/sys/netipsec/xform.h Thu Dec 15 17:41:30 2016 (r310125) @@ -99,7 +99,6 @@ struct xformsw { #ifdef _KERNEL extern void xform_register(struct xformsw*); -extern int xform_init(struct secasvar *sav, int xftype); extern int xform_ah_authsize(struct auth_hash *esph); struct cryptoini; From owner-svn-src-projects@freebsd.org Fri Dec 16 18:30:55 2016 Return-Path: Delivered-To: svn-src-projects@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 4CAB5C83C2B for ; Fri, 16 Dec 2016 18:30:55 +0000 (UTC) (envelope-from dim@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 F2FFE18D7; Fri, 16 Dec 2016 18:30:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGIUsji029098; Fri, 16 Dec 2016 18:30:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGIUsqb029096; Fri, 16 Dec 2016 18:30:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612161830.uBGIUsqb029096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 16 Dec 2016 18:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310168 - in projects/clang391-import: contrib/llvm/tools/clang/lib/Basic lib/clang/include/clang/Basic X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 18:30:55 -0000 Author: dim Date: Fri Dec 16 18:30:53 2016 New Revision: 310168 URL: https://svnweb.freebsd.org/changeset/base/310168 Log: Merge llvm, clang, lld, lldb, compiler-rt and libc++ 3.9.1 release r289601. Modified: projects/clang391-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp projects/clang391-import/lib/clang/include/clang/Basic/Version.inc Directory Properties: projects/clang391-import/contrib/compiler-rt/ (props changed) projects/clang391-import/contrib/libc++/ (props changed) projects/clang391-import/contrib/llvm/ (props changed) projects/clang391-import/contrib/llvm/tools/clang/ (props changed) projects/clang391-import/contrib/llvm/tools/lld/ (props changed) projects/clang391-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang391-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- projects/clang391-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp Fri Dec 16 18:14:36 2016 (r310167) +++ projects/clang391-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp Fri Dec 16 18:30:53 2016 (r310168) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_39/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_391/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: projects/clang391-import/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- projects/clang391-import/lib/clang/include/clang/Basic/Version.inc Fri Dec 16 18:14:36 2016 (r310167) +++ projects/clang391-import/lib/clang/include/clang/Basic/Version.inc Fri Dec 16 18:30:53 2016 (r310168) @@ -7,4 +7,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "288847" +#define SVN_REVISION "289601" From owner-svn-src-projects@freebsd.org Fri Dec 16 18:38:34 2016 Return-Path: Delivered-To: svn-src-projects@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 ABC50C83C97 for ; Fri, 16 Dec 2016 18:38:34 +0000 (UTC) (envelope-from dim@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 42DBB1D1E; Fri, 16 Dec 2016 18:38:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGIcXwr030967; Fri, 16 Dec 2016 18:38:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGIcWis030952; Fri, 16 Dec 2016 18:38:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612161838.uBGIcWis030952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 16 Dec 2016 18:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310169 - in projects/clang391-import: . bin/dd bin/df bin/ed bin/ls/tests cddl/usr.sbin/dtrace/tests/tools contrib/binutils/bfd contrib/byacc contrib/byacc/package contrib/byacc/packag... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 18:38:34 -0000 Author: dim Date: Fri Dec 16 18:38:31 2016 New Revision: 310169 URL: https://svnweb.freebsd.org/changeset/base/310169 Log: Merge ^/head r309817 through r310168. Added: projects/clang391-import/sbin/decryptcore/ - copied from r310168, head/sbin/decryptcore/ projects/clang391-import/sys/arm/rockchip/rk30xx_mp.h - copied unchanged from r310168, head/sys/arm/rockchip/rk30xx_mp.h projects/clang391-import/sys/netinet6/ip6_fastfwd.c - copied unchanged from r310168, head/sys/netinet6/ip6_fastfwd.c projects/clang391-import/tests/sys/kern/reaper.c - copied unchanged from r310168, head/tests/sys/kern/reaper.c projects/clang391-import/tests/sys/vfs/lookup_cap_dotdot.c - copied unchanged from r310168, head/tests/sys/vfs/lookup_cap_dotdot.c projects/clang391-import/tools/build/options/WITH_REPRODUCIBLE_BUILD - copied unchanged from r310168, head/tools/build/options/WITH_REPRODUCIBLE_BUILD Modified: projects/clang391-import/Makefile.inc1 projects/clang391-import/ObsoleteFiles.inc projects/clang391-import/bin/dd/dd.c projects/clang391-import/bin/df/Makefile projects/clang391-import/bin/df/df.c projects/clang391-import/bin/ed/buf.c projects/clang391-import/bin/ed/ed.h projects/clang391-import/bin/ed/glbl.c projects/clang391-import/bin/ed/main.c projects/clang391-import/bin/ls/tests/ls_tests.sh projects/clang391-import/cddl/usr.sbin/dtrace/tests/tools/exclude.sh projects/clang391-import/contrib/binutils/bfd/elf.c projects/clang391-import/contrib/binutils/bfd/elflink.c projects/clang391-import/contrib/byacc/CHANGES projects/clang391-import/contrib/byacc/MANIFEST projects/clang391-import/contrib/byacc/VERSION projects/clang391-import/contrib/byacc/aclocal.m4 projects/clang391-import/contrib/byacc/btyaccpar.c projects/clang391-import/contrib/byacc/btyaccpar.skel projects/clang391-import/contrib/byacc/config.guess projects/clang391-import/contrib/byacc/config.sub projects/clang391-import/contrib/byacc/configure projects/clang391-import/contrib/byacc/defs.h projects/clang391-import/contrib/byacc/error.c projects/clang391-import/contrib/byacc/main.c projects/clang391-import/contrib/byacc/mstring.c projects/clang391-import/contrib/byacc/output.c projects/clang391-import/contrib/byacc/package/byacc.spec projects/clang391-import/contrib/byacc/package/debian/changelog projects/clang391-import/contrib/byacc/package/mingw-byacc.spec projects/clang391-import/contrib/byacc/package/pkgsrc/Makefile projects/clang391-import/contrib/byacc/reader.c projects/clang391-import/contrib/byacc/test/btyacc/btyacc_calc1.tab.c projects/clang391-import/contrib/byacc/test/btyacc/btyacc_demo.tab.c projects/clang391-import/contrib/byacc/test/btyacc/btyacc_demo.tab.h projects/clang391-import/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c projects/clang391-import/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c projects/clang391-import/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c projects/clang391-import/contrib/byacc/test/btyacc/calc.tab.c projects/clang391-import/contrib/byacc/test/btyacc/calc1.tab.c projects/clang391-import/contrib/byacc/test/btyacc/calc2.tab.c projects/clang391-import/contrib/byacc/test/btyacc/calc3.tab.c projects/clang391-import/contrib/byacc/test/btyacc/code_calc.code.c projects/clang391-import/contrib/byacc/test/btyacc/code_calc.tab.c projects/clang391-import/contrib/byacc/test/btyacc/code_error.code.c projects/clang391-import/contrib/byacc/test/btyacc/code_error.tab.c projects/clang391-import/contrib/byacc/test/btyacc/empty.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_inherit3.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_inherit4.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_inherit4.tab.h projects/clang391-import/contrib/byacc/test/btyacc/err_syntax10.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_syntax11.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_syntax12.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_syntax18.tab.c projects/clang391-import/contrib/byacc/test/btyacc/err_syntax20.tab.c projects/clang391-import/contrib/byacc/test/btyacc/error.tab.c projects/clang391-import/contrib/byacc/test/btyacc/grammar.tab.c projects/clang391-import/contrib/byacc/test/btyacc/inherit0.tab.c projects/clang391-import/contrib/byacc/test/btyacc/inherit1.tab.c projects/clang391-import/contrib/byacc/test/btyacc/inherit2.tab.c projects/clang391-import/contrib/byacc/test/btyacc/ok_syntax1.tab.c projects/clang391-import/contrib/byacc/test/btyacc/pure_calc.tab.c projects/clang391-import/contrib/byacc/test/btyacc/pure_error.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc-s.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc2-s.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc2.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc3-s.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc3.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc4-s.tab.c projects/clang391-import/contrib/byacc/test/btyacc/quote_calc4.tab.c projects/clang391-import/contrib/byacc/test/btyacc/rename_debug.c projects/clang391-import/contrib/byacc/test/btyacc/varsyntax_calc1.tab.c projects/clang391-import/contrib/byacc/yaccpar.c projects/clang391-import/contrib/byacc/yaccpar.skel projects/clang391-import/contrib/dma/dma-mbox-create.c projects/clang391-import/contrib/elftoolchain/libelf/gelf_phdr.c projects/clang391-import/contrib/elftoolchain/libelf/libelf_ehdr.c projects/clang391-import/contrib/libarchive/cpio/test/test_option_J_upper.c projects/clang391-import/contrib/libarchive/cpio/test/test_option_Z_upper.c projects/clang391-import/contrib/libarchive/cpio/test/test_option_u.c projects/clang391-import/contrib/libarchive/cpio/test/test_option_y.c projects/clang391-import/contrib/libarchive/libarchive/test/read_open_memory.c projects/clang391-import/contrib/libarchive/libarchive/test/test_fuzz.c projects/clang391-import/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c projects/clang391-import/contrib/libarchive/libarchive/test/test_read_set_format.c projects/clang391-import/contrib/libarchive/tar/test/main.c projects/clang391-import/contrib/libarchive/tar/test/test_leading_slash.c projects/clang391-import/contrib/libarchive/tar/test/test_option_a.c projects/clang391-import/contrib/libarchive/tar/test/test_option_b.c projects/clang391-import/contrib/libarchive/tar/test/test_option_b64encode.c projects/clang391-import/contrib/libarchive/tar/test/test_option_gid_gname.c projects/clang391-import/contrib/libarchive/tar/test/test_option_grzip.c projects/clang391-import/contrib/libarchive/tar/test/test_option_j.c projects/clang391-import/contrib/libarchive/tar/test/test_option_lrzip.c projects/clang391-import/contrib/libarchive/tar/test/test_option_lz4.c projects/clang391-import/contrib/libarchive/tar/test/test_option_lzma.c projects/clang391-import/contrib/libarchive/tar/test/test_option_lzop.c projects/clang391-import/contrib/libarchive/tar/test/test_option_r.c projects/clang391-import/contrib/libarchive/tar/test/test_option_uid_uname.c projects/clang391-import/contrib/libarchive/tar/test/test_option_uuencode.c projects/clang391-import/contrib/libarchive/tar/test/test_option_xz.c projects/clang391-import/contrib/libarchive/tar/test/test_option_z.c projects/clang391-import/contrib/libarchive/tar/test/test_stdio.c projects/clang391-import/contrib/libarchive/tar/test/test_version.c projects/clang391-import/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h projects/clang391-import/contrib/netbsd-tests/lib/libc/sys/t_mincore.c projects/clang391-import/etc/defaults/rc.conf projects/clang391-import/etc/rc.d/dumpon projects/clang391-import/include/Makefile projects/clang391-import/lib/libc++/Makefile projects/clang391-import/lib/libc/stdio/vfprintf.c projects/clang391-import/lib/libcapsicum/capsicum_helpers.h projects/clang391-import/libexec/rtld-elf/rtld.c projects/clang391-import/release/tools/openstack.conf projects/clang391-import/sbin/Makefile projects/clang391-import/sbin/camcontrol/timestamp.c projects/clang391-import/sbin/dumpon/Makefile projects/clang391-import/sbin/dumpon/dumpon.8 projects/clang391-import/sbin/dumpon/dumpon.c projects/clang391-import/sbin/ifconfig/ifieee80211.c projects/clang391-import/sbin/mount/getmntopts.c projects/clang391-import/sbin/mount/mntopts.h projects/clang391-import/sbin/savecore/savecore.8 projects/clang391-import/sbin/savecore/savecore.c projects/clang391-import/share/man/man4/rsu.4 projects/clang391-import/share/man/man5/rc.conf.5 projects/clang391-import/share/man/man9/Makefile projects/clang391-import/share/man/man9/sysctl.9 projects/clang391-import/share/man/man9/sysctl_add_oid.9 projects/clang391-import/share/misc/committers-ports.dot projects/clang391-import/share/misc/organization.dot projects/clang391-import/sys/amd64/amd64/machdep.c projects/clang391-import/sys/amd64/amd64/minidump_machdep.c projects/clang391-import/sys/arm/allwinner/a10/a10_padconf.c projects/clang391-import/sys/arm/allwinner/a10_mmc.c projects/clang391-import/sys/arm/allwinner/a13/a13_padconf.c projects/clang391-import/sys/arm/allwinner/a20/a20_padconf.c projects/clang391-import/sys/arm/allwinner/a31/a31_padconf.c projects/clang391-import/sys/arm/allwinner/a31/a31_r_padconf.c projects/clang391-import/sys/arm/allwinner/a31/a31s_padconf.c projects/clang391-import/sys/arm/allwinner/a64/a64_padconf.c projects/clang391-import/sys/arm/allwinner/a64/a64_r_padconf.c projects/clang391-import/sys/arm/allwinner/allwinner_pinctrl.h projects/clang391-import/sys/arm/allwinner/aw_machdep.c projects/clang391-import/sys/arm/allwinner/aw_wdog.c projects/clang391-import/sys/arm/allwinner/h3/h3_padconf.c projects/clang391-import/sys/arm/allwinner/h3/h3_r_padconf.c projects/clang391-import/sys/arm/amlogic/aml8726/aml8726_identsoc.c projects/clang391-import/sys/arm/amlogic/aml8726/aml8726_machdep.c projects/clang391-import/sys/arm/amlogic/aml8726/aml8726_wdt.c projects/clang391-import/sys/arm/arm/cpufunc.c projects/clang391-import/sys/arm/arm/db_trace.c projects/clang391-import/sys/arm/arm/gic.c projects/clang391-import/sys/arm/arm/minidump_machdep.c projects/clang391-import/sys/arm/arm/physmem.c projects/clang391-import/sys/arm/arm/platform_if.m projects/clang391-import/sys/arm/arm/undefined.c projects/clang391-import/sys/arm/at91/at91_spi.c projects/clang391-import/sys/arm/broadcom/bcm2835/bcm2835_machdep.c projects/clang391-import/sys/arm/broadcom/bcm2835/bcm2835_spi.c projects/clang391-import/sys/arm/broadcom/bcm2835/bcm2835_wdog.c projects/clang391-import/sys/arm/conf/RK3188 projects/clang391-import/sys/arm/freescale/imx/imx51_machdep.c projects/clang391-import/sys/arm/freescale/imx/imx53_machdep.c projects/clang391-import/sys/arm/freescale/imx/imx6_anatop.c projects/clang391-import/sys/arm/freescale/imx/imx6_machdep.c projects/clang391-import/sys/arm/freescale/imx/imx6_src.c projects/clang391-import/sys/arm/freescale/imx/imx_gpt.c projects/clang391-import/sys/arm/lpc/lpc_gpio.c projects/clang391-import/sys/arm/lpc/lpc_spi.c projects/clang391-import/sys/arm/nvidia/tegra124/tegra124_machdep.c projects/clang391-import/sys/arm/nvidia/tegra_efuse.c projects/clang391-import/sys/arm/qemu/virt_machdep.c projects/clang391-import/sys/arm/rockchip/rk30xx_machdep.c projects/clang391-import/sys/arm/rockchip/rk30xx_mp.c projects/clang391-import/sys/arm/rockchip/rk30xx_wdog.c projects/clang391-import/sys/arm/ti/am335x/am335x_dmtpps.c projects/clang391-import/sys/arm/ti/ti_machdep.c projects/clang391-import/sys/arm/ti/ti_spi.c projects/clang391-import/sys/arm/versatile/versatile_machdep.c projects/clang391-import/sys/arm/xilinx/zy7_machdep.c projects/clang391-import/sys/arm/xilinx/zy7_slcr.c projects/clang391-import/sys/arm/xscale/pxa/pxa_gpio.c projects/clang391-import/sys/arm/xscale/pxa/pxa_icu.c projects/clang391-import/sys/arm/xscale/pxa/pxa_space.c projects/clang391-import/sys/arm/xscale/pxa/pxa_timer.c projects/clang391-import/sys/arm64/arm64/minidump_machdep.c projects/clang391-import/sys/arm64/conf/GENERIC projects/clang391-import/sys/boot/arm/uboot/Makefile projects/clang391-import/sys/cam/ata/ata_da.c projects/clang391-import/sys/cam/ata/ata_pmp.c projects/clang391-import/sys/cam/nvme/nvme_da.c projects/clang391-import/sys/cam/scsi/scsi_cd.c projects/clang391-import/sys/cam/scsi/scsi_da.c projects/clang391-import/sys/cam/scsi/scsi_sa.c projects/clang391-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c projects/clang391-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c projects/clang391-import/sys/compat/linuxkpi/common/include/linux/pci.h projects/clang391-import/sys/compat/linuxkpi/common/include/linux/sysfs.h projects/clang391-import/sys/conf/NOTES projects/clang391-import/sys/conf/files projects/clang391-import/sys/conf/kern.opts.mk projects/clang391-import/sys/conf/kern.post.mk projects/clang391-import/sys/conf/newvers.sh projects/clang391-import/sys/conf/options projects/clang391-import/sys/conf/options.arm projects/clang391-import/sys/ddb/db_sym.c projects/clang391-import/sys/ddb/db_textdump.c projects/clang391-import/sys/dev/acpica/acpi.c projects/clang391-import/sys/dev/acpica/acpi_thermal.c projects/clang391-import/sys/dev/acpica/acpivar.h projects/clang391-import/sys/dev/cxgbe/adapter.h projects/clang391-import/sys/dev/cxgbe/common/common.h projects/clang391-import/sys/dev/cxgbe/common/t4_hw.c projects/clang391-import/sys/dev/cxgbe/common/t4_msg.h projects/clang391-import/sys/dev/cxgbe/firmware/t6fw_cfg.txt projects/clang391-import/sys/dev/cxgbe/t4_main.c projects/clang391-import/sys/dev/cxgbe/t4_sge.c projects/clang391-import/sys/dev/drm2/i915/i915_gem.c projects/clang391-import/sys/dev/evdev/evdev.c projects/clang391-import/sys/dev/evdev/evdev.h projects/clang391-import/sys/dev/extres/clk/clk_div.c projects/clang391-import/sys/dev/extres/clk/clk_div.h projects/clang391-import/sys/dev/gpio/gpiobus.c projects/clang391-import/sys/dev/gpio/gpiospi.c projects/clang391-import/sys/dev/hyperv/include/hyperv.h projects/clang391-import/sys/dev/hyperv/include/vmbus.h projects/clang391-import/sys/dev/hyperv/netvsc/if_hn.c projects/clang391-import/sys/dev/hyperv/netvsc/if_hnvar.h projects/clang391-import/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c projects/clang391-import/sys/dev/hyperv/vmbus/hyperv_reg.h projects/clang391-import/sys/dev/hyperv/vmbus/vmbus_chan.c projects/clang391-import/sys/dev/hyperv/vmbus/vmbus_chanvar.h projects/clang391-import/sys/dev/iwn/if_iwn.c projects/clang391-import/sys/dev/mlx4/mlx4_core/mlx4_main.c projects/clang391-import/sys/dev/null/null.c projects/clang391-import/sys/dev/pci/pci_host_generic_fdt.c projects/clang391-import/sys/dev/spibus/spibus.c projects/clang391-import/sys/dev/syscons/sysmouse.c projects/clang391-import/sys/dev/usb/wlan/if_rsu.c projects/clang391-import/sys/dev/usb/wlan/if_rsureg.h projects/clang391-import/sys/dev/vt/vt_sysmouse.c projects/clang391-import/sys/dev/xen/blkfront/blkfront.c projects/clang391-import/sys/fs/tmpfs/tmpfs_subr.c projects/clang391-import/sys/geom/geom_dev.c projects/clang391-import/sys/i386/i386/minidump_machdep.c projects/clang391-import/sys/kern/kern_descrip.c projects/clang391-import/sys/kern/kern_dump.c projects/clang391-import/sys/kern/kern_et.c projects/clang391-import/sys/kern/kern_event.c projects/clang391-import/sys/kern/kern_exit.c projects/clang391-import/sys/kern/kern_fork.c projects/clang391-import/sys/kern/kern_procctl.c projects/clang391-import/sys/kern/kern_shutdown.c projects/clang391-import/sys/kern/kern_sysctl.c projects/clang391-import/sys/kern/kern_tc.c projects/clang391-import/sys/kern/subr_bus.c projects/clang391-import/sys/kern/subr_counter.c projects/clang391-import/sys/kern/uipc_shm.c projects/clang391-import/sys/kern/vfs_cache.c projects/clang391-import/sys/kern/vfs_lookup.c projects/clang391-import/sys/kern/vfs_subr.c projects/clang391-import/sys/kern/vfs_syscalls.c projects/clang391-import/sys/mips/atheros/ar531x/ar5315_spi.c projects/clang391-import/sys/mips/atheros/ar71xx_spi.c projects/clang391-import/sys/mips/conf/std.AR933X projects/clang391-import/sys/mips/ingenic/jz4780_clock.c projects/clang391-import/sys/mips/mediatek/mtk_spi_v1.c projects/clang391-import/sys/mips/mediatek/mtk_spi_v2.c projects/clang391-import/sys/mips/mips/cpu.c projects/clang391-import/sys/mips/mips/db_trace.c projects/clang391-import/sys/mips/mips/minidump_machdep.c projects/clang391-import/sys/mips/mips/pm_machdep.c projects/clang391-import/sys/mips/rt305x/rt305x_spi.c projects/clang391-import/sys/net/if_media.h projects/clang391-import/sys/net80211/_ieee80211.h projects/clang391-import/sys/net80211/ieee80211.c projects/clang391-import/sys/net80211/ieee80211_node.h projects/clang391-import/sys/net80211/ieee80211_var.h projects/clang391-import/sys/netinet/sctp_indata.c projects/clang391-import/sys/netinet/sctputil.c projects/clang391-import/sys/netinet/tcp_output.c projects/clang391-import/sys/netinet6/in6_var.h projects/clang391-import/sys/netinet6/ip6_input.c projects/clang391-import/sys/powerpc/powerpc/db_disasm.c projects/clang391-import/sys/powerpc/powerpc/trap.c projects/clang391-import/sys/sparc64/sparc64/dump_machdep.c projects/clang391-import/sys/sys/conf.h projects/clang391-import/sys/sys/disk.h projects/clang391-import/sys/sys/kerneldump.h projects/clang391-import/sys/sys/param.h projects/clang391-import/sys/sys/sysctl.h projects/clang391-import/sys/sys/vnode.h projects/clang391-import/sys/vm/default_pager.c projects/clang391-import/sys/vm/vm_map.c projects/clang391-import/sys/vm/vm_object.c projects/clang391-import/sys/vm/vm_object.h projects/clang391-import/sys/vm/vm_page.c projects/clang391-import/sys/vm/vm_page.h projects/clang391-import/sys/vm/vm_reserv.c projects/clang391-import/sys/x86/acpica/srat.c projects/clang391-import/sys/x86/x86/mca.c projects/clang391-import/tests/sys/kern/Makefile projects/clang391-import/tests/sys/vfs/Makefile projects/clang391-import/usr.bin/hexdump/display.c projects/clang391-import/usr.bin/hexdump/hexdump.c projects/clang391-import/usr.bin/iconv/iconv.c projects/clang391-import/usr.bin/ident/ident.c projects/clang391-import/usr.bin/ktrdump/ktrdump.c projects/clang391-import/usr.bin/last/last.c projects/clang391-import/usr.bin/ministat/ministat.c projects/clang391-import/usr.sbin/bsdinstall/scripts/wlanconfig projects/clang391-import/usr.sbin/syslogd/Makefile projects/clang391-import/usr.sbin/syslogd/syslogd.c Directory Properties: projects/clang391-import/ (props changed) projects/clang391-import/cddl/ (props changed) projects/clang391-import/contrib/binutils/ (props changed) projects/clang391-import/contrib/byacc/ (props changed) projects/clang391-import/contrib/dma/ (props changed) projects/clang391-import/contrib/elftoolchain/ (props changed) projects/clang391-import/contrib/libarchive/ (props changed) projects/clang391-import/contrib/llvm/ (props changed) projects/clang391-import/contrib/netbsd-tests/ (props changed) projects/clang391-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang391-import/Makefile.inc1 ============================================================================== --- projects/clang391-import/Makefile.inc1 Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/Makefile.inc1 Fri Dec 16 18:38:31 2016 (r310169) @@ -591,7 +591,7 @@ XCFLAGS+= -B${WORLDTMP}/usr/lib # XXX: This should be checking MK_GNUCXX == no .if ${X_COMPILER_VERSION} >= 40800 XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \ - -nostdinc++ -L${WORLDTMP}/../lib/libc++ + -nostdinc++ .endif .elif ${WANT_COMPILER_TYPE} == clang || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) Modified: projects/clang391-import/ObsoleteFiles.inc ============================================================================== --- projects/clang391-import/ObsoleteFiles.inc Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/ObsoleteFiles.inc Fri Dec 16 18:38:31 2016 (r310169) @@ -3048,7 +3048,6 @@ OLD_FILES+=usr/lib32/libftpio_p.a OLD_FILES+=usr/include/ftpio.h OLD_FILES+=usr/share/man/man3/ftpio.3.gz # 20110915: rename congestion control manpages -OLD_FILES+=usr/share/man/man4/cc.4.gz OLD_FILES+=usr/share/man/man9/cc.9.gz # 20110831: atomic page flags operations OLD_FILES+=usr/share/man/man9/vm_page_flag.9.gz Modified: projects/clang391-import/bin/dd/dd.c ============================================================================== --- projects/clang391-import/bin/dd/dd.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/dd/dd.c Fri Dec 16 18:38:31 2016 (r310169) @@ -142,8 +142,6 @@ setup(void) in.fd = open(in.name, O_RDONLY, 0); if (in.fd == -1) err(1, "%s", in.name); - if (caph_limit_stdin() == -1) - err(1, "unable to limit capability rights"); } getfdtype(&in); @@ -176,8 +174,6 @@ setup(void) } if (out.fd == -1) err(1, "%s", out.name); - if (caph_limit_stdout() == -1) - err(1, "unable to limit capability rights"); } getfdtype(&out); @@ -188,6 +184,16 @@ setup(void) errno != ENOSYS) err(1, "unable to limit capability rights"); + if (in.fd != STDIN_FILENO && out.fd != STDIN_FILENO) { + if (caph_limit_stdin() == -1) + err(1, "unable to limit capability rights"); + } + + if (in.fd != STDOUT_FILENO && out.fd != STDOUT_FILENO) { + if (caph_limit_stdout() == -1) + err(1, "unable to limit capability rights"); + } + if (in.fd != STDERR_FILENO && out.fd != STDERR_FILENO) { if (caph_limit_stderr() == -1) err(1, "unable to limit capability rights"); Modified: projects/clang391-import/bin/df/Makefile ============================================================================== --- projects/clang391-import/bin/df/Makefile Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/df/Makefile Fri Dec 16 18:38:31 2016 (r310169) @@ -10,6 +10,9 @@ SRCS= df.c vfslist.c CFLAGS+= -I${MOUNT} +CFLAGS+= -DMOUNT_CHAR_DEVS +SRCS+= getmntopts.c + LIBADD= xo util .include Modified: projects/clang391-import/bin/df/df.c ============================================================================== --- projects/clang391-import/bin/df/df.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/df/df.c Fri Dec 16 18:38:31 2016 (r310169) @@ -50,10 +50,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef MOUNT_CHAR_DEVS #include +#endif #include #include #include +#ifdef MOUNT_CHAR_DEVS +#include +#endif #include #include #include @@ -98,7 +103,9 @@ imax(int a, int b) static int aflag = 0, cflag, hflag, iflag, kflag, lflag = 0, nflag, Tflag; static int thousands; +#ifdef MOUNT_CHAR_DEVS static struct ufs_args mdev; +#endif int main(int argc, char *argv[]) @@ -107,11 +114,21 @@ main(int argc, char *argv[]) struct statfs statfsbuf, totalbuf; struct maxwidths maxwidths; struct statfs *mntbuf; +#ifdef MOUNT_CHAR_DEVS + struct iovec *iov = NULL; +#endif const char *fstype; - char *mntpath, *mntpt; +#ifdef MOUNT_CHAR_DEVS + char *mntpath; + char errmsg[255] = {0}; +#endif + char *mntpt; const char **vfslist; int i, mntsize; int ch, rv; +#ifdef MOUNT_CHAR_DEVS + int iovlen = 0; +#endif fstype = "ufs"; (void)setlocale(LC_ALL, ""); @@ -227,6 +244,7 @@ main(int argc, char *argv[]) rv = 1; continue; } +#ifdef MOUNT_CHAR_DEVS } else if (S_ISCHR(stbuf.st_mode)) { if ((mntpt = getmntpt(*argv)) == NULL) { mdev.fspec = *argv; @@ -243,9 +261,23 @@ main(int argc, char *argv[]) free(mntpath); continue; } - if (mount(fstype, mntpt, MNT_RDONLY, - &mdev) != 0) { - xo_warn("%s", *argv); + if (iov != NULL) + free_iovec(&iov, &iovlen); + build_iovec_argf(&iov, &iovlen, "fstype", "%s", + fstype); + build_iovec_argf(&iov, &iovlen, "fspath", "%s", + mntpath); + build_iovec_argf(&iov, &iovlen, "from", "%s", + *argv); + build_iovec(&iov, &iovlen, "errmsg", errmsg, + sizeof(errmsg)); + if (nmount(iov, iovlen, + MNT_RDONLY|MNT_NOEXEC) < 0) { + if (errmsg[0]) + xo_warn("%s: %s", *argv, + errmsg); + else + xo_warn("%s", *argv); rv = 1; (void)rmdir(mntpt); free(mntpath); @@ -264,6 +296,7 @@ main(int argc, char *argv[]) free(mntpath); continue; } +#endif } else mntpt = *argv; Modified: projects/clang391-import/bin/ed/buf.c ============================================================================== --- projects/clang391-import/bin/ed/buf.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/ed/buf.c Fri Dec 16 18:38:31 2016 (r310169) @@ -46,9 +46,9 @@ char * get_sbuf_line(line_t *lp) { static char *sfbuf = NULL; /* buffer */ - static int sfbufsz = 0; /* buffer size */ + static size_t sfbufsz; /* buffer size */ - int len, ct; + size_t len; if (lp == &buffer_head) return NULL; @@ -64,7 +64,7 @@ get_sbuf_line(line_t *lp) } len = lp->len; REALLOC(sfbuf, sfbufsz, len + 1, NULL); - if ((ct = fread(sfbuf, sizeof(char), len, sfp)) < 0 || ct != len) { + if (fread(sfbuf, sizeof(char), len, sfp) != len) { fprintf(stderr, "%s\n", strerror(errno)); errmsg = "cannot read temp file"; return NULL; @@ -81,7 +81,7 @@ const char * put_sbuf_line(const char *cs) { line_t *lp; - int len, ct; + size_t len; const char *s; if ((lp = (line_t *) malloc(sizeof(line_t))) == NULL) { @@ -110,7 +110,7 @@ put_sbuf_line(const char *cs) seek_write = 0; } /* assert: SPL1() */ - if ((ct = fwrite(cs, sizeof(char), len, sfp)) < 0 || ct != len) { + if (fwrite(cs, sizeof(char), len, sfp) != len) { sfseek = -1; fprintf(stderr, "%s\n", strerror(errno)); errmsg = "cannot write temp file"; Modified: projects/clang391-import/bin/ed/ed.h ============================================================================== --- projects/clang391-import/bin/ed/ed.h Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/ed/ed.h Fri Dec 16 18:38:31 2016 (r310169) @@ -115,7 +115,7 @@ if (--mutex == 0) { \ /* REALLOC: assure at least a minimum size for buffer b */ #define REALLOC(b,n,i,err) \ if ((i) > (n)) { \ - int ti = (n); \ + size_t ti = (n); \ char *ts; \ SPL1(); \ if ((b) != NULL) { \ @@ -141,7 +141,7 @@ if ((i) > (n)) { \ /* REALLOC: assure at least a minimum size for buffer b */ #define REALLOC(b,n,i,err) \ if ((i) > (n)) { \ - int ti = (n); \ + size_t ti = (n); \ char *ts; \ SPL1(); \ if ((ts = (char *) realloc((b), ti += max((i), MINBUFSZ))) == NULL) { \ Modified: projects/clang391-import/bin/ed/glbl.c ============================================================================== --- projects/clang391-import/bin/ed/glbl.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/ed/glbl.c Fri Dec 16 18:38:31 2016 (r310169) @@ -146,7 +146,7 @@ int set_active_node(line_t *lp) { if (active_last + 1 > active_size) { - int ti = active_size; + size_t ti = active_size; line_t **ts; SPL1(); #if defined(sun) || defined(NO_REALLOC_NULL) Modified: projects/clang391-import/bin/ed/main.c ============================================================================== --- projects/clang391-import/bin/ed/main.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/ed/main.c Fri Dec 16 18:38:31 2016 (r310169) @@ -1356,7 +1356,7 @@ handle_hup(int signo) char *hup = NULL; /* hup filename */ char *s; char ed_hup[] = "ed.hup"; - int n; + size_t n; if (!sigactive) quit(1); Modified: projects/clang391-import/bin/ls/tests/ls_tests.sh ============================================================================== --- projects/clang391-import/bin/ls/tests/ls_tests.sh Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/bin/ls/tests/ls_tests.sh Fri Dec 16 18:38:31 2016 (r310169) @@ -697,7 +697,6 @@ atf_test_case o_flag o_flag_head() { atf_set "descr" "Verify that the output from ls -o prints out the chflag values or '-' if none are set" - atf_set "require.user" "root" } o_flag_body() @@ -711,6 +710,7 @@ o_flag_body() atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=b.file \ bs=$size count=1 atf_check -e empty -o empty -s exit:0 chflags uarch a.file + atf_check -e empty -o empty -s exit:0 chflags 0 b.file atf_check -e empty -o match:"[[:space:]]+uarch[[:space:]]$size+.+a\\.file" \ -s exit:0 ls -lo a.file Modified: projects/clang391-import/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- projects/clang391-import/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Dec 16 18:38:31 2016 (r310169) @@ -188,3 +188,6 @@ exclude EXFAIL common/usdt/tst.static2.k # Uses the Solaris-specific ppriv(1). exclude EXFAIL common/usdt/tst.user.ksh + +# Triggers a lock assertion by using the raise() action from a profile probe. +exclude SKIP common/ustack/tst.spin.ksh Modified: projects/clang391-import/contrib/binutils/bfd/elf.c ============================================================================== --- projects/clang391-import/contrib/binutils/bfd/elf.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/contrib/binutils/bfd/elf.c Fri Dec 16 18:38:31 2016 (r310169) @@ -8826,7 +8826,7 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd count = relplt->size / hdr->sh_entsize; size = count * sizeof (asymbol); p = relplt->relocation; - for (i = 0; i < count; i++, s++, p++) + for (i = 0; i < count; i++, p++) size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); s = *ret = bfd_malloc (size); Modified: projects/clang391-import/contrib/binutils/bfd/elflink.c ============================================================================== --- projects/clang391-import/contrib/binutils/bfd/elflink.c Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/contrib/binutils/bfd/elflink.c Fri Dec 16 18:38:31 2016 (r310169) @@ -11487,7 +11487,7 @@ _bfd_elf_section_already_linked (bfd *ab abfd, sec); else if (sec->size != 0) { - bfd_byte *sec_contents, *l_sec_contents; + bfd_byte *sec_contents, *l_sec_contents = NULL; if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents)) (*_bfd_error_handler) Modified: projects/clang391-import/contrib/byacc/CHANGES ============================================================================== --- projects/clang391-import/contrib/byacc/CHANGES Fri Dec 16 18:30:53 2016 (r310168) +++ projects/clang391-import/contrib/byacc/CHANGES Fri Dec 16 18:38:31 2016 (r310169) @@ -1,4 +1,123 @@ -2016-06-06 Thomas E. Dickey +2016-12-02 Thomas E. Dickey + + * test/btyacc/quote_calc4-s.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc /btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, btyaccpar.c: + regen + + * btyaccpar.skel: changes from NetBSD + + use YYINT rather than short in btyaccpar.skel + (some of this had already been done by Tom Shields) + + remove some casts of malloc/realloc + + * yaccpar.c, yaccpar.skel, output.c: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * test/btyacc/btyacc_demo.tab.h, test/btyacc/code_calc.tab.c, test/btyacc/code_error.tab.c, test/btyacc/err_inherit4.tab.h: + regen + + * btyaccpar.c, btyaccpar.skel, reader.c: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * reader.c: + fix from NetBSD: correct off-by-one when adding a null in copy_param() + + * reader.c: adapted from NetBSD + - Convert *most* error fingerprints to: + -unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) + +unterminated_arglist(const struct ainfo *a) + - Cast new args to unsigned char + + * defs.h: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * defs.h: adapted from NetBSD + - Convert *most* error fingerprints to: + -unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) + +unterminated_arglist(const struct ainfo *a) + - Cast new args to unsigned char + + * main.c: changes from NetBSD + - Add some more bison stuff to make the mesa/gallium parser work: + %initial-action (add missing source struct member in location) + %debug (unimplemented) + %error-verbose (unimplemented) + + This changes some existing code: + + yylloc is now a pointer, so + + the first parameter to YYERROR_DECL() is a pointer + + struct YYLTYPE now has a "source" field + + * error.c: adapted from NetBSD + - Convert *most* error fingerprints to: + -unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) + +unterminated_arglist(const struct ainfo *a) + - Cast new args to unsigned char + + * mstring.c: adapted change from NetBSD to add casts for ctype macros + + * test/btyacc/btyacc_demo.tab.h, test/btyacc/err_inherit4.tab.h: regen + + * output.c: reorder to eliminate a forward-reference + +2016-12-02 Tom.Shields + + * output.c: + modify output to enable compilation of a lexer generated by flex (using + "%option bison-bridge" and "%option bison-locations") to be used with a parser + generated by b(t)yacc (using directives "%locations" and "%pure-parser"). + +2016-12-02 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: Improved autoconf macros + CF_CC_ENV_FLAGS + + improve split between compiler and options, prompted by report where user + had "ccache" before the compiler + + leave non-preprocessor options in "$CC" (but still copy them to "$CFLAGS" + since that's where they should be) + CF_GNU_SOURCE,v + + recent glibc (Debian 2.23-4 for example) has misordered ifdef/checks for new + symbol _DEFAULT_SOURCE, producing warning messages when only _GNU_SOURCE is + defined. Add a followup check to define _DEFAULT_SOURCE. + CF_XOPEN_SOURCE + + add "uclinux" to list of Linux's (patch by Yann E. Morin) + + use _GNU_SOURCE for cygwin headers + + build-fixes for OS/2 + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-11-20 Thomas E. Dickey + + * config.sub: 2016-11-19 + + * config.guess: 2016-10-02 + +2016-06-06 Thomas E. Dickey * configure: regen @@ -32,7 +151,7 @@ small fix for an edge case of initialized data in Chris Dodd's btyacc changes: "Avoid crash when input pops up an Action error at the first token" -2016-06-01 Thomas E. Dickey +2016-06-01 Thomas E. Dickey * test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/err_syntax24.error, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_calc.tab.c, test/yacc/code_calc.tab.h, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/rename_debug.c, yaccpar.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3- s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.error, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax27.tab.c, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax9.tab.c, te st/btyacc/error.tab.c, test/btyacc/grammar.t! ab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.output, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.error, test/btyacc/btyacc_demo.output, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_calc.tab.c, test/btyacc/code_calc.tab.h, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit3.output, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.output, test/btyacc/err_inherit4.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.t ab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c: regen @@ -72,12 +191,12 @@ + changes to a couple of test cases for coverage of #3, #4 and #5 above -2016-06-01 Thomas E. Dickey +2016-06-01 Thomas E. Dickey * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: bump -2016-03-24 Thomas E. Dickey +2016-03-24 Thomas E. Dickey * reader.c: unused variable @@ -90,7 +209,7 @@ the first occurrence of ".c" in the name in 2005-08-13 changes rather than at the end of the filename (patch by Jung-uk Kim) -2016-03-24 Thomas E. Dickey +2016-03-24 Thomas E. Dickey * aclocal.m4: update CF_WITH_MAN2HTML to use configured shell rather than /bin/sh @@ -98,11 +217,11 @@ * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: bump -2016-01-25 Thomas E. Dickey +2016-01-25 Thomas E. Dickey * config.guess, config.sub: 2016-01-01 -2015-07-10 Thomas E. Dickey +2015-07-10 Thomas E. Dickey * lr0.c: fix a duplicate-free in the leak-checking @@ -117,7 +236,7 @@ make relationship with format/size clearer (prompted by discussion with Pedro Giffuni, Oliver Pinter) -2015-07-05 Thomas E. Dickey +2015-07-05 Thomas E. Dickey * configure: regen @@ -131,13 +250,13 @@ * configure.in: add configure option --with-man2html -2015-05-02 Thomas E. Dickey +2015-05-02 Thomas E. Dickey * config.guess: 2015-03-04 * config.sub: 2015-03-08 -2014-11-28 Thomas E. Dickey +2014-11-28 Thomas E. Dickey * lr0.c: coverity #39181: memory leak @@ -159,7 +278,7 @@ Regards Jouk. -2014-10-06 Thomas E. Dickey +2014-10-06 Thomas E. Dickey * package/debian/source/format: change to native format to work around regression in Debian packaging. @@ -179,7 +298,7 @@ better fix for get_line, by ensuring there is enough space to null-terminate its result (prompted by discussion with Craig Rodrigues). -2014-10-05 Thomas E. Dickey +2014-10-05 Thomas E. Dickey * main.c: make change to umask before calling mkstemp, as suggested in Coverity #56902 @@ -250,7 +369,7 @@ modify copy_param() to handle resulting comma-separated list. Before, it only expected a single parameter. -2014-10-04 Thomas E. Dickey +2014-10-04 Thomas E. Dickey * reader.c: split-out save_param() from copy_param() @@ -271,28 +390,28 @@ * test/btyacc/btyacc_destroy3.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.error, test/btyacc/btyacc_destroy3.output, test/btyacc/btyacc_destroy3.tab.h, test/btyacc/btyacc_destroy2.error, test/btyacc/btyacc_destroy2.output, test/btyacc/btyacc_destroy2.tab.h: RCS_BASE -2014-10-03 Thomas E. Dickey +2014-10-03 Thomas E. Dickey * test/btyacc/btyacc_demo2.error, test/btyacc/btyacc_demo2.output, test/btyacc/btyacc_demo2.tab.c, test/btyacc/btyacc_demo2.tab.h, test/btyacc/btyacc_destroy1.error, test/btyacc/btyacc_destroy1.output, test/btyacc/btyacc_destroy1.tab.h, test/btyacc_destroy3.y, test/btyacc_destroy1.y, test/btyacc_destroy2.y: RCS_BASE -2014-10-02 Thomas E. Dickey +2014-10-02 Thomas E. Dickey * main.c, reader.c, defs.h: use calloc in get_line() when allocating line to ensure it is fully initialized, fixes a later uninitialized value in copy_param() (FreeBSD #193499). -2014-09-17 Thomas E. Dickey +2014-09-17 Thomas E. Dickey * closure.c, lalr.c, output.c, defs.h: rephrase odd addressing to fix Coverity #48848, #38950, #38860, not actually a bug. -2014-09-01 Thomas E. Dickey +2014-09-01 Thomas E. Dickey * config.sub: update to 2014-07-28 -2014-07-27 Thomas E. Dickey +2014-07-27 Thomas E. Dickey * configure: regen @@ -301,7 +420,7 @@ * package/pkgsrc/Makefile, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec: bump -2014-07-15 Thomas E. Dickey +2014-07-15 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (no change to configure script) @@ -312,7 +431,7 @@ make top-level "make check" work again, by adding another step to filtering the test results. -2014-07-14 Thomas E. Dickey +2014-07-14 Thomas E. Dickey * test/run_test.sh: changes from Garrett Cooper's patch: a) ensure that the script returns an error-code if there are differences @@ -331,12 +450,12 @@ * main.c: remove obsolete -D option from usage message -2014-05-27 Thomas E. Dickey +2014-05-27 Thomas E. Dickey * VERSION, package/byacc.spec, package/debian/changelog, test/yacc/big_b.output, test/yacc/big_l.output, test/yacc/help.output, test/yacc/no_b_opt.output, test/yacc/no_output2.output, test/yacc/no_p_opt.output, test/yacc/nostdin.output: bump -2014-04-22 Thomas E. Dickey +2014-04-22 Thomas E. Dickey * mstring.c: use vsnprintf() to ensure that msprintf's buffer is large enough. @@ -364,12 +483,12 @@ drop "NOTES-btyacc-Changes" and "NOTES-btyacc-Disposition", merging relevant content into README.BTYACC -2014-04-22 Thomas E. Dickey +2014-04-22 Thomas E. Dickey * package/pkgsrc/Makefile, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec: bump -2014-04-19 Thomas E. Dickey +2014-04-19 Thomas E. Dickey * config.sub: 2014-04-03 @@ -379,7 +498,7 @@ * main.c, defs.h: patch to allow DEBUG build with WIN32 system -2014-04-09 Thomas E. Dickey +2014-04-09 Thomas E. Dickey * output.c, reader.c: gcc warnings @@ -420,7 +539,7 @@ * yacc.1: clarify relationship of btyacc features to default configuration. -2014-04-08 Thomas E. Dickey +2014-04-08 Thomas E. Dickey * test/yacc/ok_syntax1.output, test/yacc/ok_syntax1.tab.c, test/yacc/ok_syntax1.tab.h, test/btyacc/ok_syntax1.output, test/btyacc/ok_syntax1.tab.c, test/btyacc/ok_syntax1.tab.h: reference output for testing @@ -443,7 +562,7 @@ * mstring.c: minor reformatting to make coverage analysis simpler -2014-04-07 Thomas E. Dickey +2014-04-07 Thomas E. Dickey * test/run_test.sh: tidy @@ -478,7 +597,7 @@ YYPATCH #define's to make test-outputs easier to compare #line's (report by Tom Shields) -2014-04-06 Thomas E. Dickey +2014-04-06 Thomas E. Dickey * reader.c: fix for valgrind (the calloc's are intentional - valgrind reported use of uninitialized memory) @@ -582,7 +701,7 @@ * test/run_make.sh: modify to avoid use of VPATH, which has no standard implementation -2014-04-05 Thomas E. Dickey +2014-04-05 Thomas E. Dickey * test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c: discard a change which merged CountLines() with explicit comparisons against @@ -613,13 +732,13 @@ * test/btyacc_demo.y: fix prototypes -2014-04-04 Thomas E. Dickey +2014-04-04 Thomas E. Dickey * reader.c, defs.h, main.c: more merging of Tom Shield's btyacc changes. In the merge, I moved the symbol_pval inside the btyacc ifdef's and added some more btyacc ifdefs -2014-04-03 Thomas E. Dickey +2014-04-03 Thomas E. Dickey * reader.c: merge-in 3/4 of btyacc's changes, deferring those which change test-outputs. @@ -633,7 +752,7 @@ Some of the merge uses ifdef-changes which I applied to ongoing resync, e.g., the introduction of PER_STATE. -2014-04-02 Thomas E. Dickey +2014-04-02 Thomas E. Dickey * test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c: regen @@ -668,7 +787,7 @@ * main.c: changes for btyacc -2014-04-01 Thomas E. Dickey +2014-04-01 Thomas E. Dickey * reader.c: integrate change by Tom Shields to use bsearch rather than successive @@ -683,7 +802,7 @@ * verbose.c: changes for btyacc, ifdef'd -2014-04-01 Thomas E. Dickey +2014-04-01 Thomas E. Dickey * mkpar.c: eliminate most of the ifdef's using macros @@ -695,7 +814,7 @@ new functions used for reporting errors from the btyacc configuration (I reordered some, and ifdef'd the new ones -TD) -2014-03-31 Thomas E. Dickey +2014-03-31 Thomas E. Dickey * test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c: omit the GCC_UNUSED, as noted by Tom Shields not really essential @@ -703,7 +822,7 @@ * test/btyacc/empty.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.tab.c: regen -2014-03-29 Thomas E. Dickey +2014-03-29 Thomas E. Dickey * test/yacc/err_syntax22.tab.c, test/yacc/err_syntax23.tab.c, test/yacc/err_syntax24.tab.c, test/yacc/err_syntax25.tab.c, test/yacc/err_syntax26.tab.c, test/yacc/err_syntax3.tab.c, test/yacc/err_syntax4.tab.c, test/yacc/err_syntax5.tab.c, test/yacc/err_syntax6.tab.c, test/yacc/err_syntax7.tab.c, test/yacc/err_syntax7a.tab.c, test/yacc/err_syntax7b.tab.c, test/yacc/err_syntax8.tab.c, test/yacc/err_syntax8a.tab.c, test/yacc/err_syntax9.tab.c, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/y acc/err_syntax1.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax13.tab.c, test/yacc/err_syntax14.tab.c, test/yacc/err_syntax15.tab.c, test/yacc/err_syntax16.tab.c, test/yacc/err_syntax17.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/err_syntax19.tab.c, test/yacc/err_syntax2.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/err_syntax21.tab.c, skeleton.c: comment-out yysccsid in the banner because it produces unnecessary compiler @@ -713,7 +832,7 @@ * test/run_test.sh: for yacc, ignore the inherit testcases, since they are btyacc-specific -2014-03-28 Thomas E. Dickey +2014-03-28 Thomas E. Dickey * test/yacc/varsyntax_calc1.error, test/yacc/varsyntax_calc1.output, test/yacc/varsyntax_calc1.tab.c, test/yacc/varsyntax_calc1.tab.h, test/yacc/err_inherit3.error, test/yacc/err_inherit3.output, test/yacc/err_inherit3.tab.c, test/yacc/err_inherit3.tab.h, test/yacc/err_inherit4.error, test/yacc/err_inherit4.output, test/yacc/err_inherit4.tab.c, test/yacc/err_inherit4.tab.h, test/yacc/err_inherit5.error, test/yacc/err_inherit5.output, test/yacc/err_inherit5.tab.c, test/yacc/err_inherit5.tab.h, test/yacc/inherit0.error, test/yacc/inherit0.output, test/yacc/inherit0.tab.c, test/yacc/inherit0.tab.h, test/yacc/inherit1.error, test/yacc/inherit1.output, test/yacc/inherit1.tab.c, test/yacc/inherit1.tab.h, test/yacc/inherit2.error, test/yacc/inherit2.output, test/yacc/inherit2.tab.c, test/yacc/inherit2.tab.h, test/yacc/empty.error, test/yacc/empty.output, test/yacc/empty.tab.c, test/yacc/empty.tab.h, test/yacc/err_inherit1.error, test/yacc/err_inherit1.output, test/yacc/err_inherit1.tab.c, test/yacc/err_inherit1.tab.h, test/yacc/err_inherit2.error, test/yacc/err_inherit2.output, test/yacc/err_inherit2.tab.c, test/yacc/err_inherit2.tab.h: reference output for testing @@ -743,7 +862,7 @@ * yacc.1: document -L/-B features from btyacc -2014-03-25 Thomas E. Dickey +2014-03-25 Thomas E. Dickey * yacc.1: typo @@ -762,7 +881,7 @@ * mstring.c: byacc-btyacc-20140323 -2014-03-25 Thomas E. Dickey +2014-03-25 Thomas E. Dickey * test/btyacc/RCS, test/yacc/RCS: PERMIT FILE @@ -777,7 +896,7 @@ * test/btyacc/err_syntax1.output, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax1.tab.h, test/btyacc/err_syntax10.error, test/btyacc/err_syntax10.output, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax10.tab.h, test/btyacc/err_syntax11.error, test/btyacc/err_syntax11.output, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax11.tab.h, test/btyacc/err_syntax12.error, test/btyacc/err_syntax12.output, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax12.tab.h, test/btyacc/err_syntax13.error, test/btyacc/err_syntax13.output, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax13.tab.h, test/btyacc/err_syntax14.error, test/btyacc/err_syntax14.output, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax14.tab.h, test/btyacc/err_syntax15.error, test/btyacc/err_syntax15.output, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax15.tab.h, test/btyacc/err_syntax16.error, test/btyacc/err_syntax16.output, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax16.tab. h, test/btyacc/err_syntax17.error, test/btyacc/err_syntax17.output, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax17.tab.h, test/btyacc/err_syntax18.error, test/btyacc/err_syntax18.output, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax18.tab.h, test/btyacc/err_syntax19.error, test/btyacc/err_syntax19.output, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax19.tab.h, test/btyacc/err_syntax2.output, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax2.tab.h, test/btyacc/err_syntax20.error, test/btyacc/err_syntax20.output, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax20.tab.h, test/btyacc/err_syntax21.error, test/btyacc/err_syntax21.output, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax21.tab.h, test/btyacc/err_syntax22.error, test/btyacc/err_syntax22.output, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax22.tab.h, test/btyacc/err_syntax23.error, test/btyacc/err_syntax23.output, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax23.tab. h, test/btyacc/err_syntax24.error, test/btya! cc/err_syntax24.output, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax24.tab.h, test/btyacc/err_syntax25.error, test/btyacc/err_syntax25.output, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax25.tab.h, test/btyacc/err_syntax26.error, test/btyacc/err_syntax26.output, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax26.tab.h, test/btyacc/err_syntax3.output, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax3.tab.h, test/btyacc/err_syntax4.output, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax4.tab.h, test/btyacc/err_syntax5.output, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax5.tab.h, test/btyacc/err_syntax6.output, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax6.tab.h, test/btyacc/err_syntax7.output, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7.tab.h, test/btyacc/err_syntax7a.output, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7a.tab.h, test/btyacc/err_syntax7b.output, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syn tax7b.tab.h, test/btyacc/err_syntax8.output, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8.tab.h, test/btyacc/err_syntax8a.output, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax8a.tab.h, test/btyacc/err_syntax9.output, test/btyacc/err_syntax9.tab.c, test/btyacc/err_syntax9.tab.h: reference output for testing -2014-03-24 Thomas E. Dickey +2014-03-24 Thomas E. Dickey * defs.h: fix compiler warnings due to mputc() @@ -790,7 +909,7 @@ * test/varsyntax_calc1.y, test/btyacc_calc1.y: testcase for btyacc -2014-03-23 Thomas E. Dickey +2014-03-23 Thomas E. Dickey * test/err_syntax26.error, test/err_syntax26.output, test/err_syntax26.tab.c, test/err_syntax26.tab.h, test/yacc/err_syntax26.error, test/yacc/err_syntax26.output, test/yacc/err_syntax26.tab.c, test/yacc/err_syntax26.tab.h: reference output for testing @@ -812,7 +931,7 @@ * test/btyacc/quote_calc3-s.error, test/btyacc/quote_calc4-s.error, test/btyacc/quote_calc4.error, test/btyacc/grammar.dot, test/btyacc/grammar.error, test/btyacc/pure_calc.error, test/btyacc/pure_error.error, test/btyacc/quote_calc-s.error, test/btyacc/quote_calc.error, test/btyacc/quote_calc2-s.error, test/btyacc/quote_calc2.error, test/btyacc/quote_calc3.error, test/btyacc/err_syntax2.error, test/btyacc/err_syntax3.error, test/btyacc/err_syntax4.error, test/btyacc/err_syntax5.error, test/btyacc/err_syntax6.error, test/btyacc/err_syntax7.error, test/btyacc/err_syntax7a.error, test/btyacc/err_syntax7b.error, test/btyacc/err_syntax8.error, test/btyacc/err_syntax8a.error, test/btyacc/err_syntax9.error, test/btyacc/error.error, test/btyacc/calc1.error, test/btyacc/calc2.error, test/btyacc/calc3.error, test/btyacc/code_calc.error, test/btyacc/code_error.error, test/btyacc/empty.error, test/btyacc/err_syntax1.error, test/btyacc/btyacc_calc1.error, test/btyacc/btyacc_demo.error: reference output for testing -2014-03-23 Thomas E. Dickey +2014-03-23 Thomas E. Dickey * test/err_syntax23.error, test/err_syntax23.output, test/err_syntax23.tab.c, test/err_syntax23.tab.h, test/yacc/err_syntax23.error, test/yacc/err_syntax23.output, test/yacc/err_syntax23.tab.c, test/yacc/err_syntax23.tab.h: reference output for testing @@ -824,7 +943,7 @@ * test/run_test.sh: move test-outputs into subdirectories to keep btyacc/yacc results separate -2014-03-23 Thomas E. Dickey +2014-03-23 Thomas E. Dickey * test/err_syntax22.error, test/err_syntax22.output, test/err_syntax22.tab.c, test/err_syntax22.tab.h, test/yacc/err_syntax22.error, test/yacc/err_syntax22.output, test/yacc/err_syntax22.tab.c, test/yacc/err_syntax22.tab.h: reference output for testing @@ -853,7 +972,7 @@ * test/err_syntax17.y: testcase for unterminated_action() -2014-03-22 Thomas E. Dickey +2014-03-22 Thomas E. Dickey * test/err_syntax16.error, test/err_syntax16.output, test/err_syntax16.tab.c, test/err_syntax16.tab.h, test/yacc/err_syntax16.error, test/yacc/err_syntax16.output, test/yacc/err_syntax16.tab.c, test/yacc/err_syntax16.tab.h: reference output for testing @@ -891,7 +1010,7 @@ * test/err_syntax10.y: testcase for retyped_warning() -2014-03-21 Thomas E. Dickey +2014-03-21 Thomas E. Dickey * test/err_syntax9.error, test/err_syntax9.output, test/err_syntax9.tab.c, test/err_syntax9.tab.h, test/yacc/err_syntax9.error, test/yacc/err_syntax9.output, test/yacc/err_syntax9.tab.c, test/yacc/err_syntax9.tab.h: reference output for testing @@ -1011,7 +1130,7 @@ * lalr.c: rename MAXSHORT to MAXYYINT -2014-01-01 Thomas E. Dickey +2014-01-01 Thomas E. Dickey * yacc.1: document %token-table, improve presentation of double-quotes @@ -1035,7 +1154,7 @@ - add YYTRANSLATE() macro - recognize bison's %token-table declaration -2014-01-01 Thomas E. Dickey +2014-01-01 Thomas E. Dickey * configure: regen @@ -1047,19 +1166,19 @@ * configure.in: use CF_MAKE_DOCS -2013-12-26 Thomas E. Dickey +2013-12-26 Thomas E. Dickey * config.guess: 2013-11-29 -2013-11-19 Thomas E. Dickey +2013-11-19 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (fixes for clang and mingw) -2013-10-25 Thomas E. Dickey +2013-10-25 Thomas E. Dickey * config.sub: 2013-10-01 -2013-09-25 Thomas E. Dickey +2013-09-25 Thomas E. Dickey * reader.c: fix two loop-limits found by clang 3.3 --analyze @@ -1094,13 +1213,13 @@ * package/debian/changelog, VERSION, package/byacc.spec: bump -2013-09-07 Thomas E. Dickey +2013-09-07 Thomas E. Dickey * config.sub: update to 2013-09-15 * config.guess: update to 2013-06-10 -2013-03-04 Thomas E. Dickey +2013-03-04 Thomas E. Dickey * package/debian/changelog, VERSION, package/byacc.spec: bump @@ -1130,11 +1249,11 @@ * aclocal.m4: another fix for CF_GCC_VERSION to handle Debian's modification of gcc message. -2013-02-10 Thomas E. Dickey +2013-02-10 Thomas E. Dickey * config.sub, config.guess: update to 2013-02-04 -2012-10-03 Thomas E. Dickey +2012-10-03 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1156,7 +1275,7 @@ suggested patch: drop CF_ANSI_CC_REQD, CF_ANSI_CC_CHECK, CF_PROG_EXT since they are not needed. -2012-10-03 Thomas E. Dickey +2012-10-03 Thomas E. Dickey * aclocal.m4: split-out CF_CC_ENV_FLAGS from CF_ANSI_CC_CHECK to avoid losing it in @@ -1190,13 +1309,13 @@ CF_MIXEDCASE_FILENAMES CF_NO_LEAKS_OPTION -2012-10-03 Thomas E. Dickey +2012-10-03 Thomas E. Dickey * aclocal.m4: move existence-check for mkstemp out of the AC_TRY_RUN, to help with cross-compiles -2012-10-02 Thomas E. Dickey +2012-10-02 Thomas E. Dickey * config_h.in: Adrian Bunk request - replace this with the output from autoheader @@ -1214,7 +1333,7 @@ * makefile.in: add assignment for datarootdir variable. -2012-05-26 Thomas E. Dickey +2012-05-26 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1242,13 +1361,13 @@ use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation (no object change) -2012-05-25 Thomas E. Dickey +2012-05-25 Thomas E. Dickey * output.c, main.c, verbose.c, mkpar.c, lr0.c: use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation (no object change) -2012-01-15 Thomas E. Dickey +2012-01-15 Thomas E. Dickey * package/debian/copyright: bump @@ -1353,7 +1472,7 @@ * test/quote_calc2-s.tab.c, test/quote_calc3-s.tab.c, test/quote_calc4-s.tab.c, test/quote_calc-s.tab.c, test/quote_calc.tab.c, test/quote_calc2.tab.c, test/quote_calc3.tab.c, test/quote_calc4.tab.c: regen -2012-01-14 Thomas E. Dickey +2012-01-14 Thomas E. Dickey * test/calc2.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/calc1.tab.c: regen @@ -1384,7 +1503,7 @@ * test/run_test.sh: generate/test with "-s" option applied. -2012-01-13 Thomas E. Dickey +2012-01-13 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1416,7 +1535,7 @@ * aclocal.m4: resync with my-autoconf, i.e., fixes for CF_XOPEN_SOURCE -2011-12-19 Thomas E. Dickey +2011-12-19 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1430,7 +1549,7 @@ Simply suppressing the second #define makes the behavior closer to yacc. (report by Paulo Andrade). -2011-09-08 Thomas E. Dickey +2011-09-08 Thomas E. Dickey * package/debian/changelog, package/byacc.spec, VERSION: bump @@ -1438,7 +1557,7 @@ fix some more interaction between -i and -d flags to ensure YYERRCODE and YYSTYPE are declared, tested with cproto. -2011-09-07 Thomas E. Dickey +2011-09-07 Thomas E. Dickey * yacc.1: document "-i" option. @@ -1452,14 +1571,14 @@ * skeleton.c, output.c, defs.h: changes to support "-i" option. -2011-09-06 Thomas E. Dickey +2011-09-06 Thomas E. Dickey * reader.c: pass explicit file-pointer to write_section() * main.c: add "-i" option, to generate interface-file (suggested by Denis M. Wilson) -2011-09-05 Thomas E. Dickey +2011-09-05 Thomas E. Dickey * configure: regen @@ -1470,15 +1589,15 @@ * defs.h, error.c, reader.c: add check for missing "}" on %parse-param and %lex-param lines (report by Denis M Wilson) -2011-04-01 Thomas E. Dickey +2011-04-01 Thomas E. Dickey * config.sub: update to 2011-04-01 -2011-02-02 Thomas E. Dickey +2011-02-02 Thomas E. Dickey * config.guess: update to 2011-01-01 -2010-12-29 Thomas E. Dickey +2010-12-29 Thomas E. Dickey * defs.h, skeleton.c: add const qualifier to skeleton data, per NetBSD changes (report by Christos Zoulas) @@ -1500,7 +1619,7 @@ * test/ftp.y: improve example, which was stuck in 19XX and assumed file sizes were longs. -2010-12-29 Thomas E. Dickey +2010-12-29 Thomas E. Dickey *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Dec 17 18:33:45 2016 Return-Path: Delivered-To: svn-src-projects@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 8E6BFC851AA for ; Sat, 17 Dec 2016 18:33:45 +0000 (UTC) (envelope-from dim@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 32EDB842; Sat, 17 Dec 2016 18:33:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBHIXiYa021811; Sat, 17 Dec 2016 18:33:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBHIXfCA021781; Sat, 17 Dec 2016 18:33:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612171833.uBHIXfCA021781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Dec 2016 18:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310191 - in projects/clang391-import: . contrib/libarchive/cat contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test con... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2016 18:33:45 -0000 Author: dim Date: Sat Dec 17 18:33:41 2016 New Revision: 310191 URL: https://svnweb.freebsd.org/changeset/base/310191 Log: Merge ^/head r310169 through r310190. Added: projects/clang391-import/contrib/libarchive/libarchive/archive_openssl_evp_private.h - copied unchanged from r310190, head/contrib/libarchive/libarchive/archive_openssl_evp_private.h projects/clang391-import/contrib/libarchive/libarchive/archive_openssl_hmac_private.h - copied unchanged from r310190, head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h projects/clang391-import/sys/mips/ingenic/jz4780_smb.c - copied unchanged from r310190, head/sys/mips/ingenic/jz4780_smb.c projects/clang391-import/sys/mips/ingenic/jz4780_smb.h - copied unchanged from r310190, head/sys/mips/ingenic/jz4780_smb.h Modified: projects/clang391-import/Makefile.inc1 projects/clang391-import/contrib/libarchive/cat/bsdcat.c projects/clang391-import/contrib/libarchive/cpio/cpio.c projects/clang391-import/contrib/libarchive/cpio/test/test_option_lz4.c projects/clang391-import/contrib/libarchive/libarchive/archive.h projects/clang391-import/contrib/libarchive/libarchive/archive_acl.c projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor.c projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor_private.h projects/clang391-import/contrib/libarchive/libarchive/archive_digest.c projects/clang391-import/contrib/libarchive/libarchive/archive_digest_private.h projects/clang391-import/contrib/libarchive/libarchive/archive_entry.c projects/clang391-import/contrib/libarchive/libarchive/archive_hmac.c projects/clang391-import/contrib/libarchive/libarchive/archive_hmac_private.h projects/clang391-import/contrib/libarchive/libarchive/archive_options.c projects/clang391-import/contrib/libarchive/libarchive/archive_read.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_append_filter.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_disk_posix.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_extract2.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_open_memory.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_private.h projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_filter_uu.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_ar.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_cpio.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_mtree.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_warc.c projects/clang391-import/contrib/libarchive/libarchive/archive_string.c projects/clang391-import/contrib/libarchive/libarchive/archive_write.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_add_filter_lz4.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_disk_posix.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_open_memory.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_ar.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_pax.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_shar.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_ustar.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c projects/clang391-import/contrib/libarchive/libarchive/archive_write_set_format_xar.c projects/clang391-import/contrib/libarchive/libarchive/test/test_archive_read_add_passphrase.c projects/clang391-import/contrib/libarchive/libarchive/test/test_pax_filename_encoding.c projects/clang391-import/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c projects/clang391-import/contrib/libarchive/tar/test/test_option_lz4.c projects/clang391-import/lib/libelftc/Makefile projects/clang391-import/release/scripts/make-pkg-package.sh projects/clang391-import/share/mk/bsd.own.mk projects/clang391-import/sys/amd64/conf/GENERIC projects/clang391-import/sys/amd64/conf/MINIMAL projects/clang391-import/sys/arm/allwinner/clk/aw_debeclk.c projects/clang391-import/sys/arm/allwinner/clk/aw_hdmiclk.c projects/clang391-import/sys/arm/allwinner/clk/aw_lcdclk.c projects/clang391-import/sys/arm/allwinner/clk/aw_mmcclk.c projects/clang391-import/sys/arm/allwinner/clk/aw_modclk.c projects/clang391-import/sys/arm/allwinner/clk/aw_pll.c projects/clang391-import/sys/arm/allwinner/clk/aw_thsclk.c projects/clang391-import/sys/arm/ti/cpsw/if_cpsw.c projects/clang391-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h projects/clang391-import/sys/dev/spibus/spigen.c projects/clang391-import/sys/dev/uart/uart_dev_pl011.c projects/clang391-import/sys/i386/conf/GENERIC projects/clang391-import/sys/mips/conf/JZ4780 projects/clang391-import/sys/mips/ingenic/files.jz4780 projects/clang391-import/sys/net/if_lagg.c projects/clang391-import/sys/sys/systm.h projects/clang391-import/sys/vm/swap_pager.c projects/clang391-import/tools/build/mk/OptionalObsoleteFiles.inc projects/clang391-import/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: projects/clang391-import/ (props changed) projects/clang391-import/contrib/libarchive/ (props changed) projects/clang391-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang391-import/Makefile.inc1 ============================================================================== --- projects/clang391-import/Makefile.inc1 Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/Makefile.inc1 Sat Dec 17 18:33:41 2016 (r310191) @@ -1379,7 +1379,8 @@ packages: .PHONY package-pkg: .PHONY rm -rf /tmp/ports.${TARGET} || : env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ - PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} WSTAGEDIR=${WSTAGEDIR} \ + PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \ + WSTAGEDIR=${WSTAGEDIR} \ sh ${.CURDIR}/release/scripts/make-pkg-package.sh real-packages: stage-packages create-packages sign-packages .PHONY @@ -1417,11 +1418,11 @@ create-world-packages: _pkgbootstrap .PH /^name/ { printf("===> Creating %s-", $$2); next } \ /^version/ { print $$2; next } \ ' ${WSTAGEDIR}/$${pkgname}.ucl ; \ - pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ create -M ${WSTAGEDIR}/$${pkgname}.ucl \ -p ${WSTAGEDIR}/$${pkgname}.plist \ -r ${WSTAGEDIR} \ - -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} ; \ + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} ; \ done create-kernel-packages: _pkgbootstrap .PHONY @@ -1445,11 +1446,11 @@ create-kernel-packages: _pkgbootstrap .P /name/ { printf("===> Creating %s-", $$2); next } \ /version/ {print $$2; next } ' \ ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ - pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ create -M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \ -p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \ -r ${KSTAGEDIR}/${DISTDIR} \ - -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} .endfor .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" @@ -1474,25 +1475,25 @@ create-kernel-packages: _pkgbootstrap .P /name/ { printf("===> Creating %s-", $$2); next } \ /version/ {print $$2; next } ' \ ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ - pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ create -M ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \ -p ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \ -r ${KSTAGEDIR}/kernel.${_kernel} \ - -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} .endfor .endif .endfor .endif sign-packages: _pkgbootstrap .PHONY - @[ -L "${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/latest" ] && \ - unlink ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/latest ; \ - pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh repo \ - -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} \ - ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} \ + @[ -L "${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/latest" ] && \ + unlink ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/latest ; \ + ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh repo \ + -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} \ + ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} \ ${PKGSIGNKEY} ; \ - ln -s ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} \ - ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/latest + ln -s ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} \ + ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/latest # # Modified: projects/clang391-import/contrib/libarchive/cat/bsdcat.c ============================================================================== --- projects/clang391-import/contrib/libarchive/cat/bsdcat.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/cat/bsdcat.c Sat Dec 17 18:33:41 2016 (r310191) @@ -142,5 +142,8 @@ main(int argc, char **argv) bsdcat_next(); } + if (a != NULL) + archive_read_free(a); + exit(exit_status); } Modified: projects/clang391-import/contrib/libarchive/cpio/cpio.c ============================================================================== --- projects/clang391-import/contrib/libarchive/cpio/cpio.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/cpio/cpio.c Sat Dec 17 18:33:41 2016 (r310191) @@ -1324,10 +1324,9 @@ lookup_name(struct cpio *cpio, struct na if (*name_cache_variable == NULL) { - *name_cache_variable = malloc(sizeof(struct name_cache)); + *name_cache_variable = calloc(1, sizeof(struct name_cache)); if (*name_cache_variable == NULL) lafe_errc(1, ENOMEM, "No more memory"); - memset(*name_cache_variable, 0, sizeof(struct name_cache)); (*name_cache_variable)->size = name_cache_size; } Modified: projects/clang391-import/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- projects/clang391-import/contrib/libarchive/cpio/test/test_option_lz4.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/cpio/test/test_option_lz4.c Sat Dec 17 18:33:41 2016 (r310191) @@ -63,6 +63,13 @@ DEFINE_TEST(test_option_lz4) "but no such program is available on this system."); return; } + /* On some systems the error won't be detected until closing + time, by a 127 exit error returned by waitpid. */ + if (strstr(p, "Error closing") != NULL && !canLz4()) { + skipping("This version of bsdcpio uses an external lz4 program " + "but no such program is available on this system."); + return; + } failure("--lz4 option is broken: %s", p); assertEqualInt(r, 0); return; Modified: projects/clang391-import/contrib/libarchive/libarchive/archive.h ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive.h Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive.h Sat Dec 17 18:33:41 2016 (r310191) @@ -373,7 +373,7 @@ typedef const char *archive_passphrase_c * 4) Repeatedly call archive_read_next_header to get information about * successive archive entries. Call archive_read_data to extract * data for entries of interest. - * 5) Call archive_read_finish to end processing. + * 5) Call archive_read_free to end processing. */ __LA_DECL struct archive *archive_read_new(void); Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_acl.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_acl.c Sat Dec 17 18:33:41 2016 (r310191) @@ -280,11 +280,17 @@ acl_new_entry(struct archive_acl *acl, acl->acl_text = NULL; } - /* If there's a matching entry already in the list, overwrite it. */ + /* + * If there's a matching entry already in the list, overwrite it. + * NFSv4 entries may be repeated and are not overwritten. + * + * TODO: compare names of no id is provided (needs more rework) + */ ap = acl->acl_head; aq = NULL; while (ap != NULL) { - if (ap->type == type && ap->tag == tag && ap->id == id) { + if (((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) && + ap->type == type && ap->tag == tag && ap->id == id) { if (id != -1 || (tag != ARCHIVE_ENTRY_ACL_USER && tag != ARCHIVE_ENTRY_ACL_GROUP)) { ap->permset = permset; @@ -296,10 +302,9 @@ acl_new_entry(struct archive_acl *acl, } /* Add a new entry to the end of the list. */ - ap = (struct archive_acl_entry *)malloc(sizeof(*ap)); + ap = (struct archive_acl_entry *)calloc(1, sizeof(*ap)); if (ap == NULL) return (NULL); - memset(ap, 0, sizeof(*ap)); if (aq == NULL) acl->acl_head = ap; else Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor.c Sat Dec 17 18:33:41 2016 (r310191) @@ -302,6 +302,8 @@ aes_ctr_release(archive_crypto_ctx *ctx) static int aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) { + if ((ctx->ctx = EVP_CIPHER_CTX_new()) == NULL) + return -1; switch (key_len) { case 16: ctx->type = EVP_aes_128_ecb(); break; @@ -314,7 +316,7 @@ aes_ctr_init(archive_crypto_ctx *ctx, co memcpy(ctx->key, key, key_len); memset(ctx->nonce, 0, sizeof(ctx->nonce)); ctx->encr_pos = AES_BLOCK_SIZE; - EVP_CIPHER_CTX_init(&ctx->ctx); + EVP_CIPHER_CTX_init(ctx->ctx); return 0; } @@ -324,10 +326,10 @@ aes_ctr_encrypt_counter(archive_crypto_c int outl = 0; int r; - r = EVP_EncryptInit_ex(&ctx->ctx, ctx->type, NULL, ctx->key, NULL); + r = EVP_EncryptInit_ex(ctx->ctx, ctx->type, NULL, ctx->key, NULL); if (r == 0) return -1; - r = EVP_EncryptUpdate(&ctx->ctx, ctx->encr_buf, &outl, ctx->nonce, + r = EVP_EncryptUpdate(ctx->ctx, ctx->encr_buf, &outl, ctx->nonce, AES_BLOCK_SIZE); if (r == 0 || outl != AES_BLOCK_SIZE) return -1; @@ -337,7 +339,7 @@ aes_ctr_encrypt_counter(archive_crypto_c static int aes_ctr_release(archive_crypto_ctx *ctx) { - EVP_CIPHER_CTX_cleanup(&ctx->ctx); + EVP_CIPHER_CTX_free(ctx->ctx); memset(ctx->key, 0, ctx->key_len); memset(ctx->nonce, 0, sizeof(ctx->nonce)); return 0; Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor_private.h ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor_private.h Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_cryptor_private.h Sat Dec 17 18:33:41 2016 (r310191) @@ -99,12 +99,12 @@ typedef struct { } archive_crypto_ctx; #elif defined(HAVE_LIBCRYPTO) -#include +#include "archive_openssl_evp_private.h" #define AES_BLOCK_SIZE 16 #define AES_MAX_KEY_SIZE 32 typedef struct { - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; const EVP_CIPHER *type; uint8_t key[AES_MAX_KEY_SIZE]; unsigned key_len; Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_digest.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_digest.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_digest.c Sat Dec 17 18:33:41 2016 (r310191) @@ -207,7 +207,9 @@ __archive_nettle_md5final(archive_md5_ct static int __archive_openssl_md5init(archive_md5_ctx *ctx) { - EVP_DigestInit(ctx, EVP_md5()); + if ((*ctx = EVP_MD_CTX_new()) == NULL) + return (ARCHIVE_FAILED); + EVP_DigestInit(*ctx, EVP_md5()); return (ARCHIVE_OK); } @@ -215,7 +217,7 @@ static int __archive_openssl_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { - EVP_DigestUpdate(ctx, indata, insize); + EVP_DigestUpdate(*ctx, indata, insize); return (ARCHIVE_OK); } @@ -226,8 +228,11 @@ __archive_openssl_md5final(archive_md5_c * this is meant to cope with that. Real fix is probably to fix * archive_write_set_format_xar.c */ - if (ctx->digest) - EVP_DigestFinal(ctx, md, NULL); + if (*ctx) { + EVP_DigestFinal(*ctx, md, NULL); + EVP_MD_CTX_free(*ctx); + *ctx = NULL; + } return (ARCHIVE_OK); } @@ -359,7 +364,9 @@ __archive_nettle_ripemd160final(archive_ static int __archive_openssl_ripemd160init(archive_rmd160_ctx *ctx) { - EVP_DigestInit(ctx, EVP_ripemd160()); + if ((*ctx = EVP_MD_CTX_new()) == NULL) + return (ARCHIVE_FAILED); + EVP_DigestInit(*ctx, EVP_ripemd160()); return (ARCHIVE_OK); } @@ -367,14 +374,18 @@ static int __archive_openssl_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { - EVP_DigestUpdate(ctx, indata, insize); + EVP_DigestUpdate(*ctx, indata, insize); return (ARCHIVE_OK); } static int __archive_openssl_ripemd160final(archive_rmd160_ctx *ctx, void *md) { - EVP_DigestFinal(ctx, md, NULL); + if (*ctx) { + EVP_DigestFinal(*ctx, md, NULL); + EVP_MD_CTX_free(*ctx); + *ctx = NULL; + } return (ARCHIVE_OK); } @@ -509,7 +520,9 @@ __archive_nettle_sha1final(archive_sha1_ static int __archive_openssl_sha1init(archive_sha1_ctx *ctx) { - EVP_DigestInit(ctx, EVP_sha1()); + if ((*ctx = EVP_MD_CTX_new()) == NULL) + return (ARCHIVE_FAILED); + EVP_DigestInit(*ctx, EVP_sha1()); return (ARCHIVE_OK); } @@ -517,7 +530,7 @@ static int __archive_openssl_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { - EVP_DigestUpdate(ctx, indata, insize); + EVP_DigestUpdate(*ctx, indata, insize); return (ARCHIVE_OK); } @@ -528,8 +541,11 @@ __archive_openssl_sha1final(archive_sha1 * this is meant to cope with that. Real fix is probably to fix * archive_write_set_format_xar.c */ - if (ctx->digest) - EVP_DigestFinal(ctx, md, NULL); + if (*ctx) { + EVP_DigestFinal(*ctx, md, NULL); + EVP_MD_CTX_free(*ctx); + *ctx = NULL; + } return (ARCHIVE_OK); } @@ -733,7 +749,9 @@ __archive_nettle_sha256final(archive_sha static int __archive_openssl_sha256init(archive_sha256_ctx *ctx) { - EVP_DigestInit(ctx, EVP_sha256()); + if ((*ctx = EVP_MD_CTX_new()) == NULL) + return (ARCHIVE_FAILED); + EVP_DigestInit(*ctx, EVP_sha256()); return (ARCHIVE_OK); } @@ -741,14 +759,18 @@ static int __archive_openssl_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { - EVP_DigestUpdate(ctx, indata, insize); + EVP_DigestUpdate(*ctx, indata, insize); return (ARCHIVE_OK); } static int __archive_openssl_sha256final(archive_sha256_ctx *ctx, void *md) { - EVP_DigestFinal(ctx, md, NULL); + if (*ctx) { + EVP_DigestFinal(*ctx, md, NULL); + EVP_MD_CTX_free(*ctx); + *ctx = NULL; + } return (ARCHIVE_OK); } @@ -928,7 +950,9 @@ __archive_nettle_sha384final(archive_sha static int __archive_openssl_sha384init(archive_sha384_ctx *ctx) { - EVP_DigestInit(ctx, EVP_sha384()); + if ((*ctx = EVP_MD_CTX_new()) == NULL) + return (ARCHIVE_FAILED); + EVP_DigestInit(*ctx, EVP_sha384()); return (ARCHIVE_OK); } @@ -936,14 +960,18 @@ static int __archive_openssl_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { - EVP_DigestUpdate(ctx, indata, insize); + EVP_DigestUpdate(*ctx, indata, insize); return (ARCHIVE_OK); } static int __archive_openssl_sha384final(archive_sha384_ctx *ctx, void *md) { - EVP_DigestFinal(ctx, md, NULL); + if (*ctx) { + EVP_DigestFinal(*ctx, md, NULL); + EVP_MD_CTX_free(*ctx); + *ctx = NULL; + } return (ARCHIVE_OK); } @@ -1147,7 +1175,9 @@ __archive_nettle_sha512final(archive_sha static int __archive_openssl_sha512init(archive_sha512_ctx *ctx) { - EVP_DigestInit(ctx, EVP_sha512()); + if ((*ctx = EVP_MD_CTX_new()) == NULL) + return (ARCHIVE_FAILED); + EVP_DigestInit(*ctx, EVP_sha512()); return (ARCHIVE_OK); } @@ -1155,14 +1185,18 @@ static int __archive_openssl_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { - EVP_DigestUpdate(ctx, indata, insize); + EVP_DigestUpdate(*ctx, indata, insize); return (ARCHIVE_OK); } static int __archive_openssl_sha512final(archive_sha512_ctx *ctx, void *md) { - EVP_DigestFinal(ctx, md, NULL); + if (*ctx) { + EVP_DigestFinal(*ctx, md, NULL); + EVP_MD_CTX_free(*ctx); + *ctx = NULL; + } return (ARCHIVE_OK); } Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_digest_private.h ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_digest_private.h Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_digest_private.h Sat Dec 17 18:33:41 2016 (r310191) @@ -134,7 +134,7 @@ defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) #define ARCHIVE_CRYPTO_OPENSSL 1 -#include +#include "archive_openssl_evp_private.h" #endif /* Windows crypto headers */ @@ -161,7 +161,7 @@ typedef CC_MD5_CTX archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) typedef struct md5_ctx archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) -typedef EVP_MD_CTX archive_md5_ctx; +typedef EVP_MD_CTX *archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_WIN) typedef Digest_CTX archive_md5_ctx; #else @@ -175,7 +175,7 @@ typedef RIPEMD160_CTX archive_rmd160_ctx #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) typedef struct ripemd160_ctx archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) -typedef EVP_MD_CTX archive_rmd160_ctx; +typedef EVP_MD_CTX *archive_rmd160_ctx; #else typedef unsigned char archive_rmd160_ctx; #endif @@ -189,7 +189,7 @@ typedef CC_SHA1_CTX archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) typedef struct sha1_ctx archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) -typedef EVP_MD_CTX archive_sha1_ctx; +typedef EVP_MD_CTX *archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) typedef Digest_CTX archive_sha1_ctx; #else @@ -209,7 +209,7 @@ typedef CC_SHA256_CTX archive_sha256_ctx #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) typedef struct sha256_ctx archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) -typedef EVP_MD_CTX archive_sha256_ctx; +typedef EVP_MD_CTX *archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) typedef Digest_CTX archive_sha256_ctx; #else @@ -227,7 +227,7 @@ typedef CC_SHA512_CTX archive_sha384_ctx #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) typedef struct sha384_ctx archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) -typedef EVP_MD_CTX archive_sha384_ctx; +typedef EVP_MD_CTX *archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) typedef Digest_CTX archive_sha384_ctx; #else @@ -247,7 +247,7 @@ typedef CC_SHA512_CTX archive_sha512_ctx #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) typedef struct sha512_ctx archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) -typedef EVP_MD_CTX archive_sha512_ctx; +typedef EVP_MD_CTX *archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) typedef Digest_CTX archive_sha512_ctx; #else Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_entry.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_entry.c Sat Dec 17 18:33:41 2016 (r310191) @@ -248,10 +248,9 @@ archive_entry_new2(struct archive *a) { struct archive_entry *entry; - entry = (struct archive_entry *)malloc(sizeof(*entry)); + entry = (struct archive_entry *)calloc(1, sizeof(*entry)); if (entry == NULL) return (NULL); - memset(entry, 0, sizeof(*entry)); entry->archive = a; return (entry); } Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_hmac.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_hmac.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_hmac.c Sat Dec 17 18:33:41 2016 (r310191) @@ -176,8 +176,10 @@ __hmac_sha1_cleanup(archive_hmac_sha1_ct static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) { - HMAC_CTX_init(ctx); - HMAC_Init(ctx, key, key_len, EVP_sha1()); + *ctx = HMAC_CTX_new(); + if (*ctx == NULL) + return -1; + HMAC_Init_ex(*ctx, key, key_len, EVP_sha1(), NULL); return 0; } @@ -185,22 +187,22 @@ static void __hmac_sha1_update(archive_hmac_sha1_ctx *ctx, const uint8_t *data, size_t data_len) { - HMAC_Update(ctx, data, data_len); + HMAC_Update(*ctx, data, data_len); } static void __hmac_sha1_final(archive_hmac_sha1_ctx *ctx, uint8_t *out, size_t *out_len) { unsigned int len = (unsigned int)*out_len; - HMAC_Final(ctx, out, &len); + HMAC_Final(*ctx, out, &len); *out_len = len; } static void __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) { - HMAC_CTX_cleanup(ctx); - memset(ctx, 0, sizeof(*ctx)); + HMAC_CTX_free(*ctx); + *ctx = NULL; } #else Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_hmac_private.h ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_hmac_private.h Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_hmac_private.h Sat Dec 17 18:33:41 2016 (r310191) @@ -70,9 +70,9 @@ typedef struct { typedef struct hmac_sha1_ctx archive_hmac_sha1_ctx; #elif defined(HAVE_LIBCRYPTO) -#include +#include "archive_openssl_hmac_private.h" -typedef HMAC_CTX archive_hmac_sha1_ctx; +typedef HMAC_CTX* archive_hmac_sha1_ctx; #else Copied: projects/clang391-import/contrib/libarchive/libarchive/archive_openssl_evp_private.h (from r310190, head/contrib/libarchive/libarchive/archive_openssl_evp_private.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_openssl_evp_private.h Sat Dec 17 18:33:41 2016 (r310191, copy of r310190, head/contrib/libarchive/libarchive/archive_openssl_evp_private.h) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef ARCHIVE_OPENSSL_EVP_PRIVATE_H_INCLUDED +#define ARCHIVE_OPENSSL_EVP_PRIVATE_H_INCLUDED + +#include +#include + +#if OPENSSL_VERSION_NUMBER < 0x10100000L +#include /* malloc, free */ +#include /* memset */ +static inline EVP_MD_CTX *EVP_MD_CTX_new(void) +{ + EVP_MD_CTX *ctx = (EVP_MD_CTX *)calloc(1, sizeof(EVP_MD_CTX)); + return ctx; +} + +static inline void EVP_MD_CTX_free(EVP_MD_CTX *ctx) +{ + EVP_MD_CTX_cleanup(ctx); + memset(ctx, 0, sizeof(*ctx)); + free(ctx); +} +#endif + +#endif Copied: projects/clang391-import/contrib/libarchive/libarchive/archive_openssl_hmac_private.h (from r310190, head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Sat Dec 17 18:33:41 2016 (r310191, copy of r310190, head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef ARCHIVE_OPENSSL_HMAC_PRIVATE_H_INCLUDED +#define ARCHIVE_OPENSSL_HMAC_PRIVATE_H_INCLUDED + +#include +#include + +#if OPENSSL_VERSION_NUMBER < 0x10100000L +#include /* malloc, free */ +#include /* memset */ +static inline HMAC_CTX *HMAC_CTX_new(void) +{ + HMAC_CTX *ctx = (HMAC_CTX *)calloc(1, sizeof(HMAC_CTX)); + return ctx; +} + +static inline void HMAC_CTX_free(HMAC_CTX *ctx) +{ + HMAC_CTX_cleanup(ctx); + memset(ctx, 0, sizeof(*ctx)); + free(ctx); +} +#endif + +#endif Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_options.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_options.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_options.c Sat Dec 17 18:33:41 2016 (r310191) @@ -26,6 +26,10 @@ #include "archive_platform.h" __FBSDID("$FreeBSD$"); +#ifdef HAVE_ERRNO_H +#include +#endif + #include "archive_options_private.h" static const char * @@ -105,8 +109,11 @@ _archive_set_options(struct archive *a, if (options == NULL || options[0] == '\0') return ARCHIVE_OK; - data = (char *)malloc(strlen(options) + 1); - strcpy(data, options); + if ((data = strdup(options)) == NULL) { + archive_set_error(a, + ENOMEM, "Out of memory adding file to list"); + return (ARCHIVE_FATAL); + } s = (const char *)data; do { Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read.c Sat Dec 17 18:33:41 2016 (r310191) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); static int choose_filters(struct archive_read *); static int choose_format(struct archive_read *); +static int close_filters(struct archive_read *); static struct archive_vtable *archive_read_vtable(void); static int64_t _archive_filter_bytes(struct archive *, int); static int _archive_filter_code(struct archive *, int); @@ -528,7 +529,7 @@ archive_read_open1(struct archive *_a) { slot = choose_format(a); if (slot < 0) { - __archive_read_close_filters(a); + close_filters(a); a->archive.state = ARCHIVE_STATE_FATAL; return (ARCHIVE_FATAL); } @@ -582,7 +583,6 @@ choose_filters(struct archive_read *a) /* Verify the filter by asking it for some data. */ __archive_read_filter_ahead(a->filter, 1, &avail); if (avail < 0) { - __archive_read_close_filters(a); __archive_read_free_filters(a); return (ARCHIVE_FATAL); } @@ -601,7 +601,6 @@ choose_filters(struct archive_read *a) a->filter = filter; r = (best_bidder->init)(a->filter); if (r != ARCHIVE_OK) { - __archive_read_close_filters(a); __archive_read_free_filters(a); return (ARCHIVE_FATAL); } @@ -986,8 +985,8 @@ _archive_read_data_block(struct archive return (a->format->read_data)(a, buff, size, offset); } -int -__archive_read_close_filters(struct archive_read *a) +static int +close_filters(struct archive_read *a) { struct archive_read_filter *f = a->filter; int r = ARCHIVE_OK; @@ -1010,6 +1009,9 @@ __archive_read_close_filters(struct arch void __archive_read_free_filters(struct archive_read *a) { + /* Make sure filters are closed and their buffers are freed */ + close_filters(a); + while (a->filter != NULL) { struct archive_read_filter *t = a->filter->upstream; free(a->filter); @@ -1052,7 +1054,7 @@ _archive_read_close(struct archive *_a) /* TODO: Clean up the formatters. */ /* Release the filter objects. */ - r1 = __archive_read_close_filters(a); + r1 = close_filters(a); if (r1 < r) r = r1; Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_append_filter.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_append_filter.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_append_filter.c Sat Dec 17 18:33:41 2016 (r310191) @@ -133,7 +133,6 @@ archive_read_append_filter(struct archiv a->filter = filter; r2 = (bidder->init)(a->filter); if (r2 != ARCHIVE_OK) { - __archive_read_close_filters(a); __archive_read_free_filters(a); return (ARCHIVE_FATAL); } @@ -191,7 +190,6 @@ archive_read_append_filter_program_signa a->filter = filter; r = (bidder->init)(a->filter); if (r != ARCHIVE_OK) { - __archive_read_close_filters(a); __archive_read_free_filters(a); return (ARCHIVE_FATAL); } Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_disk_posix.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_disk_posix.c Sat Dec 17 18:33:41 2016 (r310191) @@ -244,7 +244,7 @@ struct tree { int initial_filesystem_id; int current_filesystem_id; int max_filesystem_id; - int allocated_filesytem; + int allocated_filesystem; int entry_fd; int entry_eof; @@ -1382,7 +1382,7 @@ update_current_filesystem(struct archive for (i = 0; i < t->max_filesystem_id; i++) { if (t->filesystem_table[i].dev == dev) { - /* There is the filesytem ID we've already generated. */ + /* There is the filesystem ID we've already generated. */ t->current_filesystem_id = i; t->current_filesystem = &(t->filesystem_table[i]); return (ARCHIVE_OK); @@ -1390,10 +1390,10 @@ update_current_filesystem(struct archive } /* - * This is the new filesytem which we have to generate a new ID for. + * This is the new filesystem which we have to generate a new ID for. */ fid = t->max_filesystem_id++; - if (t->max_filesystem_id > t->allocated_filesytem) { + if (t->max_filesystem_id > t->allocated_filesystem) { size_t s; void *p; @@ -1406,7 +1406,7 @@ update_current_filesystem(struct archive return (ARCHIVE_FATAL); } t->filesystem_table = (struct filesystem *)p; - t->allocated_filesytem = s; + t->allocated_filesystem = s; } t->current_filesystem_id = fid; t->current_filesystem = &(t->filesystem_table[fid]); @@ -2063,8 +2063,7 @@ tree_push(struct tree *t, const char *pa { struct tree_entry *te; - te = malloc(sizeof(*te)); - memset(te, 0, sizeof(*te)); + te = calloc(1, sizeof(*te)); te->next = t->stack; te->parent = t->current; if (te->parent) @@ -2122,9 +2121,8 @@ tree_open(const char *path, int symlink_ { struct tree *t; - if ((t = malloc(sizeof(*t))) == NULL) + if ((t = calloc(1, sizeof(*t))) == NULL) return (NULL); - memset(t, 0, sizeof(*t)); archive_string_init(&t->path); archive_string_ensure(&t->path, 31); t->initial_symlink_mode = symlink_mode; Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_extract2.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_extract2.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_extract2.c Sat Dec 17 18:33:41 2016 (r310191) @@ -52,12 +52,11 @@ struct archive_read_extract * __archive_read_get_extract(struct archive_read *a) { if (a->extract == NULL) { - a->extract = (struct archive_read_extract *)malloc(sizeof(*a->extract)); + a->extract = (struct archive_read_extract *)calloc(1, sizeof(*a->extract)); if (a->extract == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't extract"); return (NULL); } - memset(a->extract, 0, sizeof(*a->extract)); a->cleanup_archive_extract = archive_read_extract_cleanup; } return (a->extract); Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_open_memory.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_open_memory.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_open_memory.c Sat Dec 17 18:33:41 2016 (r310191) @@ -70,12 +70,11 @@ archive_read_open_memory2(struct archive { struct read_memory_data *mine; - mine = (struct read_memory_data *)malloc(sizeof(*mine)); + mine = (struct read_memory_data *)calloc(1, sizeof(*mine)); if (mine == NULL) { archive_set_error(a, ENOMEM, "No memory"); return (ARCHIVE_FATAL); } - memset(mine, 0, sizeof(*mine)); mine->start = mine->p = (const unsigned char *)buff; mine->end = mine->start + size; mine->read_size = read_size; Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_private.h ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_private.h Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_private.h Sat Dec 17 18:33:41 2016 (r310191) @@ -252,7 +252,6 @@ int64_t __archive_read_consume(struct ar int64_t __archive_read_filter_consume(struct archive_read_filter *, int64_t); int __archive_read_program(struct archive_read_filter *, const char *); void __archive_read_free_filters(struct archive_read *); -int __archive_read_close_filters(struct archive_read *); struct archive_read_extract *__archive_read_get_extract(struct archive_read *); Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_filter_uu.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_filter_uu.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_filter_uu.c Sat Dec 17 18:33:41 2016 (r310191) @@ -320,30 +320,14 @@ uudecode_bidder_bid(struct archive_read_ if (l > 45) /* Normally, maximum length is 45(character 'M'). */ return (0); - while (l && len-nl > 0) { - if (l > 0) { - if (!uuchar[*b++]) - return (0); - if (!uuchar[*b++]) - return (0); - len -= 2; - --l; - } - if (l > 0) { - if (!uuchar[*b++]) - return (0); - --len; - --l; - } - if (l > 0) { - if (!uuchar[*b++]) - return (0); - --len; - --l; - } + if (l > len - nl) + return (0); /* Line too short. */ + while (l) { + if (!uuchar[*b++]) + return (0); + --len; + --l; } - if (len-nl < 0) - return (0); if (len-nl == 1 && (uuchar[*b] || /* Check sum. */ (*b >= 'a' && *b <= 'z'))) {/* Padding data(MINIX). */ Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Sat Dec 17 18:33:41 2016 (r310191) @@ -213,7 +213,7 @@ struct _7zip { int header_is_encoded; uint64_t header_bytes_remaining; unsigned long header_crc32; - /* Header offset to check that reading pointes of the file contens + /* Header offset to check that reading points of the file contents * will not exceed the header. */ uint64_t header_offset; /* Base offset of the archive file for a seek in case reading SFX. */ Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_ar.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_ar.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_ar.c Sat Dec 17 18:33:41 2016 (r310191) @@ -104,13 +104,12 @@ archive_read_support_format_ar(struct ar archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_support_format_ar"); - ar = (struct ar *)malloc(sizeof(*ar)); + ar = (struct ar *)calloc(1, sizeof(*ar)); if (ar == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate ar data"); return (ARCHIVE_FATAL); } - memset(ar, 0, sizeof(*ar)); ar->strtab = NULL; r = __archive_read_register_format(a, @@ -316,7 +315,7 @@ _ar_read_header(struct archive_read *a, * If we can't look up the real name, warn and return * the entry with the wrong name. */ - if (ar->strtab == NULL || number > ar->strtab_size) { + if (ar->strtab == NULL || number >= ar->strtab_size) { archive_set_error(&a->archive, EINVAL, "Can't find long filename for GNU/SVR4 archive entry"); archive_entry_copy_pathname(entry, filename); Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Sat Dec 17 18:33:41 2016 (r310191) @@ -814,8 +814,8 @@ header_odc(struct archive_read *a, struc * NOTE: if a filename suffix is ".z", it is the file gziped by afio. * it would be nice that we can show uncompressed file size and we can * uncompressed file contents automatically, unfortunately we have nothing - * to get a uncompressed file size while reading each header. it means - * we also cannot uncompressed file contens under the our framework. + * to get a uncompressed file size while reading each header. It means + * we also cannot uncompress file contents under our framework. */ static int header_afiol(struct archive_read *a, struct cpio *cpio, Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sat Dec 17 18:33:41 2016 (r310191) @@ -229,13 +229,12 @@ archive_read_support_format_mtree(struct archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_support_format_mtree"); - mtree = (struct mtree *)malloc(sizeof(*mtree)); + mtree = (struct mtree *)calloc(1, sizeof(*mtree)); if (mtree == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate mtree data"); return (ARCHIVE_FATAL); } - memset(mtree, 0, sizeof(*mtree)); mtree->fd = -1; r = __archive_read_register_format(a, mtree, "mtree", Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_rar.c Sat Dec 17 18:33:41 2016 (r310191) @@ -647,13 +647,12 @@ archive_read_support_format_rar(struct a archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_support_format_rar"); - rar = (struct rar *)malloc(sizeof(*rar)); + rar = (struct rar *)calloc(sizeof(*rar), 1); if (rar == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate rar data"); return (ARCHIVE_FATAL); } - memset(rar, 0, sizeof(*rar)); /* * Until enough data has been read, we cannot tell about Modified: projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sat Dec 17 18:04:59 2016 (r310190) +++ projects/clang391-import/contrib/libarchive/libarchive/archive_read_support_format_tar.c Sat Dec 17 18:33:41 2016 (r310191) @@ -297,7 +297,7 @@ archive_read_format_tar_cleanup(struct a /* * Validate number field * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Dec 17 18:35:18 2016 Return-Path: Delivered-To: svn-src-projects@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 B5BAAC85208 for ; Sat, 17 Dec 2016 18:35:18 +0000 (UTC) (envelope-from dim@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 85A16962; Sat, 17 Dec 2016 18:35:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBHIZHa7021916; Sat, 17 Dec 2016 18:35:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBHIZHhJ021914; Sat, 17 Dec 2016 18:35:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612171835.uBHIZHhJ021914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Dec 2016 18:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310192 - projects/clang391-import X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2016 18:35:18 -0000 Author: dim Date: Sat Dec 17 18:35:17 2016 New Revision: 310192 URL: https://svnweb.freebsd.org/changeset/base/310192 Log: Put a tentative import date in ObsoleteFiles.inc and UPDATING. Modified: projects/clang391-import/ObsoleteFiles.inc projects/clang391-import/UPDATING Modified: projects/clang391-import/ObsoleteFiles.inc ============================================================================== --- projects/clang391-import/ObsoleteFiles.inc Sat Dec 17 18:33:41 2016 (r310191) +++ projects/clang391-import/ObsoleteFiles.inc Sat Dec 17 18:35:17 2016 (r310192) @@ -38,7 +38,7 @@ # xargs -n1 | sort | uniq -d; # done -# 2016mmdd: new clang import which bumps version from 3.9.0 to 3.9.1. +# 20161217: new clang import which bumps version from 3.9.0 to 3.9.1. OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/asan_interface.h OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/common_interface_defs.h Modified: projects/clang391-import/UPDATING ============================================================================== --- projects/clang391-import/UPDATING Sat Dec 17 18:33:41 2016 (r310191) +++ projects/clang391-import/UPDATING Sat Dec 17 18:35:17 2016 (r310192) @@ -51,7 +51,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** -2016mmdd: +20161217: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.1. Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher.