#include "include/conf.h"
#include "include/defs.h"
+static void show_ignored_denied(FILE *fp_ou,int count)
+{
+ char ignored[80];
+
+ snprintf(ignored,sizeof(ignored),ngettext("%d more denied access not shown here…","%d more denied accesses not shown here…",count),count);
+ fprintf(fp_ou,"<tr><td class=\"data\"></td><td class=\"data\"></td><td class=\"data\"></td><td class=\"data2\"><i>%s</i></td></tr>\n",ignored);
+}
+
void gen_denied_report(void)
{
if(strcmp(ouser2,uinfo->label) == 0) {
count++;
} else {
+ if(count>DeniedReportLimit && DeniedReportLimit>0)
+ show_ignored_denied(fp_ou,count-DeniedReportLimit);
count=1;
strcpy(ouser2,uinfo->label);
}
- if(count >= DeniedReportLimit)
+ if(count > DeniedReportLimit)
continue;
}
fclose(fp_in);
longline_destroy(&line);
+ if(count>DeniedReportLimit && DeniedReportLimit>0)
+ show_ignored_denied(fp_ou,count-DeniedReportLimit);
+
fputs("</table></div>\n",fp_ou);
if (write_html_trailer(fp_ou)<0)
debuga(_("Write error in file %s\n"),report);