Blame SOURCES/0022-compat-support-with-smartcard-lock-on-removal-smartc.patch

1756dc
From 0556b44eabdc9be59eb4fb4a72fc4e644b657ea1 Mon Sep 17 00:00:00 2001
1756dc
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
1756dc
Date: Mon, 12 Nov 2018 12:51:55 +0100
1756dc
Subject: [PATCH 04/15] compat: support with-smartcard-lock-on-removal
1756dc
 (--smartcardaction=0)
1756dc
1756dc
Resolves:
1756dc
https://github.com/pbrezina/authselect/issues/110
1756dc
---
1756dc
 src/compat/authcompat.py.in.in | 7 +++++++
1756dc
 1 file changed, 7 insertions(+)
1756dc
1756dc
diff --git a/src/compat/authcompat.py.in.in b/src/compat/authcompat.py.in.in
1756dc
index accb3385ade908c07451ee4824d6b62b012ea317..666dcd0df57962a789a8882c26535d95d3e75cf2 100755
1756dc
--- a/src/compat/authcompat.py.in.in
1756dc
+++ b/src/compat/authcompat.py.in.in
1756dc
@@ -556,6 +556,13 @@ class AuthCompat:
1756dc
                 while feature in features:
1756dc
                     features.remove(feature)
1756dc
 
1756dc
+        # Add lock-on-smartcard-removal if requested
1756dc
+        if self.options.isset("smartcardaction"):
1756dc
+            if int(self.options.get("smartcardaction")) == 0:
1756dc
+                features.append("with-smartcard-lock-on-removal")
1756dc
+            else:
1756dc
+                features.remove("with-smartcard-lock-on-removal")
1756dc
+
1756dc
         # Remove duplicates. The order is not kept but that does not matter.
1756dc
         features = list(set(features))
1756dc
 
1756dc
-- 
1756dc
2.17.2
1756dc