aboutsummaryrefslogtreecommitdiff
path: root/www/sarg
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2007-06-11 11:25:32 +0000
committerRenato Botelho <garga@FreeBSD.org>2007-06-11 11:25:32 +0000
commitbd6572668216a3c0dd5315be5ed17bf68772b53c (patch)
tree160e85f1f5d56973097369139dc826b73458eb79 /www/sarg
parent2df42ad263fb35c75e9df70e06a505eeeeb7e737 (diff)
downloadports-bd6572668216a3c0dd5315be5ed17bf68772b53c.tar.gz
ports-bd6572668216a3c0dd5315be5ed17bf68772b53c.zip
- Fix a segmentation fault when you are using authentication and have a user
named "log" - Bump PORTREVISION Obtained from: Sarg bugtracker
Notes
Notes: svn path=/head/; revision=193250
Diffstat (limited to 'www/sarg')
-rw-r--r--www/sarg/Makefile2
-rw-r--r--www/sarg/files/patch-report.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/www/sarg/Makefile b/www/sarg/Makefile
index 2bc2e8e255cf..2f0ec6ea53b9 100644
--- a/www/sarg/Makefile
+++ b/www/sarg/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sarg
PORTVERSION= 2.2.3.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= www
MASTER_SITES= SF
diff --git a/www/sarg/files/patch-report.c b/www/sarg/files/patch-report.c
new file mode 100644
index 000000000000..c0f29234e497
--- /dev/null
+++ b/www/sarg/files/patch-report.c
@@ -0,0 +1,30 @@
+--- report.c.orig Tue Jan 2 17:11:26 2007
++++ report.c Fri Jun 8 08:13:13 2007
+@@ -46,6 +46,7 @@
+ long long int incache=0;
+ long long int oucache=0;
+ char *s;
++ char *haystack;
+ DIR *dirp;
+ struct dirent *direntp;
+
+@@ -73,7 +74,9 @@
+
+ dirp = opendir(tmp);
+ while ((direntp = readdir( dirp )) != NULL ) {
+- if((strstr(direntp->d_name,".log") == 0) ||
++ haystack=direntp->d_name;
++ haystack+=(strlen(haystack)-5);
++ if((strstr(haystack,".log") == 0) ||
+ (strncmp(direntp->d_name,"download.log",12) == 0) ||
+ (strncmp(direntp->d_name,"denied.log",10) == 0) ||
+ (strncmp(direntp->d_name,"authfail.log.unsort",19) == 0))
+@@ -89,7 +92,7 @@
+ getword(wname2,wdname,'.');
+ strcat(user,wname2);
+
+- if(strcmp(wdname,"log") !=0) {
++ if((strcmp(wdname,"log")!=0) || (strlen(wdname)>3)) {
+ strcat(user,".");
+ goto strip_prefix;
+ }