From: Jeffrey Altman Date: Tue, 10 Oct 2006 16:52:54 +0000 (+0000) Subject: STABLE14-windows-afscreds-20061010 X-Git-Tag: openafs-stable-1_4_2~14 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5d0ed5cc3532af4490808c129bc897cfa25180d3;p=packages%2Fo%2Fopenafs.git STABLE14-windows-afscreds-20061010 prevent a stack overflow if the afsd_service does not successfully start after a request to do so is issued. (cherry picked from commit 3c13e5f0c0423d5e724ab224af22d7d3606ef1b0) --- diff --git a/src/WINNT/client_creds/window.cpp b/src/WINNT/client_creds/window.cpp index 1d4364b27..20ed21767 100644 --- a/src/WINNT/client_creds/window.cpp +++ b/src/WINNT/client_creds/window.cpp @@ -207,20 +207,20 @@ BOOL CALLBACK Main_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp) { if (StartService (hService, 0, 0)) TestAndDoMapShare(SERVICE_START_PENDING); - if ( KFW_is_available() && KFW_AFS_wait_for_service_start() ) { + if ( KFW_is_available() && KFW_AFS_wait_for_service_start() ) { #ifdef USE_MS2MIT - KFW_import_windows_lsa(); + KFW_import_windows_lsa(); #endif /* USE_MS2MIT */ - KFW_AFS_renew_tokens_for_all_cells(); - } + KFW_AFS_renew_tokens_for_all_cells(); + } CloseServiceHandle (hService); } CloseServiceHandle (hManager); } - KFW_AFS_wait_for_service_start(); - ObtainTokensFromUserIfNeeded(g.hMain); + if (KFW_AFS_wait_for_service_start()) + ObtainTokensFromUserIfNeeded(g.hMain); } break; }