[pkg-opensc-commit] [opensc] 149/295: remove all login states when the token was removed

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 7e6dc25c400d25e511a3aa0065571adf672508a4
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Fri Sep 2 02:05:34 2016 +0200

    remove all login states when the token was removed
---
 src/pkcs11/pkcs11-global.c | 1 -
 src/pkcs11/slot.c          | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pkcs11/pkcs11-global.c b/src/pkcs11/pkcs11-global.c
index 9af60e3..11a49ac 100644
--- a/src/pkcs11/pkcs11-global.c
+++ b/src/pkcs11/pkcs11-global.c
@@ -316,7 +316,6 @@ CK_RV C_Finalize(CK_VOID_PTR pReserved)
 
 	while ((slot = list_fetch(&virtual_slots))) {
 		list_destroy(&slot->objects);
-		pop_all_login_states(slot);
 		list_destroy(&slot->logins);
 		free(slot);
 	}
diff --git a/src/pkcs11/slot.c b/src/pkcs11/slot.c
index b56590c..45be6d4 100644
--- a/src/pkcs11/slot.c
+++ b/src/pkcs11/slot.c
@@ -449,6 +449,7 @@ CK_RV slot_token_removed(CK_SLOT_ID id)
 	/* Reset relevant slot properties */
 	slot->slot_info.flags &= ~CKF_TOKEN_PRESENT;
 	slot->login_user = -1;
+	pop_all_login_states(slot);
 	slot->p11card = NULL;
 
 	if (token_was_present)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list