Hi,

We are running the Dropbear 0.50 SSH server on an ARM9 platform.  We are
connecting to it from a fast quad-core intel server over 100-Base-T.

We found this problem when trying to build Perl for the target.  The
cross-compile process uploads and runs programs on the target and checks
the exit code from the SSH client to check the target program's exit code.

The ARM9 platform is running a stock Linux 2.6.18 kernel compiled with the
GCC CodeSourcery 2006q3-26 v4.1.1.

The host Intel platform is running CentOS5 with OpenSSH_4.3p2.

A sample shell script on the target is:

#!/bin/bash
echo "ARG: $1"
exit $1

When we run dropbear 0.50 server on the target without debug enabled, we
get exit code 255 from SSH.  e.g.

# ssh [EMAIL PROTECTED] /tmp/test.sh 1
ARG: 1
# echo $?
255
#

# ssh [EMAIL PROTECTED] /tmp/test.sh 100
ARG: 1
# echo $?
255
#

If we recompile dropbear with debug enabled, but don't pass the -v option
when starting dropbear, the behavior is the same.  If we run dropbear with
the "-F -E -v" options, we get the correct exit codes.

# ssh [EMAIL PROTECTED] /tmp/test.sh 1
TRACE: enter sign_key_free
TRACE: enter dsa_key_free
TRACE: enter dsa_key_free: key == NULL
TRACE: enter rsa_key_free
TRACE: leave rsa_key_free
TRACE: leave sign_key_free
ARG: 1
# echo $?
1
#

# ssh [EMAIL PROTECTED] /tmp/test.sh 100
TRACE: enter sign_key_free
TRACE: enter dsa_key_free
TRACE: enter dsa_key_free: key == NULL
TRACE: enter rsa_key_free
TRACE: leave rsa_key_free
TRACE: leave sign_key_free
ARG: 1
# echo $?
100
#

Does anyone have any ideas what could be causing this?

Has anyone seen this on other platforms or is happy that dropbear does
return the correct exit codes in their tests?

Thanks,

Roger



Reply via email to