diff options
author | Marc Schiffbauer <mschiff@gentoo.org> | 2022-12-11 02:30:19 +0800 |
---|---|---|
committer | Marc Schiffbauer <mschiff@gentoo.org> | 2022-12-11 02:31:35 +0800 |
commit | 36e288262d4a9993fe3528ca913f174cdd4de0f3 (patch) | |
tree | a38411482094370a6867cdd5d250dae37097073d | |
parent | sci-libs/mkl: add convenience symlink without version number (diff) | |
download | gentoo-36e288262d4a9993fe3528ca913f174cdd4de0f3.tar.gz gentoo-36e288262d4a9993fe3528ca913f174cdd4de0f3.tar.bz2 gentoo-36e288262d4a9993fe3528ca913f174cdd4de0f3.zip |
app-backup/bareos: improve openrc init scripts
Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
-rw-r--r-- | app-backup/bareos/files/bareos-dir.initd | 4 | ||||
-rw-r--r-- | app-backup/bareos/files/bareos-sd.initd | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app-backup/bareos/files/bareos-dir.initd b/app-backup/bareos/files/bareos-dir.initd index 0bb566582f4c..a2986d133cc3 100644 --- a/app-backup/bareos/files/bareos-dir.initd +++ b/app-backup/bareos/files/bareos-dir.initd @@ -8,6 +8,10 @@ depend() { start_pre() { checkpath --directory --owner root:bareos --mode 01775 /run/bareos + if [[ -e /run/bareos/bareos-dir.9101.pid && $(stat -c %U /run/bareos/bareos-dir.9101.pid) != "root" ]]; then + eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)" + exit 1 + fi } start_post() { diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd index 222dc95f47d5..a4a45343d137 100644 --- a/app-backup/bareos/files/bareos-sd.initd +++ b/app-backup/bareos/files/bareos-sd.initd @@ -8,6 +8,10 @@ depend() { start_pre() { checkpath --directory --owner root:bareos --mode 01775 /run/bareos + if [[ -e /run/bareos/bareos-sd.9103.pid && $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then + eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)" + exit 1 + fi } start_post() { |