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 C35B460217 for ; Tue, 1 Sep 2020 14:28:14 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B7C5E928C for ; Tue, 1 Sep 2020 14:27:44 +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 5211B9477 for ; Tue, 1 Sep 2020 14:27:43 +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 1DB7E449AA for ; Tue, 1 Sep 2020 14:27:43 +0200 (CEST) From: Stefan Reiter To: pbs-devel@lists.proxmox.com Date: Tue, 1 Sep 2020 14:27:28 +0200 Message-Id: <20200901122728.12566-2-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200901122728.12566-1-s.reiter@proxmox.com> References: <20200901122728.12566-1-s.reiter@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.050 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 v2 proxmox-backup 2/2] 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 12:28:14 -0000 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 --- 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@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@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@pam: /' /var/log/proxmox-backup/tasks/active ;; abort-upgrade|abort-remove|abort-deconfigure) -- 2.20.1