From ddcda60b9467d0369487cf6e7338bdcff946b51e Mon Sep 17 00:00:00 2001 From: Michael Shuler Date: Sat, 16 Oct 2021 18:09:15 +0200 Subject: Fix error on install when TEMPBUNDLE missing. Closes: #996005 [jcristau: also make the restorecon call conditional] --- debian/changelog | 7 +++++++ sbin/update-ca-certificates | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2a146c2..7b1e0bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ca-certificates (20211010) UNRELEASED; urgency=medium + + [ Michael Shuler ] + * Fix error on install when TEMPBUNDLE missing. Closes: #996005 + + -- Michael Shuler Sun, 10 Oct 2021 09:10:28 -0500 + ca-certificates (20211004) unstable; urgency=low [ Debian Janitor ] diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates index 789867f..9a876d7 100755 --- a/sbin/update-ca-certificates +++ b/sbin/update-ca-certificates @@ -187,10 +187,14 @@ then fi fi -chmod 0644 "$TEMPBUNDLE" -mv -f "$TEMPBUNDLE" "$CERTBUNDLE" -# Restore proper SELinux label after moving the file -[ -x /sbin/restorecon ] && /sbin/restorecon "$CERTBUNDLE" >/dev/null 2>&1 +# chmod and mv only if TEMPBUNDLE exists or install may fail, #996005 +if [ -f "$TEMPBUNDLE" ] +then + chmod 0644 "$TEMPBUNDLE" + mv -f "$TEMPBUNDLE" "$CERTBUNDLE" + # Restore proper SELinux label after moving the file + [ -x /sbin/restorecon ] && /sbin/restorecon "$CERTBUNDLE" >/dev/null 2>&1 +fi echo "$ADDED_CNT added, $REMOVED_CNT removed; done." -- cgit v1.2.1