From 3545be19d5dda71a47303dae64295b3678115128 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 6 Jan 2011 22:46:22 +0000 Subject: regress test for LocalCommand %n expansion from bert.wesarg AT googlemail.com; ok markus@ --- regress/usr.bin/ssh/Makefile | 7 ++++--- regress/usr.bin/ssh/host-expand.sh | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 regress/usr.bin/ssh/host-expand.sh (limited to 'regress') diff --git a/regress/usr.bin/ssh/Makefile b/regress/usr.bin/ssh/Makefile index c3e1bb9186d..e2db094409b 100644 --- a/regress/usr.bin/ssh/Makefile +++ b/regress/usr.bin/ssh/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.57 2010/09/22 12:26:05 djm Exp $ +# $OpenBSD: Makefile,v 1.58 2011/01/06 22:46:21 djm Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 @@ -49,7 +49,8 @@ LTESTS= connect \ keytype \ kextype \ cert-hostkey \ - cert-userkey + cert-userkey \ + host-expand INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp @@ -65,7 +66,7 @@ CLEANFILES+= authorized_keys_${USER} known_hosts pidfile \ scp-ssh-wrapper.exe ssh_proxy_envpass remote_pid \ sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \ known_hosts-cert host_ca_key* cert_host_key* \ - authorized_principals_${USER} + authorized_principals_${USER} expect actual # Enable all malloc(3) randomisations and checks TEST_ENV= "MALLOC_OPTIONS=AFGJPRX" diff --git a/regress/usr.bin/ssh/host-expand.sh b/regress/usr.bin/ssh/host-expand.sh new file mode 100644 index 00000000000..c0417d9c987 --- /dev/null +++ b/regress/usr.bin/ssh/host-expand.sh @@ -0,0 +1,18 @@ +# Placed in the Public Domain. + +tid="expand %h and %n" + +echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy +printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy + +cat >expect <actual + diff expect actual || fail "$tid proto $p" +done + -- cgit v1.2.3