Bug 629914

Summary: Bacula daemons do not drop privileges
Product: Red Hat Enterprise Linux 6 Reporter: Jan Görig <jgorig>
Component: baculaAssignee: Jan Görig <jgorig>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: medium    
Version: 6.1CC: andreas, a.rogge, dnovotny, fschwarz, gwync, jgorig, mmcgrath, rvokal, vanmeeuwen+fedora
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 629697 Environment:
Last Closed: 2010-11-11 13:36:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 629697    
Bug Blocks:    

Description Jan Görig 2010-09-03 09:22:53 UTC
+++ This bug was initially created as a clone of Bug #629697 +++

Description of problem:
usually the bacula services (especially the director and the storage daemon) are not run as root. In the SPECfile's configure user and group are set to bacula (which is good). However, this only affects the upstream init scripts that aren'nt used in Fedora.
The Fedora scripts provide no way to make bacula-dir and bacula-sd drop privileges.

Version-Release number of selected component (if applicable):
bacula-5.0.1-1.fc13.src.rpm
bacula-5.0.2-5.fc13.src.rpm

How reproducible:
always

Steps to Reproduce:
1. install a storage daemon or director
2. start
3. ps auxwww | grep bacula
  
Actual results:
bacula-dir and bacula-sd run as root

Expected results:
bacula-dir and bacula-sd should run as bacula

Additional info:
The fedora init scripts don't work as expected for bacula as they practically ignore /etc/sysconfig/bacula.
Please have a look at the upstream supplied initscripts that read /etc/sysconfig/bacula and support configuration of uid and gid through DIR_USER, DIR_GROUP, SD_USER, SD_GROUP, FD_USER and FD_GROUP and try to make yours at least a bit compatible to that.
It would probably also make sense to change the default group for bacula-sd from "bacula" to "disk" so writing to tapes works out of the box.
(writing to tapes currently works out of the box, because the SD does not drop privileges).

--- Additional comment from a.rogge on 2010-09-02 20:24:54 CEST ---

I just confirmed that this issue is also present in the RHEL 6 Beta as bacula-3.0.2-8.el6.src.rpm uses the same initscripts

Comment 1 Jan Görig 2010-11-11 13:36:57 UTC

*** This bug has been marked as a duplicate of bug 651786 ***