]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - include/conf.h
Protect a few buffers against overflows
[thirdparty/sarg.git] / include / conf.h
index 2d5546c5e1e6b34b6e706f1b37e2ecc4dbe19fad..3e8582c70b5a4b9d210ba5f6d44c61c303f8ba0a 100755 (executable)
@@ -173,7 +173,11 @@ int mkstemps(char *template, int suffixlen);
 #define MAX_LOG_FILELEN 1024
 #define MAX_REDIRECTOR_LOGS 64
 #define MAX_REDIRECTOR_FILELEN 1024
-#define MAX_DATETIME_DAYS 90
+/*!
+Arbitrary limit on the number of days that are accepted in the selected range of the log file.
+Sarg will complain that there are too many days in the files if this limit is overrun.
+*/
+#define MAX_DATETIME_DAYS 1000
 
 #define REPORT_TYPE_USERS_SITES         0x0001UL
 #define REPORT_TYPE_SITE_USER_TIME_DATE 0x0002UL
@@ -270,6 +274,9 @@ int mkstemps(char *template, int suffixlen);
 //! Bit to include sorttable.js in the html plage.
 #define HTML_JS_SORTTABLE 0x0001
 
+//! The character prefixed in front of the host names that are aliased.
+#define ALIAS_PREFIX '*'
+
 struct periodstruct
 {
    //! The first date of the period.
@@ -390,10 +397,10 @@ unsigned long int IndexTree;
 unsigned long int IndexFields;
 bool UserAuthentication;
 char AuthUserTemplateFile[1024];
+//! \c True to use anonymous file and directory names in the report.
+bool AnonymousOutputFiles;
 char val1[MAXLEN];
-char val2[MAXLEN];
 char val3[MAXLEN];
-char val4[MAXLEN];
 char val5[MAXLEN];
 char val6[MAXLEN];
 char val7[MAXLEN];
@@ -425,6 +432,8 @@ char LDAPTargetAttr[64];
 char GraphFont[MAXLEN];
 //! The full path to sorttable.js if the table in the reports must be dynamicaly sorted.
 char SortTableJs[256];
+//! The name of the file containing the host names to replace by an alias in the report.
+char HostAliasFile[512];
 
 int  idate;
 int  smartfilter;
@@ -432,7 +441,7 @@ int  denied_count;
 int  download_count;
 int  authfail_count;
 int  dansguardian_count;
-int  squidguard_count;
+int  redirector_count;
 int  useragent_count;
 int  limit_flag;
 int  z1, z2, z3;
@@ -442,7 +451,7 @@ int  isalog;
 int  dfrom;
 int  duntil;
 int  dataonly;
-int  indexonly;
+bool  indexonly;
 bool  iprel;
 int  langcode;
 int  debug;