summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2014-04-15 11:02:38 +0000
committerespie <espie@openbsd.org>2014-04-15 11:02:38 +0000
commit6af91da1f0cef89ebe732dca144726e5377acc8c (patch)
tree2bb7a161e0f895206b59a8482bfe7aa71b8038b4
parenti wanted to work on this in the tree so i could commit lots of small (diff)
downloadwireguard-openbsd-6af91da1f0cef89ebe732dca144726e5377acc8c.tar.xz
wireguard-openbsd-6af91da1f0cef89ebe732dca144726e5377acc8c.zip
catch directories we don't have the right to enter instead of letting Find
do it (shorter/better message)
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCheck.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
index 214c405f4a9..2ac0743a13f 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCheck.pm,v 1.48 2014/04/14 21:55:37 espie Exp $
+# $OpenBSD: PkgCheck.pm,v 1.49 2014/04/15 11:02:38 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -859,6 +859,11 @@ sub localbase_check
}
}
}
+ if (! -r -x _) {
+ $File::Find::prune = 1;
+ $state->errsay("can't enter #1",
+ $File::Find::name);
+ }
return if defined $state->{known}{$File::Find::name};
if (-l $_) {
return if $state->{known}{$File::Find::dir}{$_};