Dropbear fails to run as a daemon.

Matt Johnston matt at ucc.asn.au
Sat Nov 27 14:32:55 WST 2004


On Fri, Nov 26, 2004 at 06:49:14PM -0800, Marc Spiegelman wrote:
> I compiled and ran dropbear successfully on a Debian box but I get the
> following error when I copy and run it an embedded system I'm building:
> 
> Jan  1 01:00:16 embedded user.info sshd: premature exit: Failed to
> daemonize: Success
> 
> The executable runs fine when I fire it up with the -E or -F arguments
> but I can't get it to run as a daemon.
> 
> I copied dropbearmulti along with...
>  libutil.so.1
>  libcrypt.so.1
>  libc.so.6
>  ld-linux-so.2
> 
> Does anyone have any ideas what is going on?

That's quite strange - the error message "Failed to
daemonize" is only printed when the daemon() call fails
(returns -1), but if errno then isn't set, that would
suggest a bug in libc or something.

What version of Dropbear are you using, and what libc are
you using on the embedded system?

I've attached a small program which might help in tracking
down what's happening. Compile it with
gcc -o testdaemon testdaemon.c
(replacing gcc with whatever toolchain you're using), run
it, and let me know what the output is.

Cheers,
Matt



More information about the Dropbear mailing list