summaryrefslogtreecommitdiffhomepage
path: root/svr-main.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-12-23 17:00:15 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-12-23 17:00:15 +0000
commit9d4318370418b66796d370cb1fa05d49c28920b0 (patch)
treeed87ba82226d3eddce366b14a29d71464ebe4921 /svr-main.c
parente7677a5e8ddaa4787659a1a9e5320369c94564e4 (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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/svr-main.c b/svr-main.c
index 60ed212..48e6042 100644
--- a/svr-main.c
+++ b/svr-main.c
@@ -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);
}