Hello community,
here is the log from the commit of package sarg
checked in at Wed Aug 30 00:06:46 CEST 2006.
--------
--- sarg/sarg.changes 2006-08-10 11:09:37.000000000 +0200
+++ sarg/sarg.changes 2006-08-29 19:23:22.000000000 +0200
@@ -1,0 +2,16 @@
+Tue Aug 29 19:23:20 CEST 2006 - kssingvo@suse.de
+
+- update to version 2.2.2
+ * malloc test implemented to avoid high-memory consuming.
+ Thanks to Rodrigo Rubira Branco
+ * Czech UTF8 language added by Josef Karliak
+ * fixed: parsed mismatch in realtime_access_log_lines and
+ access_log_lines tags.
+ Thanks to Kuznetsov Andrey
+ * changed: realtime report sort changed by date/time
+ Thanks to Leonardo Buonsanti
+ * GD minor fixes added.
+ * bug fixed. *** buffer overflow detected ***: sarg terminated
+ in Fedora Core 5 when using -D FORTIFY_SOURCE in gcc or in kernel
+
+-------------------------------------------------------------------
Old:
----
sarg-2.2.1.tar.bz2
New:
----
sarg-2.2.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sarg.spec ++++++
--- /var/tmp/diff_new_pack.KaudSP/_old 2006-08-30 00:06:28.000000000 +0200
+++ /var/tmp/diff_new_pack.KaudSP/_new 2006-08-30 00:06:28.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package sarg (Version 2.2.1)
+# spec file for package sarg (Version 2.2.2)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
Name: sarg
Summary: Squid Analysis Report Generator
-Version: 2.2.1
+Version: 2.2.2
Release: 1
License: GPL
URL: http://sarg.sourceforge.net/sarg.php
@@ -130,6 +130,19 @@
%doc CONTRIBUTORS COPYING ChangeLog DONATIONS LICENSE README
%changelog -n sarg
+* Tue Aug 29 2006 - kssingvo@suse.de
+- update to version 2.2.2
+ * malloc test implemented to avoid high-memory consuming.
+ Thanks to Rodrigo Rubira Branco
+ * Czech UTF8 language added by Josef Karliak
+ * fixed: parsed mismatch in realtime_access_log_lines and
+ access_log_lines tags.
+ Thanks to Kuznetsov Andrey
+ * changed: realtime report sort changed by date/time
+ Thanks to Leonardo Buonsanti
+ * GD minor fixes added.
+ * bug fixed. *** buffer overflow detected ***: sarg terminated
+ in Fedora Core 5 when using -D FORTIFY_SOURCE in gcc or in kernel
* Thu Aug 10 2006 - kssingvo@suse.de
- update to version 2.2.1
* iconv problems fixed in Freebsd and Slackware.
++++++ sarg-2.2.1.tar.bz2 -> sarg-2.2.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/ChangeLog new/sarg-2.2.2/ChangeLog
--- old/sarg-2.2.1/ChangeLog 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/ChangeLog 2006-08-29 13:09:32.000000000 +0200
@@ -1,5 +1,18 @@
SARG ChangeLog
+Aug/29/2006 Version 2.2.2
+ - malloc test implemented to avoid high-memory consuming.
+ Thanks to Rodrigo Rubira Branco
+ - Czech UTF8 language added by Josef Karliak
+ - fixed: parsed mismatch in realtime_access_log_lines and
+ access_log_lines tags.
+ Thanks to Kuznetsov Andrey
+ - changed: realtime report sort changed by date/time
+ Thanks to Leonardo Buonsanti
+ - GD minor fixes added.
+ - bug fixed. *** buffer overflow detected ***: sarg terminated
+ in Fedora Core 5 when using -D FORTIFY_SOURCE in gcc or in kernel.
+
May/19/2006 Version 2.2.1
- iconv problems fixed in Freebsd and Slackware.
Thanks to Grigory Trenin .
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/DONATIONS new/sarg-2.2.2/DONATIONS
--- old/sarg-2.2.1/DONATIONS 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/DONATIONS 2006-08-29 13:09:32.000000000 +0200
@@ -1,3 +1,3 @@
-If you like SARG and want to contribute, please go to http://sarg.sourceforge.net
+If you like SARG please contribute, go to http://sarg.sourceforge.net
Thank you
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/README new/sarg-2.2.2/README
--- old/sarg-2.2.1/README 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/README 2006-08-29 13:09:32.000000000 +0200
@@ -33,6 +33,7 @@
Jose Luis Hernandez - Spanish language fix
Theo kastermans - Dutch language fix
Alex Deiter - Russian UFT-8 language added
+Josef Karliak - Czech UTF8
Translating
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/getconf.c new/sarg-2.2.2/getconf.c
--- old/sarg-2.2.1/getconf.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/getconf.c 2006-08-29 13:09:32.000000000 +0200
@@ -190,7 +190,7 @@
if(strstr(buf,"date_format") != 0) {
getword(wbuf,buf,' ');
- strcpy(DateFormat,buf);
+ strncpy(DateFormat,buf,1);
fixnone(DateFormat);
return;
}
@@ -226,10 +226,12 @@
}
if(strstr(buf,"access_log") != 0) {
- getword(wbuf,buf,' ');
- strcpy(AccessLog,buf);
- fixnone(AccessLog);
- return;
+ if(strstr(buf,"realtime_access_log_lines") == 0) {
+ getword(wbuf,buf,' ');
+ strcpy(AccessLog,buf);
+ fixnone(AccessLog);
+ return;
+ }
}
if(strstr(buf,"useragent_log") != 0) {
@@ -521,6 +523,13 @@
return;
}
+ if(strstr(buf,"bytes_in_sites_users_report") != 0) {
+ getword(wbuf,buf,' ');
+ strcpy(BytesInSitesUsersReport,buf);
+ fixnone(BytesInSitesUsersReport);
+ return;
+ }
+
if(strstr(buf,"user_report_fields") != 0) {
getword(wbuf,buf,' ');
strcpy(UserReportFields,buf);
@@ -528,10 +537,10 @@
return;
}
- if(strstr(buf,"site_user_time_date_type") != 0) {
+ if(strstr(buf,"bytes_in_sites_users_report") != 0) {
getword(wbuf,buf,' ');
- strcpy(SiteUserTimeDateType,buf);
- fixnone(SiteUserTimeDateType);
+ strcpy(BytesInSitesUsersReport,buf);
+ fixnone(BytesInSitesUsersReport);
return;
}
@@ -799,9 +808,12 @@
if(debugm)
printf("SYSCONFDIR %s",buf);
- if(strncmp(buf,"#",1) == 0)
+ if(strncmp(buf,"#",1) == 0 || strncmp(buf,"\n",1) == 0)
continue;
+ if(debugz)
+ printf("SARG: TAG: %s",buf);
+
parmtest(buf);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/grepday.c new/sarg-2.2.2/grepday.c
--- old/sarg-2.2.1/grepday.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/grepday.c 2006-08-29 13:09:32.000000000 +0200
@@ -39,14 +39,12 @@
char *font1 = SYSCONFDIR"/fonts/FreeSans.ttf";
char s[15];
-#ifdef HAVE_GD
-#ifdef HAVE_ICONV_H
+#if defined(HAVE_GD) && defined(HAVE_ICONV_H) && defined(gdFTEX_Unicode)
#include
#define SARGgdImageStringFT I18NgdImageStringFT
-BGD_DECLARE(char *) I18NgdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
- double ptsize, double angle, int x, int y,
- char *string)
+char * I18NgdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
+ double ptsize, double angle, int x, int y, char *string)
{
iconv_t localtoutf;
char *sstring, *str, *sstr, *retval;
@@ -71,7 +69,6 @@
#else
#define SARGgdImageStringFT gdImageStringFT
#endif
-#endif
void *bar(long long int *n)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/include/conf.h new/sarg-2.2.2/include/conf.h
--- old/sarg-2.2.1/include/conf.h 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/include/conf.h 2006-08-29 13:09:32.000000000 +0200
@@ -127,6 +127,7 @@
char ReplaceIndex[256];
char Index[20];
char OverwriteReport[4];
+char u2[255];
char RecordsWithoutUser[20];
char UseComma[4];
char MailUtility[6];
@@ -142,6 +143,7 @@
char LongUrl[20];
char Ip2Name[20];
char language[255];
+char bufy[MAXLEN];
char AccessLog[MAXLEN];
char Title[MAXLEN];
char BgColor[MAXLEN];
@@ -204,6 +206,7 @@
char SquidGuardLogAlternate[MAXLEN];
char SquidguardIgnoreDate[10];
char ShowSargInfo[5];
+char BytesInSitesUsersReport[10];
char ShowSargLogo[5];
char ParsedOutputLog[MAXLEN];
char ParsedOutputLogCompress[255];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/include/info.h new/sarg-2.2.2/include/info.h
--- old/sarg-2.2.1/include/info.h 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/include/info.h 2006-08-29 13:09:32.000000000 +0200
@@ -1,3 +1,3 @@
-#define VERSION "2.2.1 May-19-2006"
+#define VERSION "2.2.2 Aug-29-2006"
#define PGM "sarg"
#define URL "http://sarg.sourceforge.net"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/languages/Czech_UTF8 new/sarg-2.2.2/languages/Czech_UTF8
--- old/sarg-2.2.1/languages/Czech_UTF8 1970-01-01 01:00:00.000000000 +0100
+++ new/sarg-2.2.2/languages/Czech_UTF8 2006-08-29 13:09:32.000000000 +0200
@@ -0,0 +1,130 @@
+# by Josef Karliak
+"Ano"
+"Ne"
+"Čeština"
+"Volba"
+"vyžaduje argument"
+"Inicializace"
+"Čtu přístupový žurnál"
+"Nemohu otevřít žurnál"
+"Nemohu otevřít přechodný soubor"
+"Záznamů přečteno"
+"zapsáno"
+"Žurnál má smíchané oba žurnálové formáty (obecný a squid žurnál)"
+"Obecný formát žurnálu"
+"Squid formát žurnálu"
+"Žurnál s neplatným formátem"
+"Nenašel jsem žádné záznamy"
+"Období"
+"použil jsem"
+"jako přechodný adresář"
+"Třídím soubor"
+"Konec"
+"Parametry"
+"Jméno hostitele nebo IP adresa"
+"Datum od-do"
+"Formát data"
+"Evropa"
+"USA"
+"IP zpráva"
+"Použij IP Adresu místo ID uživatele"
+"Navštívený server"
+"Čas"
+"Uživatel"
+"verze Squidu"
+"Dočasnný adresář"
+"Ladicí zprávy"
+"Zprávy o zpracování"
+"Vstupní žurnál"
+"Výstupní adresář"
+"Použití"
+"volby"
+"Emailová adresa, na kterou se mají poslat přehledy"
+"stdout pro konzolu"
+"Přehledy podle uživatele a IP adresy"
+"přehledy"
+"Nemohu otevřít soubor"
+"Zakázáno"
+"Přehled úspěšně generován"
+"Přehled úspěšně generován a odeslán na adresu"
+"Vytvářím soubor"
+"Vytvářím soubor období"
+"Soubor"
+"už existuje, přesouvám do"
+"Vytvářím index.html"
+"Třídím soubor"
+"Přehled"
+"Squid není na tomto počítači instalován"
+"Prosíme použijte volbu -v pro definování verze Squidu"
+"Načítám konfiguraci z"
+"chyba malloc"
+"Načítám heslo ze souboru"
+"Vytvářím zprávu"
+"Rozbaluji žurnálový soubor"
+"Balím žurnálový soubor"
+"Soubor nenalezen"
+"Převádí IP adresu na jméno"
+"Čtu žurnál s přehledem klientů"
+"Načítám soubor vyjímek z"
+"vyjmuto"
+"Soubor vyjímek"
+"Konfigurační soubor"
+"Žurnál s přehledem klientů"
+"Vytvářím přehled o klientech"
+"verze"
+"limit překročen"
+"Přidáno do souboru"
+"Převede soubor access.log na správné datum"
+"Rozdělí žurnálový soubor podle data v parametru -d"
+", napsal"
+"obráceně"
+"normálně"
+"Odstraňuji starý soubor s přehledem"
+"Odstraňuji přechodný soubor"
+"Nejlepších"
+"serverů"
+"Týdny"
+"Loading User table"
+"Cannot load. Memory fault"
+"Přehled o využití Squidu podle uživatelů"
+"Období"
+"Uživatel"
+"NAVŠTÍVENÝ SERVER"
+"SPOJENÍ"
+"BYTŮ"
+"POUŽITÝ ČAS"
+"MILISEC"
+"PRŮMĚR"
+"Klesající přístup (bytů)"
+"ID UŽIVATELE"
+"ČAS"
+"POŘADÍ"
+"SOUBOR/OBDOBÍ"
+"DATUM VZNIKU"
+"UŽIVATELÉ"
+"Třídění"
+"Přehled o použitých klientech pro Squid"
+"KLIENT"
+"CELKEM"
+"Generoval"
+"dne"
+"datum/čas"
+"IP/JMÉNO"
+"VÝSTUP"
+"VSTUP"
+"CACHE"
+"ServeryUživatelé"
+"SmartFilter"
+"Authentication failures"
+"Denied"
+"Topsites"
+"SQUIDGUARD"
+"RULE"
+"squidGuard"
+"Sarg parsed log saved as"
+"Sarg log format"
+"Downloads"
+"Graphic"
+"DAYS"
+"DansGuardian"
+"CAUSE"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/log.c new/sarg-2.2.2/log.c
--- old/sarg-2.2.1/log.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/log.c 2006-08-29 13:09:32.000000000 +0200
@@ -217,6 +217,7 @@
strcpy(DansguardianIgnoreDate,"off");
strcpy(DataFileUrl,"ip");
strcpy(MaxElapsed,"28800000");
+ strcpy(BytesInSitesUsersReport,"no");
dia[0]='\0';
mes[0]='\0';
@@ -421,44 +422,6 @@
exit(0);
}
- if(debugz) {
- fprintf(stderr, "SARG: ConfigFile.........= %s\n",ConfigFile);
- fprintf(stderr, "SARG: AccessLog..........= %s\n",AccessLog);
- fprintf(stderr, "SARG: BgColor............= %s\n",BgColor);
- fprintf(stderr, "SARG: TxColor............= %s\n",TxColor);
- fprintf(stderr, "SARG: TxBgColor..........= %s\n",TxBgColor);
- fprintf(stderr, "SARG: TiColor............= %s\n",TiColor);
- fprintf(stderr, "SARG: LogoImage..........= %s\n",LogoImage);
- fprintf(stderr, "SARG: LogoText...........= %s\n",LogoText);
- fprintf(stderr, "SARG: LogoTextColor......= %s\n",LogoTextColor);
- fprintf(stderr, "SARG: Width..............= %s\n",Width);
- fprintf(stderr, "SARG: Height.............= %s\n",Height);
- fprintf(stderr, "SARG: Title..............= %s\n",Title);
- fprintf(stderr, "SARG: BgImage............= %s\n",BgImage);
- fprintf(stderr, "SARG: FontFace...........= %s\n",FontFace);
- fprintf(stderr, "SARG: HeaderColor........= %s\n",HeaderColor);
- fprintf(stderr, "SARG: HeaderBgColor......= %s\n",HeaderBgColor);
- fprintf(stderr, "SARG: FontSize...........= %s\n",FontSize);
- fprintf(stderr, "SARG: PasswdFile.........= %s\n",PasswdFile);
- fprintf(stderr, "SARG: TempDir............= %s\n",TempDir);
- fprintf(stderr, "SARG: OutputDir..........= %s\n",OutputDir);
- fprintf(stderr, "SARG: Ip2Name............= %s\n",Ip2Name);
- fprintf(stderr, "SARG: TopuserSortField.........= %s\n",TopuserSortField);
- fprintf(stderr, "SARG: UserSortField.........= %s\n",UserSortField);
- fprintf(stderr, "SARG: TopuserSortOrder.........= %s\n",TopuserSortOrder);
- fprintf(stderr, "SARG: UserSortOrder.........= %s\n",UserSortOrder);
- fprintf(stderr, "SARG: UserAgentLog.......= %s\n",UserAgentLog);
- fprintf(stderr, "SARG: ExcludeHosts.......= %s\n",ExcludeHosts);
- fprintf(stderr, "SARG: DateFormat.........= %s\n",DateFormat);
- fprintf(stderr, "SARG: ExcludeUsers.......= %s\n",ExcludeUsers);
- fprintf(stderr, "SARG: PerUserLimitFile...= %s\n",PerUserLimitFile);
- fprintf(stderr, "SARG: PerUserLimit.......= %s\n",PerUserLimit);
- fprintf(stderr, "SARG: UserIp.............= %s\n",UserIp);
- fprintf(stderr, "SARG: MaxElapsed.........= %s\n",MaxElapsed);
- fprintf(stderr, "SARG: LastLog............= %s\n",LastLog);
- fprintf(stderr, "SARG:\n");
- }
-
if(strcmp(IndexTree,"file") == 0)
strcpy(ImageFile,"../images");
else
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/realtime.c new/sarg-2.2.2/realtime.c
--- old/sarg-2.2.1/realtime.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/realtime.c 2006-08-29 13:09:32.000000000 +0200
@@ -1,6 +1,6 @@
/*
- * AUTHOR: Pedro Lineu Orso pedro.orso@gmail.com
- * 1998, 2006
+ * AUTHOR: Pedro Lineu Orso orso@penguintech.com.br
+ * 1998, 2005
* SARG Squid Analysis Report Generator http://sarg.sourceforge.net
*
* SARG donations:
@@ -46,12 +46,49 @@
void getlog()
{
- FILE *tmp, *fp;
+ FILE *tmp, *fp, *fp_usr;
char template1[255]="/var/tmp/sargtpl1.XXXXXX";
char template2[255]="/var/tmp/sargtpl2.XXXXXX";
char cmd[512];
char buf[512];
- int fd1,fd2;
+ int fd1,fd2,nreg;
+
+ if(UserTabFile[0] != '\0') {
+ if(debug) {
+ sprintf(msg,"%s: %s",text[86],UserTabFile);
+ debuga(msg);
+ }
+ if((fp_usr=fopen(UserTabFile,"r"))==NULL) {
+ fprintf(stderr, "SARG: (realtime) %s: %s - %s\n",text[45],UserTabFile,strerror(errno));
+ exit(1);
+ }
+ nreg = lseek(fileno(fp_usr), 0, SEEK_END);
+ lseek(fileno(fp_usr), 0, 0);
+ if((userfile=(char *) malloc(nreg+100))==NULL){
+ fprintf(stderr, "SARG ERROR: %s",text[87]);
+ exit(1);
+ }
+ bzero(userfile,nreg+100);
+ strncat(userfile,":",1);
+ z1=0;
+ z2=1;
+ while(fgets(buf,MAXLEN,fp_usr)!=NULL){
+ buf[strlen(buf)-1]='\0';
+ if(strstr(buf,"\r") != 0) buf[strlen(buf)-1]='\0';
+ getword(bufy,buf,' ');
+ for(z1=0; z1<=strlen(bufy); z1++) {
+ userfile[z2]=bufy[z1];
+ z2++;
+ }
+ strncat(userfile,":",1);
+ for(z1=0; z1<=strlen(buf); z1++) {
+ userfile[z2]=buf[z1];
+ z2++;
+ }
+ strncat(userfile,":",1);
+ }
+ fclose(fp_usr);
+ }
fd1 = mkstemp(template1);
fd2 = mkstemp(template2);
@@ -139,7 +176,29 @@
if(strcmp(ouser,user) == 0 && strcmp(ourl,url) == 0)
continue;
- printf("<tr>%s %s</td> | %s</td> | %s</td> | %s</td> | http://%s\">%s</td></tr>\n",dat,tim,ip,user,typ,url,url);
+ strcpy(u2,user);
+ if(strcmp(Ip2Name,"yes") == 0)
+ ip2name(u2);
+ if(UserTabFile[0] != '\0') {
+ sprintf(warea,":%s:",u2);
+ if((str=(char *) strstr(userfile,warea)) != (char *) NULL ) {
+ z1=0;
+ str2=(char *) strstr(str+1,":");
+ str2++;
+ bzero(name, MAXLEN);
+ while(str2[z1] != ':') {
+ name[z1]=str2[z1];
+ z1++;
+ }
+ } else strcpy(name,u2);
+ } else strcpy(name,u2);
+
+ if(dotinuser && strstr(name,"_")) {
+ str2=(char *)subs(name,"_",".");
+ strcpy(name,str2);
+ }
+
+ printf("<tr> | %s %s</td> | %s</td> | %s</td> | %s</td> | http://%s\">%s</td></tr>\n",dat,tim,ip,name,typ,url,url);
strcpy(ouser,user);
strcpy(ourl,url);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/report.c new/sarg-2.2.2/report.c
--- old/sarg-2.2.1/report.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/report.c 2006-08-29 13:09:32.000000000 +0200
@@ -39,7 +39,6 @@
char accsmart[MAXLEN];
char wcrc[50];
char crc2[50];
- char u2[255];
long long int nbytes=0;
long long int nelap=0;
long long int nacc=0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/sarg-php/language.php new/sarg-2.2.2/sarg-php/language.php
--- old/sarg-2.2.1/sarg-php/language.php 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/sarg-php/language.php 2006-08-29 13:09:32.000000000 +0200
@@ -40,6 +40,10 @@
$language = "en-EN";
else if ( 0 == strcmp("Portuguese", $lang))
$language = "pt_BR";
+ else if ( 0 == strcmp("French", $lang))
+ $language = "fr";
+ else if ( 0 == strcmp("Russian", $lang))
+ $language = "ru";
return;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/sarg-php/sarg-squidguard-block.php new/sarg-2.2.2/sarg-php/sarg-squidguard-block.php
--- old/sarg-2.2.1/sarg-php/sarg-squidguard-block.php 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/sarg-php/sarg-squidguard-block.php 2006-08-29 13:09:32.000000000 +0200
@@ -25,7 +25,7 @@
*
*/
-// Change to squidGuard and sarg config files path
+// Change to squidGuard and sarg config file paths
$SargConf = "/usr/local/sarg/sarg.conf";
$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/sarg.conf new/sarg-2.2.2/sarg.conf
--- old/sarg-2.2.1/sarg.conf 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/sarg.conf 2006-08-29 13:09:32.000000000 +0200
@@ -5,6 +5,7 @@
# Bulgarian_windows1251
# Catalan
# Czech
+# Czech_UTF8
# Dutch
# English
# French
@@ -391,6 +392,11 @@
#
#user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
+# TAG: bytes_in_sites_users_report yes|no
+# Bytes field must be in Site & Users Report ?
+#
+#bytes_in_sites_users_report no
+
# TAG: topuser_num n
# How many users in topsites report. 0 = no limit
#
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/siteuser.c new/sarg-2.2.2/siteuser.c
--- old/sarg-2.2.1/siteuser.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/siteuser.c 2006-08-29 13:09:32.000000000 +0200
@@ -36,6 +36,7 @@
char ourl[MAXLEN];
char nacc[20];
char nbytes[20];
+ char obytes[20];
char csort[255];
char general[MAXLEN];
char general2[MAXLEN];
@@ -47,6 +48,7 @@
int regs=0;
int ucount=0;
char *users;
+ long long int llbytes=0;
if(strcmp(Privacy,"yes") == 0)
return;
@@ -102,11 +104,14 @@
fputs("<center><table cellpadding=0 cellspacing=2>\n",fp_ou);
fputs("<tr><td></td></tr>\n",fp_ou);
- sprintf(url,"<tr> | %d</td> | %shttp://%s\">%s</td> | %s</td></tr>\n",regs,BlockImage,ourl,ourl,users);
+ if(strncmp(strlow(BytesInSitesUsersReport),"yes",3) == 0) {
+ llbytes=my_atoll(obytes);
+ sprintf(wwork2,"%s",fixnum(llbytes,1));
+ sprintf(html,"<tr> | %d</td> | %shttp://%s\">%s</td> | %s</td> | %s</td></tr>\n",regs,BlockImage,ourl,ourl,wwork2,users);
+ } else sprintf(html,"<tr> | %d</td> | %shttp://%s\">%s</td> | %s</td></tr>\n",regs,BlockImage,ourl,ourl,users);
fputs(html,fp_ou);
regs++;
ucount=0;
strcpy(users,name);
strcat(users," ");
strcpy(ourl,url);
+ strcpy(obytes,nbytes);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/topuser.c new/sarg-2.2.2/topuser.c
--- old/sarg-2.2.1/topuser.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/topuser.c 2006-08-29 13:09:32.000000000 +0200
@@ -367,7 +367,8 @@
unlink(val1);
}
- if(UserTabFile[0] != '\0' && strstr(user2,".") != 0) {
+// if(UserTabFile[0] != '\0' && strstr(user2,".") != 0) {
+ if(UserTabFile[0] != '\0') {
sprintf(warea,":%s:",user2);
if((str=(char *) strstr(userfile,warea)) != (char *) NULL ) {
z1=0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/user_limit_block new/sarg-2.2.2/user_limit_block
--- old/sarg-2.2.1/user_limit_block 2006-05-19 12:13:20.000000000 +0200
+++ new/sarg-2.2.2/user_limit_block 2006-08-29 13:09:32.000000000 +0200
@@ -1,4 +1,28 @@
#!/bin/sh
+#
+# AUTHOR: Pedro Lineu Orso pedro.orso@gmail.com
+# 1998, 2006
+# SARG Squid Analysis Report Generator http://sarg.sourceforge.net
+#
+# SARG donations:
+# please look at http://sarg.sourceforge.net/donations.php
+# ---------------------------------------------------------------------
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+#
+#
conf="/usr/local/sarg/sarg.conf"
squid_password_file="/usr/local/squid/etc/passwd"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sarg-2.2.1/util.c new/sarg-2.2.2/util.c
--- old/sarg-2.2.1/util.c 2006-05-19 12:13:19.000000000 +0200
+++ new/sarg-2.2.2/util.c 2006-08-29 13:09:32.000000000 +0200
@@ -977,7 +977,13 @@
return (char *) str;
ss = strlen(str); st = strlen(to) + 10;
- ret = (char *) malloc(ss + st);
+
+ if((ret=(char *) malloc(ss + st))==NULL)
+ {
+ fprintf(stderr, "SARG: %s (%d):\n",text[59],ss+st);
+ exit(1);
+ }
+
bzero(ret,ss+st);
tmp = strstr(str, from);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org
|