From 18d7e878cf8906904fbe698ef8517c5e4b36c84d Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Mon, 25 May 2020 17:40:20 +0200 Subject: [PATCH] added accepted in filter --- main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 37e3192..cc9b076 100644 --- a/main.c +++ b/main.c @@ -12,8 +12,12 @@ #define HOSTNAME "localhost" #define EVENT_SIZE (sizeof(struct inotify_event)) +#define NONE 0 +#define INFO 1 +#define WARNING 2 +#define DEBUG 3 -int debug = 1; +int debug = INFO; struct connexion { @@ -413,7 +417,7 @@ int getprocinfo( struct connexion * conn ) null2space( str ); sprintf(conn->cmdline, "%s", str); fclose(fh1); - if ((strstr(conn->cmdline, "pam") || strstr(conn->cmdline, "net")) != 0) + if ((strstr(conn->cmdline, "pam") || strstr(conn->cmdline, "net") || strstr(conn->cmdline, "accepted")) != 0) { retval = -1; }