this switches www/webalizer to webalizer xtended, a fork of webalizer
that adds IPv6 support and detailed HTTP 404 statistics.  Also set
MAINTAINER to the ports mailing list.

See http://www.patrickfrei.ch/webalizer/

ok?

Index: www/webalizer/Makefile
===================================================================
RCS file: /cvs/ports/www/webalizer/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- www/webalizer/Makefile      15 Sep 2007 20:38:26 -0000      1.22
+++ www/webalizer/Makefile      30 Jan 2008 12:48:22 -0000
@@ -2,18 +2,15 @@
 
 COMMENT=       web server log file analysis program
 
-DISTNAME=      webalizer-2.01-10-src
-PKGNAME=       webalizer-2.01.10p3
+DISTNAME=      webalizer-2.01-10-RB21-src
+PKGNAME=       webalizer-2.01.10p4
 CATEGORIES=    www
-MASTER_SITES=  ftp://ftp.mrunix.net/pub/webalizer/
-EXTRACT_SUFX=  .tgz
+MASTER_SITES=  http://www.patrickfrei.ch/webalizer/rb21/
 
-HOMEPAGE=      http://www.mrunix.net/webalizer/
+HOMEPAGE=      http://www.patrickfrei.ch/webalizer/
 
 LIB_DEPENDS=   gd.>=18::graphics/gd
 
-MAINTAINER=    Dan Harnett <[EMAIL PROTECTED]>
-
 # GPL
 PERMIT_PACKAGE_CDROM=  Yes 
 PERMIT_PACKAGE_FTP=    Yes
@@ -23,7 +20,7 @@ WANTLIB=              c jpeg m png z
 
 MODULES=       converters/libiconv
 
-WRKDIST=       ${WRKDIR}/webalizer-2.01-10
+WRKDIST=       ${WRKDIR}/webalizer-2.01-10-RB21
 
 CONFIGURE_STYLE= gnu dest
 CONFIGURE_ARGS=        --enable-dns
Index: www/webalizer/distinfo
===================================================================
RCS file: /cvs/ports/www/webalizer/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- www/webalizer/distinfo      5 Apr 2007 17:26:26 -0000       1.4
+++ www/webalizer/distinfo      30 Jan 2008 12:48:22 -0000
@@ -1,5 +1,5 @@
-MD5 (webalizer-2.01-10-src.tgz) = khdZUAWuxGpQXh+zSQUqjg==
-RMD160 (webalizer-2.01-10-src.tgz) = +6I1ZJvpaRSq6WZM400LkJgQYQA=
-SHA1 (webalizer-2.01-10-src.tgz) = sTvOrJSyIbVDXUWxQtMGY9c5n0A=
-SHA256 (webalizer-2.01-10-src.tgz) = 
HuPqLkXFZorGEtbFULWjk8ApNJJUa7Q2lO/fwTEyGp0=
-SIZE (webalizer-2.01-10-src.tgz) = 418680
+MD5 (webalizer-2.01-10-RB21-src.tar.gz) = efQT1eJBWzjkv5Pi6amSWA==
+RMD160 (webalizer-2.01-10-RB21-src.tar.gz) = eSbtEWxkmaKdIrkb/hVYJrCmqCc=
+SHA1 (webalizer-2.01-10-RB21-src.tar.gz) = DdPmHbTo70i6M/o5mZeLXeUcgO4=
+SHA256 (webalizer-2.01-10-RB21-src.tar.gz) = 
JBZaDMIZQCYh9OusEPwEVw8IIzV44+fcqgBVbv7uoNU=
+SIZE (webalizer-2.01-10-RB21-src.tar.gz) = 457585
Index: www/webalizer/patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-Makefile_in,v
retrieving revision 1.6
diff -u -p -r1.6 patch-Makefile_in
--- www/webalizer/patches/patch-Makefile_in     17 Apr 2002 16:17:45 -0000      
1.6
+++ www/webalizer/patches/patch-Makefile_in     30 Jan 2008 12:48:22 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Makefile_in,v 1.6 2002/04/17 16:17:45 danh Exp $
---- Makefile.in.orig   Wed Apr 17 11:40:20 2002
-+++ Makefile.in        Wed Apr 17 11:41:02 2002
-@@ -86,9 +86,9 @@ distclean: clean
+--- Makefile.in.orig   Tue Jan  2 14:04:23 2007
++++ Makefile.in        Wed Jan 30 13:21:35 2008
+@@ -87,9 +87,9 @@ distclean: clean
  install: all
        $(INSTALL_PROGRAM) webalizer ${BINDIR}/webalizer
        $(INSTALL_DATA) webalizer.1 ${MANDIR}/webalizer.1
Index: www/webalizer/patches/patch-dns_resolv_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-dns_resolv_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-dns_resolv_c
--- www/webalizer/patches/patch-dns_resolv_c    17 Apr 2002 16:17:45 -0000      
1.3
+++ www/webalizer/patches/patch-dns_resolv_c    30 Jan 2008 12:48:22 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-dns_resolv_c,v 1.3 2002/04/17 16:17:45 danh Exp $
---- dns_resolv.c.orig  Wed Apr 17 11:45:23 2002
-+++ dns_resolv.c       Wed Apr 17 11:46:53 2002
-@@ -153,7 +153,7 @@ void resolve_dns(struct log_struct *log_
+--- dns_resolv.c.orig  Mon Aug  6 18:29:25 2007
++++ dns_resolv.c       Wed Jan 30 13:24:39 2008
+@@ -158,7 +158,7 @@ void resolve_dns(struct log_struct *log_rec)
        case  0:
        {
           memcpy(&alignedRecord, response.data, sizeof(struct dnsRecord));
@@ -9,24 +9,24 @@ $OpenBSD: patch-dns_resolv_c,v 1.3 2002/
 +         strlcpy (log_rec->hostname,
                    ((struct dnsRecord *)response.data)->hostName,
                    MAXHOST);
-          log_rec->hostname[MAXHOST]=0;
-@@ -263,7 +263,7 @@ int dns_resolver(void *log_fp)
-          continue;                        /* go get next record if any    */
+          log_rec->hostname[MAXHOST-1]=0;
+@@ -269,7 +269,7 @@ int dns_resolver(void *log_fp)
        }
  
--      strcpy(tmp_buf, buffer);            /* save buffer in case of error */
-+      strlcpy(tmp_buf, buffer, sizeof tmp_buf);            /* save buffer in 
case of error */
+       memset(tmp_buf, 0, sizeof(tmp_buf));
+-      strncpy(tmp_buf, buffer, sizeof(tmp_buf)-1);            /* save buffer 
in case of error */
++      strlcpy(tmp_buf, buffer, sizeof(tmp_buf));            /* save buffer in 
case of error */
        if(parse_record(buffer))            /* parse the record             */
        {
-          if((log_rec.addr.s_addr = inet_addr(log_rec.hostname)) != 
INADDR_NONE)
-@@ -446,8 +446,8 @@ static void process_list(DNODEPTR l_list
+          struct addrinfo hints, *ares;
+@@ -460,8 +460,8 @@ static void process_list(DNODEPTR l_list)
  
                          /* If long hostname, take max domain name part */
-                         if ((size = strlen(res_ent->h_name)) > MAXHOST-2)
--                           
strcpy(child_buf,(res_ent->h_name+(size-MAXHOST+1)));
--                        else strcpy(child_buf, res_ent->h_name);
-+                           
strlcpy(child_buf,(res_ent->h_name+(size-MAXHOST+1)),sizeof child_buf);
-+                        else strlcpy(child_buf, res_ent->h_name, sizeof 
child_buf);
+                         if ((size = strlen(hbuf)) > MAXHOST-2)
+-                           strcpy(child_buf,(hbuf+(size-MAXHOST+1)));
+-                        else strcpy(child_buf, hbuf);
++                           
strlcpy(child_buf,(hbuf+(size-MAXHOST+1)),sizeof(child_buf));
++                        else strlcpy(child_buf, hbuf,sizeof(child_buf));
                          size = strlen(child_buf);
                       }
                       else
Index: www/webalizer/patches/patch-graphs_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-graphs_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-graphs_c
--- www/webalizer/patches/patch-graphs_c        17 Apr 2002 16:17:45 -0000      
1.1
+++ www/webalizer/patches/patch-graphs_c        30 Jan 2008 12:48:22 -0000
@@ -1,84 +1,74 @@
 $OpenBSD: patch-graphs_c,v 1.1 2002/04/17 16:17:45 danh Exp $
---- graphs.c.orig      Wed Apr 17 11:07:33 2002
-+++ graphs.c   Wed Apr 17 11:11:43 2002
-@@ -137,7 +137,7 @@ int year_graph6x(  char *fname,         
-       if (data5[i] > maxval) maxval = data5[i];
+--- graphs.c.orig      Tue Aug  7 13:25:17 2007
++++ graphs.c   Wed Jan 30 13:42:39 2008
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/types.h>
++#include <sys/socket.h>
+ #include <gd.h>
+ #include <gdfontt.h>
+ #include <gdfonts.h>
+@@ -198,7 +199,7 @@ int year_graph6x(  char *fname,            /* file nam
+       if (data7[i] > maxval) maxval = data7[i];
     }
     if (maxval <= 0) maxval = 1;
 -   sprintf(maxvaltxt, "%lu", maxval);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%lu", maxval);
-    gdImageStringUp(im,gdFontSmall,8,26+(strlen(maxvaltxt)*6),maxvaltxt,black);
+    
gdImageStringUp(im,gdFontSmall,8,26+(strlen(maxvaltxt)*6),maxvaltxt,CHLEGENDCOLOR);
  
     if (graph_legend)                          /* print color coded legends? */
-@@ -221,7 +221,7 @@ int year_graph6x(  char *fname,         
-        if (data6[i] > maxval) maxval = data6[i];
+@@ -292,7 +293,7 @@ int year_graph6x(  char *fname,            /* file nam
+        if (data8[i] > maxval) maxval = data8[i];
     }
     if (maxval <= 0) maxval = 1;
 -   sprintf(maxvaltxt, "%lu", maxval);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%lu", maxval);
     gdImageStringUp(im, gdFontSmall,493,26+(strlen(maxvaltxt)*6),
-                    maxvaltxt, black);
+                    maxvaltxt,CHLEGENDCOLOR);
  
-@@ -257,7 +257,7 @@ int year_graph6x(  char *fname,         
-    for (i=0; i<12; i++)
-        if (data4[i] > fmaxval) fmaxval = data4[i];         /* get max val    
*/
+@@ -331,7 +332,7 @@ int year_graph6x(  char *fname,            /* file nam
+        if (data6[i] > fmaxval) fmaxval = data6[i];         /* get max val    
*/
+    }
     if (fmaxval <= 0.0) fmaxval = 1.0;
 -   sprintf(maxvaltxt, "%.0f", fmaxval);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%.0f", fmaxval);
     gdImageStringUp(im, gdFontSmall,493,130+(strlen(maxvaltxt)*6),
-                    maxvaltxt,black);
+                    maxvaltxt,CHLEGENDCOLOR);
  
-@@ -354,7 +354,7 @@ int month_graph6(  char *fname,         
-        if (data5[i] > maxval) maxval = data5[i];
+@@ -458,7 +459,7 @@ int month_graph6(  char *fname,            /* filename
+        if (data7[i] > maxval) maxval = data7[i];
     }
     if (maxval <= 0) maxval = 1;
 -   sprintf(maxvaltxt, "%lu", maxval);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%lu", maxval);
     gdImageStringUp(im, gdFontSmall,8,26+(strlen(maxvaltxt)*6),
-                    maxvaltxt,black);
+                    maxvaltxt,CHLEGENDCOLOR);
  
-@@ -434,7 +434,7 @@ int month_graph6(  char *fname,         
-       if (data6[i]>maxval) maxval = data6[i];
+@@ -555,7 +556,7 @@ int month_graph6(  char *fname,            /* filename
+       if (data8[i]>maxval) maxval = data8[i];
     }
     if (maxval <= 0) maxval = 1;
 -   sprintf(maxvaltxt, "%lu", maxval);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%lu", maxval);
-    gdImageStringUp(im, gdFontSmall,8,180+(strlen(maxvaltxt)*6),
-                    maxvaltxt, black);
+    gdImageStringUp(im, gdFontSmall,8,224+(strlen(maxvaltxt)*6),
+                    maxvaltxt,CHLEGENDCOLOR);
     
-@@ -467,7 +467,7 @@ int month_graph6(  char *fname,         
-    for (i=0; i<31; i++)
-       if (data4[i]>fmaxval) fmaxval = data4[i];
+@@ -590,7 +591,7 @@ int month_graph6(  char *fname,            /* filename
+       if (data6[i]>fmaxval) fmaxval = data6[i];
+    }
     if (fmaxval <= 0.0) fmaxval = 1.0;
 -   sprintf(maxvaltxt, "%.0f", fmaxval/1024);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%.0f", fmaxval/1024);
-    gdImageStringUp(im, gdFontSmall,8,280+(strlen(maxvaltxt)*6),
-                    maxvaltxt, black);
-    
-@@ -531,7 +531,7 @@ int day_graph3(  char *fname,
+    gdImageStringUp(im, gdFontSmall,8,352+(strlen(maxvaltxt)*6),
+                    maxvaltxt,CHLEGENDCOLOR);
+ 
+@@ -679,7 +680,7 @@ int day_graph3(  char *fname,
        if (data3[i] > maxval) maxval = data3[i];
     }
     if (maxval <= 0) maxval = 1;
 -   sprintf(maxvaltxt, "%lu", maxval);
 +   snprintf(maxvaltxt, sizeof maxvaltxt, "%lu", maxval);
     gdImageStringUp(im, gdFontSmall, 8, 26+(strlen(maxvaltxt)*6),
-                    maxvaltxt, black);
+                    maxvaltxt,CHLEGENDCOLOR);
     
-@@ -654,7 +654,7 @@ int pie_chart(char *fname, char *title, 
-          gdImageLine(im, CX, CY, gdata.x, gdata.y, black);
-          gdImageFill(im, gdata.mx, gdata.my, i+4);
- 
--         sprintf(buffer,"%s (%d%%)",legend[i], percent);
-+         snprintf(buffer, sizeof buffer, "%s (%d%%)",legend[i], percent);
-          x=480-(strlen(buffer)*7);
-          gdImageString(im,gdFontMediumBold, x+1, y+1, buffer, black);
-          gdImageString(im,gdFontMediumBold, x, y, buffer, i+4);
-@@ -667,7 +667,7 @@ int pie_chart(char *fname, char *title, 
-       gdata=*calc_arc(s_arc,1.0);
- 
-       gdImageFill(im, gdata.mx, gdata.my, white);
--      sprintf(buffer,"%s (%d%%)",msg_h_other,100-(int)(s_arc*100));
-+      snprintf(buffer, sizeof buffer, "%s 
(%d%%)",msg_h_other,100-(int)(s_arc*100));
-       x=480-(strlen(buffer)*7);
-       gdImageString(im,gdFontMediumBold, x+1, y+1, buffer, black);
-       gdImageString(im,gdFontMediumBold, x, y, buffer, white);
Index: www/webalizer/patches/patch-hashtab_c
===================================================================
RCS file: www/webalizer/patches/patch-hashtab_c
diff -N www/webalizer/patches/patch-hashtab_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ www/webalizer/patches/patch-hashtab_c       30 Jan 2008 12:48:22 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- hashtab.c.orig     Wed Jan 30 13:40:22 2008
++++ hashtab.c  Wed Jan 30 13:40:33 2008
+@@ -38,6 +38,7 @@
+ #include <ctype.h>
+ #include <sys/utsname.h>
+ #include <sys/times.h>
++#include <sys/socket.h>
+ 
+ /* ensure getopt */
+ #ifdef HAVE_GETOPT_H
Index: www/webalizer/patches/patch-linklist_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-linklist_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-linklist_c
--- www/webalizer/patches/patch-linklist_c      17 Apr 2002 16:17:45 -0000      
1.1
+++ www/webalizer/patches/patch-linklist_c      30 Jan 2008 12:48:22 -0000
@@ -1,7 +1,15 @@
 $OpenBSD: patch-linklist_c,v 1.1 2002/04/17 16:17:45 danh Exp $
---- linklist.c.orig    Wed Apr 17 11:15:16 2002
-+++ linklist.c Wed Apr 17 11:18:20 2002
-@@ -118,7 +118,7 @@ NLISTPTR new_nlist(char *str)
+--- linklist.c.orig    Tue Jan  2 14:20:19 2007
++++ linklist.c Wed Jan 30 13:41:00 2008
+@@ -38,6 +38,7 @@
+ #include <ctype.h>
+ #include <sys/utsname.h>
+ #include <sys/times.h>
++#include <sys/socket.h>
+ 
+ /* ensure getopt */
+ #ifdef HAVE_GETOPT_H
+@@ -118,7 +119,7 @@ NLISTPTR new_nlist(char *str)
      fprintf(stderr,"[new_nlist] %s\n",msg_big_one);
     }
     if (( newptr = malloc(sizeof(struct nlist))) != NULL)
@@ -10,7 +18,7 @@ $OpenBSD: patch-linklist_c,v 1.1 2002/04
     return newptr;
  }
  
-@@ -176,8 +176,8 @@ GLISTPTR new_glist(char *str, char *name
+@@ -176,8 +177,8 @@ GLISTPTR new_glist(char *str, char *name)
     }
     if (( newptr = malloc(sizeof(struct glist))) != NULL)
       {
@@ -21,12 +29,12 @@ $OpenBSD: patch-linklist_c,v 1.1 2002/04
         newptr->next=NULL;
       }
     return newptr;
-@@ -194,8 +194,7 @@ int add_glist(char *str, GLISTPTR *list)
+@@ -194,8 +195,7 @@ int add_glist(char *str, GLISTPTR *list)
     char *name=temp_buf;
  
     /* make local copy of string */
--   strncpy(temp_buf,str,79);
--   temp_buf[79]=0;
+-   strncpy(temp_buf,str,255);
+-   temp_buf[255]=0;
 +   strlcpy(temp_buf,str,sizeof temp_buf);
  
     while (!isspace((int)*name)&&*name!=0) name++;
Index: www/webalizer/patches/patch-output_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-output_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-output_c
--- www/webalizer/patches/patch-output_c        17 Apr 2002 16:17:45 -0000      
1.1
+++ www/webalizer/patches/patch-output_c        30 Jan 2008 12:48:22 -0000
@@ -1,213 +1,46 @@
 $OpenBSD: patch-output_c,v 1.1 2002/04/17 16:17:45 danh Exp $
---- output.c.orig      Wed Apr 17 11:19:13 2002
-+++ output.c   Wed Apr 17 11:24:20 2002
-@@ -295,14 +295,14 @@ int write_month_html()
-    hist_lday[i]  =  l_day;
- 
-    /* fill in filenames */
--   sprintf(html_fname,"usage_%04d%02d.%s",cur_year,cur_month,html_ext);
--   sprintf(png1_fname,"daily_usage_%04d%02d.png",cur_year,cur_month);
--   sprintf(png2_fname,"hourly_usage_%04d%02d.png",cur_year,cur_month);
-+   snprintf(html_fname,sizeof 
html_fname,"usage_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(png1_fname,sizeof 
png1_fname,"daily_usage_%04d%02d.png",cur_year,cur_month);
-+   snprintf(png2_fname,sizeof 
png2_fname,"hourly_usage_%04d%02d.png",cur_year,cur_month);
- 
-    /* create PNG images for web page */
-    if (daily_graph)
-    {
--      sprintf(dtitle,"%s %s %d",msg_hmth_du,l_month[cur_month-1],cur_year);
-+      snprintf(dtitle,sizeof dtitle,"%s %s 
%d",msg_hmth_du,l_month[cur_month-1],cur_year);
-       month_graph6 (  png1_fname,          /* filename          */
-                       dtitle,              /* graph title       */
-                       cur_month,           /* graph month       */
-@@ -317,7 +317,7 @@ int write_month_html()
- 
-    if (hourly_graph)
-    {
--      sprintf(htitle,"%s %s %d",msg_hmth_hu,l_month[cur_month-1],cur_year);
-+      snprintf(htitle,sizeof htitle,"%s %s 
%d",msg_hmth_hu,l_month[cur_month-1],cur_year);
-       day_graph3(    png2_fname,
-                      htitle,
-                      th_hit,
-@@ -329,7 +329,7 @@ int write_month_html()
-    /* first, open the file */
-    if ( (out_fp=open_out_file(html_fname))==NULL ) return 1;
+--- output.c.orig      Tue Aug  7 13:28:49 2007
++++ output.c   Wed Jan 30 13:42:20 2008
+@@ -38,6 +38,7 @@
+ #include <ctype.h>
+ #include <sys/utsname.h>
+ #include <sys/times.h>
++#include <sys/socket.h>
+ #include <stddef.h>
+ 
+ /* ensure limits */
+@@ -569,7 +570,7 @@ void month_links()
+    char index_fname[256];
+    
+    fprintf(out_fp,"<SMALL>\n");
+-   sprintf(index_fname,"index.%s",html_ext);
++   snprintf(index_fname,sizeof index_fname, "index.%s",html_ext);
+    fprintf(out_fp, "<A HREF=\"%s\">[%s]</A>\n", index_fname, msg_hlnk_in);
+    if (ntop_notfound && response[21].count)
+       fprintf(out_fp,"<A HREF=\"#ERRORSTATS\">[%s]</A>\n",msg_hlnk_nf);
+@@ -818,8 +819,8 @@ void month_total_table()
+          }
+       }
  
--   sprintf(buffer,"%s %d",l_month[cur_month-1],cur_year);
-+   snprintf(buffer,sizeof buffer,"%s %d",l_month[cur_month-1],cur_year);
-    write_html_head(buffer, out_fp);
-    month_links();
-    month_total_table();
-@@ -938,12 +938,12 @@ int all_sites_page(u_long h_reg, u_long 
-    int      i=(h_grp)?1:0;
+-      sprintf(pie_title,"%s %s %d",msg_mtot_rc,l_month[cur_month-1],cur_year);
+-      sprintf(pie_fname,"responses_%04d%02d.png",cur_year,cur_month);
++      snprintf(pie_title,sizeof pie_title,"%s %s 
%d",msg_mtot_rc,l_month[cur_month-1],cur_year);
++      snprintf(pie_fname,sizeof 
pie_fname,"responses_%04d%02d.png",cur_year,cur_month);
+       
+       pie_chart(pie_fname,pie_title,t_hit,pie_data,pie_legend);
+       
+@@ -971,12 +972,12 @@ int all_errors_page()
+    int i;
  
     /* generate file name */
--   sprintf(site_fname,"site_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(site_fname,sizeof 
site_fname,"site_%04d%02d.%s",cur_year,cur_month,html_ext);
+-   sprintf(error_fname,"error_%04d%02d.%s",cur_year,cur_month,html_ext);
++   snprintf(error_fname,sizeof 
error_fname,"error_%04d%02d.%s",cur_year,cur_month,html_ext);
  
     /* open file */
-    if ( (out_fp=open_out_file(site_fname))==NULL ) return 0;
- 
--   sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_sites);
-+   snprintf(buffer,sizeof buffer,"%s %d - 
%s",l_month[cur_month-1],cur_year,msg_h_sites);
-    write_html_head(buffer, out_fp);
- 
-    fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n");
-@@ -1143,12 +1143,12 @@ int all_urls_page(u_long u_reg, u_long u
-    int      i=(u_grp)?1:0;
- 
-    /* generate file name */
--   sprintf(url_fname,"url_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(url_fname,sizeof 
url_fname,"url_%04d%02d.%s",cur_year,cur_month,html_ext);
- 
-    /* open file */
-    if ( (out_fp=open_out_file(url_fname))==NULL ) return 0;
+    if ( (out_fp=open_out_file(error_fname))==NULL ) return 0;
  
 -   sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_url);
 +   snprintf(buffer,sizeof buffer,"%s %d - 
%s",l_month[cur_month-1],cur_year,msg_h_url);
     write_html_head(buffer, out_fp);
  
     fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n");
-@@ -1414,12 +1414,12 @@ int all_refs_page(u_long r_reg, u_long r
-    int      i=(r_grp)?1:0;
- 
-    /* generate file name */
--   sprintf(ref_fname,"ref_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(ref_fname,sizeof 
ref_fname,"ref_%04d%02d.%s",cur_year,cur_month,html_ext);
- 
-    /* open file */
-    if ( (out_fp=open_out_file(ref_fname))==NULL ) return 0;
- 
--   sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_ref);
-+   snprintf(buffer,sizeof buffer,"%s %d - 
%s",l_month[cur_month-1],cur_year,msg_h_ref);
-    write_html_head(buffer, out_fp);
- 
-    fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n");
-@@ -1566,12 +1566,12 @@ int all_agents_page(u_long a_reg, u_long
-    int      i=(a_grp)?1:0;
- 
-    /* generate file name */
--   sprintf(agent_fname,"agent_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(agent_fname,sizeof 
agent_fname,"agent_%04d%02d.%s",cur_year,cur_month,html_ext);
- 
-    /* open file */
-    if ( (out_fp=open_out_file(agent_fname))==NULL ) return 0;
- 
--   sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_agent);
-+   snprintf(buffer,sizeof buffer,"%s %d - 
%s",l_month[cur_month-1],cur_year,msg_h_agent);
-    write_html_head(buffer, out_fp);
- 
-    fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n");
-@@ -1700,12 +1700,12 @@ int all_search_page(u_long tot_num, u_lo
-    if (!tot_num) return 0;
- 
-    /* generate file name */
--   sprintf(search_fname,"search_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(search_fname,sizeof 
search_fname,"search_%04d%02d.%s",cur_year,cur_month,html_ext);
- 
-    /* open file */
-    if ( (out_fp=open_out_file(search_fname))==NULL ) return 0;
- 
--   sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_search);
-+   snprintf(buffer,sizeof buffer,"%s %d - 
%s",l_month[cur_month-1],cur_year,msg_h_search);
-    write_html_head(buffer, out_fp);
- 
-    fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n");
-@@ -1843,12 +1843,12 @@ int all_users_page(u_long i_reg, u_long 
-    int      i=(i_grp)?1:0;
- 
-    /* generate file name */
--   sprintf(user_fname,"user_%04d%02d.%s",cur_year,cur_month,html_ext);
-+   snprintf(user_fname,sizeof 
user_fname,"user_%04d%02d.%s",cur_year,cur_month,html_ext);
- 
-    /* open file */
-    if ( (out_fp=open_out_file(user_fname))==NULL ) return 0;
- 
--   sprintf(buffer,"%s %d - %s",l_month[cur_month-1],cur_year,msg_h_uname);
-+   snprintf(buffer,sizeof buffer,"%s %d - 
%s",l_month[cur_month-1],cur_year,msg_h_uname);
-    write_html_head(buffer, out_fp);
- 
-    fprintf(out_fp,"<FONT SIZE=\"-1\"></CENTER><PRE>\n");
-@@ -1998,8 +1998,8 @@ void top_ctry_table()
-          pie_data[i]=top_ctrys[i]->count;           /* load the array       */
-          pie_legend[i]=top_ctrys[i]->desc;
-       }
--      sprintf(pie_title,"%s %s 
%d",msg_ctry_use,l_month[cur_month-1],cur_year);
--      sprintf(pie_fname,"ctry_usage_%04d%02d.png",cur_year,cur_month);
-+      snprintf(pie_title,sizeof pie_title,"%s %s 
%d",msg_ctry_use,l_month[cur_month-1],cur_year);
-+      snprintf(pie_fname,sizeof 
pie_fname,"ctry_usage_%04d%02d.png",cur_year,cur_month);
- 
-       pie_chart(pie_fname,pie_title,t_hit,pie_data,pie_legend);  /* do it   */
- 
-@@ -2063,7 +2063,7 @@ void dump_all_sites()
-    u_long   cnt=a_ctr;
- 
-    /* generate file name */
--   sprintf(filename,"%s/site_%04d%02d.%s",
-+   snprintf(filename,sizeof filename,"%s/site_%04d%02d.%s",
-       (dump_path)?dump_path:".",cur_year,cur_month,dump_ext);
- 
-    /* open file */
-@@ -2106,7 +2106,7 @@ void dump_all_urls()
-    u_long   cnt=a_ctr;
- 
-    /* generate file name */
--   sprintf(filename,"%s/url_%04d%02d.%s",
-+   snprintf(filename,sizeof filename,"%s/url_%04d%02d.%s",
-       (dump_path)?dump_path:".",cur_year,cur_month,dump_ext);
- 
-    /* open file */
-@@ -2146,7 +2146,7 @@ void dump_all_refs()
-    u_long   cnt=a_ctr;
- 
-    /* generate file name */
--   sprintf(filename,"%s/ref_%04d%02d.%s",
-+   snprintf(filename,sizeof filename,"%s/ref_%04d%02d.%s",
-       (dump_path)?dump_path:".",cur_year,cur_month,dump_ext);
- 
-    /* open file */
-@@ -2185,7 +2185,7 @@ void dump_all_agents()
-    u_char   cnt=a_ctr;
- 
-    /* generate file name */
--   sprintf(filename,"%s/agent_%04d%02d.%s",
-+   snprintf(filename,sizeof filename,"%s/agent_%04d%02d.%s",
-       (dump_path)?dump_path:".",cur_year,cur_month,dump_ext);
- 
-    /* open file */
-@@ -2224,7 +2224,7 @@ void dump_all_users()
-    u_long   cnt=a_ctr;
- 
-    /* generate file name */
--   sprintf(filename,"%s/user_%04d%02d.%s",
-+   snprintf(filename,sizeof filename,"%s/user_%04d%02d.%s",
-       (dump_path)?dump_path:".",cur_year,cur_month,dump_ext);
- 
-    /* open file */
-@@ -2267,7 +2267,7 @@ void dump_all_search()
-    u_char   cnt=a_ctr;
- 
-    /* generate file name */
--   sprintf(filename,"%s/search_%04d%02d.%s",
-+   snprintf(filename,sizeof filename,"%s/search_%04d%02d.%s",
-       (dump_path)?dump_path:".",cur_year,cur_month,dump_ext);
- 
-    /* open file */
-@@ -2312,7 +2312,7 @@ int write_main_index()
- 
-    if (verbose>1) printf("%s\n",msg_gen_sum);
- 
--   sprintf(buffer,"%s %s",msg_main_us,hname);
-+   snprintf(buffer,sizeof buffer,"%s %s",msg_main_us,hname);
- 
-    for (i=0;i<12;i++)                   /* get last month in history */
-    {
-@@ -2338,7 +2338,7 @@ int write_main_index()
-                    hist_visit);         /* data set 6        */
- 
-    /* now do html stuff... */
--   sprintf(index_fname,"index.%s",html_ext);
-+   snprintf(index_fname,sizeof index_fname,"index.%s",html_ext);
- 
-    if ( (out_fp=fopen(index_fname,"w")) == NULL)
-    {
Index: www/webalizer/patches/patch-parser_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-parser_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-parser_c
--- www/webalizer/patches/patch-parser_c        17 Apr 2002 16:17:45 -0000      
1.1
+++ www/webalizer/patches/patch-parser_c        30 Jan 2008 12:48:22 -0000
@@ -1,23 +1,11 @@
-$OpenBSD: patch-parser_c,v 1.1 2002/04/17 16:17:45 danh Exp $
---- parser.c.orig      Wed Apr 17 11:26:51 2002
-+++ parser.c   Wed Apr 17 11:33:35 2002
-@@ -162,7 +162,7 @@ int parse_record_ftp(char *buffer)
-    if (i<1 || i>31) return 0;
+$OpenBSD$
+--- parser.c.orig      Wed Jan 30 13:41:49 2008
++++ parser.c   Wed Jan 30 13:42:01 2008
+@@ -38,6 +38,7 @@
+ #include <ctype.h>
+ #include <sys/utsname.h>
+ #include <sys/times.h>
++#include <sys/socket.h>
  
-    /* format date/time field         */
--   sprintf(log_rec.datetime,"[%02d/%s/%4d:%s -0000]",i,cpx,j,cpy);
-+   snprintf(log_rec.datetime,sizeof log_rec.datetime,"[%02d/%s/%4d:%s 
-0000]",i,cpx,j,cpy);
- 
-    /* skip seconds... */
-    while (*cp1!=0 && cp1<eob) cp1++;
-@@ -196,8 +196,8 @@ int parse_record_ftp(char *buffer)
-    while (*cp1==0) cp1++;
- 
-    /* fabricate an appropriate request string based on direction */
--   if (*cp1=='i') sprintf(log_rec.url,"\"POST %s HTTP/1.0\"",cpx);
--      else        sprintf(log_rec.url,"\"GET %s HTTP/1.0\"",cpx);
-+   if (*cp1=='i') snprintf(log_rec.url,sizeof log_rec.url,"\"POST %s 
HTTP/1.0\"",cpx);
-+      else        snprintf(log_rec.url,sizeof log_rec.url,"\"GET %s 
HTTP/1.0\"",cpx);
- 
-    if (cp1<eob) cp1++;
-    if (cp1<eob) cp1++;
+ /* ensure getopt */
+ #ifdef HAVE_GETOPT_H
Index: www/webalizer/patches/patch-preserve_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-preserve_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-preserve_c
--- www/webalizer/patches/patch-preserve_c      21 Jan 2003 05:16:43 -0000      
1.2
+++ www/webalizer/patches/patch-preserve_c      30 Jan 2008 12:48:22 -0000
@@ -1,7 +1,15 @@
 $OpenBSD: patch-preserve_c,v 1.2 2003/01/21 05:16:43 danh Exp $
---- preserve.c.orig    Wed Oct 24 02:22:42 2001
-+++ preserve.c Mon Jan 20 23:51:14 2003
-@@ -196,38 +196,38 @@ int save_state()
+--- preserve.c.orig    Tue Jul  3 12:19:00 2007
++++ preserve.c Wed Jan 30 13:41:34 2008
+@@ -38,6 +38,7 @@
+ #include <ctype.h>
+ #include <sys/utsname.h>
+ #include <sys/times.h>
++#include <sys/socket.h>
+ 
+ /* ensure getopt */
+ #ifdef HAVE_GETOPT_H
+@@ -203,7 +204,7 @@ int save_state()
     /* Saving current run data... */
     if (verbose>1)
     {
@@ -10,26 +18,20 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
         cur_month,cur_day,cur_year,cur_hour,cur_min,cur_sec);
        printf("%s [%s]\n",msg_put_data,buffer);
     }
- 
-    /* first, save the easy stuff */
-    /* Header record */
--   sprintf(buffer,
-+   snprintf(buffer,sizeof buffer,
-      "# Webalizer V%s-%s Incremental Data - %02d/%02d/%04d %02d:%02d:%02d\n",
-       version,editlvl,cur_month,cur_day,cur_year,cur_hour,cur_min,cur_sec);
+@@ -216,25 +217,25 @@ int save_state()
     if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
  
     /* Current date/time          */
 -   sprintf(buffer,"%d %d %d %d %d %d\n",
-+   snprintf(buffer,sizeof buffer,"%d %d %d %d %d %d\n",
++   snprintf(buffer,sizeof(buffer),"%d %d %d %d %d %d\n",
          cur_year, cur_month, cur_day, cur_hour, cur_min, cur_sec);
     if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
  
     /* Monthly totals for sites, urls, etc... */
--   sprintf(buffer,"%lu %lu %lu %lu %lu %lu %.0f %lu %lu %lu\n",
-+   snprintf(buffer,sizeof buffer,"%lu %lu %lu %lu %lu %lu %.0f %lu %lu %lu\n",
+-   sprintf(buffer,"%lu %lu %lu %lu %lu %lu %.0f %lu %lu %lu %.0f %.0f\n",
++   snprintf(buffer,sizeof buffer,"%lu %lu %lu %lu %lu %lu %.0f %lu %lu %lu 
%.0f %.0f\n",
          t_hit, t_file, t_site, t_url,
-         t_ref, t_agent, t_xfer, t_page, t_visit, t_user);
+         t_ref, t_agent, t_xfer, t_page, t_visit, t_user, t_ixfer, t_oxfer);
     if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
  
     /* Daily totals for sites, urls, etc... */
@@ -41,21 +43,21 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
     /* Monthly (by day) total array */
     for (i=0;i<31;i++)
     {
--      sprintf(buffer,"%lu %lu %.0f %lu %lu %lu\n",
-+      snprintf(buffer,sizeof buffer,"%lu %lu %.0f %lu %lu %lu\n",
-         tm_hit[i],tm_file[i],tm_xfer[i],tm_site[i],tm_page[i],tm_visit[i]);
+-      sprintf(buffer,"%lu %lu %.0f %lu %lu %lu %.0f %.0f\n",
++      snprintf(buffer,sizeof buffer,"%lu %lu %.0f %lu %lu %lu %.0f %.0f\n",
+         tm_hit[i],tm_file[i],tm_xfer[i],tm_site[i],
+         tm_page[i],tm_visit[i],tm_ixfer[i],tm_oxfer[i]);
        if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
-    }
-@@ -235,7 +235,7 @@ int save_state()
+@@ -243,7 +244,7 @@ int save_state()
     /* Daily (by hour) total array */
     for (i=0;i<24;i++)
     {
--      sprintf(buffer,"%lu %lu %.0f %lu\n",
-+      snprintf(buffer,sizeof buffer,"%lu %lu %.0f %lu\n",
-         th_hit[i],th_file[i],th_xfer[i],th_page[i]);
+-      sprintf(buffer,"%lu %lu %.0f %lu %.0f %.0f\n",
++      snprintf(buffer,sizeof buffer,"%lu %lu %.0f %lu %.0f %.0f\n",
+         th_hit[i],th_file[i],th_xfer[i],th_page[i],th_ixfer[i],th_oxfer[i]);
        if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
     }
-@@ -243,7 +243,7 @@ int save_state()
+@@ -251,7 +252,7 @@ int save_state()
     /* Response codes */
     for (i=0;i<TOTAL_RC;i++)
     {
@@ -64,34 +66,34 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
     }
  
-@@ -255,7 +255,7 @@ int save_state()
+@@ -263,7 +264,7 @@ int save_state()
        uptr=um_htab[i];
        while (uptr!=NULL)
        {
--         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu\n", uptr->string,
-+         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu\n", 
uptr->string,
+-         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f %.0f\n", 
uptr->string,
++         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f 
%.0f\n", uptr->string,
                uptr->flag, uptr->count, uptr->files, uptr->xfer,
-               uptr->entry, uptr->exit);
+               uptr->entry, uptr->exit,uptr->ixfer, uptr->oxfer);
           if (fputs(buffer,fp)==EOF) return 1;
-@@ -272,7 +272,7 @@ int save_state()
+@@ -280,7 +281,7 @@ int save_state()
        hptr=sm_htab[i];
        while (hptr!=NULL)
        {
--         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu\n%s\n",
-+         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu\n%s\n",
+-         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f %.0f\n%s\n",
++         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f 
%.0f\n%s\n",
                hptr->string,
                hptr->flag,
                hptr->count,
-@@ -294,7 +294,7 @@ int save_state()
+@@ -304,7 +305,7 @@ int save_state()
        hptr=sd_htab[i];
        while (hptr!=NULL)
        {
--         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu\n%s\n",
-+         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu\n%s\n",
+-         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f %.0f\n%s\n",
++         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f 
%.0f\n%s\n",
                hptr->string,
                hptr->flag,
                hptr->count,
-@@ -318,7 +318,7 @@ int save_state()
+@@ -330,7 +331,7 @@ int save_state()
           rptr=rm_htab[i];
           while (rptr!=NULL)
           {
@@ -100,7 +102,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
                   rptr->flag, rptr->count);
              if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
              rptr=rptr->next;
-@@ -336,7 +336,7 @@ int save_state()
+@@ -348,7 +349,7 @@ int save_state()
           aptr=am_htab[i];
           while (aptr!=NULL)
           {
@@ -109,7 +111,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
                   aptr->flag, aptr->count);
              if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
              aptr=aptr->next;
-@@ -352,7 +352,7 @@ int save_state()
+@@ -364,7 +365,7 @@ int save_state()
        sptr=sr_htab[i];
        while (sptr!=NULL)
        {
@@ -118,16 +120,32 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
           if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
           sptr=sptr->next;
        }
-@@ -367,7 +367,7 @@ int save_state()
+@@ -379,7 +380,7 @@ int save_state()
        iptr=im_htab[i];
        while (iptr!=NULL)
        {
--         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu\n",
-+         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu\n",
+-         sprintf(buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f %.0f\n",
++         snprintf(buffer,sizeof buffer,"%s\n%d %lu %lu %.0f %lu %lu %.0f 
%.0f\n",
                iptr->string,
                iptr->flag,
                iptr->count,
-@@ -417,7 +417,7 @@ int restore_state()
+@@ -396,13 +397,13 @@ int save_state()
+    if (fputs("# End Of Table - usernames\n",fp)==EOF) return 1;
+ 
+    /* 404 error list */
+-   sprintf(buffer,"%lu\n",resp_counter); /* save total 404 counter */
++   snprintf(buffer,sizeof buffer,"%lu\n",resp_counter); /* save total 404 
counter */
+    if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
+    
+    if (fputs("# -notfounderrors- \n",fp)==EOF) return 1;  /* error exit */
+    if (resp_counter>0) {
+       for (i=0;i<resp_counter;i++) {
+-              
sprintf(buffer,"%s\n%lu\n",respnotfound[i].respurl,respnotfound[i].count);
++              snprintf(buffer,sizeof 
buffer,"%s\n%lu\n",respnotfound[i].respurl,respnotfound[i].count);
+               if (fputs(buffer,fp)==EOF) return 1;  /* error exit */
+       }
+    }
+@@ -444,7 +445,7 @@ int restore_state()
     if (verbose>1) printf("%s %s\n",msg_get_data,state_fname);
  
     /* get easy stuff */
@@ -136,7 +154,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
     if ((fgets(buffer,BUFSIZE,fp)) != NULL)                 /* Header record */
       {if (strncmp(buffer,tmp_buf,17)) return 99;} /* bad magic? */
     else return 1;   /* error exit */
-@@ -493,7 +493,7 @@ int restore_state()
+@@ -537,7 +538,7 @@ int restore_state()
     while ((fgets(buffer,BUFSIZE,fp)) != NULL)
     {
        if (!strncmp(buffer,"# End Of Table ",15)) break;
@@ -145,7 +163,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        tmp_buf[strlen(tmp_buf)-1]=0;
  
        if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 10;  /* error exit */
-@@ -524,7 +524,7 @@ int restore_state()
+@@ -574,7 +575,7 @@ int restore_state()
     {
        /* Check for end of table */
        if (!strncmp(buffer,"# End Of Table ",15)) break;
@@ -154,7 +172,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        tmp_buf[strlen(buffer)-1]=0;
  
        if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 8;  /* error exit */
-@@ -564,7 +564,7 @@ int restore_state()
+@@ -620,7 +621,7 @@ int restore_state()
     {
        /* Check for end of table */
        if (!strncmp(buffer,"# End Of Table ",15)) break;
@@ -163,7 +181,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        tmp_buf[strlen(buffer)-1]=0;
  
        if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 9;  /* error exit */
-@@ -603,7 +603,7 @@ int restore_state()
+@@ -664,7 +665,7 @@ int restore_state()
     while ((fgets(buffer,BUFSIZE,fp)) != NULL)
     {
        if (!strncmp(buffer,"# End Of Table ",15)) break;
@@ -172,7 +190,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        tmp_buf[strlen(buffer)-1]=0;
  
        if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 11;  /* error exit */
-@@ -628,7 +628,7 @@ int restore_state()
+@@ -689,7 +690,7 @@ int restore_state()
     while ((fgets(buffer,BUFSIZE,fp)) != NULL)
     {
        if (!strncmp(buffer,"# End Of Table ",15)) break;
@@ -181,7 +199,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        tmp_buf[strlen(buffer)-1]=0;
  
        if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 12;  /* error exit */
-@@ -653,7 +653,7 @@ int restore_state()
+@@ -714,7 +715,7 @@ int restore_state()
     while ((fgets(buffer,BUFSIZE,fp)) != NULL)
     {
        if (!strncmp(buffer,"# End Of Table ",15)) break;
@@ -190,7 +208,7 @@ $OpenBSD: patch-preserve_c,v 1.2 2003/01
        tmp_buf[strlen(buffer)-1]=0;
  
        if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 13;  /* error exit */
-@@ -678,7 +678,7 @@ int restore_state()
+@@ -739,7 +740,7 @@ int restore_state()
     {
        /* Check for end of table */
        if (!strncmp(buffer,"# End Of Table ",15)) break;
Index: www/webalizer/patches/patch-sample_conf
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-sample_conf,v
retrieving revision 1.2
diff -u -p -r1.2 patch-sample_conf
--- www/webalizer/patches/patch-sample_conf     17 Apr 2002 16:17:45 -0000      
1.2
+++ www/webalizer/patches/patch-sample_conf     30 Jan 2008 12:48:22 -0000
@@ -1,30 +1,21 @@
 $OpenBSD: patch-sample_conf,v 1.2 2002/04/17 16:17:45 danh Exp $
---- sample.conf.orig   Wed Apr 17 11:41:44 2002
-+++ sample.conf        Wed Apr 17 11:42:47 2002
-@@ -25,7 +25,7 @@
- # the log filename ends in '.gz' (ie: a gzip compressed file), it will
- # be decompressed on the fly as it is being read.
- 
--#LogFile        /var/lib/httpd/logs/access_log
-+#LogFile        /var/www/logs/access_log
- 
- # LogType defines the log type being processed.  Normally, the Webalizer
- # expects a CLF or Combined web server log as input.  Using this option,
-@@ -39,7 +39,7 @@
- # should be a full path name, however relative ones might work as well.
- # If no output directory is specified, the current directory will be used.
- 
--#OutputDir      /var/lib/httpd/htdocs/usage
-+#OutputDir      /var/www/htdocs/usage
- 
- # HistoryName allows you to specify the name of the history file produced
- # by the Webalizer.  The history file keeps the data for up to 12 months
-@@ -540,7 +540,7 @@ SearchEngine       northernlight.com  qr=
- # it will default to the current output directory.  Do not use a
- # trailing slash ('/').
- 
--#DumpPath     /var/lib/httpd/logs
-+#DumpPath     /var/www/logs
- 
- # The DumpHeader keyword specifies if a header record should be
- # written to the file.  A header record is the first record of the
+--- sample.conf.orig   Mon Aug  6 18:30:26 2007
++++ sample.conf        Wed Jan 30 13:32:11 2008
+@@ -27,7 +27,7 @@
+ # the log filename ends in '.gz' (ie: a gzip compressed file), it will
+ # be decompressed on the fly as it is being read.
+ 
+-#LogFile        /var/lib/httpd/logs/access_log
++#LogFile        /var/www/logs/access_log
+ 
+ # LogType defines the log type being processed.  Normally, the Webalizer
+ # expects a CLF or Combined web server log as input.  Using this option,
+@@ -41,7 +41,7 @@
+ # should be a full path name, however relative ones might work as well.
+ # If no output directory is specified, the current directory will be used.
+ 
+-#OutputDir      /var/lib/httpd/htdocs/usage
++#OutputDir      /var/www/htdocs/usage
+ 
+ # HistoryName allows you to specify the name of the history file produced
+ # by the Webalizer.  The history file keeps the data for up to 12 months
Index: www/webalizer/patches/patch-webalizer_c
===================================================================
RCS file: /cvs/ports/www/webalizer/patches/patch-webalizer_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-webalizer_c
--- www/webalizer/patches/patch-webalizer_c     17 Apr 2002 16:17:45 -0000      
1.3
+++ www/webalizer/patches/patch-webalizer_c     30 Jan 2008 12:48:22 -0000
@@ -1,16 +1,15 @@
 $OpenBSD: patch-webalizer_c,v 1.3 2002/04/17 16:17:45 danh Exp $
---- webalizer.c.orig   Wed Apr 17 11:59:59 2002
-+++ webalizer.c        Wed Apr 17 12:05:26 2002
-@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
-    /* add default index. alias */
-    add_nlist("index.",&index_alias);
- 
--   sprintf(tmp_buf,"%s/webalizer.conf",ETCDIR);
-+   snprintf(tmp_buf,sizeof tmp_buf,"%s/webalizer.conf",ETCDIR);
-    /* check for default config file */
-    if (!access("webalizer.conf",F_OK))
-       get_config("webalizer.conf");
-@@ -560,7 +560,7 @@ int main(int argc, char *argv[])
+--- webalizer.c.orig   Sat Dec  8 12:49:25 2007
++++ webalizer.c        Wed Jan 30 13:44:10 2008
+@@ -38,6 +38,7 @@
+ #include <ctype.h>
+ #include <sys/utsname.h>
+ #include <sys/times.h>
++#include <sys/socket.h>
+ #include <zlib.h>
+ 
+ /* ensure getopt */
+@@ -687,7 +688,7 @@ int main(int argc, char *argv[])
        }
  
        /* got a record... */
@@ -19,7 +18,7 @@ $OpenBSD: patch-webalizer_c,v 1.3 2002/0
        if (parse_record(buffer))           /* parse the record             */
        {
           /*********************************************/
-@@ -750,7 +750,7 @@ int main(int argc, char *argv[])
+@@ -891,7 +892,7 @@ int main(int argc, char *argv[])
                 if (!isurlchar(*cp1))
                 {
                    /* Save query portion in log.rec.srchstr */
@@ -28,7 +27,28 @@ $OpenBSD: patch-webalizer_c,v 1.3 2002/0
                    *cp1++='\0';
                    break;
                 }
-@@ -1007,7 +1007,7 @@ int main(int argc, char *argv[])
+@@ -1269,7 +1270,7 @@ int main(int argc, char *argv[])
+ 
+          /* if this is a IPv4 address in IPv6 notation, normalize it back */
+        if (strncmp(log_rec.hostname, "::ffff:", 7) == 0) {
+-          strcpy(log_rec.hostname, log_rec.hostname+7);
++          strlcpy(log_rec.hostname, log_rec.hostname+7, 
sizeof(log_rec.hostname));
+        }
+ 
+          /* Save IP address for later checks */
+@@ -1307,9 +1308,9 @@ int main(int argc, char *argv[])
+                else
+                {
+                   if (strcmp(log_rec.hostname,ip)!=0)
+-                     strcpy(log_rec.hostname,ip);
++                     strlcpy(log_rec.hostname,ip,sizeof(log_rec.hostname));
+                   else
+-                     strncpy(log_rec.hostname,"Invalid",8);
++                     
strlcpy(log_rec.hostname,"Invalid",sizeof(log_rec.hostname));
+                   invalid = 1; break;
+                }
+             }
+@@ -1322,7 +1323,7 @@ int main(int argc, char *argv[])
  
           /* Catch blank hostnames here */
           if (log_rec.hostname[0]=='\0')
@@ -37,7 +57,7 @@ $OpenBSD: patch-webalizer_c,v 1.3 2002/0
  
           /* Ignore/Include check */
           if ( (isinlist(include_sites,log_rec.hostname)==NULL) &&
-@@ -1809,7 +1809,7 @@ void srch_string(char *ptr)
+@@ -2260,7 +2261,7 @@ void srch_string(char *ptr)
     if ( (cps=isinglist(search_list,log_rec.refer))==NULL) return; 
  
     /* Try to find query variable */

Reply via email to