aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2018-11-11 09:26:25 +0100
committerBryn M. Reeves <bmr@redhat.com>2019-03-18 20:02:58 +0000
commit22712dd4bf3ab25b68748cff955bb41fc4284ae1 (patch)
treeef2e0e3091ab458f1a05891e624c0061ba2711c0
parent5d08c705b35211f22c12b997b3c1e58a4b150503 (diff)
downloadsos-22712dd4bf3ab25b68748cff955bb41fc4284ae1.tar.gz
[smartcard] collect info about smart card readers via opensc
Inspect smart card reader information using opensc command pkcs11-tool and collect its configuration. Resolves: #1478 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/smartcard.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/sos/plugins/smartcard.py b/sos/plugins/smartcard.py
index 16d355b3..cbdd749c 100644
--- a/sos/plugins/smartcard.py
+++ b/sos/plugins/smartcard.py
@@ -19,16 +19,23 @@ class Smartcard(Plugin, RedHatPlugin):
profiles = ('security', 'identity', 'hardware')
files = ('/etc/pam_pkcs11/pam_pkcs11.conf',)
- packages = ('pam_pkcs11',)
+ packages = ('pam_pkcs11', 'pcsc-tools', 'opensc')
def setup(self):
self.add_copy_spec([
"/etc/reader.conf",
"/etc/reader.conf.d/",
- "/etc/pam_pkcs11/"])
+ "/etc/pam_pkcs11/",
+ "/etc/opensc-*.conf"
+ ])
self.add_cmd_output([
"pklogin_finder debug",
- "ls -nl /usr/lib*/pam_pkcs11/"
+ "ls -nl /usr/lib*/pam_pkcs11/",
+ "pcsc_scan",
+ "pkcs11-tool --show-info",
+ "pkcs11-tool --list-mechanisms",
+ "pkcs11-tool --list-slots",
+ "pkcs11-tool --list-objects"
])
self.add_forbidden_path("/etc/pam_pkcs11/nssdb/key[3-4].db")