Bug 236622 - security/clamav clamd will not run as root if the option is set in /usr/local/etc/clamd.conf
Summary: security/clamav clamd will not run as root if the option is set in /usr/local...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-18 23:00 UTC by ddrinnon
Modified: 2020-06-17 10:04 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yasu)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ddrinnon 2019-03-18 23:00:05 UTC
clamd will not run as root if 

User root

is set in /usr/local/etc/clamd.conf.  It seems this is because /usr/local/etc/rc.d/clamav-clamd sets the default user as clamav.  The only way to set clamd to run as root is to add

clamav_clamd_user="root"

in /etc/rc.conf and then the User <username> line in clamd.conf is honored.

The line in /usr/local/etc/rc.d/clamav-clamd:

: ${clamav_clamd_user="clamav"}

can alse be commented out and then the User root line in clamd.conf is honored.

Not sure when the rc.conf option was added, but it doesn't seem to be documented anywhere.  Please bring back the original behavior.
Comment 1 Li-Wen Hsu freebsd_committer 2020-06-17 10:04:10 UTC
ping maintainer again.