openbsd-ports/www/sarg/patches/patch-log_c
martynas cbb6a6bf82 fix a segmentation fault when you are using authentication and have
a user named "log"; from sarg bugtracker via freebsd
also, fix sprintf and rcs id; from maintainer Douglas Santos
thanks to aanriot@, who found some errors when i merged Douglas
Santos diff
ok aanriot@ and maintainer Douglas Santos
2007-06-22 12:48:25 +00:00

45 lines
1.7 KiB
Plaintext

$OpenBSD: patch-log_c,v 1.3 2007/06/22 12:48:25 martynas Exp $
--- log.c.orig Tue Jan 2 21:11:26 2007
+++ log.c Tue Jun 19 20:45:44 2007
@@ -145,7 +145,7 @@ int main(argc,argv)
SquidGuardLogAlternate[0]='\0';
arq[0]='\0';
- strcpy(AccessLog,"/usr/local/squid/var/logs/access.log");
+ strcpy(AccessLog,"/var/squid/logs/access.log");
sprintf(ExcludeCodes,"%s/exclude_codes",SYSCONFDIR);
strcpy(GraphDaysBytesBarColor,"orange");
strcpy(BgColor,"#ffffff");
@@ -160,7 +160,7 @@ int main(argc,argv)
strcpy(LogoTextColor,"#006699");
strcpy(FontSize,"9px");
strcpy(TempDir,"/tmp");
- strcpy(OutputDir,"/var/www/html/squid-reports");
+ strcpy(OutputDir,"/var/www/htdocs/sarg");
strcpy(Ip2Name,"no");
strcpy(DateFormat,"u");
strcpy(OverwriteReport,"no");
@@ -197,11 +197,11 @@ int main(argc,argv)
strcpy(ShowSargInfo,"yes");
strcpy(ShowSargLogo,"yes");
strcpy(ParsedOutputLog,"no");
- strcpy(ParsedOutputLogCompress,"/bin/gzip");
+ strcpy(ParsedOutputLogCompress,"/usr/bin/gzip");
strcpy(DisplayedValues,"abbreviation");
strcpy(HeaderFontSize,"9px");
strcpy(TitleFontSize,"11px");
- strcpy(AuthUserFile,"/usr/local/sarg/passwd");
+ strcpy(AuthUserFile,"%%SYSCONFDIR%%/sarg/passwd");
strcpy(AuthName,"SARG, Restricted Access");
strcpy(AuthType,"basic");
strcpy(Require,"require user admin %u");
@@ -1216,7 +1216,7 @@ int main(argc,argv)
if(download_flag && strstr(code,"DENIED") == 0) {
ndownload = 1;
- sprintf(bufz, "%s %s %s %s %s %s\n",dia,hora,user,ip,download_url);
+ sprintf(bufz, "%s %s %s %s %s\n",dia,hora,user,ip,download_url);
#ifdef LEGACY_WRITE_DOWNLOAD
sprintf(tmp3,"%s/sarg/download.unsort",tmp);