Bug 1568

Summary: ssh-rand-helper ignores incorrect command line arguments
Product: Portable OpenSSH Reporter: Andreas Gustafsson <gson>
Component: ssh-rand-helperAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: djm
Priority: P2    
Version: 5.2p1   
Hardware: ix86   
OS: Linux   
Bug Depends on:    
Bug Blocks: 1626    
Attachments:
Description Flags
Patch none

Description Andreas Gustafsson 2009-03-09 22:21:37 AEDT
Created attachment 1611 [details]
Patch

If you mistakenly run the command

  ssh-rand-helper 256

expecting it to return 256 bytes of output, ssh-rand-helper silently
ignores the error on the command line and returns 48 bytes of output.
It would be helpful to get an usage message in this case.

Also, if you enter an illegal command line option, say,

  ssh-rand-helper -z

ssh-rand-helper does print a usage message, but it will otherwise
ignore the error and will return an exit status of zero.  It would
seem more prudent to treat this as a fatal error.
Comment 1 Damien Miller 2009-11-20 15:17:03 AEDT
Applied - thanks for the patch. This will be in openssh-5.4.
Comment 2 Darren Tucker 2010-03-26 10:52:01 AEDT
With the release of 5.4p1, this bug is now considered closed.