[gnome-keyring] [gkm] Fix warning that occurs when screensaver unlocks daemon.



commit a8fc026cdf2b1a47ec4d0ea8517c86199dd8b6cd
Author: Stef Walter <stef memberwebs com>
Date:   Sun Aug 8 09:31:21 2010 +0200

    [gkm] Fix warning that occurs when screensaver unlocks daemon.
    
     * Fix return error code from C_Login to appropriate code when
       another user type is logged in.

 pkcs11/gkm/gkm-module.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pkcs11/gkm/gkm-module.c b/pkcs11/gkm/gkm-module.c
index 0ce3289..8b27c5a 100644
--- a/pkcs11/gkm/gkm-module.c
+++ b/pkcs11/gkm/gkm-module.c
@@ -1318,8 +1318,10 @@ gkm_module_C_Login (GkmModule *self, CK_SESSION_HANDLE handle, CK_USER_TYPE user
 	apt = lookup_apartment (self, apt_id);
 	g_return_val_if_fail (apt, CKR_GENERAL_ERROR);
 
-	if (apt->logged_in != CKU_NONE)
+	if (apt->logged_in == user_type)
 		return CKR_USER_ALREADY_LOGGED_IN;
+	if (apt->logged_in != CKU_NONE)
+		return CKR_USER_ANOTHER_ALREADY_LOGGED_IN;
 
 	if (user_type == CKU_SO) {
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]