Bug 83988 - [PATCH] security/amavisd-new: properly set default values
Summary: [PATCH] security/amavisd-new: properly set default values
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-24 09:10 UTC by Petr Rehor
Modified: 2005-08-24 19:54 UTC (History)
1 user (show)

See Also:


Attachments
amavisd-new.diff (1008 bytes, patch)
2005-07-24 09:10 UTC, Petr Rehor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Rehor 2005-07-24 09:10:16 UTC
When amavisd_flags is in rc.conf is set to empty value, then rc script
set it to default value (wanted on czech FreeBSD mailing list).

How-To-Repeat: Add amavisd_flags="" to /etc/rc.conf and restart amavisd - it run with
default amavisd_flags="-u vscan"
Comment 1 blaz 2005-07-24 16:31:49 UTC
The line should instead be completely removed, because I think it is not 
needed anymore. amavisd can be safely run as root, because it 
immediately drops privileges and switches to the "vscan" user. I'm just 
waiting for a confirmation from the amavisd-new author that this is 
indeed safe.
Comment 2 Yen-Ming Lee freebsd_committer freebsd_triage 2005-07-25 16:22:04 UTC
State Changed
From-To: open->feedback

The maintainer is waiting a confirmation from the author.
Comment 3 Blaz Zupan 2005-07-31 15:23:24 UTC
I have confirmation from the amavisd-new author that starting amavisd as root 
is safe, because it drops privileges as soon as possible. The only caveat is 
that p5-Net-Server 0.88 is needed, which is included in the ports collection. 
If somebody upgrades amavisd-new but does not upgrade p5-Net-Server, 
amavisd-new will not start until p5-Net-Server is upgraded. Below is the patch 
that should be commited. This makes amavisd-new work automatically both with 
and without chroot (but only if p5-Net-Server 0.88 is also installed).

diff -urN amavisd-new.orig/Makefile amavisd-new/Makefile
--- amavisd-new.orig/Makefile	Sun Jul 17 23:42:11 2005
+++ amavisd-new/Makefile	Sun Jul 31 16:05:58 2005
@@ -8,7 +8,7 @@

  PORTNAME=	amavisd-new
  PORTVERSION=	2.3.2
-PORTREVISION=	1
+PORTREVISION=	2
  PORTEPOCH=	1
  CATEGORIES=	security
  MASTER_SITES=	http://www.ijs.si/software/amavisd/ \
diff -urN amavisd-new.orig/files/amavisd.sh.in amavisd-new/files/amavisd.sh.in
--- amavisd-new.orig/files/amavisd.sh.in	Wed Jul  6 10:47:09 2005
+++ amavisd-new/files/amavisd.sh.in	Sun Jul 31 16:15:45 2005
@@ -33,7 +33,6 @@
  # set defaults

  amavisd_enable=${amavisd_enable:-"NO"}
-amavisd_flags=${amavisd_flags:-"-u %%AMAVISUSER%%"}

  load_rc_config $name
  run_rc_command "$1"
Comment 4 lesi freebsd_committer freebsd_triage 2005-08-24 19:53:01 UTC
State Changed
From-To: feedback->closed

Fix from maintainer merged with upgrade in PR ports/85241.