aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog21
-rw-r--r--addressbook/gui/component/addressbook-config.c2
-rw-r--r--addressbook/gui/component/addressbook-storage.c10
-rw-r--r--addressbook/gui/component/addressbook-storage.h1
4 files changed, 29 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f20a90729d..a4cc6a6d70 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,24 @@
+2001-07-16 Chris Toshok <toshok@ximian.com>
+
+ [ Fix bug #4705 - LDAP storage gets saved with corrupted binddn]
+
+ * gui/component/addressbook-config.c (addressbook_dialog_apply):
+ call addressbook_storage_write_sources here after we're done
+ rebuilding them.
+
+ * gui/component/addressbook-storage.c
+ (addressbook_storage_clear_sources): don't write the source file
+ here.
+ (addressbook_storage_add_source): same.
+ (addressbook_storage_remove_source): same.
+ (addressbook_storage_write_sources): new function, write the
+ source file out.
+ (addressbook_source_copy): g_strdup the binddn so we don't end up
+ free'ing it multiple times thanks to copies freeing theirs.
+
+ * gui/component/addressbook-storage.h: add prototype for
+ address_storage_write_sources.
+
2001-07-16 Iain Holmes <iain@ximian.com>
* backend/pas/evolution-vcard-importer.c (ebook_create): Don't just
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index d23fb1ced2..77614a89f5 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -898,6 +898,8 @@ addressbook_dialog_apply (GnomePropertyBox *property_box, gint page_num, Address
AddressbookSource *source = (AddressbookSource*)gtk_clist_get_row_data (GTK_CLIST (dialog->clistSources), i);
addressbook_storage_add_source (addressbook_source_copy (source));
}
+
+ addressbook_storage_write_sources();
}
static void
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index 1f8e01f464..531051defd 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -413,8 +413,6 @@ addressbook_storage_add_source (AddressbookSource *source)
source->uri, source->description, FALSE);
g_free (path);
-
- save_source_data (storage_path);
}
void
@@ -446,8 +444,6 @@ addressbook_storage_remove_source (const char *name)
evolution_storage_removed_folder (storage, path);
g_free (path);
-
- save_source_data (storage_path);
}
GList *
@@ -506,7 +502,11 @@ addressbook_storage_clear_sources ()
g_list_foreach (sources, (GFunc)addressbook_source_foreach, NULL);
g_list_free (sources);
sources = NULL;
+}
+void
+addressbook_storage_write_sources ()
+{
save_source_data (storage_path);
}
@@ -527,7 +527,7 @@ addressbook_source_copy (const AddressbookSource *source)
copy->ldap.rootdn = g_strdup (source->ldap.rootdn);
copy->ldap.scope = source->ldap.scope;
copy->ldap.auth = source->ldap.auth;
- copy->ldap.binddn = source->ldap.binddn;
+ copy->ldap.binddn = g_strdup (source->ldap.binddn);
copy->ldap.remember_passwd = source->ldap.remember_passwd;
}
else {
diff --git a/addressbook/gui/component/addressbook-storage.h b/addressbook/gui/component/addressbook-storage.h
index fa88405e38..f2a1910e13 100644
--- a/addressbook/gui/component/addressbook-storage.h
+++ b/addressbook/gui/component/addressbook-storage.h
@@ -70,6 +70,7 @@ void addressbook_storage_setup (EvolutionShellComponent *shell_component,
GList *addressbook_storage_get_sources (void);
AddressbookSource *addressbook_storage_get_source_by_uri (const char *uri);
void addressbook_storage_clear_sources (void);
+void addressbook_storage_write_sources (void);
AddressbookSource *addressbook_source_copy (const AddressbookSource *source);
void addressbook_source_free (AddressbookSource *source);
void addressbook_storage_init_source_uri (AddressbookSource *source);
ntly i forgot to run make maintainerJP Rosevear2001-04-182-4272/+0 * Removing autogenerated filesJP Rosevear2001-04-189-2282/+0 * Finish merge of new libical 0.23a versionJP Rosevear2001-04-1840-3116/+3303 * This commit was generated by cvs2svn to compensate for changes in r9415,JP Rosevear2001-04-1816-424/+189 * Initial revisionJP Rosevear2001-04-1845-0/+12569 * Merge the building fix from evolution-0-9-branch.Ettore Perazzoli2001-02-282-1/+6 * Missing change log entryJP Rosevear2001-02-141-2/+0 * The built sources shouldn't be cleaneJP Rosevear2001-02-092-9/+6 * its NEEDS-ACTION rather than NEEDSACTION (icalparameter_as_ical_string):JP Rosevear2001-02-092-4/+10 * Added a missing #include here.Christopher James Lahey2001-02-073-2/+15 * Use the renamed api callJP Rosevear2001-02-062-1/+6 * Fscking autoconfJP Rosevear2001-02-061-1/+1 * Guess what! Fix `builddir != srcdir' breakage.Ettore Perazzoli2001-02-062-4/+11 * This is it i hopeJP Rosevear2001-02-061-2/+1 * More import cleanupJP Rosevear2001-02-062-9/+9 * Import cleanupJP Rosevear2001-02-0619-215/+721 * This commit was generated by cvs2svn to compensate for changes in r7975,JP Rosevear2001-02-063-3/+24 * Initial revisionJP Rosevear2001-02-062-0/+202 * Remove unused "extern long timezone".Dan Winship2001-01-262-1/+4 * rewrote to fix problems with freeing the environment string after callingDamon Chaplin2001-01-252-19/+51 * Don't AC_INIT on an autogenerated file that does not exist beforehandJP Rosevear2001-01-242-1/+6 * Minor import fixJP Rosevear2001-01-241-4/+0 * Import clean upJP Rosevear2001-01-2442-2916/+5819 * This commit was generated by cvs2svn to compensate for changes in r7747,JP Rosevear2001-01-2428-611/+792 * Initial revisionJP Rosevear2001-01-241-0/+167 * Missing Changelog entryJP Rosevear2001-01-191-0/+8 * add -ve sign to output of duration if appropriate.JP Rosevear2001-01-191-5/+25 * include configure.h because HAVE_TIMEZONE is usedJP Rosevear2000-12-223-1/+13 * Build `libical-static.la', that is needed for the conduits.Ettore Perazzoli2000-12-152-0/+8 * make icalcomponent.c depend on icalproperty.h, icalvalue.h, andPeter Teichman2000-12-151-2/+4 * ShushJP Rosevear2000-12-152-0/+9 * put icalproperty.h and icalvalue.h before icalcomponent.c in thePeter Teichman2000-12-151-2/+2 * More builddir != srcdir fun! Man, I enjoy this so much.Ettore Perazzoli2000-12-142-17/+21 * Use gmtime() unconditionally, since we want an UTC broken-downFederico Mena Quintero2000-12-142-4/+11 * time_t values *are* in UTC by definition, so the is_utc argument isFederico Mena Quintero2000-12-142-0/+15 * icalparser.c Addedd support for x-parameters.Eric Busboom2000-12-146-27/+66 * Added a name to the parameter to icalerror_set_errno.Christopher James Lahey2000-12-142-1/+6 * Removed the explicit paths. Why it did *not* work on my original try whenFederico Mena Quintero2000-12-142-19/+23 * Missed ChangeLog.Ettore Perazzoli2000-12-141-0/+23 * Fix some horrible Makefile breakage, getting it to compile withEttore Perazzoli2000-12-132-12/+23 * #if 0ed out some #if 1ed test code that was breaking my build byJoe Shaw2000-12-132-1/+6 * Add a check for "extern int timezone;" vs struct tm tm_gmtoff, stolen fromDan Winship2000-12-135-8/+53 * More fixage - FedericoFederico Mena Quintero2000-12-124-3/+9 * Make AC_INIT() check for a file that is not autogenerated!Federico Mena Quintero2000-12-122-1/+4 * Fixety fix - FedericoFederico Mena Quintero2000-12-125-3209/+12 * shoo - FedericoFederico Mena Quintero2000-12-124-9443/+0 * Remove more auto-generated files - FedericoFederico Mena Quintero2000-12-123-4955/+0 * Removed auto-generated files - FedericoFederico Mena Quintero2000-12-128-12041/+0 * Fix fucking CVS conflicts - FedericoFederico Mena Quintero2000-12-1220-44/+36 * Fix fucking CVS conflicts because fucking CVS is a fucking big doofus - FedericoFederico Mena Quintero2000-12-1266-2973/+8198 * This commit was generated by cvs2svn to compensate for changes in r6917,Federico Mena Quintero2000-12-1222-298/+1548 * Initial revisionFederico Mena Quintero2000-12-12