|
|
@ -1,5 +1,5 @@
|
|
|
|
--- evolution-data-server-1.11.2/libedataserverui/e-passwords.h.e-passwords 2007-04-18 06:10:16.000000000 -0400
|
|
|
|
--- evolution-data-server-1.11.2/libedataserverui/e-passwords.h.e-passwords 2007-04-18 06:10:16.000000000 -0400
|
|
|
|
+++ evolution-data-server-1.11.2/libedataserverui/e-passwords.h 2007-05-18 12:03:54.000000000 -0400
|
|
|
|
+++ evolution-data-server-1.11.2/libedataserverui/e-passwords.h 2007-05-31 22:51:17.000000000 -0400
|
|
|
|
@@ -28,45 +28,65 @@
|
|
|
|
@@ -28,45 +28,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
G_BEGIN_DECLS
|
|
|
@ -98,7 +98,7 @@
|
|
|
|
G_END_DECLS
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
--- evolution-data-server-1.11.2/libedataserverui/e-passwords.c.e-passwords 2007-04-18 06:10:16.000000000 -0400
|
|
|
|
--- evolution-data-server-1.11.2/libedataserverui/e-passwords.c.e-passwords 2007-04-18 06:10:16.000000000 -0400
|
|
|
|
+++ evolution-data-server-1.11.2/libedataserverui/e-passwords.c 2007-05-18 12:03:54.000000000 -0400
|
|
|
|
+++ evolution-data-server-1.11.2/libedataserverui/e-passwords.c 2007-05-31 23:55:51.000000000 -0400
|
|
|
|
@@ -23,18 +23,29 @@
|
|
|
|
@@ -23,18 +23,29 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
@ -623,7 +623,7 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GnomeKeyringAttributeList *attributes;
|
|
|
|
GnomeKeyringAttributeList *attributes;
|
|
|
|
GnomeKeyringAttribute attribute;
|
|
|
|
GnomeKeyringAttribute attribute;
|
|
|
|
@@ -205,11 +438,8 @@
|
|
|
|
@@ -205,11 +438,8 @@ ep_clear_passwords_keyring(EPassMsg *msg
|
|
|
|
|
|
|
|
|
|
|
|
result = gnome_keyring_get_default_keyring_sync (&default_keyring);
|
|
|
|
result = gnome_keyring_get_default_keyring_sync (&default_keyring);
|
|
|
|
if (!default_keyring) {
|
|
|
|
if (!default_keyring) {
|
|
|
@ -637,7 +637,7 @@
|
|
|
|
default_keyring = g_strdup ("default");
|
|
|
|
default_keyring = g_strdup ("default");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -239,38 +469,44 @@
|
|
|
|
@@ -239,38 +469,44 @@ ep_clear_passwords_keyring(EPassMsg *msg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
g_free (default_keyring);
|
|
|
|
g_free (default_keyring);
|
|
|
@ -700,7 +700,7 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GnomeKeyringAttributeList *attributes;
|
|
|
|
GnomeKeyringAttributeList *attributes;
|
|
|
|
GnomeKeyringAttribute attribute;
|
|
|
|
GnomeKeyringAttribute attribute;
|
|
|
|
@@ -281,11 +517,8 @@
|
|
|
|
@@ -281,11 +517,8 @@ ep_forget_passwords_keyring(EPassMsg *ms
|
|
|
|
|
|
|
|
|
|
|
|
result = gnome_keyring_get_default_keyring_sync (&default_keyring);
|
|
|
|
result = gnome_keyring_get_default_keyring_sync (&default_keyring);
|
|
|
|
if (!default_keyring) {
|
|
|
|
if (!default_keyring) {
|
|
|
@ -714,7 +714,7 @@
|
|
|
|
default_keyring = g_strdup ("default");
|
|
|
|
default_keyring = g_strdup ("default");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
d(g_print("Get Default %d\n", result));
|
|
|
|
d(g_print("Get Default %d\n", result));
|
|
|
|
@@ -316,69 +549,54 @@
|
|
|
|
@@ -316,69 +549,54 @@ ep_forget_passwords_keyring(EPassMsg *ms
|
|
|
|
g_free (default_keyring);
|
|
|
|
g_free (default_keyring);
|
|
|
|
|
|
|
|
|
|
|
|
/* free up the session passwords */
|
|
|
|
/* free up the session passwords */
|
|
|
@ -811,7 +811,7 @@
|
|
|
|
guint32 item_id;
|
|
|
|
guint32 item_id;
|
|
|
|
|
|
|
|
|
|
|
|
if (!strcmp (uri->protocol, "ldap") && !uri->user) {
|
|
|
|
if (!strcmp (uri->protocol, "ldap") && !uri->user) {
|
|
|
|
@@ -419,48 +637,48 @@
|
|
|
|
@@ -419,48 +637,48 @@ ep_remember_password_keyring(EPassMsg *m
|
|
|
|
|
|
|
|
|
|
|
|
d(g_print("Remember %s: %d/%d\n", msg->key, result, item_id));
|
|
|
|
d(g_print("Remember %s: %d/%d\n", msg->key, result, item_id));
|
|
|
|
/* now remove it from our session hash */
|
|
|
|
/* now remove it from our session hash */
|
|
|
@ -890,7 +890,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_GNOME_KEYRING
|
|
|
|
#ifdef WITH_GNOME_KEYRING
|
|
|
|
@@ -472,7 +690,6 @@
|
|
|
|
@@ -472,7 +690,6 @@ ep_forget_password_keyring (EPassMsg *ms
|
|
|
|
GnomeKeyringResult result;
|
|
|
|
GnomeKeyringResult result;
|
|
|
|
GList *matches = NULL, *tmp;
|
|
|
|
GList *matches = NULL, *tmp;
|
|
|
|
char *default_keyring = NULL;
|
|
|
|
char *default_keyring = NULL;
|
|
|
@ -898,7 +898,7 @@
|
|
|
|
EUri *uri = e_uri_new (msg->key);
|
|
|
|
EUri *uri = e_uri_new (msg->key);
|
|
|
|
|
|
|
|
|
|
|
|
if (!strcmp (uri->protocol, "ldap") && !uri->user) {
|
|
|
|
if (!strcmp (uri->protocol, "ldap") && !uri->user) {
|
|
|
|
@@ -486,27 +703,17 @@
|
|
|
|
@@ -486,27 +703,17 @@ ep_forget_password_keyring (EPassMsg *ms
|
|
|
|
uri->user = keycopy;
|
|
|
|
uri->user = keycopy;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -929,7 +929,7 @@
|
|
|
|
default_keyring = g_strdup ("default");
|
|
|
|
default_keyring = g_strdup ("default");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -567,35 +774,44 @@
|
|
|
|
@@ -567,35 +774,44 @@ ep_forget_password_keyring (EPassMsg *ms
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
g_free (default_keyring);
|
|
|
|
g_free (default_keyring);
|
|
|
@ -993,7 +993,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_GNOME_KEYRING
|
|
|
|
#ifdef WITH_GNOME_KEYRING
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
@@ -605,11 +821,11 @@
|
|
|
|
@@ -605,11 +821,11 @@ ep_get_password_keyring (EPassMsg *msg)
|
|
|
|
GnomeKeyringAttributeList *attributes;
|
|
|
|
GnomeKeyringAttributeList *attributes;
|
|
|
|
GnomeKeyringAttribute attribute;
|
|
|
|
GnomeKeyringAttribute attribute;
|
|
|
|
GnomeKeyringResult result;
|
|
|
|
GnomeKeyringResult result;
|
|
|
@ -1008,7 +1008,7 @@
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
EUri *uri = e_uri_new (msg->key);
|
|
|
|
EUri *uri = e_uri_new (msg->key);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -683,287 +899,154 @@
|
|
|
|
@@ -683,287 +899,154 @@ ep_get_password_keyring (EPassMsg *msg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1386,7 +1386,7 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Set the offline-state of the application. This is a work-around
|
|
|
|
* Set the offline-state of the application. This is a work-around
|
|
|
|
* for having the backends fully offline aware, and returns a
|
|
|
|
* for having the backends fully offline aware, and returns a
|
|
|
|
@@ -972,10 +1055,11 @@
|
|
|
|
@@ -972,10 +1055,11 @@ e_passwords_shutdown (void)
|
|
|
|
* FIXME: This is not a permanent api, review post 2.0.
|
|
|
|
* FIXME: This is not a permanent api, review post 2.0.
|
|
|
|
**/
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
void
|
|
|
@ -1401,7 +1401,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@@ -986,150 +1070,137 @@
|
|
|
|
@@ -986,151 +1070,138 @@ e_passwords_set_online(int state)
|
|
|
|
void
|
|
|
|
void
|
|
|
|
e_passwords_forget_passwords (void)
|
|
|
|
e_passwords_forget_passwords (void)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1601,11 +1601,13 @@
|
|
|
|
* @title: title for the password dialog
|
|
|
|
* @title: title for the password dialog
|
|
|
|
- * @component_name: the name of the component for which we're storing
|
|
|
|
- * @component_name: the name of the component for which we're storing
|
|
|
|
- * the password (e.g. Mail, Addressbook, etc.)
|
|
|
|
- * the password (e.g. Mail, Addressbook, etc.)
|
|
|
|
|
|
|
|
- * @key: key to store the password under
|
|
|
|
+ * @component: component name of the caller
|
|
|
|
+ * @component: component name of the caller
|
|
|
|
* @key: key to store the password under
|
|
|
|
+ * @key: key to store the password under, or NULL
|
|
|
|
* @prompt: prompt string
|
|
|
|
* @prompt: prompt string
|
|
|
|
* @secret: whether or not the password text should be ***ed out
|
|
|
|
* @secret: whether or not the password text should be ***ed out
|
|
|
|
@@ -1146,241 +1217,45 @@
|
|
|
|
* @remember_type: whether or not to offer to remember the password,
|
|
|
|
|
|
|
|
@@ -1146,241 +1217,44 @@ e_passwords_add_password (const char *ke
|
|
|
|
* return value is non-%NULL and @remember_type is not
|
|
|
|
* return value is non-%NULL and @remember_type is not
|
|
|
|
* E_PASSWORDS_DO_NOT_REMEMBER.
|
|
|
|
* E_PASSWORDS_DO_NOT_REMEMBER.
|
|
|
|
**/
|
|
|
|
**/
|
|
|
@ -1632,7 +1634,6 @@
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ g_return_val_if_fail (title != NULL, NULL);
|
|
|
|
+ g_return_val_if_fail (title != NULL, NULL);
|
|
|
|
+ g_return_val_if_fail (component != NULL, NULL);
|
|
|
|
+ g_return_val_if_fail (component != NULL, NULL);
|
|
|
|
+ g_return_val_if_fail (key != NULL, NULL);
|
|
|
|
|
|
|
|
+ g_return_val_if_fail (prompt != NULL, NULL);
|
|
|
|
+ g_return_val_if_fail (prompt != NULL, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
if ((type & E_PASSWORDS_ONLINE) && !ep_online_state)
|
|
|
|
if ((type & E_PASSWORDS_ONLINE) && !ep_online_state)
|
|
|
@ -1710,13 +1711,21 @@
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (break_lines)
|
|
|
|
- if (break_lines)
|
|
|
|
- *outptr++ = '\n';
|
|
|
|
- *outptr++ = '\n';
|
|
|
|
-
|
|
|
|
+ msg = ep_msg_new (ep_ask_password, TRUE);
|
|
|
|
|
|
|
|
+ msg->component = component;
|
|
|
|
|
|
|
|
+ msg->key = (key != NULL) ? key : "";
|
|
|
|
|
|
|
|
+ msg->data = data;
|
|
|
|
|
|
|
|
|
|
|
|
- *save = 0;
|
|
|
|
- *save = 0;
|
|
|
|
- *state = 0;
|
|
|
|
- *state = 0;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- return outptr-out;
|
|
|
|
- return outptr-out;
|
|
|
|
-}
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
+ ep_msg_send (msg);
|
|
|
|
|
|
|
|
+ password = msg->password;
|
|
|
|
|
|
|
|
+ remember = data->remember;
|
|
|
|
|
|
|
|
+ ep_msg_free (msg);
|
|
|
|
|
|
|
|
|
|
|
|
-/*
|
|
|
|
-/*
|
|
|
|
- performs an 'encode step', only encodes blocks of 3 characters to the
|
|
|
|
- performs an 'encode step', only encodes blocks of 3 characters to the
|
|
|
|
- output at a time, saves left-over state in state and save (initialise to
|
|
|
|
- output at a time, saves left-over state in state and save (initialise to
|
|
|
@ -1785,8 +1794,11 @@
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- return outptr-out;
|
|
|
|
- return outptr-out;
|
|
|
|
-}
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
+ ep_dialog_data_free (data);
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
+ if (p_remember != NULL)
|
|
|
|
|
|
|
|
+ *p_remember = remember;
|
|
|
|
|
|
|
|
|
|
|
|
-/**
|
|
|
|
-/**
|
|
|
|
- * base64_decode_step: decode a chunk of base64 encoded data
|
|
|
|
- * base64_decode_step: decode a chunk of base64 encoded data
|
|
|
|
- * @in: input stream
|
|
|
|
- * @in: input stream
|
|
|
@ -1825,18 +1837,10 @@
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
+ msg = ep_msg_new (ep_ask_password, TRUE);
|
|
|
|
-
|
|
|
|
+ msg->component = component;
|
|
|
|
|
|
|
|
+ msg->key = key;
|
|
|
|
|
|
|
|
+ msg->data = data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- *save = v;
|
|
|
|
- *save = v;
|
|
|
|
- *state = i;
|
|
|
|
- *state = i;
|
|
|
|
+ ep_msg_send (msg);
|
|
|
|
-
|
|
|
|
+ password = msg->password;
|
|
|
|
|
|
|
|
+ remember = data->remember;
|
|
|
|
|
|
|
|
+ ep_msg_free (msg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- /* quick scan back for '=' on the end somewhere */
|
|
|
|
- /* quick scan back for '=' on the end somewhere */
|
|
|
|
- /* fortunately we can drop 1 output char for each trailing = (upto 2) */
|
|
|
|
- /* fortunately we can drop 1 output char for each trailing = (upto 2) */
|
|
|
|
- i=2;
|
|
|
|
- i=2;
|
|
|
@ -1848,14 +1852,11 @@
|
|
|
|
- i--;
|
|
|
|
- i--;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
+ ep_dialog_data_free (data);
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
- /* if i!= 0 then there is a truncation error! */
|
|
|
|
- /* if i!= 0 then there is a truncation error! */
|
|
|
|
- return outptr-out;
|
|
|
|
- return outptr-out;
|
|
|
|
-}
|
|
|
|
-}
|
|
|
|
+ if (p_remember != NULL)
|
|
|
|
-
|
|
|
|
+ *p_remember = remember;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-static char *
|
|
|
|
-static char *
|
|
|
|
-decode_base64 (char *base64)
|
|
|
|
-decode_base64 (char *base64)
|
|
|
|
-{
|
|
|
|
-{
|
|
|
@ -1877,8 +1878,8 @@
|
|
|
|
+ return password;
|
|
|
|
+ return password;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--- evolution-data-server-1.11.2/libedataserver/e-msgport.h.e-passwords 2007-04-18 06:10:18.000000000 -0400
|
|
|
|
--- evolution-data-server-1.11.2/libedataserver/e-msgport.h.e-passwords 2007-04-18 06:10:18.000000000 -0400
|
|
|
|
+++ evolution-data-server-1.11.2/libedataserver/e-msgport.h 2007-05-18 12:03:54.000000000 -0400
|
|
|
|
+++ evolution-data-server-1.11.2/libedataserver/e-msgport.h 2007-05-31 22:51:17.000000000 -0400
|
|
|
|
@@ -54,7 +54,7 @@
|
|
|
|
@@ -54,7 +54,7 @@ typedef struct _EMsgPort EMsgPort;
|
|
|
|
|
|
|
|
|
|
|
|
/* header for any message */
|
|
|
|
/* header for any message */
|
|
|
|
typedef struct _EMsg {
|
|
|
|
typedef struct _EMsg {
|
|
|
|