Dropbear: exit status of remote shell not properly returned to client
Dr. H. Nikolaus Schaller
hns at computer.org
Sat Aug 11 21:04:03 CEST 2007
See here:
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 false ; echo $?
root at 192.168.0.202's password:
255
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
0
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
255
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
255
MacBook-hns:~ hns$ true; echo $?
0
MacBook-hns:~ hns$ true; echo $?
0
MacBook-hns:~ hns$ true; echo $?
0
MacBook-hns:~ hns$ false; echo $?
1
MacBook-hns:~ hns$ false; echo $?
1
MacBook-hns:~ hns$ false; echo $?
1
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
0
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
0
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
255
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
255
MacBook-hns:~ hns$ ssh -l root 192.168.0.202 true ; echo $?
root at 192.168.0.202's password:
255
MacBook-hns:~ hns$
Am 11.08.2007 um 09:05 schrieb Dr. H. Nikolaus Schaller:
> Does anybody have the same experience?
>
> The symptom is that I sometimes get the correct exit status and
> sometimes a 255 - for the same repeated command. i.e.:
>
> $ ssh -l root 192.168.0.202 true ; echo $?
> 0
> $ ssh -l root 192.168.0.202 true ; echo $?
> 255
>
> Using ssh -vvv shows that the debug message:
>
> debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
>
> is missing if ssh returns 255, i.e. dropbear does *not* provide the
> exit status and the client substitutes -1.
>
> This appears to me to be the same bug as in the Changelog (although
> OpenMoko komes with version 0.49)
>
>> 0.44 - Mon Jan 3 2005
>>
>> - Avoid a race in server shell-handling code which prevents the
>> exit-code
>> from being returned to the client in some circumstances.
>
> Does anybody know a fix or is dropbear broken? Or is OpenSSH
> available for OpenMoko?
>
> Nikolaus
>
> _______________________________________________
> OpenMoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
More information about the community
mailing list