From ae84c5f5955d68733a18d07a1f9bb33e6704a967 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 22 Feb 2006 20:39:52 +0000 Subject: [PATCH] Bug 150642. Return additional error codes when store is locked --- CASA.changes | 14 +++++++++++--- c_micasacache/sscs_unx_ipc_client.c | 13 +++++++++---- c_micasad/common/Constants.cs | 3 +-- c_micasad/verbs/ReadBinaryKey.cs | 2 +- c_micasad/verbs/ReadKey.cs | 2 +- c_micasad/verbs/ReadSecret.cs | 2 +- c_micasad/verbs/WriteBinaryKey.cs | 4 ++-- c_micasad/verbs/WriteKey.cs | 4 ++-- c_micasad/verbs/WriteSecret.cs | 4 ++-- include/sscs_unx_cache_defines.h | 1 + 10 files changed, 31 insertions(+), 18 deletions(-) diff --git a/CASA.changes b/CASA.changes index 80c4aa34..ac4a02da 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,15 +1,23 @@ ------------------------------------------------------------------- -Mon Feb 21 16:25:20 MST 2006 - jnorman@novell.com +Tue Feb 22 13:33:20 MST 2006 - jnorman@novell.com +- Bug 150642. Return additional error codes when store is locked + +------------------------------------------------------------------- +Tue Feb 22 10:25:20 MST 2006 - jnorman@novell.com +- Remove build dependency on krb5-devel and libgssapi + +------------------------------------------------------------------- +Tue Feb 21 16:25:20 MST 2006 - jnorman@novell.com - Bug 141689. Windows: change mouse handler for notifyicon to mouse down event. - Bug: Windows, start service at post install. ------------------------------------------------------------------- -Mon Feb 21 12:22:17 MST 2006 - jnorman@novell.com +Tue Feb 21 12:22:17 MST 2006 - jnorman@novell.com - Bug 141651. On windows, uninstalls will kill CASAManager too. ------------------------------------------------------------------- -Mon Feb 21 12:05:17 MST 2006 - jnorman@novell.com +Tue Feb 21 12:05:17 MST 2006 - jnorman@novell.com - Bug 148945. Handle the case were micasad is restarted, before a user sets their master password diff --git a/c_micasacache/sscs_unx_ipc_client.c b/c_micasacache/sscs_unx_ipc_client.c index f7b7ec86..b71155a1 100644 --- a/c_micasacache/sscs_unx_ipc_client.c +++ b/c_micasacache/sscs_unx_ipc_client.c @@ -26,15 +26,14 @@ #define WINDOWS_LOGIN_ID 1 // return codes -#define MAX_RETURN_CODE 21 -int32_t static gReturnCodes[21] = { +#define MAX_RETURN_CODE 27 +int32_t static gReturnCodes[27] = { NSSCS_SUCCESS, //SSCS_REPLY_SUCCESS 0 NSSCS_E_INVALID_PARAM, //SSCS_E_INVALID_MESSAGE -1 NSSCS_E_INCOMPATIBLE_VERSION, //SSCS_E_VERSION_NOT_SUPPORTED -2 NSSCS_E_SYSTEM_FAILURE, //SSCS_E_SYSTEM_ERROR -3 NSSCS_E_SERVICE_NOT_SUPPORTED, //SSCS_E_REPLY_NOT_AVAILABLE -4 - NSSCS_E_INVALID_SECRET_ID, // REQUIRES New - //SSCS_E_INVALID_KEYCHAIN -5 + NSSCS_E_INVALID_SECRET_ID, // REQUIRES New SSCS_E_INVALID_KEYCHAIN -5 NSSCS_E_INVALID_SECRET_ID, //SSCS_E_INVALID_SECRETID -6 NSSCS_E_SECRET_ID_EXISTS, // REQUIRES NEW -//SSCS_E_KEYCHAIN_ALREADY_EXISTS -7 NSSCS_E_SYSTEM_FAILURE, //SSCS_E_MAX_KEYCHAINS_REACHED -8 @@ -50,6 +49,12 @@ int32_t static gReturnCodes[21] = { NSSCS_E_SYSTEM_FAILURE, //SSCS_E_CREATE_SOCKET_FAILED -18 NSSCS_E_INVALID_SECRET_ID, //SSCS_E_SECRETID_DOES_NOT_EXIST -19 NSSCS_E_INVALID_PARAM, //SSCS_E_INVALID_INPUT -20 + NSSCS_E_SYSTEM_FAILURE, //SSCS_E_SETTING_PASSCODE_FAILED -21 + NSSCS_E_SYSTEM_FAILURE, //SSCS_STORE_IS_PERSISTENT -22; + NSSCS_E_SYSTEM_FAILURE, //SSCS_STORE_IS_NOT_PERSISTENT = -23; + NSSCS_E_SYSTEM_FAILURE, //SSCS_SECRET_IS_PERSISTENT = -24; + NSSCS_E_SYSTEM_FAILURE, //SSCS_SECRET_IS_NOT_PERSISTENT = -25; + NSSCS_E_ACCESS_DENIED //SSCS_SECRET_STORE_IS_LOCKED = -26; }; /*----------------------------------------------------------------------------- diff --git a/c_micasad/common/Constants.cs b/c_micasad/common/Constants.cs index 58108aaf..b742fbf2 100644 --- a/c_micasad/common/Constants.cs +++ b/c_micasad/common/Constants.cs @@ -53,8 +53,7 @@ namespace sscs.constants internal static int SSCS_STORE_IS_NOT_PERSISTENT = -23; internal static int SSCS_SECRET_IS_PERSISTENT = -24; internal static int SSCS_SECRET_IS_NOT_PERSISTENT = -25; - internal static int SSCS_SECRET_STORE_IS_LOCKED = -26; - + internal static int SSCS_SECRET_STORE_IS_LOCKED = -26; } internal class ReqMsgId diff --git a/c_micasad/verbs/ReadBinaryKey.cs b/c_micasad/verbs/ReadBinaryKey.cs index 31df1247..951f3b87 100644 --- a/c_micasad/verbs/ReadBinaryKey.cs +++ b/c_micasad/verbs/ReadBinaryKey.cs @@ -135,7 +135,7 @@ namespace sscs.verbs } } else - retCode = IPCRetCodes.SSCS_E_SECRETID_DOES_NOT_EXIST; + retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED; } catch(UserNotInSessionException) diff --git a/c_micasad/verbs/ReadKey.cs b/c_micasad/verbs/ReadKey.cs index 5bb4ce4e..4779a899 100644 --- a/c_micasad/verbs/ReadKey.cs +++ b/c_micasad/verbs/ReadKey.cs @@ -136,7 +136,7 @@ namespace sscs.verbs } } else - retCode = IPCRetCodes.SSCS_E_SECRETID_DOES_NOT_EXIST; + retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED; } catch(UserNotInSessionException) diff --git a/c_micasad/verbs/ReadSecret.cs b/c_micasad/verbs/ReadSecret.cs index 52e4ff98..2aeb97cc 100644 --- a/c_micasad/verbs/ReadSecret.cs +++ b/c_micasad/verbs/ReadSecret.cs @@ -125,7 +125,7 @@ namespace sscs.verbs } } else - retCode = IPCRetCodes.SSCS_E_SECRETID_DOES_NOT_EXIST; + retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED; } catch(UserNotInSessionException) diff --git a/c_micasad/verbs/WriteBinaryKey.cs b/c_micasad/verbs/WriteBinaryKey.cs index b5f02df0..18bc39a7 100644 --- a/c_micasad/verbs/WriteBinaryKey.cs +++ b/c_micasad/verbs/WriteBinaryKey.cs @@ -218,8 +218,8 @@ namespace sscs.verbs } } else - { - // do nothing + { + retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED; } } diff --git a/c_micasad/verbs/WriteKey.cs b/c_micasad/verbs/WriteKey.cs index 856f92f4..5c8cccfd 100644 --- a/c_micasad/verbs/WriteKey.cs +++ b/c_micasad/verbs/WriteKey.cs @@ -218,8 +218,8 @@ namespace sscs.verbs } } else - { - // do nothing + { + retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED; } } diff --git a/c_micasad/verbs/WriteSecret.cs b/c_micasad/verbs/WriteSecret.cs index 417479a1..b44518ef 100644 --- a/c_micasad/verbs/WriteSecret.cs +++ b/c_micasad/verbs/WriteSecret.cs @@ -204,8 +204,8 @@ namespace sscs.verbs } } else - { - // do nothing + { + retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED; } } catch(UserNotInSessionException) diff --git a/include/sscs_unx_cache_defines.h b/include/sscs_unx_cache_defines.h index dc41bef8..99d03d49 100644 --- a/include/sscs_unx_cache_defines.h +++ b/include/sscs_unx_cache_defines.h @@ -67,6 +67,7 @@ #define SSCS_STORE_IS_NOT_PERSISTENT -23 #define SSCS_SECRET_IS_PERSISTENT -24 #define SSCS_SECRET_IS_NOT_PERSISTENT -25 +#define SSCS_STORE_IS_LOCKED -26 #define SSCS_E_INCORRECT_FUNCTION_CALL_SEQUENCE -30