Bug 629697

Summary: Bacula daemons do not drop privileges
Product: [Fedora] Fedora Reporter: Andreas Rogge <a.rogge>
Component: baculaAssignee: Andreas Thienemann <andreas>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 13CC: andreas, dnovotny, fschwarz, jgorig, limburgher, mmcgrath, rvokal, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 629914 (view as bug list) Environment:
Last Closed: 2011-04-28 03:20:10 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 629914    

Description Andreas Rogge 2010-09-02 14:18:06 EDT
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):

How reproducible:

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).
Comment 1 Andreas Rogge 2010-09-02 14:24:54 EDT
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 2 Fedora Update System 2010-11-24 12:34:45 EST
bacula-5.0.3-1.fc14 has been submitted as an update for Fedora 14.
Comment 3 Fedora Update System 2010-11-24 12:48:14 EST
bacula-5.0.3-1.fc13 has been submitted as an update for Fedora 13.
Comment 4 Jan Görig 2010-11-24 12:49:27 EST
Update for F13 and F14 contains only changed init files with ability to take user configuration from /etc/sysconfig/bacula*. Default user for running Bacula is changed in Rawhide.
Comment 5 Andreas Rogge 2010-11-25 07:26:46 EST
Chaging the user and group of an existing installation with an RPM upgrade is dangerous. For example Log- and Statusfiles that were written before the upgrade (as root) won't be writable by the daemons (now running as bacula) after the upgrade anymore

I'd suggest to add somethings to the Release Notes for F15 and make sure the user and group settings are not silently changed during a package update.
Comment 6 Jan Görig 2010-11-25 07:36:39 EST
Yes, we are aware of this problem. This change will never go through ordinary update in stable release of Fedora. It will come with upgrade to F15 and it will be mentioned in its Release Notes.
Comment 7 Fedora Update System 2011-01-06 14:26:04 EST
bacula-5.0.3-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2011-01-06 14:28:05 EST
bacula-5.0.3-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Jan Görig 2011-04-28 03:20:10 EDT
The change is mentioned in Release Notes. Closing.