mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-02-05 08:32:26 +00:00
upstream: When checking for unsafe directories, ignore non-directories
(ie symlinks, where permissions are not relevant). OpenBSD-Regress-ID: fb6cfc8b022becb62b2dcb99ed3f072b3326e501
This commit is contained in:
parent
74deb7029b
commit
ba247af8e9
@ -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.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
#SUDO=sudo
|
#SUDO=sudo
|
||||||
@ -449,10 +449,12 @@ else
|
|||||||
unsafe=""
|
unsafe=""
|
||||||
dir="${OBJ}"
|
dir="${OBJ}"
|
||||||
while test ${dir} != "/"; do
|
while test ${dir} != "/"; do
|
||||||
perms=`ls -ld ${dir}`
|
if test -d "${dir}" ; then
|
||||||
case "${perms}" in
|
perms=`ls -ld ${dir}`
|
||||||
|
case "${perms}" in
|
||||||
?????w????*|????????w?*) unsafe="${unsafe} ${dir}" ;;
|
?????w????*|????????w?*) unsafe="${unsafe} ${dir}" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
dir=`dirname ${dir}`
|
dir=`dirname ${dir}`
|
||||||
done
|
done
|
||||||
if ! test -z "${unsafe}"; then
|
if ! test -z "${unsafe}"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user