From 7d06b00032d2d57474dbba9fddd0b8cd9ef05ef3 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 7 Jan 2011 09:54:20 +1100 Subject: [PATCH] - djm@cvs.openbsd.org 2011/01/06 22:46:21 [regress/Makefile regress/host-expand.sh] regress test for LocalCommand %n expansion from bert.wesarg AT googlemail.com; ok markus@ --- ChangeLog | 4 ++++ regress/Makefile | 7 ++++--- regress/host-expand.sh | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 regress/host-expand.sh diff --git a/ChangeLog b/ChangeLog index 5e2089620..4fc608814 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ [clientloop.c] when exiting due to ServerAliveTimeout, mention the hostname that caused it (useful with backgrounded controlmaster) + - djm@cvs.openbsd.org 2011/01/06 22:46:21 + [regress/Makefile regress/host-expand.sh] + regress test for LocalCommand %n expansion from bert.wesarg AT + googlemail.com; ok markus@ 20110106 - (djm) OpenBSD CVS Sync diff --git a/regress/Makefile b/regress/Makefile index 9ebb2500e..85fd3a5ad 100644 --- a/regress/Makefile +++ b/regress/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 t-exec tests: $(REGRESS_TARGETS) @@ -56,7 +56,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 @@ -75,7 +76,7 @@ CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \ known_hosts-cert host_ca_key* cert_host_key* \ putty.rsa2 sshd_proxy_orig \ - authorized_principals_${USER} + authorized_principals_${USER} expect actual # Enable all malloc(3) randomisations and checks TEST_ENV= "MALLOC_OPTIONS=AFGJPRX" diff --git a/regress/host-expand.sh b/regress/host-expand.sh new file mode 100644 index 000000000..c0417d9c9 --- /dev/null +++ b/regress/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 +