ports/95061: [patch] www/c-icap: overwriting of /var/log/access.log and /var/log/server.log

Elisey O. Savateev b3k at mail.ru
Wed Mar 29 04:40:15 UTC 2006


>Number:         95061
>Category:       ports
>Synopsis:       [patch] www/c-icap: overwriting of /var/log/access.log and /var/log/server.log
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 29 04:40:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Elisey O. Savateev
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD beastie 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #16: Wed Mar  1 17:41:48 YEKT
>Description:
Fixed serious bug in pkg-install.in:

elif [ "$2" = "POST-INSTALL" ]; then
        touch "$LOG_PATH/access.log" "$LOG_PATH/server.log" || exit 1
        chown -R "$CICAP_USER:$CICAP_GROUP" "$LOG_PATH" || exit 1
fi

where $LOG_PATH=/var/log!

Plus fixed incorrect stopping of c-icap in pkg-plist.
>How-To-Repeat:

>Fix:
--- c-icap-220505_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/c-icap/Makefile /usr/home/bio3k/my_proj/ports/c-icap/c-icap/Makefile
--- /usr/ports/www/c-icap/Makefile  Mon Mar 27 12:40:18 2006
+++ /usr/home/bio3k/my_proj/ports/c-icap/c-icap/Makefile    Wed Mar 29 08:57:57 2006
@@ -2,13 +2,15 @@
 # Date created:                30 January 2006
 # Whom:                    Elisey Savateev <b3k at mail.ru>
 #
-# $FreeBSD: ports/www/c-icap/Makefile,v 1.1 2006/03/27 06:40:18 sem Exp $
+# $FreeBSD$
 #

 PORTNAME=  c-icap
 PORTVERSION=   220505
+PORTREVISION=  1
 CATEGORIES=    www
-MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE} \
+               http://bio3k.softboard.ru/uploads/arch/
 MASTER_SITE_SUBDIR=    ${PORTNAME}
 DISTNAME=  c_icap-${PORTVERSION}

diff -ruN --exclude=CVS /usr/ports/www/c-icap/files/patch-c-icap.conf.default.in /usr/home/bio3k/my_proj/ports/c-icap/c-icap/files/patch-c-icap.conf.default.in
--- /usr/ports/www/c-icap/files/patch-c-icap.conf.default.in    Mon Mar 27 12:40:18 2006
+++ /usr/home/bio3k/my_proj/ports/c-icap/c-icap/files/patch-c-icap.conf.default.in  Wed Mar 29 08:26:56 2006
@@ -1,26 +1,13 @@
---- c-icap.conf.default.in.bak Fri Feb  3 10:18:30 2006
-+++ c-icap.conf.default.in Fri Feb  3 10:20:15 2006
-@@ -3,7 +3,7 @@
- #
-
-
--PidFile /var/run/c-icap.pid
-+PidFile @prefix@/var/run/c-icap.pid
- Timeout 300
- KeepAlive On
- MaxKeepAliveRequests 100
-@@ -25,11 +25,11 @@
- #ServerAdmin you at your.address # Not implemented yet
- #ServerName localhost:1344 # Not implemented yet
-
--TmpDir /var/tmp
-+TmpDir @prefix@/var/tmp
+--- c-icap.conf.default.in.bak Wed Mar 29 08:24:29 2006
++++ c-icap.conf.default.in Wed Mar 29 08:25:58 2006
+@@ -28,8 +28,8 @@
+ TmpDir /var/tmp
  MaxMemObject 131072

 -ServerLog @prefix@/var/log/server.log
 -AccessLog @prefix@/var/log/access.log
-+ServerLog @prefix@/var/log/c_icap/server.log
-+AccessLog @prefix@/var/log/c_icap/access.log
++ServerLog /var/log/c_icap/server.log
++AccessLog /var/log/c_icap/access.log
  #DebugLevel 3

  ModulesDir @prefix@/lib/c_icap
diff -ruN --exclude=CVS /usr/ports/www/c-icap/files/pkg-install.in /usr/home/bio3k/my_proj/ports/c-icap/c-icap/files/pkg-install.in
--- /usr/ports/www/c-icap/files/pkg-install.in  Wed Mar 29 08:15:03 2006
+++ /usr/home/bio3k/my_proj/ports/c-icap/c-icap/files/pkg-install.in    Wed Mar 29 08:59:33 2006
@@ -1,11 +1,10 @@
 #!/bin/sh
-# $FreeBSD: ports/www/c-icap/files/pkg-install.in,v 1.1 2006/03/27 06:40:18 sem Exp $
+# $FreeBSD$

 CICAP_USER=cicap
 CICAP_GROUP=cicap

-LOG_PATH=/var/log
-TMP_PATH=/var/tmp
+LOG_PATH=/var/log/c_icap

 if [ "$2" = "PRE-INSTALL" ]; then
    if ! pw groupshow "$CICAP_USER" 2>/dev/null 1>&2; then
@@ -29,6 +28,7 @@
        fi
    fi
 elif [ "$2" = "POST-INSTALL" ]; then
+   [ -d "$LOG_PATH" ] || mkdir -p "$LOG_PATH" || exit 1
    touch "$LOG_PATH/access.log" "$LOG_PATH/server.log" || exit 1
    chown -R "$CICAP_USER:$CICAP_GROUP" "$LOG_PATH" || exit 1
 fi
diff -ruN --exclude=CVS /usr/ports/www/c-icap/pkg-plist /usr/home/bio3k/my_proj/ports/c-icap/c-icap/pkg-plist
--- /usr/ports/www/c-icap/pkg-plist Mon Mar 27 12:40:18 2006
+++ /usr/home/bio3k/my_proj/ports/c-icap/c-icap/pkg-plist   Wed Mar 29 08:59:04 2006
@@ -1,4 +1,4 @@
- at comment $FreeBSD: ports/www/c-icap/pkg-plist,v 1.1 2006/03/27 06:40:18 sem Exp $
+ at comment $FreeBSD$
 bin/c-icap
 bin/icap-client
 bin/icap-stretch
@@ -8,7 +8,7 @@
 @unexec if cmp -s %D/etc/c-icap.magic %D/etc/c-icap.magic.default; then rm -f %D/etc/c-icap.magic; fi
 etc/c-icap.magic.default
 @exec [ -f %B/c-icap.magic ] || cp -p %%PREFIX%%/%F %B/c-icap.magic
- at unexec %D/etc/rc.d/c_icap.sh stop; fi
+ at unexec if [ -f /var/run/c-icap.pid ]; then %D/etc/rc.d/c_icap stop; fi
 include/c_icap/access.h
 include/c_icap/body.h
 include/c_icap/c-icap.h
@@ -49,5 +49,6 @@
 lib/libicapapi.so.0
 lib/libicapapi.so
 @cwd /
-var/log/access.log
-var/log/server.log
+var/log/c_icap/access.log
+var/log/c_icap/server.log
+ at dirrm var/log/c_icap
--- c-icap-220505_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list