Date: Tue, 7 Jun 2011 00:02:10 GMT From: Xin LI <delphij@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: prehor@gmail.com Subject: ports/157674: [PATCH] security/amavisd-milter: allow alternative socket path and permission Message-ID: <201106070002.p5702AlS049764@freefall.freebsd.org> Resent-Message-ID: <201106070010.p570A8Xa059017@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157674 >Category: ports >Synopsis: [PATCH] security/amavisd-milter: allow alternative socket path and permission >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jun 07 00:10:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Xin LI >Release: FreeBSD 8.2-STABLE i386 >Organization: iXsystems, Inc. >Environment: System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #4 r220774: Mon Apr 18 13:56:14 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: Currently security/amavisd-milter's supplied startup script does not allow changing socket path and permission, nor amavisd-milter have the functionality of changing permission at startup time. The attached patch makes it possible to: a) change the default location of amavisd-milter, which is important in a chrooted setup; b) allows change of the permission of the socket. The practical default of that permission set is 0666. >How-To-Repeat: >Fix: --- amavisd-milter.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/amavisd-milter/Makefile,v retrieving revision 1.16 diff -u -p -r1.16 Makefile --- Makefile 16 Dec 2010 02:34:00 -0000 1.16 +++ Makefile 6 Jun 2011 23:54:08 -0000 @@ -7,7 +7,7 @@ PORTNAME= amavisd-milter PORTVERSION= 1.5.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security mail MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} Index: files/amavisd-milter.sh.in =================================================================== RCS file: /home/ncvs/ports/security/amavisd-milter/files/amavisd-milter.sh.in,v retrieving revision 1.8 diff -u -p -r1.8 amavisd-milter.sh.in --- files/amavisd-milter.sh.in 27 Mar 2010 00:14:38 -0000 1.8 +++ files/amavisd-milter.sh.in 6 Jun 2011 23:50:30 -0000 @@ -25,10 +25,18 @@ load_rc_config $name # Set defaults : ${amavisd_milter_enable:="NO"} : ${amavisd_milter_user="%%AMAVISUSER%%"} +: ${amavisd_milter_socket:="%%AMAVISDIR%%/amavisd-milter.sock"} +: ${amavisd_milter_socket_perm:="0666"} pidfile="${amavisd_milter_pidfile:-%%AMAVISDIR%%/amavisd-milter.pid}" command="%%PREFIX%%/sbin/amavisd-milter" -command_args="-p ${pidfile}" +command_args="-p ${pidfile} -s ${amavisd_milter_socket}" required_files="%%PREFIX%%/etc/amavisd.conf" +start_postcmd="amavisd_milter_postcmd" + +amavisd_milter_postcmd() +{ + chmod ${amavisd_milter_socket_perm} ${amavisd_milter_socket} +} run_rc_command "$1" --- amavisd-milter.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106070002.p5702AlS049764>