debug
This commit is contained in:
parent
d7c386cc9b
commit
ce35181bc6
11
main.c
11
main.c
@ -110,15 +110,12 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[], char host_ip
|
|||||||
time_t timet=0;
|
time_t timet=0;
|
||||||
|
|
||||||
getutmp( pid, user, host_ip, &timet );
|
getutmp( pid, user, host_ip, &timet );
|
||||||
if ( timet != 0)
|
if ( timet == 0)
|
||||||
{
|
|
||||||
sprintf(date, "%s", ctime(&timet));
|
|
||||||
}else
|
|
||||||
{
|
{
|
||||||
time( &timet );
|
time( &timet );
|
||||||
sprintf( date, "%s", ctime(&timet) );
|
|
||||||
date[strlen(date)-1] = 0;
|
|
||||||
}
|
}
|
||||||
|
sprintf( date, "%s", ctime(&timet) );
|
||||||
|
date[strlen(date)-1] = 0;
|
||||||
while ( flag == 0)
|
while ( flag == 0)
|
||||||
{
|
{
|
||||||
r = getpids( pid, child_pid );
|
r = getpids( pid, child_pid );
|
||||||
@ -289,7 +286,7 @@ int main()
|
|||||||
perror(logfile);
|
perror(logfile);
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
fprintf(fh1, "%s: %s Connecté depuis %s - %s %s\n", date, host_ip, user, cmd, cmdline);
|
fprintf(fh1, "%s: %s Connecté depuis %s - %s %s\n", date, user, host_ip, cmd, cmdline);
|
||||||
fclose(fh1);
|
fclose(fh1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user