diff options
author | Matt Johnston <matt@ucc.asn.au> | 2004-12-23 17:00:15 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2004-12-23 17:00:15 +0000 |
commit | 9d4318370418b66796d370cb1fa05d49c28920b0 (patch) | |
tree | ed87ba82226d3eddce366b14a29d71464ebe4921 /svr-main.c | |
parent | e7677a5e8ddaa4787659a1a9e5320369c94564e4 (diff) |
Log the IP along with auth success/fail attempts
--HG--
extra : convert_revision : 25eab43bd46e931fd4afecec49c22b9311062099
Diffstat (limited to 'svr-main.c')
-rw-r--r-- | svr-main.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -94,7 +94,6 @@ static void main_inetd() { /* In case our inetd was lax in logging source addresses */ addrstring = getaddrstring(&remoteaddr, 1); dropbear_log(LOG_INFO, "Child connection from %s", addrstring); - m_free(addrstring); /* Don't check the return value - it may just fail since inetd has * already done setsid() after forking (xinetd on Darwin appears to do @@ -104,7 +103,7 @@ static void main_inetd() { /* Start service program * -1 is a dummy childpipe, just something we can close() without * mattering. */ - svr_session(0, -1, getaddrhostname(&remoteaddr)); + svr_session(0, -1, getaddrhostname(&remoteaddr), addrstring); /* notreached */ } @@ -264,7 +263,6 @@ void main_noinetd() { addrstring = getaddrstring(&remoteaddr, 1); dropbear_log(LOG_INFO, "Child connection from %s", addrstring); - m_free(addrstring); if (setsid() < 0) { dropbear_exit("setsid: %s", strerror(errno)); @@ -283,7 +281,8 @@ void main_noinetd() { /* start the session */ svr_session(childsock, childpipe[1], - getaddrhostname(&remoteaddr)); + getaddrhostname(&remoteaddr), + addrstring); /* don't return */ assert(0); } |