[evolution-ews] Remove e_ews_connection_forget_password().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Remove e_ews_connection_forget_password().
- Date: Tue, 31 Jul 2012 17:32:08 +0000 (UTC)
commit 91942e3dfab20ab67e0e3e61221a6169742bedad
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jul 31 12:27:02 2012 -0400
Remove e_ews_connection_forget_password().
Call e_ews_connection_set_password(connection, NULL) instead.
The old password string is still zero-filled before being freed.
src/camel/camel-ews-store.c | 3 ++-
src/server/e-ews-connection.c | 24 +++---------------------
src/server/e-ews-connection.h | 2 --
3 files changed, 5 insertions(+), 24 deletions(-)
---
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 2731df0..ac3b6e8 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -264,7 +264,8 @@ ews_disconnect_sync (CamelService *service,
if (ews_store->priv->connection != NULL) {
g_signal_handlers_disconnect_by_data (
camel_service_get_settings (service), service);
- e_ews_connection_forget_password (ews_store->priv->connection);
+ e_ews_connection_set_password (
+ ews_store->priv->connection, NULL);
g_object_unref (ews_store->priv->connection);
ews_store->priv->connection = NULL;
}
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index be8537a..4edd3c3 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1247,7 +1247,7 @@ ews_connection_dispose (GObject *object)
priv->settings = NULL;
}
- e_ews_connection_forget_password (E_EWS_CONNECTION (object));
+ e_ews_connection_set_password (E_EWS_CONNECTION (object), NULL);
if (priv->jobs) {
g_slist_free (priv->jobs);
@@ -1456,9 +1456,8 @@ ews_connection_authenticate (SoupSession *sess,
g_return_if_fail (cnc != NULL);
- if (retrying) {
- e_ews_connection_forget_password (cnc);
- }
+ if (retrying)
+ e_ews_connection_set_password (cnc, NULL);
network_settings = CAMEL_NETWORK_SETTINGS (cnc->priv->settings);
user = camel_network_settings_dup_user (network_settings);
@@ -1706,23 +1705,6 @@ e_ews_connection_ref_soup_session (EEwsConnection *cnc)
return g_object_ref (cnc->priv->soup_session);
}
-void
-e_ews_connection_forget_password (EEwsConnection *cnc)
-{
- g_return_if_fail (cnc != NULL);
-
- g_mutex_lock (cnc->priv->password_lock);
-
- if (cnc->priv->password && *cnc->priv->password) {
- memset (cnc->priv->password, 0, strlen (cnc->priv->password));
- }
-
- g_free (cnc->priv->password);
- cnc->priv->password = NULL;
-
- g_mutex_unlock (cnc->priv->password_lock);
-}
-
static xmlDoc *
e_ews_autodiscover_ws_xml (const gchar *email_address)
{
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index e8b0b84..6813d46 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -190,8 +190,6 @@ CamelEwsSettings *
e_ews_connection_ref_settings (EEwsConnection *cnc);
SoupSession * e_ews_connection_ref_soup_session
(EEwsConnection *cnc);
-void e_ews_connection_forget_password
- (EEwsConnection *cnc);
EEwsConnection *e_ews_connection_find (const gchar *uri,
const gchar *username);
void e_ews_connection_queue_request (EEwsConnection *cnc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]