Skip to content

Commit

Permalink
WIP: Temporary fix for test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
yunimoo committed Aug 17, 2024
1 parent a14d572 commit 200c341
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
# platform = multi_platform_ubuntu
# packages = libpam-pkcs11

if [ ! -f /etc/pam_pkcs11/pam_pkcs11.conf ]; then
cp /usr/share/doc/libpam-pkcs11/examples/pam_pkcs11.conf.example /etc/pam_pkcs11/pam_pkcs11.conf
fi
mkdir -p /etc/pam_pkcs11
echo "cert_policy = ca,signature,ocsp_on,crl_auto;" > /etc/pam_pkcs11/pam_pkcs11.conf

if grep -v "^\s*\#+cert_policy" /etc/pam_pkcs11/pam_pkcs11.conf | grep -Eqv "crl_auto|crl_offline" ; then
sed -i "s/\(^[[:blank:]]*\)\(\(\#*[[:blank:]]*cert_policy[[:blank:]]*=[[:blank:]]*.*;\)[^ $]*\)/\1cert_policy = ca,signature,ocsp_on,crl_auto;/" /etc/pam_pkcs11/pam_pkcs11.conf
fi
# if [ ! -f /etc/pam_pkcs11/pam_pkcs11.conf ]; then
# cp /usr/share/doc/libpam-pkcs11/examples/pam_pkcs11.conf.example /etc/pam_pkcs11/pam_pkcs11.conf
# fi
#
# if grep -v "^\s*\#+cert_policy" /etc/pam_pkcs11/pam_pkcs11.conf | grep -Eqv "crl_auto|crl_offline" ; then
# sed -i "s/\(^[[:blank:]]*\)\(\(\#*[[:blank:]]*cert_policy[[:blank:]]*=[[:blank:]]*.*;\)[^ $]*\)/\1cert_policy = ca,signature,ocsp_on,crl_auto;/" /etc/pam_pkcs11/pam_pkcs11.conf
# fi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# platform = multi_platform_ubuntu
# packages = libpam-pkcs11

if [ ! -f /etc/pam_pkcs11/pam_pkcs11.conf ]; then
cp /usr/share/doc/libpam-pkcs11/examples/pam_pkcs11.conf.example /etc/pam_pkcs11/pam_pkcs11.conf
fi
mkdir -p /etc/pam_pkcs11
echo "# cert_policy = ca,signature,ocsp_on,crl_auto;" > /etc/pam_pkcs11/pam_pkcs11.conf

sed -i "/^\s*#/! s/cert_policy.*/cert_policy = ca,signature,ocsp_on;/g" /etc/pam_pkcs11/pam_pkcs11.conf

0 comments on commit 200c341

Please sign in to comment.