[evolution-patches] patch for changes done mail and camel for remebering passwords across components



Hi,
The attached patch contains changes done to some files under camel and
mail for using the remembered password across components. I have a
defined CAMEL_PROVIDER_CONF_HIDDEN and used it in groupwise provider to
set the auth-domain value in imap url which imap provider uses while
remembering passwords.
Thanks for Michael Zucchi for all the help provided.

Thanks,
Siva
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2141
diff -u -r1.2141 ChangeLog
--- camel/ChangeLog	21 May 2004 09:08:09 -0000	1.2141
+++ camel/ChangeLog	21 May 2004 12:34:27 -0000
@@ -1,3 +1,14 @@
+2004-05-21  Sivaiah Nallagatla <snallagatla novell com>
+
+	* camel-provider.h : added CAMEL_PROVIDER_CONF_HIDDEN to 
+	 conf item type enum. This is used by groupwise provider
+	* providers/groupwise/camel-groupwise-provider.c : Added CAMEL_PROVIDER_CONF_HIDDEN
+	to groupwise_conf_entries to pass the auth-domain value
+	* providers/imap/camel-imap-store.c (imap_auth_loop) : read the auth-domain
+	property from imap url and pass it camel sesstion apis
+
+
+
 2004-05-21  Not Zed  <NotZed Ximian com>
 
 	* camel-session.c (camel_session_get_password): added a 'domain'
Index: camel/camel-provider.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-provider.h,v
retrieving revision 1.41
diff -u -r1.41 camel-provider.h
--- camel/camel-provider.h	23 Apr 2004 04:16:04 -0000	1.41
+++ camel/camel-provider.h	21 May 2004 12:34:27 -0000
@@ -120,6 +120,7 @@
 	CAMEL_PROVIDER_CONF_CHECKSPIN,
 	CAMEL_PROVIDER_CONF_ENTRY,
 	CAMEL_PROVIDER_CONF_LABEL,
+	CAMEL_PROVIDER_CONF_HIDDEN
 } CamelProviderConfType;
 
 typedef struct {
Index: camel/providers/groupwise/camel-groupwise-provider.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/groupwise/camel-groupwise-provider.c,v
retrieving revision 1.9
diff -u -r1.9 camel-groupwise-provider.c
--- camel/providers/groupwise/camel-groupwise-provider.c	25 Mar 2004 04:10:27 -0000	1.9
+++ camel/providers/groupwise/camel-groupwise-provider.c	21 May 2004 12:34:27 -0000
@@ -67,7 +67,10 @@
 
 	{ CAMEL_PROVIDER_CONF_ENTRY, "soap_port", NULL,
 	  N_("Post Office Agent SOAP Port:"), "7181" },
-	
+
+	{ CAMEL_PROVIDER_CONF_HIDDEN, "auth-domain", NULL,
+	  NULL, "Groupwise" },
+	 	
 	{ CAMEL_PROVIDER_CONF_SECTION_END }, 
 
 
Index: camel/providers/imap/camel-imap-store.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-store.c,v
retrieving revision 1.291
diff -u -r1.291 camel-imap-store.c
--- camel/providers/imap/camel-imap-store.c	21 May 2004 09:08:09 -0000	1.291
+++ camel/providers/imap/camel-imap-store.c	21 May 2004 12:34:28 -0000
@@ -1226,8 +1226,10 @@
 	CamelImapResponse *response;
 	char *errbuf = NULL;
 	gboolean authenticated = FALSE;
+	const char *auth_domain;
 	
 	CAMEL_SERVICE_ASSERT_LOCKED (store, connect_lock);
+	auth_domain = camel_url_get_param (service->url, "auth-domain");
 	
 	if (store->preauthed) {
 		if (camel_verbose_debug)
@@ -1264,7 +1266,7 @@
 	while (!authenticated) {
 		if (errbuf) {
 			/* We need to un-cache the password before prompting again */
-			camel_session_forget_password (session, service, NULL, "password", ex);
+			camel_session_forget_password (session, service, auth_domain, "password", ex);
 			g_free (service->url->passwd);
 			service->url->passwd = NULL;
 		}
@@ -1278,7 +1280,7 @@
 						  service->url->user,
 						  service->url->host);
 			service->url->passwd =
-				camel_session_get_password (session, service, NULL,
+				camel_session_get_password (session, service, auth_domain,
 							    prompt, "password", CAMEL_SESSION_PASSWORD_SECRET, ex);
 			g_free (prompt);
 			g_free (errbuf);
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3341
diff -u -r1.3341 ChangeLog
--- mail/ChangeLog	21 May 2004 09:10:00 -0000	1.3341
+++ mail/ChangeLog	21 May 2004 12:34:29 -0000
@@ -1,3 +1,9 @@
+2004-05-21  Sivaiah Nallagatla <snallagatla novell com>
+	
+	* mail-account-gui.c (mail_account_gui_build_extra_conf) : added empty 
+	handling for CAMEL_PROVIDER_CONF_HIDDEN 
+	 (extract_values) : added handling for CAMEL_PROVIDER_CONF_HIDDEN
+
 2004-05-21  Not Zed  <NotZed Ximian com>
 
 	* mail-mt.c (do_call): add marshaller for p_ppppp call.
Index: mail/mail-account-gui.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-account-gui.c,v
retrieving revision 1.168
diff -u -r1.168 mail-account-gui.c
--- mail/mail-account-gui.c	20 May 2004 20:52:42 -0000	1.168
+++ mail/mail-account-gui.c	21 May 2004 12:34:30 -0000
@@ -1226,7 +1226,10 @@
 			enable_widget = hbox;
 			break;
 		}
-		
+
+		case CAMEL_PROVIDER_CONF_HIDDEN:
+			break;
+
 		case CAMEL_PROVIDER_CONF_END:
 			goto done;
 		}
@@ -1290,7 +1293,12 @@
 			camel_url_set_param (url, entries[i].name, name);
 			g_free (name);
 			break;
-			
+
+		case CAMEL_PROVIDER_CONF_HIDDEN:
+			if (entries[i].value)
+				camel_url_set_param (url, entries[i].name, entries[i].value);
+			break;
+
 		case CAMEL_PROVIDER_CONF_END:
 			return;
 			


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]