Bug 28630

Summary: The group "root" of files bat.conf, bconsole.conf and bacula-tray-monitor.conf located in /etc/bacula is wrong
Product: Mageia Reporter: pat dealt <pat.dealt>
Component: RPM PackagesAssignee: All Packagers <pkg-bugs>
Status: NEW --- QA Contact:
Severity: major    
Priority: High CC: j.biernacki+mga, yvesbrungard
Version: 8   
Target Milestone: ---   
Hardware: All   
OS: Linux   
See Also: https://bugs.mageia.org/show_bug.cgi?id=28633
Whiteboard:
Source RPM: bacula-bat-9.6.7-1.mga8.x86_64 bacula-console-9.6.7-1.mga8.x86_64 bacula-tray-monitor-9.6.7-1.mga8.x86_64 CVE:
Status comment:

Description pat dealt 2021-03-22 17:36:31 CET
Description of problem:

The following Bacula binaries should run with user permissions:
bat, bconsole and bacula-tray-monitor.

To do so, the associated configuration files need to have group=user (not root).
/etc/bacula/bat.conf, 
/etc/bacula/bconsole.conf and
/etc/bacula/bacula-tray-monitor.conf
Comment 1 pat dealt 2021-03-22 17:48:02 CET
bacula.spec need to be changed that way to fix the problem:

diff bacula.spec.org bacula.spec
607c607
< %config(noreplace) %{sysconf_dir}/bconsole.conf %attr(640,root,root)
---
> %config(noreplace) %{sysconf_dir}/bconsole.conf %attr(640,root,%{username})
614c614
< %config(noreplace) %{sysconf_dir}/bat.conf %attr(640,root,root)
---
> %config(noreplace) %{sysconf_dir}/bat.conf %attr(640,root,%{username})
624c624
< %attr(640,root,root)%config(noreplace) %{sysconf_dir}/bacula-tray-monitor.conf
---
> %attr(640,root,%{username})%config(noreplace) %{sysconf_dir}/bacula-tray-monitor.conf
Comment 2 Lewis Smith 2021-03-23 21:00:39 CET
Thank you for this report and your diagnosis.
This makes 3/3 bacula bugs; see also Bug 28633, Bug 28618.
Raising the priority because there are three.

As for the others, assigning this globally (no fixed maintainer).

Assignee: bugsquad => pkg-bugs
Priority: Normal => High

Comment 3 papoteur 2022-02-20 10:41:22 CET
Hello pat,
Even if the problem is real, the solution can't be this one. The group shouldn't depend of who does the installation or compilation.
What is the problem when bat, bconsole and bacula-tray-monitor are run with user privileges?

CC: (none) => yves.brungard_mageia

Comment 4 Jybz 2022-02-20 10:55:01 CET
Hello all!

For papoteur, the macro %username can be renamed to %bacula_user if it makes more sense.
The suggested solution change the group of the file to the user bacula generated line 444 of the spec.

No problem on my side, but I've a question, why not changing the owner to bacula also ?

CC: (none) => j.biernacki+mga

Comment 5 pat dealt 2022-03-09 18:00:30 CET
The problem is real.

Without this fix or another fix, launching bat, bconsole or bacula-tray-monitor
leads to a crash.

As mentionned earlier, I feel nobodyelse than me uses bacula on Mageia.

It doesn't work at all and after fixes reported in reports 28630, 28633, 28618, it is usable.

For me the group and user are supposed to be "bacula" and I agree with Jybz comment (4), the user should be changed too.
Comment 6 Jybz 2022-03-09 19:55:54 CET
Hello, I can't promess, but I will try to have a look this weekend on it.
Thank you very much Pat for your work
Morgan Leijström 2022-09-24 12:18:47 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=28633