mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
afslogon-20040726
Only display the "Integrated Login failed" message box if Integrated Login is in fact being used.
This commit is contained in:
parent
06634de349
commit
3c40200982
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user