From owner-svn-ports-all@FreeBSD.ORG Tue Apr 1 18:34:03 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD06818C; Tue, 1 Apr 2014 18:34:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9B26B09; Tue, 1 Apr 2014 18:34:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s31IY3iD020029; Tue, 1 Apr 2014 18:34:03 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s31IY3Z5020027; Tue, 1 Apr 2014 18:34:03 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201404011834.s31IY3Z5020027@svn.freebsd.org> From: Antoine Brodin Date: Tue, 1 Apr 2014 18:34:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r349874 - in head/ports-mgmt/pkg: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 18:34:03 -0000 Author: antoine Date: Tue Apr 1 18:34:03 2014 New Revision: 349874 URL: http://svnweb.freebsd.org/changeset/ports/349874 QAT: https://qat.redports.org/buildarchive/r349874/ Log: Detect invalid packages that list directories as a file in plist Exp-run by: bdrewery With hat: portmgr Added: head/ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c (contents, props changed) Modified: head/ports-mgmt/pkg/Makefile Modified: head/ports-mgmt/pkg/Makefile ============================================================================== --- head/ports-mgmt/pkg/Makefile Tue Apr 1 18:29:09 2014 (r349873) +++ head/ports-mgmt/pkg/Makefile Tue Apr 1 18:34:03 2014 (r349874) @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.2.7 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= \ http://files.etoilebsd.net/${PORTNAME}/ \ Added: head/ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c Tue Apr 1 18:34:03 2014 (r349874) @@ -0,0 +1,18 @@ +--- ./libpkg/pkg_ports.c.orig 2014-03-15 13:15:46.000000000 +0000 ++++ ./libpkg/pkg_ports.c 2014-04-01 18:20:02.000000000 +0000 +@@ -318,9 +318,14 @@ + buf = NULL; + regular = false; + +- if (S_ISREG(st.st_mode)) ++ if (S_ISDIR(st.st_mode)) { ++ pkg_emit_error("Plist error, directory listed as a file: %s", line); ++ free_file_attr(a); ++ return (EPKG_FATAL); ++ } else if (S_ISREG(st.st_mode)) + regular = true; + ++ + /* special case for hardlinks */ + if (st.st_nlink > 1) + regular = is_hardlink(p->hardlinks, &st);