some bugs
This commit is contained in:
parent
aa186662ee
commit
f9bc01f14a
8
main.c
8
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)
|
||||
|
Reference in New Issue
Block a user