Blob Blame History Raw
From 81de5acd2ce27592b724ab564ed3ade6ed3d68eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Tue, 4 Sep 2018 11:51:20 +0200
Subject: [PATCH 7/7] spec: fix invalid options in pwquality.conf generated by
 compat tool

---
 rpm/authselect.spec.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/rpm/authselect.spec.in b/rpm/authselect.spec.in
index 70af91e16c72478e5e5bba0b4f59df86b66fb99f..6887d1d16724412de8abfd5b872e5ecfc93e5ba5 100644
--- a/rpm/authselect.spec.in
+++ b/rpm/authselect.spec.in
@@ -219,6 +219,14 @@ fi

 exit 0

+%posttrans compat
+# Fix for RHBZ#1618865
+# Remove invalid lines from pwquality.conf generated by authconfig compat tool
+# - previous version could write some options without value, which is invalid
+# - we delete all options without value from existing file
+sed -i -E '/^\w+=$/d' %{_sysconfdir}/security/pwquality.conf.d/10-authconfig-pwquality.conf &> /dev/null
+exit 0
+
 %changelog
 * Thu Feb 22 2018 Pavel Březina <pbrezina@redhat.com> - @PACKAGE_VERSION@-@RELEASE_NUMBER@
 - Do not use change log for rpm generated from source
--
2.17.1