Dropbear server 0.50 stops listening to socket when started without stdin
matt at ucc.asn.au
Thu Sep 20 20:41:59 WST 2007
On Wed, Sep 19, 2007 at 03:18:47PM +0200, Laurent Pinchart wrote:
> The 2007-07-19 commit ("Patch from Nicolai Ehemann to try binding before going
> to the background, so that if it exits early (because something's already
> listening etc) then it will return an exitcode of 1.") breaks Dropbear when
> started from init (busybox 1.6.1) with no console.
> When no console is configured, init starts dropbear with stdin (fd 0) closed.
> The socket opened by listensockets() will then be assigned fd 0. The later
> call to daemon() will reassign fd 0, 1 and 2 to /dev/null, making dropbreak
> stop listening to the network.
> I reverted the patch as temporary workaround. I'm not sure what a proper
> solution would be.
Aha, right. I'm heading away for a few weeks, will have a
closer look after that. Sounds plausible that it broke
More information about the Dropbear