]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
List the source of the redirection rule in a squidGuard log
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 11 May 2010 08:26:17 +0000 (08:26 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 11 May 2010 08:26:17 +0000 (08:26 +0000)
CMakeLists.txt
include/info.h
squidguard_log.c

index c82e7c22fcdc6c901d78433041853439bb1c3fe4..ccf2458c87b6a8131a8a029df5c4643c05ebebfc 100755 (executable)
@@ -3,7 +3,7 @@ PROJECT(sarg C)
 SET(sarg_VERSION 2)
 SET(sarg_REVISION "3-pre2")
 SET(sarg_BUILD "")
-SET(sarg_BUILDDATE "May-10-2010")
+SET(sarg_BUILDDATE "May-11-2010")
 
 INCLUDE(AddFileDependencies)
 INCLUDE(CheckIncludeFile)
index 53af90841e4522e3f20eabfc5dc9178dabf62851..87c66a27758c038da02e8e3dc07b8980738be105 100755 (executable)
@@ -1,3 +1,3 @@
-#define VERSION PACKAGE_VERSION" May-10-2010"
+#define VERSION PACKAGE_VERSION" May-11-2010"
 #define PGM PACKAGE_NAME
 #define URL "http://sarg.sourceforge.net"
index 19abe1da0159a54834a94ae11149fcfc02760e89..32e42e729756c12903c42e3be55a38b6a68ff0a9 100644 (file)
@@ -37,7 +37,7 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil)
    char buf[MAXLEN];
    char leks[5], sep[2], res[MAXLEN];
    char mon[20], day[3], year[5], hour[15];
-   char list[MAXLEN];
+   char source[128], list[128];
    char wdata[127];
    char url[MAX_URL_LEN];
    char user[MAX_USER_LEN];
@@ -165,7 +165,8 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil)
       } else {
          if (getword(year,sizeof(year),&gwarea,'-')<0 || getword(mon,sizeof(mon),&gwarea,'-')<0 ||
              getword(day,sizeof(day),&gwarea,' ')<0 || getword(hour,sizeof(hour),&gwarea,' ')<0 ||
-             getword_skip(MAXLEN,&gwarea,'/')<0 || getword(list,sizeof(list),&gwarea,'/')<0 ||
+             getword_skip(MAXLEN,&gwarea,'(')<0 ||
+             getword(source,sizeof(source),&gwarea,'/')<0 || getword(list,sizeof(list),&gwarea,'/')<0 ||
              getword_skip(MAXLEN,&gwarea,' ')<0 || getword(url,sizeof(url),&gwarea,' ')<0 ||
              getword(ip,sizeof(ip),&gwarea,'/')<0 || getword_skip(MAXLEN,&gwarea,' ')<0 ||
              getword(user,sizeof(user),&gwarea,' ')<0) {
@@ -222,7 +223,7 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil)
          if(Ip2Name && id_is_ip) ip2name(user,sizeof(user));
          user_find(uinfo->label,MAX_USER_LEN, user);
       }
-      fprintf(fp_ou,"%s\t%s%s%s\t%s\t%s\t%s\t%s\n",uinfo->id,year,mon,day,hour,ip,url,list);
+      fprintf(fp_ou,"%s\t%s%s%s\t%s\t%s\t%s\t%s/%s\n",uinfo->id,year,mon,day,hour,ip,url,source,list);
       squidguard_count++;
    }
    if (fp_in) fclose(fp_in);