[pkg-bacula-commits] [bacula] 01/01: Merge branch 'migrate-files' into systemd-fixuser
Sven Hartge
hartge-guest at moszumanska.debian.org
Sat Sep 3 18:18:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
hartge-guest pushed a commit to branch systemd-fixuser
in repository bacula.
commit 2c96941eeb8cb7c5e20627db6ce037ad8dea9b5d
Merge: 8c721b6 f09f5b4
Author: Sven Hartge <sven at svenhartge.de>
Date: Sat Sep 3 20:17:57 2016 +0200
Merge branch 'migrate-files' into systemd-fixuser
debian/TODO | 17 ++---
debian/additions/common-functions.dpkg | 10 +--
debian/bacula-common.preinst | 10 ---
debian/bacula-console-qt.postinst | 51 +++------------
debian/bacula-console-qt.postrm | 59 ++++++++++++++++--
debian/bacula-console.postinst | 20 ++----
debian/bacula-console.postrm | 59 +++++++++++++++---
debian/bacula-director-db.postinst.in | 109 ++++++++++-----------------------
debian/bacula-director-db.postrm.in | 40 ------------
debian/bacula-director.postinst | 13 ++++
debian/bacula-director.postrm | 88 ++++++++++++++------------
debian/bacula-fd.postinst | 58 +++---------------
debian/bacula-fd.postrm | 86 ++++++++++++++++----------
debian/bacula-sd.postinst | 54 +++-------------
debian/bacula-sd.postrm | 85 +++++++++++++++----------
debian/bacula.postinst | 36 -----------
debian/changelog | 11 +++-
debian/scripts/libpostrm.inc.sh | 40 ++++++++++++
18 files changed, 392 insertions(+), 454 deletions(-)
diff --cc debian/additions/common-functions.dpkg
index 160cb3a,247dee1..b4d76a1
--- a/debian/additions/common-functions.dpkg
+++ b/debian/additions/common-functions.dpkg
@@@ -166,13 -166,12 +166,9 @@@ setup_etc_default()
;;
bacula-sd)
SERVICE="bacula-sd"
- ARGS="-u bacula -g tape"
;;
- bacula-director-pgsql|bacula-director-mysql|bacula-director-sqlite3)
+ bacula-director)
SERVICE="bacula-dir"
- if ucfq -w "/etc/default/bacula-dir" \
- |egrep -q '^[^:]*:bacula-director-(pgsql|mysql|sqlite3):'; then
- UCFR_ARGS="-f"
- fi
- ARGS="-u bacula -g bacula"
;;
*)
echo "setup_defaults: unknown package \"$1\"" >&2
diff --cc debian/bacula-fd.postinst
index 3de1760,5d1231f..113f411
--- a/debian/bacula-fd.postinst
+++ b/debian/bacula-fd.postinst
@@@ -35,42 -13,14 +13,24 @@@ setup_etc_default bacula-fd $
case "$1" in
configure)
-
- if [ ! -f $DSTDIR/$CONFIG ]; then
- TARGET=$DSTDIR/$CONFIG
- else
- TARGET=$DSTDIR/$CONFIG.dist
+ if [ ! -f $TARGET ]; then
+ install -m 640 -o root -g bacula $SRCDIR/$CONFIG $TARGET
+ sed -e s~@debian_hostname@~`hostname`~ \
+ -e s~XXX_FDPASSWORD_XXX~$FDPASSWD~ \
+ -e s~XXX_MONFDPASSWORD_XXX~$FDMPASSWD~ \
+ -i $TARGET
fi
-
- sed -e s~@debian_hostname@~`hostname`~ \
- -e s~XXX_FDPASSWORD_XXX~$FDPASSWD~ \
- -e s~XXX_MONFDPASSWORD_XXX~$FDMPASSWD~ < $SRCDIR/$CONFIG > $TARGET
+
-
- # Harden permissions, so that passwords can not be looked at
- chown root:root $TARGET
- chmod 640 $TARGET
-
+ # If we have setcap installed, try setting cap_dac_read_search+ep,
+ # which allows running bacula-fd as non-root.
+ if command -v setcap > /dev/null; then
+ if ! setcap cap_dac_read_search+ep /usr/sbin/bacula-fd; then
- echo "Setcap failed on /usr/sbin/bacula-fd, running bacula-fd as non-root not possible" >&2
++ echo "setcap failed on /usr/sbin/bacula-fd, running bacula-fd as non-root not possible" >&2
+ fi
+ else
- echo "Setcap is not installed, running bacula-fd as non-root not possible" >&2
++ echo "setcap is not installed, running bacula-fd as non-root not possible" >&2
+ fi
-
;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
esac
# dh_installdeb will replace this with shell code automatically
diff --cc debian/changelog
index dd80c0b,68872f2..7df85cb
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,21 -1,13 +1,28 @@@
+bacula (7.4.3+dfsg-5~fixuser1) UNRELEASED; urgency=medium
+
+ [ Sven Hartge ]
+ * Remove configuration option to change runtime user for director
+ and storage daemon. This was broken never really possible without
+ recompiling the package in the first place.
+ * Add capability cap_dac_read_search to bacula-fd, making it possible
+ to run as non-root
+ * change bacula-fd init-script and systemd unit to be able to run as
+ non-root (Closes: #699149)
+ * README.Debian contains documentation on how to enable this feature,
+ if needed
+
+ -- Sven Hartge <sven at svenhartge.de> Tue, 18 Jul 2016 23:59:59 +0200
+
bacula (7.4.3+dfsg-5) unstable; urgency=medium
+ Continue reorganisation of packages:
+
* Don't delete all of /etc/bacula when purging bacula-common
+ * Rewrote most of the postrm scripts
+ * /etc/default/bacula-dir is now handled in bacula-director
+ * Cleanup of postinst scripts, safer password handling,
+ no longer create unneeded .dist files of config files (Closes: #493092)
+ * deleted obsolete code from various places in debian/*
--
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list