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, gwync, jgorig, mmcgrath, rvokal, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 629914 (view as bug list) Environment:
Last Closed: 2011-04-28 07:20:10 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:    
Bug Blocks: 629914    

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

Comment 1 Andreas Rogge 2010-09-02 18:24:54 UTC
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 17:34:45 UTC
bacula-5.0.3-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/bacula-5.0.3-1.fc14

Comment 3 Fedora Update System 2010-11-24 17:48:14 UTC
bacula-5.0.3-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/bacula-5.0.3-1.fc13

Comment 4 Jan Görig 2010-11-24 17:49:27 UTC
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 12:26:46 UTC
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 12:36:39 UTC
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 19:26:04 UTC
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 19:28:05 UTC
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 07:20:10 UTC
The change is mentioned in Release Notes. Closing.