[pbs-devel] [PATCH v2 proxmox-backup 2/2] d/postinst: always fixup termproxy user id and for all users

Stefan Reiter s.reiter at proxmox.com
Tue Sep 1 14:27:28 CEST 2020


Anyone with a PAM account and Sys.Console access could have started a
termproxy session, adapt the regex.

Always run the sed expression to make sure eventually all occurences of
the broken syntax are fixed.

Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---

v2: new patch

This one is definitely necessary though, as otherwise broken entries will just
remain forever. This way they'll at least be fixed up eventually at some
upgrade (and for all users, not just root at pam).

 debian/postinst | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 9ab78798..bc414ccb 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -15,12 +15,8 @@ case "$1" in
 	fi
 	deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true
 
-	if test -n "$2"; then
-		if dpkg --compare-versions "$2" 'le' '0.8.10-1'; then
-			echo "Fixing up termproxy user id in task log..."
-			flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::root: /:termproxy::root at pam: /' /var/log/proxmox-backup/tasks/active
-		fi
-	fi
+	echo "Fixing up termproxy user id in task log..."
+	flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::\([^@]\+\): /:termproxy::\1 at pam: /' /var/log/proxmox-backup/tasks/active
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
-- 
2.20.1






More information about the pbs-devel mailing list