On Wed, 7 Feb 2001, Rahsheen Porter wrote:
> I'm pretty positive the latest ver of OpenSSH does this. There was
> something
> on the list recently about it. I think I'm using a patch provided during
> that thread though. (OpenSSH_2.3.0p1)

This off-topic here but you can get a patch here:
http://storm.sst.com.br/openssh-2.3.0p1-daemontools.diff

I made that patch using routines already in the code. All that it do is
insert a new toggle (-t) that enables inetd mode (daemon doesn't fork to
background) and enables stderr logging. The CVS version of sshd.c
implements a -D switch meaning "don't fork to background" but it lacks
support to stderr logging. I'm using it like this:

root@storm:~> cd /service/sshd
root@storm:/service/sshd> cat run
#!/bin/sh
exec 2>&1
exec softlimit -d300000 tcpserver -vDRHl0 -x tcp.cdb 0 ssh /usr/sbin/sshd
-t
root@storm:/service/sshd> cd log
root@storm:/service/sshd/log> cat run
#!/bin/sh
exec setuidgid log multilog t ./main
root@storm:/service/sshd/log>

Here is a sample of main/current:

@400000003a7ef9772ed9a124 tcpserver: status: 1/40
@400000003a7ef9772edb896c tcpserver: pid 31274 from 200.223.199.3
@400000003a7ef9772f59aa7c tcpserver: ok 31274 0:200.223.199.5:22 :200.223.199.3::1011
@400000003a7ef97730f633dc sshd: Generating 768 bit RSA key.
@400000003a7ef97734e340d4 sshd: RSA key generation complete.
@400000003a7ef97b1571c8c4 sshd: Accepted password for ROOT from 200.223.199.3 port 
1011 ssh2
@400000003a7ef9b511cc638c tcpserver: end 31274 status 65280
@400000003a7ef9b511cc8a9c tcpserver: status: 0/40

The patch is ugly because I'm not a C expert but it works.

Antonio Dias

Reply via email to