- [regress/agent.sh regress/proto-version.sh regress/ssh-com.sh

regress/test-exec.sh] Handle different was of echoing without newlines.
This commit is contained in:
Darren Tucker 2003-09-04 15:16:56 +10:00
parent 58f89bc14d
commit 53c55f4179
5 changed files with 19 additions and 6 deletions

View File

@ -17,6 +17,8 @@
- [regress/sftp.sh] Remove dependency on /dev/stdin. - [regress/sftp.sh] Remove dependency on /dev/stdin.
- [regress/agent-ptrace.sh regress/agent-timeout.sh] - [regress/agent-ptrace.sh regress/agent-timeout.sh]
"grep -q" -> "grep >/dev/null" "grep -q" -> "grep >/dev/null"
- [regress/agent.sh regress/proto-version.sh regress/ssh-com.sh
regress/test-exec.sh] Handle different was of echoing without newlines.
20030903 20030903
- (djm) OpenBSD CVS Sync - (djm) OpenBSD CVS Sync
@ -1007,4 +1009,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2951 2003/09/04 05:07:59 dtucker Exp $ $Id: ChangeLog,v 1.2952 2003/09/04 05:16:56 dtucker Exp $

View File

@ -19,7 +19,7 @@ else
fail "ssh-add -l did not fail with exit code 1" fail "ssh-add -l did not fail with exit code 1"
fi fi
trace "overwrite authorized keys" trace "overwrite authorized keys"
echo -n > $OBJ/authorized_keys_$USER echon > $OBJ/authorized_keys_$USER
for t in rsa rsa1; do for t in rsa rsa1; do
# generate user key for agent # generate user key for agent
rm -f $OBJ/$t-agent rm -f $OBJ/$t-agent

View File

@ -8,7 +8,7 @@ check_version ()
{ {
version=$1 version=$1
expect=$2 expect=$2
banner=`echo -n | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy` banner=`echon | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy`
case ${banner} in case ${banner} in
SSH-1.99-*) SSH-1.99-*)
proto=199 proto=199

View File

@ -67,7 +67,7 @@ done
# convert and append DSA hostkey # convert and append DSA hostkey
( (
echo -n 'ssh2-localhost-with-alias,127.0.0.1,::1 ' echon 'ssh2-localhost-with-alias,127.0.0.1,::1 '
${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub ${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub
) >> $OBJ/known_hosts ) >> $OBJ/known_hosts

View File

@ -72,6 +72,17 @@ export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER
#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER
# helper # helper
echon()
{
if [ "x`echo -n`" = "x" ]; then
echo -n "$@"
elif [ "x`echo '\c'`" = "x" ]; then
echo "$@\c"
else
fatal "Don't know how to echo without newline."
fi
}
cleanup () cleanup ()
{ {
if [ -f $PIDFILE ]; then if [ -f $PIDFILE ]; then
@ -111,7 +122,7 @@ fail ()
fatal () fatal ()
{ {
echo -n "FATAL: " echon "FATAL: "
fail "$@" fail "$@"
cleanup cleanup
exit $RESULT exit $RESULT
@ -169,7 +180,7 @@ for t in rsa rsa1; do
# known hosts file for client # known hosts file for client
( (
echo -n 'localhost-with-alias,127.0.0.1,::1 ' echon 'localhost-with-alias,127.0.0.1,::1 '
cat $OBJ/$t.pub cat $OBJ/$t.pub
) >> $OBJ/known_hosts ) >> $OBJ/known_hosts