diff options
author | Colin Watson <cjwatson@debian.org> | 2016-08-06 10:49:59 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-08-07 12:18:58 +0100 |
commit | 477bb7636238c106f8cd7c868a8c0c5eabcfb3db (patch) | |
tree | 601176af2ecf358c36b766776a86845ad7a3cd6f /regress/test-exec.sh | |
parent | 747fac2de0d889183f67f6900194c0462c558544 (diff) | |
parent | 4c914ccd85bbf391c4dc61b85e3c178fef465e3f (diff) |
New upstream release (7.3p1).
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r-- | regress/test-exec.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 114e129f2..1b6526d0b 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.51 2015/03/03 22:35:19 markus Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.53 2016/04/15 02:57:10 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -221,6 +221,7 @@ echo "#!/bin/sh" > $SSHLOGWRAP | |||
221 | echo "exec ${SSH} -E${TEST_SSH_LOGFILE} "'"$@"' >>$SSHLOGWRAP | 221 | echo "exec ${SSH} -E${TEST_SSH_LOGFILE} "'"$@"' >>$SSHLOGWRAP |
222 | 222 | ||
223 | chmod a+rx $OBJ/ssh-log-wrapper.sh | 223 | chmod a+rx $OBJ/ssh-log-wrapper.sh |
224 | REAL_SSH="$SSH" | ||
224 | SSH="$SSHLOGWRAP" | 225 | SSH="$SSHLOGWRAP" |
225 | 226 | ||
226 | # Some test data. We make a copy because some tests will overwrite it. | 227 | # Some test data. We make a copy because some tests will overwrite it. |
@@ -411,6 +412,13 @@ cat << EOF > $OBJ/sshd_config | |||
411 | Subsystem sftp $SFTPSERVER | 412 | Subsystem sftp $SFTPSERVER |
412 | EOF | 413 | EOF |
413 | 414 | ||
415 | # This may be necessary if /usr/src and/or /usr/obj are group-writable, | ||
416 | # but if you aren't careful with permissions then the unit tests could | ||
417 | # be abused to locally escalate privileges. | ||
418 | if [ ! -z "$TEST_SSH_UNSAFE_PERMISSIONS" ]; then | ||
419 | echo "StrictModes no" >> $OBJ/sshd_config | ||
420 | fi | ||
421 | |||
414 | if [ ! -z "$TEST_SSH_SSHD_CONFOPTS" ]; then | 422 | if [ ! -z "$TEST_SSH_SSHD_CONFOPTS" ]; then |
415 | trace "adding sshd_config option $TEST_SSH_SSHD_CONFOPTS" | 423 | trace "adding sshd_config option $TEST_SSH_SSHD_CONFOPTS" |
416 | echo "$TEST_SSH_SSHD_CONFOPTS" >> $OBJ/sshd_config | 424 | echo "$TEST_SSH_SSHD_CONFOPTS" >> $OBJ/sshd_config |