Hello all, I came across the following with the latest snapshot (and previous): (just trying to start sshd when it's already running) # ./sshd -d [snip] socket: Invalid argument debug1: Bind to port 22 on 0.0.0.0. fatal: Cannot bind any address. # echo $? 255 # ./sshd # echo $? 0 with './sshd', the same fatal message is printed to syslog. This seems critically wrong on systems that check what sshd's exit status was to see if it should have started running without problems. -- Pekka Savola "Tell me of difficulties surmounted, Netcore Oy not those you stumble over and fall" Systems. Networks. Security. -- Robert Jordan: A Crown of Swords
On Sat, 17 Feb 2001, Pekka Savola wrote: : # ./sshd -d : [snip] : socket: Invalid argument : debug1: Bind to port 22 on 0.0.0.0. : fatal: Cannot bind any address. : # echo $? : 255 : : # ./sshd : # echo $? : 0 : : with './sshd', the same fatal message is printed to syslog. this one has forked and detached from the terminal at the point of that error. its parent does exit(0) in daemon() which is what the shell sees.
On Sat, 17 Feb 2001, Pekka Savola wrote:> Hello all, > > I came across the following with the latest snapshot (and previous): > > (just trying to start sshd when it's already running) > > # ./sshd -d > [snip] > socket: Invalid argument > debug1: Bind to port 22 on 0.0.0.0. > fatal: Cannot bind any address. > # echo $? > 255 > > # ./sshd > # echo $? > 0 > > with './sshd', the same fatal message is printed to syslog. > > This seems critically wrong on systems that check what sshd's exit > status was to see if it should have started running without problems.This is because sshd has already daemonised by that point. -d -- | Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's | http://www.mindrot.org / distributed filesystem'' - Dan Geer