[Pkg-sssd-devel] Bug#994825: Me Too

Troy Telford ttelford at pariahzero.net
Tue Sep 21 23:23:14 BST 2021


#!/usr/bin/env bash
# It probably does a lot more than it needs to... but I tried re-compiling sssd
# from source just in case that was the issue.
#
# Note that it deletes files in /var/lib/sss/db, and removing cache files will
# also remove all of your cached credentials.
TEMPDIR=$(mktemp -d)
chown _apt:root ${TEMPDIR}
cd ${TEMPDIR}
echo "Download source package for SSSD: "
apt-get source sssd
PACKAGES=($(cat sssd-*/debian/control | grep Package | awk '{print $2}'))
declare -a INSTALLED
declare -a HOLD
for PACKAGE in ${PACKAGES[@]}; do
    # Check what's installed vs what the sssd src package would build
    if dpkg --get-selections | grep -qE "^$PACKAGE[[:space:]]*(install|hold)$" >/dev/null; then
        HOLD+=(${PACKAGE})
        INSTALLED+=(${PACKAGE}_2.4.1-2_amd64.deb)
        if [[ ! -f ${PACKAGE}_2.4.1-2_amd64.deb ]]; then
            curl -O https://mirrors.xmission.com/debian/pool/main/s/sssd/${PACKAGE}_2.4.1-2_amd64.deb
        fi
    fi
done
clear
echo "Packages are in ${TEMPDIR}; you will need to clean it up manually."
echo
echo "You will need to remove the old sssd cache by executing:"
echo "# rm /var/lib/sss/db/cache_*"
echo
echo "Once you've done that, you can re-install the old versions using"
echo "# dpkg -i ${INSTALLED[@]}"
echo
echo "Finally, hold the old version using:"
echo "# apt-mark hold ${HOLD[@]}"                                                                               
echo 
echo "You will need to 'apt-mark unhold ${HOLD[@]}' once this bug is fixed.



More information about the Pkg-sssd-devel mailing list