[openssh-commits] [openssh] 05/07: upstream: When checking for unsafe directories, ignore non-directories
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Jan 23 22:35:00 AEDT 2020
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit ba247af8e9e302910e22881ef9d307a8afeef036
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date: Thu Jan 23 10:19:59 2020 +0000
upstream: When checking for unsafe directories, ignore non-directories
(ie symlinks, where permissions are not relevant).
OpenBSD-Regress-ID: fb6cfc8b022becb62b2dcb99ed3f072b3326e501
---
regress/test-exec.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index c26e47f7..f17f9493 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.71 2020/01/23 03:42:41 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.72 2020/01/23 10:19:59 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -449,10 +449,12 @@ else
unsafe=""
dir="${OBJ}"
while test ${dir} != "/"; do
- perms=`ls -ld ${dir}`
- case "${perms}" in
+ if test -d "${dir}" ; then
+ perms=`ls -ld ${dir}`
+ case "${perms}" in
?????w????*|????????w?*) unsafe="${unsafe} ${dir}" ;;
- esac
+ esac
+ fi
dir=`dirname ${dir}`
done
if ! test -z "${unsafe}"; then
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list