From f9bc01f14a1f23ba1393619a13efc11a0e2355f4 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Wed, 27 May 2020 23:10:25 +0200 Subject: [PATCH] some bugs --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 5d6f741..ce1338c 100644 --- a/main.c +++ b/main.c @@ -310,8 +310,8 @@ void getutmp( struct connexion * conn, time_t * time ) char str[6]; char strlog[128]; - //conn->host_ip[0]='\0'; - //conn->host_ipv6[0]='\0'; + conn->host_ip[0]='\0'; + conn->host_ipv6[0]='\0'; setutent(); while ( (utmp = getutent()) != NULL ) { @@ -474,7 +474,7 @@ int getprocinfo( struct connexion * conn ) sprintf(conn->cmdline, "%s", str); fclose(fh1); printlog(conn->cmdline, DEBUG, 0); - if ((strstr(conn->cmdline, "pam") || strstr(conn->cmdline, "net") || strstr(conn->cmdline, "accepted")) != 0) + if ((strstr(conn->cmdline, "pam") || strstr(conn->cmdline, "net") ) != 0) { printlog("comdline is pam or net or accepted", DEBUG, 0); retval = -1; @@ -635,7 +635,7 @@ int main() } }else { - sprintf(strlog, "%s: %s Connecté depuis %s - %s %s", conn.date, conn.user, ip, conn.cmd, conn.cmdline); + sprintf(strlog, "%s Connecté depuis %s ip=%s - %s %s", conn.user, conn.date, ip, conn.cmd, conn.cmdline); printlog(strlog, INFO, 0); } }else if (rinfo == -1)