OpenSSH 3.7 testing (Re: 3.6p1 bug on SCO OpenServer)

Darren Tucker dtucker at zip.com.au
Sun Sep 7 09:53:06 EST 2003


"Gary E. Miller" wrote:
[snip]
> gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.. -I. -I./.. -I/usr/local/ssl/lib  -DHAVE_CONFIG_H -c xcrypt.c
> xcrypt.c:68:3: invalid preprocessing directive #elsif
[snip]
> Changing the #elsif to #elif on lines 68 and 73 allows the SNAP to build.

> make tests passes fine, except for one thing I did not dig out:
> 
> run test dynamic-forward.sh ...
> /usr/local/src/openssh/regress/test-exec.sh: [: too many arguments
> /usr/local/src/openssh/regress/test-exec.sh: [: too many arguments
> skipped (no suitable ProxyCommand found)

Thanks for that, both of those have been fixed.  You can try the attached
patch, or wait for tomorrow's snapshot.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: ChangeLog
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/ChangeLog,v
retrieving revision 1.2962
retrieving revision 1.2967
diff -u -p -r1.2962 -r1.2967
--- ChangeLog	6 Sep 2003 06:44:39 -0000	1.2962
+++ ChangeLog	6 Sep 2003 23:43:42 -0000	1.2967
@@ -1,3 +1,13 @@
+20030907
+ - (dtucker) [agent-ptrace.sh dynamic-forward.sh (all regress/)]
+   Put "which" inside quotes.
+ - (dtucker) [dynamic-forward.sh forwarding.sh sftp-batch.sh (all regress/)]
+   Add ${EXEEXT}: required to work on Cygwin.
+ - (dtucker) [regress/sftp-batch.sh] Make temporary batch file name more
+   distinctive, so "rm ${BATCH}.*" doesn't match the script itself.
+ - (dtucker) [regress/sftp-cmds.sh] Skip quoted file test on Cygwin.
+ - (dtucker) openbsd-compat/xcrypt.c] #elsif -> #elif
+
 20030906
  - (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
 
@@ -24,7 +34,7 @@
    - [regress/agent-ptrace.sh regress/agent-timeout.sh]
      "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.
+     regress/test-exec.sh] Handle different ways of echoing without newlines.
    - [regress/dynamic-forward.sh] Some "which" programs output on stderr.
    - [regress/sftp-cmds.sh] Use portable "test" option.
    - [regress/test-exec.sh] Use sudo, search for "whoami" equivalent, always
@@ -1024,4 +1034,4 @@
  - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
    Report from murple at murple.net, diagnosis from dtucker at zip.com.au
 
-$Id: ChangeLog,v 1.2962 2003/09/06 06:44:39 dtucker Exp $
+$Id: ChangeLog,v 1.2967 2003/09/06 23:43:42 dtucker Exp $
Index: openbsd-compat/xcrypt.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/openbsd-compat/xcrypt.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- openbsd-compat/xcrypt.c	11 Aug 2003 13:00:34 -0000	1.3
+++ openbsd-compat/xcrypt.c	6 Sep 2003 23:43:42 -0000	1.4
@@ -65,12 +65,12 @@ xcrypt(const char *password, const char 
                 crypted = md5_crypt(password, salt);
         else
                 crypted = crypt(password, salt);
-# elsif defined(__hpux) && !defined(HAVE_SECUREWARE)
+# elif defined(__hpux) && !defined(HAVE_SECUREWARE)
 	if (iscomsec())
                 crypted = bigcrypt(password, salt);
         else
                 crypted = crypt(password, salt);
-# elsif defined(HAVE_SECUREWARE)
+# elif defined(HAVE_SECUREWARE)
         crypted = bigcrypt(password, salt);
 # else
         crypted = crypt(password, salt);
@@ -99,12 +99,12 @@ shadow_pw(struct passwd *pw)
 	struct passwd_adjunct *spw;
 	if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
 		pw_password = spw->pwa_passwd;
-# elsif defined(HAVE_SECUREWARE)
+# elif defined(HAVE_SECUREWARE)
 	struct pr_passwd *spw = getprpwnam(pw->pw_name);
 
 	if (spw != NULL)
 		pw_password = spw->ufld.fd_encrypt;
-# elsif defined(__hpux) && !defined(HAVE_SECUREWARE)
+# elif defined(__hpux) && !defined(HAVE_SECUREWARE)
 	struct pr_passwd *spw;
         if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
                 pw_password = spw->ufld.fd_encrypt;
Index: regress/agent-ptrace.sh
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/regress/agent-ptrace.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- regress/agent-ptrace.sh	4 Sep 2003 12:06:16 -0000	1.4
+++ regress/agent-ptrace.sh	6 Sep 2003 23:22:22 -0000	1.5
@@ -3,7 +3,7 @@
 
 tid="disallow agent ptrace attach"
 
-if [ -x `which uname 2>&1` ]; then
+if [ -x "`which uname 2>&1`" ]; then
 	case `uname` in
 	Linux|HP-UX|SunOS|NetBSD|AIX|CYGWIN*)
 		echo "skipped (not supported on this platform)"
@@ -12,7 +12,7 @@ if [ -x `which uname 2>&1` ]; then
 	esac
 fi
 
-if [ ! -x `which gdb 2>&1` ]; then
+if [ ! -x "`which gdb 2>&1`" ]; then
 	echo "skipped (gdb not found)"
 	exit 0
 fi
Index: regress/dynamic-forward.sh
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/regress/dynamic-forward.sh,v
retrieving revision 1.3
retrieving revision 1.5
diff -u -p -r1.3 -r1.5
--- regress/dynamic-forward.sh	4 Sep 2003 05:22:01 -0000	1.3
+++ regress/dynamic-forward.sh	6 Sep 2003 23:28:04 -0000	1.5
@@ -5,10 +5,11 @@ tid="dynamic forwarding"
 
 PORT=4242
 FWDPORT=4243
+DATA=/bin/ls${EXEEXT}
 
-if [ -x `which nc 2>&1` ] && nc -h 2>&1 | grep "x proxy address" >/dev/null; then
+if [ -x "`which nc 2>&1`" ] && nc -h 2>&1 | grep "x proxy address" >/dev/null; then
 	proxycmd="nc -x 127.0.0.1:$FWDPORT -X"
-elif [ -x `which connect 2>&1` ]; then
+elif [ -x "`which connect 2>&1`" ]; then
 	proxycmd="connect -S 127.0.0.1:$FWDPORT -"
 else
 	echo "skipped (no suitable ProxyCommand found)"
@@ -28,9 +29,9 @@ for p in 1 2; do
 		trace "testing ssh protocol $p socks version $s host $h"
 		${SSH} -F $OBJ/ssh_config \
 			-o "ProxyCommand ${proxycmd}${s} $h $PORT" \
-			somehost cat /bin/ls > $OBJ/ls.copy
-		test -f $OBJ/ls.copy	 || fail "failed copy /bin/ls"
-		cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls"
+			somehost cat $DATA > $OBJ/ls.copy
+		test -f $OBJ/ls.copy	 || fail "failed copy $DATA"
+		cmp $DATA $OBJ/ls.copy || fail "corrupted copy of $DATA"
 	    done
 	done
 
Index: regress/forwarding.sh
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/regress/forwarding.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- regress/forwarding.sh	1 May 2002 03:17:34 -0000	1.1
+++ regress/forwarding.sh	6 Sep 2003 23:28:04 -0000	1.2
@@ -2,6 +2,7 @@
 #	Placed in the Public Domain.
 
 tid="local and remote forwarding"
+DATA=/bin/ls${EXEEXT}
 
 start_sshd
 
@@ -25,9 +26,9 @@ for p in 1 2; do
 
 	trace "transfer over forwarded channels and check result"
 	${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \
-		somehost cat /bin/ls > $OBJ/ls.copy
-	test -f $OBJ/ls.copy			|| fail "failed copy /bin/ls"
-	cmp /bin/ls $OBJ/ls.copy		|| fail "corrupted copy of /bin/ls"
+		somehost cat $DATA > $OBJ/ls.copy
+	test -f $OBJ/ls.copy			|| fail "failed copy $DATA"
+	cmp $DATA $OBJ/ls.copy			|| fail "corrupted copy of $DATA"
 
 	sleep 10
 done
Index: regress/sftp-batch.sh
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/regress/sftp-batch.sh,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -p -r1.1 -r1.3
--- regress/sftp-batch.sh	22 Jan 2003 06:53:17 -0000	1.1
+++ regress/sftp-batch.sh	6 Sep 2003 23:31:02 -0000	1.3
@@ -3,9 +3,9 @@
 
 tid="sftp batchfile"
 
-DATA=/bin/ls
+DATA=/bin/ls${EXEEXT}
 COPY=${OBJ}/copy
-BATCH=${OBJ}/sftp-batch
+BATCH=${OBJ}/sftp-batch.tmp
 
 rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
 
Index: regress/sftp-cmds.sh
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/regress/sftp-cmds.sh,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- regress/sftp-cmds.sh	4 Sep 2003 05:24:50 -0000	1.7
+++ regress/sftp-cmds.sh	6 Sep 2003 23:32:59 -0000	1.8
@@ -17,6 +17,20 @@ do
 	fi
 done
 
+if [ -x "`which uname 2>&1`" ]
+then
+	case `uname` in
+	CYGWIN*)
+		os=cygwin
+		;;
+	*)
+		os=`uname`
+		;;
+	esac
+else
+	os="unknown"
+fi
+
 # Path with embedded quote
 QUOTECOPY=${COPY}".\"blah\""
 QUOTECOPY_ARG=${COPY}'.\"blah\"'
@@ -99,11 +113,13 @@ echo "put $DATA $COPY" | ${SFTP} -P ${SF
 	|| fail "put failed"
 cmp $DATA ${COPY} || fail "corrupted copy after put"
 
+if [ "$os" != "cygwin" ]; then
 rm -f ${QUOTECOPY}
 verbose "$tid: put filename with quotes"
 echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
 	|| fail "put failed"
 cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes"
+fi
 
 rm -f ${COPY}.dd/*
 verbose "$tid: put to directory"


More information about the openssh-unix-dev mailing list