From: Jeffrey Altman Date: Tue, 27 Jul 2004 00:14:42 +0000 (+0000) Subject: afslogon-20040726 X-Git-Tag: openafs-devel-1_3_66~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3c402009821570b840641be6afe261f1187f0da3;p=packages%2Fo%2Fopenafs.git afslogon-20040726 Only display the "Integrated Login failed" message box if Integrated Login is in fact being used. --- diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index 32e358dd9..7216f684d 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -729,22 +729,21 @@ DWORD APIENTRY NPLogonNotify( if (code) { char msg[128]; + HANDLE h; + char *ptbuf[1]; StringCbPrintf(msg, sizeof(msg), "Integrated login failed: %s", reason); - if (interactive && !opt.failSilently) + if (ISLOGONINTEGRATED(opt.LogonOption) && interactive && !opt.failSilently) MessageBox(hwndOwner, msg, "AFS Logon", MB_OK); - else { - HANDLE h; - char *ptbuf[1]; - - h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME); - ptbuf[0] = msg; - ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1008, NULL, - 1, 0, ptbuf, NULL); - DeregisterEventSource(h); - } - code = MapAuthError(code); + + h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME); + ptbuf[0] = msg; + ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1008, NULL, + 1, 0, ptbuf, NULL); + DeregisterEventSource(h); + + code = MapAuthError(code); SetLastError(code); if (ISLOGONINTEGRATED(opt.LogonOption) && (code!=0))