From aa9c895a415a544fcd5cb2debe5f2d91cc6aa721 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 14 Dec 2005 18:01:18 +0000 Subject: [PATCH] Bug 138355. Delay persistence until home directory is created. prevent closing session prematurely (pam_sscs.c) --- CASA.changes | 6 ++++++ c_micasad/cache/SecretStore.cs | 8 ++++++++ login_capture/PAM/pam_sscs.c | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CASA.changes b/CASA.changes index f098d51f..bb2a395a 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 14 10:57:46 MST 2005 - jnorman@novell.com + +-Bug 138355. Delay persistence until home directory is created. + prevent closing session prematurely (pam_sscs.c) + ------------------------------------------------------------------- Wed Dec 14 10:22:46 MST 2005 - jluciani@novell.com diff --git a/c_micasad/cache/SecretStore.cs b/c_micasad/cache/SecretStore.cs index bba728f3..d2516813 100644 --- a/c_micasad/cache/SecretStore.cs +++ b/c_micasad/cache/SecretStore.cs @@ -124,6 +124,14 @@ namespace sscs.cache CSSSLogger.DbgLog("StartPersistenceByDesktopPasswd - No Home directory yet"); return false; } + else + { + if (!Directory.Exists(GetUserHomeDirectory())) + { + CSSSLogger.DbgLog("StartPersistenceByDesktopPasswd - Home directory is not created yet"); + return false; + } + } try diff --git a/login_capture/PAM/pam_sscs.c b/login_capture/PAM/pam_sscs.c index 89dccd93..7555c5da 100644 --- a/login_capture/PAM/pam_sscs.c +++ b/login_capture/PAM/pam_sscs.c @@ -202,7 +202,7 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh,int flags,int argc break; } - retVal = (*pNSSCSCloseSecretStoreCache) (ssContext,1,NULL); + retVal = (*pNSSCSCloseSecretStoreCache) (ssContext,0,NULL); if( retVal != 0 ) { pam_sscs_log(LOG_ERR,"Closing SecretStore for the user %s failed.\n",passwdEntry->pw_name);