]> andersk Git - openssh.git/commitdiff
- dtucker@cvs.openbsd.org 2006/12/13 08:36:36
authordjm <djm>
Fri, 26 Oct 2007 04:45:13 +0000 (04:45 +0000)
committerdjm <djm>
Fri, 26 Oct 2007 04:45:13 +0000 (04:45 +0000)
     [regress/cfgmatch.sh]
     Additional test for multiple PermitOpen entries.  ok djm@

ChangeLog
regress/cfgmatch.sh

index c7dd5e3dc10d06cc71ea04abe580eeaf5a06dcf6..695756837bcf25c61fef0b7799af81c4b4e03469 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,9 @@
    - markus@cvs.openbsd.org 2006/11/06 09:27:43
      [regress/cfgmatch.sh]
      fix quoting for non-(c)sh login shells.
+   - dtucker@cvs.openbsd.org 2006/12/13 08:36:36
+     [regress/cfgmatch.sh]
+     Additional test for multiple PermitOpen entries.  ok djm@
 
 20070927
  - (dtucker) [configure.ac atomicio.c] Fall back to including <sys/poll.h> if
index 46f26d0899264da776453bf2ca4c3c0c5c70b31f..35c5e52a12bdf7ad8599fa7e9279c9b364cdae53 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: cfgmatch.sh,v 1.3 2006/11/06 09:27:43 markus Exp $
+#      $OpenBSD: cfgmatch.sh,v 1.4 2006/12/13 08:36:36 dtucker Exp $
 #      Placed in the Public Domain.
 
 tid="sshd_config match"
@@ -104,3 +104,22 @@ for p in 1 2; do
            fail "match override permitopen proto $p"
        stop_client
 done
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1 127.0.0.1:$PORT 127.0.0.2:2" >>$OBJ/sshd_proxy
+echo "Match User NoSuchUser" >>$OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1 127.0.0.1:2" >>$OBJ/sshd_proxy
+
+# Test that a rule that doesn't match doesn't override, plus test a
+# PermitOpen entry that's not at the start of the list
+for p in 1 2; do
+       rm -f $pidfile
+       trace "nomatch permitopen proxy w/key opts proto $p"
+       ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \
+           exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
+           fail "nomatch override permitopen proto $p sshd failed"
+       sleep 1;
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
+           fail "nomatch override permitopen proto $p"
+       stop_client
+done
This page took 0.18381 seconds and 5 git commands to generate.