Blame SOURCES/pam_pkcs11-0.6.2-login_required.patch

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