Blame SOURCES/pam_pkcs11-0.6.2-login_required.patch

ac2449
diff -up ./src/common/pkcs11_lib.c.login_required ./src/common/pkcs11_lib.c
ac2449
--- ./src/common/pkcs11_lib.c.login_required	2010-03-18 17:45:38.091458000 -0700
ac2449
+++ ./src/common/pkcs11_lib.c	2010-03-18 17:48:24.498131000 -0700
ac2449
@@ -662,6 +662,16 @@ int pkcs11_login(pkcs11_handle_t *h, cha
ac2449
   return (rv == SECSuccess) ? 0 : -1;
ac2449
 }
ac2449
 
ac2449
+int get_slot_login_required(pkcs11_handle_t *h)
ac2449
+{
ac2449
+  if (h->slot == NULL) {
ac2449
+    DBG("Login failed: No Slot selected");
ac2449
+    return -1;
ac2449
+  }
ac2449
+
ac2449
+  return PK11_NeedLogin(h->slot);
ac2449
+}
ac2449
+
ac2449
 int close_pkcs11_session(pkcs11_handle_t *h)
ac2449
 {
ac2449
   if (h->slot) {