From: Frédéric Marchal Date: Fri, 31 Aug 2012 16:54:46 +0000 (+0200) Subject: Don't delete the denied and authfail temporary files if requested X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d89ead3cf991cab008dbb6a0b2b0ff3c51c1b4de;p=thirdparty%2Fsarg.git Don't delete the denied and authfail temporary files if requested The temporary unsorted files containing the denied and authfail could be deleted when the user had requested to keep the temporary files. --- diff --git a/authfail.c b/authfail.c index 26fc449..60b4657 100644 --- a/authfail.c +++ b/authfail.c @@ -294,7 +294,7 @@ void authfail_cleanup(void) fp_authfail=NULL; } if(authfail_unsort[0]) { - if (unlink(authfail_unsort)==-1) + if (!KeepTempLog && unlink(authfail_unsort)==-1) debuga(_("Failed to delete %s: %s\n"),authfail_unsort,strerror(errno)); } } diff --git a/denied.c b/denied.c index 08a0913..701d744 100644 --- a/denied.c +++ b/denied.c @@ -290,7 +290,7 @@ void denied_cleanup(void) fclose(fp_denied); fp_denied=NULL; } - if(denied_unsort[0]) { + if (!KeepTempLog && denied_unsort[0]) { if (unlink(denied_unsort)==-1) debuga(_("Failed to delete %s: %s\n"),denied_unsort,strerror(errno)); }