Bug 95553

Summary: security/rkhunter overwrites existing rkhunter.conf on install or upgrade
Product: Ports & Packages Reporter: Torfinn Ingolfsen <torfinn.ingolfsen>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Torfinn Ingolfsen 2006-04-09 19:50:16 UTC

The rkhunter port has a config file in /usr/local/etc/rkhunter.conf. Whenever the port is installed or upgraded, an existing rkhunter.conf file will be overwritten

Fix: 

- only install rkhunter.conf if there isn't such a file there already
- if /usr/local/etc/rkhunter.conf exists, install the new conf file as rkhunter.conf.sample
How-To-Repeat: 

1) create a dummy conf file in /usr/local/etc/rkhunter.conf. Note the details and / or contents
2) install the port with portinstall -R rkhunter, or directly with 'make install' from the port directory.

This last step also gives the same result if the port is upgraded.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-04-09 19:52:14 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Marcus Alves Grando freebsd_committer freebsd_triage 2006-04-29 01:49:29 UTC
State Changed
From-To: feedback->closed

Fixed. Thanks.
Comment 3 Torfinn Ingolfsen 2006-07-21 07:49:43 UTC
On Sat, 29 Apr 2006 00:49:29 +0000 (GMT)
Marcus Alves Grando <mnag@FreeBSD.org> wrote:

> Synopsis: security/rkhunter overwrites existing rkhunter.conf on
> install or upgrade
> 
> State-Changed-From-To: feedback->closed
> State-Changed-By: mnag
> State-Changed-When: Sat Apr 29 00:49:29 UTC 2006
> State-Changed-Why: 
> Fixed. Thanks.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=95553

I just upgraded (using portupgrade) rkhunter to version 1.2.8_2
and the bug is back - rkhunter overwrites it's config file again.
(Yes - it installa a rkhunter.conf.sample file - that is identical to
the rkhunter.conf file it installs.)
-- 
Regards, 
Torfinn Ingolfsen,
Norway