From 51d55c03dc944c353fed8630dd93405e0e1221bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 18 Jul 2015 15:05:15 +0200 Subject: [PATCH] debian: fix permissions of /var/lib/qubes/dom0-updates qubesos/qubes-issues#1029 --- debian/qubes-core-agent.postinst | 4 ++++ debian/qubes-core-agent.postrm | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/debian/qubes-core-agent.postinst b/debian/qubes-core-agent.postinst index 1e14dfd..7210d05 100755 --- a/debian/qubes-core-agent.postinst +++ b/debian/qubes-core-agent.postinst @@ -220,6 +220,10 @@ case "${1}" in chown user:user /home_volatile/user + if ! dpkg-statoverride --list /var/lib/qubes/dom0-updates >/dev/null 2>&1; then + dpkg-statoverride --update --add user user 775 /var/lib/qubes/dom0-updates + fi + dpkg-divert --divert /etc/init/serial.conf.qubes-orig --package qubes-core-agent --rename --add /etc/init/serial.conf # Enable Qubes systemd units diff --git a/debian/qubes-core-agent.postrm b/debian/qubes-core-agent.postrm index 1c0d124..c80f67b 100755 --- a/debian/qubes-core-agent.postrm +++ b/debian/qubes-core-agent.postrm @@ -48,6 +48,10 @@ if [ "${1}" = "remove" ] ; then done fi +if [ "$1" = "purge" ]; then + dpkg-statoverride --remove /var/lib/qubes/dom0-updates || test $? -eq 2 +fi + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts.