diff options
author | antoine <antoine@FreeBSD.org> | 2014-04-02 02:34:03 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2014-04-02 02:34:03 +0800 |
commit | 7cb65e934f5bed92ba80e594135ae90aac4449a6 (patch) | |
tree | 5c929d346c5fe7d21e2a600b746db4fe2e934e89 /ports-mgmt | |
parent | 0a71474fc86675ee72c1db0123a41a9746e5b366 (diff) | |
download | freebsd-ports-gnome-7cb65e934f5bed92ba80e594135ae90aac4449a6.tar.gz freebsd-ports-gnome-7cb65e934f5bed92ba80e594135ae90aac4449a6.tar.zst freebsd-ports-gnome-7cb65e934f5bed92ba80e594135ae90aac4449a6.zip |
Detect invalid packages that list directories as a file in plist
Exp-run by: bdrewery
With hat: portmgr
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/pkg/Makefile | 1 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile index a7e76ab67e6a..7059515e3306 100644 --- a/ports-mgmt/pkg/Makefile +++ b/ports-mgmt/pkg/Makefile @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.2.7 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= \ http://files.etoilebsd.net/${PORTNAME}/ \ diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c b/ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c new file mode 100644 index 000000000000..bd6538c46bc4 --- /dev/null +++ b/ports-mgmt/pkg/files/patch-libpkg__pkg_ports.c @@ -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); |