1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00

security/amavisd-milter: resolve runtime bug with temp directory handling

- Use ${AMAVISDIR}/tmp as working directory to resolve runtime bug:
  Failure: Suspicious temporary directory name '/var/run/amavis/tmp/afcokTMBJlIs'

PR:		204787
Submitted by:	Geoffroy Desvernay <dgeo@centrale-marseille.fr>
Approved by:	Petr Rehor <rx@rx.cz> (maintainer)
MFH:		2015Q4
This commit is contained in:
Jason Unovitch 2015-12-27 15:49:01 +00:00
parent eca925acb0
commit 41bacec215
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=404578
3 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= amavisd-milter
PORTVERSION= 1.6.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= security mail
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@ -31,7 +31,7 @@ AMAVISDIR?= /var/amavis
RUNDIR= /var/run/amavis
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir=${RUNDIR} --with-working-dir=tmp
CONFIGURE_ARGS= --localstatedir=${RUNDIR} --with-working-dir=${AMAVISDIR}/tmp
USE_RC_SUBR= ${PORTNAME}
SUB_LIST= AMAVISUSER=${AMAVISUSER} \
@ -64,6 +64,5 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
${INSTALL} -d -o ${AMAVISUSER} -g ${AMAVISGROUP} -m 755 ${STAGEDIR}${RUNDIR}
${INSTALL} -d -o ${AMAVISUSER} -g ${AMAVISGROUP} -m 750 ${STAGEDIR}${RUNDIR}/tmp
.include <bsd.port.post.mk>

View File

@ -37,7 +37,9 @@ start_postcmd="amavisd_milter_postcmd"
amavisd_milter_postcmd()
{
chmod ${amavisd_milter_socket_perm} ${amavisd_milter_socket}
if [ -e ${amavisd_milter_socket} ]; then
chmod ${amavisd_milter_socket_perm} ${amavisd_milter_socket}
fi
}
run_rc_command "$1"

View File

@ -1,4 +1,3 @@
sbin/amavisd-milter
man/man8/amavisd-milter.8.gz
@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,750) %%RUNDIR%%/tmp
@dir(%%AMAVISUSER%%,%%AMAVISGROUP%%,755) %%RUNDIR%%