From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id ACFD960340 for ; Tue, 1 Sep 2020 16:50:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 95505A58F for ; Tue, 1 Sep 2020 16:50:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4B966A587 for ; Tue, 1 Sep 2020 16:50:25 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 196D5449A9 for ; Tue, 1 Sep 2020 16:50:25 +0200 (CEST) From: Stefan Reiter To: pbs-devel@lists.proxmox.com Date: Tue, 1 Sep 2020 16:50:18 +0200 Message-Id: <20200901145018.4557-1-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.049 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup] d/postinst: always fixup termproxy user id and for all users X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 14:50:56 -0000 Anyone with a PAM account and Sys.Console access could have started a termproxy session, adapt the regex. Always test for broken entries and run the sed expression to make sure eventually all occurences of the broken syntax are fixed. Signed-off-by: Stefan Reiter --- debian/postinst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/postinst b/debian/postinst index 9ab78798..adf49da6 100644 --- a/debian/postinst +++ b/debian/postinst @@ -15,11 +15,10 @@ 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@pam: /' /var/log/proxmox-backup/tasks/active - fi + # FIXME: Remove in future version once we're sure no broken entries remain in anyone's files + if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then + 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@pam: /' /var/log/proxmox-backup/tasks/active fi ;; -- 2.20.1