diff options
author | 2020-01-23 10:19:59 +0000 | |
---|---|---|
committer | 2020-01-23 10:19:59 +0000 | |
commit | bf01990d610adda20edb0a27a4f8f980b459eb43 (patch) | |
tree | 4adfb029175edb9077e31dbbe8762b316fc4572d | |
parent | Fix the mask that we applied when setting the voltage. (diff) | |
download | wireguard-openbsd-bf01990d610adda20edb0a27a4f8f980b459eb43.tar.xz wireguard-openbsd-bf01990d610adda20edb0a27a4f8f980b459eb43.zip |
When checking for unsafe directories, ignore non-directories (ie symlinks,
where permissions are not relevant).
-rw-r--r-- | regress/usr.bin/ssh/test-exec.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index f01d9eeb5b6..061cbeca0d0 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/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. USER=`id -un` @@ -286,10 +286,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 |