added function name in log
This commit is contained in:
parent
94198e6a25
commit
a4b85fa73c
8
main.c
8
main.c
@ -219,6 +219,7 @@ int readconfig( struct config * cfg )
|
||||
}
|
||||
if (cfg->commande[0] == 0)
|
||||
{
|
||||
strcpy(cfg->commande,"no command found");
|
||||
printf("command not found in config file: no command will be executed\n");
|
||||
retval += 4;
|
||||
}
|
||||
@ -558,14 +559,9 @@ int main()
|
||||
sprintf( str, "%s \"%s - %s: Démarrage de sshdetect\"", cfg.commande, cfg.hostname, date );
|
||||
id=fork();
|
||||
if(id == 0)
|
||||
{
|
||||
if (cfg.commande[0] != 0)
|
||||
{
|
||||
r = system( str );
|
||||
}else
|
||||
{
|
||||
printlog("no command defined: no command launched", WARNING, 0);
|
||||
}
|
||||
printlog("str", WARNING, 0);
|
||||
exit(r);
|
||||
}else if( id<0 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user