Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832805 - app-backup/bareos-21.0.0-r1 security fix breaks installation (permission denied)
Summary: app-backup/bareos-21.0.0-r1 security fix breaks installation (permission denied)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-06 13:01 UTC by Plüss Roland
Modified: 2022-02-12 14:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Plüss Roland 2022-02-06 13:01:56 UTC
Updating to app-backup/bareos-21.0.0-r1 causes bareos installation to break and become unusable. Reason is this error:

/etc/init.d/bareos-sd start
 * Starting bareos storage daemon ...
chown: Zugriff auf '/run/bareos/bareos-sd.9103.pid' nicht möglich: Datei oder Verzeichnis nicht gefunden                                           [ !! ]
 * ERROR: bareos-sd failed to start

This happens for all bareos daemons.

Upon inspecting the init files you see these lines:

# g+w until #631598 is resolved
checkpath -d -m 0770 -o root:bareos /run/bareos
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd -- ${SD_OPTIONS}
# harden pid file until #631598 is resolved
ewaitfile 10 /run/bareos/bareos-sd.9103.pid
chown root:bareos /run/bareos/bareos-sd.9103.pid

The checkpath line changes permissions to:

drwxrwx--- root bareos => /run/bareos

Which seems correct. But there is no run file in this directory causing the following chown line to fail.

But bareos-sd is running confirming with "ps". The start script thinks bareos is not running any everything breaks.

Has the new package moved the run file somehow and forgot to update a config?
Comment 1 Marc Schiffbauer gentoo-dev 2022-02-07 07:09:35 UTC
Hi Roland,

thanks for reporting!

A fix is underway in will be in the tree very soon.
Comment 2 Larry the Git Cow gentoo-dev 2022-02-07 07:30:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9aa2491329e3b770bfa24a8139c8fde245f1867

commit f9aa2491329e3b770bfa24a8139c8fde245f1867
Author:     Marc Schiffbauer <mschiff@gentoo.org>
AuthorDate: 2022-02-07 07:23:25 +0000
Commit:     Marc Schiffbauer <mschiff@gentoo.org>
CommitDate: 2022-02-07 07:30:14 +0000

    app-backup/bareos: fix pid file creation
    
    Closes: https://bugs.gentoo.org/832805
    Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>

 ...eos-21.0.0-r1.ebuild => bareos-21.0.0-r2.ebuild} | 11 +++--------
 app-backup/bareos/files/bareos-dir-21.confd         |  2 +-
 app-backup/bareos/files/bareos-dir-21.initd         | 17 ++++-------------
 app-backup/bareos/files/bareos-fd-21.confd          |  7 +++++++
 app-backup/bareos/files/bareos-fd-21.initd          | 21 +++++++++++++++++++++
 app-backup/bareos/files/bareos-sd-21.confd          | 10 ++++++++++
 app-backup/bareos/files/bareos-sd-21.initd          | 21 +++++++++++++++++++++
 7 files changed, 67 insertions(+), 22 deletions(-)
Comment 3 Marc Schiffbauer gentoo-dev 2022-02-07 07:31:45 UTC
Hi Roland,

please report back and reopen if you still have any issue with this.

Thanks!
Comment 4 Plüss Roland 2022-02-12 14:57:50 UTC
Sorry for the waiting but I had been busy (who is not :D).

The fix looks good so far. Starting and stopping works so I think this ticket is resolved.