diff options
author | Dan Winship <danw@src.gnome.org> | 2000-12-02 04:25:10 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-12-02 04:25:10 +0800 |
commit | 7c69d2523a8b4760065b1596c1837292e9dfff53 (patch) | |
tree | df7bba4a39e523592b64e1515e820a781106518a /mail/mail-config.c | |
parent | 4f4e741d46da50b1a81b3d28ca38ea3c661cb94d (diff) | |
download | gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.gz gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.zst gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.zip |
Writes out passwords (to .gnome_private) in our patented proprietary "Best
* session.c (mail_session_remember_password): Writes out passwords
(to .gnome_private) in our patented proprietary "Best Awesome
Super Encryption 64" ("BASE64") format which could not possibly
ever be cracked by even the most cryptographically knowledgeable
five-year-olds.
(mail_session_init): Load remembered passwords at startup.
(mail_session_forget_passwords): Erase them from disk as well as
memory.
* mail-config.c: Add "remember_password" field to
MailConfigService.
(mail_config_write_on_exit): Call mail_session_remember_password
for services with "remember_password" set.
* mail-config-gui.c: Add "remember password" checkbox to the
dialogs, and make it appear and disappear as appropriate.
svn path=/trunk/; revision=6760
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index 2bbd9194f3..18927b4aa3 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -107,6 +107,7 @@ service_copy (MailConfigService *source) newsource = g_new0 (MailConfigService, 1); newsource->url = g_strdup (source->url); newsource->keep_on_server = source->keep_on_server; + newsource->remember_password = source->remember_password; return newsource; } @@ -232,6 +233,9 @@ config_read (void) path = g_strdup_printf ("keep_on_server_%d", i); s->keep_on_server = gnome_config_get_bool (path); g_free (path); + path = g_strdup_printf ("remember_password_%d", i); + s->remember_password = gnome_config_get_bool (path); + g_free (path); config->sources = g_slist_append (config->sources, s); } @@ -351,6 +355,9 @@ mail_config_write (void) path = g_strdup_printf ("keep_on_server_%d", i); gnome_config_set_bool (path, s->keep_on_server); g_free (path); + path = g_strdup_printf ("remember_password_%d", i); + gnome_config_set_bool (path, s->remember_password); + g_free (path); } gnome_config_pop_prefix (); @@ -398,6 +405,8 @@ void mail_config_write_on_exit (void) { gchar *str; + GSList *sources; + MailConfigService *s; /* Show Messages Threaded */ str = g_strdup_printf ("=%s/config/Mail=/Display/thread_list", @@ -411,6 +420,14 @@ mail_config_write_on_exit (void) gnome_config_set_int (str, config->paned_size); g_free (str); + /* Passwords */ + gnome_config_private_clean_section ("/Evolution/Passwords"); + for (sources = config->sources; sources; sources = sources->next) { + s = sources->data; + if (s->remember_password) + mail_session_remember_password (s->url); + } + gnome_config_sync (); } |