From f3b81bb59566e6ded787f0485968bd9a8ff7d435 Mon Sep 17 00:00:00 2001 From: Justin Anderson Date: Wed, 29 Oct 2008 19:36:06 +0000 Subject: [PATCH] KerberosAgent hangs changing pw for passwordless identities Trying to change the password for an identity which only uses non-password authentication methods left KerberosAgent with a spinning progress indicator. Problem was with auth sheet not being ended. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20935 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kim/agent/mac/AuthenticationController.h | 2 ++ src/kim/agent/mac/AuthenticationController.m | 5 +++++ src/kim/agent/mac/IPCClient.m | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/kim/agent/mac/AuthenticationController.h b/src/kim/agent/mac/AuthenticationController.h index 3b223f760..b443d8a73 100644 --- a/src/kim/agent/mac/AuthenticationController.h +++ b/src/kim/agent/mac/AuthenticationController.h @@ -100,6 +100,8 @@ - (IBAction) cancelTicketOptions: (id) sender; - (IBAction) saveTicketOptions: (id) sender; +- (IBAction) cancelAuthSheet: (id) sender; + - (void) authSheetDidEnd: (NSWindow *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo; diff --git a/src/kim/agent/mac/AuthenticationController.m b/src/kim/agent/mac/AuthenticationController.m index de49b11de..07449f876 100644 --- a/src/kim/agent/mac/AuthenticationController.m +++ b/src/kim/agent/mac/AuthenticationController.m @@ -514,6 +514,11 @@ [NSApp endSheet:ticketOptionsSheet]; } +- (IBAction) cancelAuthSheet: (id) sender +{ + [NSApp endSheet:[self window]]; +} + - (void) authSheetDidEnd: (NSWindow *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo diff --git a/src/kim/agent/mac/IPCClient.m b/src/kim/agent/mac/IPCClient.m index 8b9eb2194..53a7fe540 100644 --- a/src/kim/agent/mac/IPCClient.m +++ b/src/kim/agent/mac/IPCClient.m @@ -144,6 +144,10 @@ enum krb_agent_client_state { [self.currentInfo addEntriesFromDictionary:info]; self.state = ipc_client_state_select; + if ([[self.authController window] isVisible]) { + [self.authController cancelAuthSheet:nil]; + } + [self.selectController setContent:self.currentInfo]; [self.selectController showWindow:nil]; -- 2.26.2