summaryrefslogtreecommitdiff
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
commit57d800d314006b78699282260f3ab3b839b43e08 (patch)
treeed87ba82226d3eddce366b14a29d71464ebe4921 /svr-main.c
parent706d0cbf66d0ac1096d2763379e70d106403bfb7 (diff)
downloaddropbear-57d800d314006b78699282260f3ab3b839b43e08.tar.gz
Log the IP along with auth success/fail attempts
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);
}