[evolution-ews] Revert "Bug #703181 - Book/calendar backends can authenticate without password"
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Revert "Bug #703181 - Book/calendar backends can authenticate without password"
- Date: Fri, 16 Aug 2013 18:01:18 +0000 (UTC)
commit d47bbcd8d0d0b3c9385c77574210b70c53119655
Author: Milan Crha <mcrha redhat com>
Date: Fri Aug 16 19:57:42 2013 +0200
Revert "Bug #703181 - Book/calendar backends can authenticate without password"
This reverts commit addcca8b5803a3abcb532f52523962fae3fa0e11.
The added ews_connection_schedule_abort (connection); at
ews_connection_try_password_sync() is not enough, the second attempt
will not work and fails to connect on the session, thus let's rather
revert this for now, because it's too early before the release, and
revisit this later. The associated API change in evolution-data-server
will not be reverted.
src/addressbook/e-book-backend-ews.c | 13 -------
src/calendar/e-cal-backend-ews.c | 13 -------
src/configuration/e-ews-config-utils.c | 9 -----
src/configuration/e-mail-config-ews-autodiscover.c | 18 +--------
.../e-mail-config-ews-delegates-page.c | 13 -------
.../e-mail-config-ews-oal-combo-box.c | 18 +--------
src/configuration/e-mail-config-ews-ooo-page.c | 16 +-------
src/server/e-ews-connection.c | 39 +-------------------
src/server/e-ews-connection.h | 3 --
9 files changed, 7 insertions(+), 135 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 27ca4dd..ca54ee9 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -3751,18 +3751,6 @@ e_book_backend_ews_dispose (GObject *object)
G_OBJECT_CLASS (e_book_backend_ews_parent_class)->dispose (object);
}
-static gboolean
-book_backend_ews_get_without_password (ESourceAuthenticator *authenticator)
-{
- EBookBackendEws *ews_backend;
- CamelEwsSettings *ews_settings;
-
- ews_backend = E_BOOK_BACKEND_EWS (authenticator);
- ews_settings = book_backend_ews_get_collection_settings (ews_backend);
-
- return e_ews_connection_util_get_authentication_without_password (ews_settings);
-}
-
static ESourceAuthenticationResult
book_backend_ews_try_password_sync (ESourceAuthenticator *authenticator,
const GString *password,
@@ -3845,7 +3833,6 @@ e_book_backend_ews_class_init (EBookBackendEwsClass *klass)
static void
e_book_backend_ews_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = book_backend_ews_get_without_password;
interface->try_password_sync = book_backend_ews_try_password_sync;
}
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 366c398..fe17ed6 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -4367,18 +4367,6 @@ e_cal_backend_ews_finalize (GObject *object)
G_OBJECT_CLASS (e_cal_backend_ews_parent_class)->finalize (object);
}
-static gboolean
-cal_backend_ews_get_without_password (ESourceAuthenticator *authenticator)
-{
- ECalBackendEws *ews_backend;
- CamelEwsSettings *ews_settings;
-
- ews_backend = E_CAL_BACKEND_EWS (authenticator);
- ews_settings = cal_backend_ews_get_collection_settings (ews_backend);
-
- return e_ews_connection_util_get_authentication_without_password (ews_settings);
-}
-
static ESourceAuthenticationResult
cal_backend_ews_try_password_sync (ESourceAuthenticator *authenticator,
const GString *password,
@@ -4528,7 +4516,6 @@ e_cal_backend_ews_class_init (ECalBackendEwsClass *class)
static void
e_cal_backend_ews_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = cal_backend_ews_get_without_password;
interface->try_password_sync = cal_backend_ews_try_password_sync;
}
diff --git a/src/configuration/e-ews-config-utils.c b/src/configuration/e-ews-config-utils.c
index 24e4a52..871cc63 100644
--- a/src/configuration/e-ews-config-utils.c
+++ b/src/configuration/e-ews-config-utils.c
@@ -262,14 +262,6 @@ struct _EEwsConfigUtilsAuthenticatorClass {
GObjectClass parent_class;
};
-static gboolean
-ews_config_utils_authenticator_get_without_password (ESourceAuthenticator *authenticator)
-{
- EEwsConfigUtilsAuthenticator *ews_authenticator = (EEwsConfigUtilsAuthenticator *) authenticator;
-
- return e_ews_connection_util_get_authentication_without_password (ews_authenticator->ews_settings);
-}
-
static ESourceAuthenticationResult
ews_config_utils_authenticator_try_password_sync (ESourceAuthenticator *auth,
const GString *password,
@@ -373,7 +365,6 @@ e_ews_config_utils_authenticator_class_init (EEwsConfigUtilsAuthenticatorClass *
static void
e_ews_config_utils_authenticator_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = ews_config_utils_authenticator_get_without_password;
interface->try_password_sync = ews_config_utils_authenticator_try_password_sync;
}
diff --git a/src/configuration/e-mail-config-ews-autodiscover.c
b/src/configuration/e-mail-config-ews-autodiscover.c
index cf5b0ab..3c6987f 100644
--- a/src/configuration/e-mail-config-ews-autodiscover.c
+++ b/src/configuration/e-mail-config-ews-autodiscover.c
@@ -246,20 +246,6 @@ mail_config_ews_autodiscover_clicked (GtkButton *button)
mail_config_ews_autodiscover_run (autodiscover);
}
-static gboolean
-mail_config_ews_autodiscover_get_without_password (ESourceAuthenticator *authenticator)
-{
- EMailConfigEwsAutodiscover *autodiscover;
- EMailConfigServiceBackend *backend;
- CamelSettings *settings;
-
- autodiscover = E_MAIL_CONFIG_EWS_AUTODISCOVER (authenticator);
- backend = e_mail_config_ews_autodiscover_get_backend (autodiscover);
- settings = e_mail_config_service_backend_get_settings (backend);
-
- return e_ews_connection_util_get_authentication_without_password (CAMEL_EWS_SETTINGS (settings));
-}
-
static ESourceAuthenticationResult
mail_config_ews_autodiscover_try_password_sync (ESourceAuthenticator *auth,
const GString *password,
@@ -335,8 +321,8 @@ e_mail_config_ews_autodiscover_class_init (EMailConfigEwsAutodiscoverClass *clas
static void
e_mail_config_ews_autodiscover_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = mail_config_ews_autodiscover_get_without_password;
- interface->try_password_sync = mail_config_ews_autodiscover_try_password_sync;
+ interface->try_password_sync =
+ mail_config_ews_autodiscover_try_password_sync;
}
static void
diff --git a/src/configuration/e-mail-config-ews-delegates-page.c
b/src/configuration/e-mail-config-ews-delegates-page.c
index e32a67c..f6c6adb 100644
--- a/src/configuration/e-mail-config-ews-delegates-page.c
+++ b/src/configuration/e-mail-config-ews-delegates-page.c
@@ -1510,18 +1510,6 @@ sort_by_display_name_cb (gconstpointer a,
return g_utf8_collate (aname, bname);
}
-static gboolean
-mail_config_ews_delegates_page_get_without_password (ESourceAuthenticator *authenticator)
-{
- EMailConfigEwsDelegatesPage *page;
- CamelSettings *settings;
-
- page = E_MAIL_CONFIG_EWS_DELEGATES_PAGE (authenticator);
- settings = mail_config_ews_delegates_page_get_settings (page);
-
- return e_ews_connection_util_get_authentication_without_password (CAMEL_EWS_SETTINGS (settings));
-}
-
static ESourceAuthenticationResult
mail_config_ews_delegates_page_try_password_sync (ESourceAuthenticator *auth,
const GString *password,
@@ -1656,7 +1644,6 @@ e_mail_config_ews_delegates_page_interface_init (EMailConfigPageInterface *inter
static void
e_mail_config_ews_delegates_page_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = mail_config_ews_delegates_page_get_without_password;
interface->try_password_sync = mail_config_ews_delegates_page_try_password_sync;
}
diff --git a/src/configuration/e-mail-config-ews-oal-combo-box.c
b/src/configuration/e-mail-config-ews-oal-combo-box.c
index a6c3142..7a03275 100644
--- a/src/configuration/e-mail-config-ews-oal-combo-box.c
+++ b/src/configuration/e-mail-config-ews-oal-combo-box.c
@@ -135,20 +135,6 @@ mail_config_ews_oal_combo_box_finalize (GObject *object)
finalize (object);
}
-static gboolean
-mail_config_ews_oal_combo_box_get_without_password (ESourceAuthenticator *authenticator)
-{
- EMailConfigEwsOalComboBox *combo_box;
- EMailConfigServiceBackend *backend;
- CamelSettings *settings;
-
- combo_box = E_MAIL_CONFIG_EWS_OAL_COMBO_BOX (authenticator);
- backend = e_mail_config_ews_oal_combo_box_get_backend (combo_box);
- settings = e_mail_config_service_backend_get_settings (backend);
-
- return e_ews_connection_util_get_authentication_without_password (CAMEL_EWS_SETTINGS (settings));
-}
-
static ESourceAuthenticationResult
mail_config_ews_oal_combo_box_try_password_sync (ESourceAuthenticator *auth,
const GString *password,
@@ -233,8 +219,8 @@ e_mail_config_ews_oal_combo_box_class_init (EMailConfigEwsOalComboBoxClass *clas
static void
e_mail_config_ews_oal_combo_box_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = mail_config_ews_oal_combo_box_get_without_password;
- interface->try_password_sync = mail_config_ews_oal_combo_box_try_password_sync;
+ interface->try_password_sync =
+ mail_config_ews_oal_combo_box_try_password_sync;
}
static void
diff --git a/src/configuration/e-mail-config-ews-ooo-page.c b/src/configuration/e-mail-config-ews-ooo-page.c
index a88b51c..acc958d 100644
--- a/src/configuration/e-mail-config-ews-ooo-page.c
+++ b/src/configuration/e-mail-config-ews-ooo-page.c
@@ -800,18 +800,6 @@ mail_config_ews_ooo_page_submit_finish (EMailConfigPage *page,
return !g_simple_async_result_propagate_error (simple, error);
}
-static gboolean
-mail_config_ews_ooo_page_get_without_password (ESourceAuthenticator *authenticator)
-{
- EMailConfigEwsOooPage *page;
- CamelSettings *settings;
-
- page = E_MAIL_CONFIG_EWS_OOO_PAGE (authenticator);
- settings = mail_config_ews_ooo_page_get_settings (page);
-
- return e_ews_connection_util_get_authentication_without_password (CAMEL_EWS_SETTINGS (settings));
-}
-
static ESourceAuthenticationResult
mail_config_ews_ooo_page_try_password_sync (ESourceAuthenticator *auth,
const GString *password,
@@ -941,8 +929,8 @@ e_mail_config_ews_ooo_page_interface_init (EMailConfigPageInterface *interface)
static void
e_mail_config_ews_ooo_page_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = mail_config_ews_ooo_page_get_without_password;
- interface->try_password_sync = mail_config_ews_ooo_page_try_password_sync;
+ interface->try_password_sync =
+ mail_config_ews_ooo_page_try_password_sync;
}
static void
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 2362eec..8a33ac3 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1417,41 +1417,6 @@ ews_connection_finalize (GObject *object)
G_OBJECT_CLASS (e_ews_connection_parent_class)->finalize (object);
}
-gboolean
-e_ews_connection_util_get_authentication_without_password (CamelEwsSettings *ews_settings)
-{
- gboolean auth_without_password;
- gchar *auth_mechanism;
-
- g_return_val_if_fail (CAMEL_IS_EWS_SETTINGS (ews_settings), FALSE);
-
- auth_mechanism = camel_network_settings_dup_auth_mechanism (
- CAMEL_NETWORK_SETTINGS (ews_settings));
-
- /* the other one is currently NTLM */
- auth_without_password = g_strcmp0 (auth_mechanism, "PLAIN") != 0;
-
- g_free (auth_mechanism);
-
- return auth_without_password;
-}
-
-static gboolean
-ews_connection_get_without_password (ESourceAuthenticator *authenticator)
-{
- CamelEwsSettings *ews_settings;
- gboolean auth_without_password;
-
- ews_settings = e_ews_connection_ref_settings (E_EWS_CONNECTION (authenticator));
- g_return_val_if_fail (ews_settings != NULL, FALSE);
-
- auth_without_password = e_ews_connection_util_get_authentication_without_password (ews_settings);
-
- g_clear_object (&ews_settings);
-
- return auth_without_password;
-}
-
static ESourceAuthenticationResult
ews_connection_try_password_sync (ESourceAuthenticator *authenticator,
const GString *password,
@@ -1498,7 +1463,6 @@ ews_connection_try_password_sync (ESourceAuthenticator *authenticator,
}
e_ews_connection_set_password (connection, NULL);
- ews_connection_schedule_abort (connection);
}
return result;
@@ -1544,7 +1508,6 @@ e_ews_connection_class_init (EEwsConnectionClass *class)
static void
e_ews_connection_authenticator_init (ESourceAuthenticatorInterface *interface)
{
- interface->get_without_password = ews_connection_get_without_password;
interface->try_password_sync = ews_connection_try_password_sync;
}
@@ -2007,7 +1970,7 @@ e_ews_connection_set_password (EEwsConnection *cnc,
memset (cnc->priv->password, 0, strlen (cnc->priv->password));
g_free (cnc->priv->password);
- cnc->priv->password = g_strdup ((password && *password) ? password : NULL);
+ cnc->priv->password = g_strdup (password);
g_mutex_unlock (&cnc->priv->password_lock);
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index db418d7..53d3fc7 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -211,9 +211,6 @@ void ews_oal_details_free (EwsOALDetails *details);
void e_ews_connection_utils_unref_in_thread
(gpointer object);
-gboolean e_ews_connection_util_get_authentication_without_password
- (CamelEwsSettings *ews_settings);
-
GType e_ews_connection_get_type (void);
EEwsConnection *e_ews_connection_new (const gchar *uri,
CamelEwsSettings *settings);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]