[Pkg-utopia-commits] r728 - in packages/unstable/dbus/debian: .
patches
Sjoerd Simons
sjoerd at costa.debian.org
Sun Mar 5 17:11:35 UTC 2006
Author: sjoerd
Date: 2006-03-05 17:11:34 +0000 (Sun, 05 Mar 2006)
New Revision: 728
Added:
packages/unstable/dbus/debian/patches/dbus-reload-usercache.patch
Modified:
packages/unstable/dbus/debian/changelog
Log:
* debian/patches/dbus-reload-usercache.patch
+ Added. Reload the user info cache when reloading the config.
Modified: packages/unstable/dbus/debian/changelog
===================================================================
--- packages/unstable/dbus/debian/changelog 2006-03-05 15:06:46 UTC (rev 727)
+++ packages/unstable/dbus/debian/changelog 2006-03-05 17:11:34 UTC (rev 728)
@@ -1,3 +1,10 @@
+dbus (0.61-4) unstable; urgency=low
+
+ * debian/patches/dbus-reload-usercache.patch
+ + Added. Reload the user info cache when reloading the config.
+
+ -- Sjoerd Simons <sjoerd at debian.org> Sun, 5 Mar 2006 18:09:15 +0100
+
dbus (0.61-3) unstable; urgency=low
* debian/patches/dbus-monoversion.patch
Added: packages/unstable/dbus/debian/patches/dbus-reload-usercache.patch
===================================================================
--- packages/unstable/dbus/debian/patches/dbus-reload-usercache.patch 2006-03-05 15:06:46 UTC (rev 727)
+++ packages/unstable/dbus/debian/patches/dbus-reload-usercache.patch 2006-03-05 17:11:34 UTC (rev 728)
@@ -0,0 +1,103 @@
+Index: bus/bus.c
+===================================================================
+RCS file: /cvs/dbus/dbus/bus/bus.c,v
+retrieving revision 1.65
+diff -u -r1.65 bus.c
+--- bus/bus.c 14 Nov 2005 20:51:25 -0000 1.65
++++ bus/bus.c 5 Mar 2006 17:08:15 -0000
+@@ -790,6 +790,9 @@
+ DBusString config_file;
+ dbus_bool_t ret;
+
++ /* Flush the user database cache */
++ _dbus_user_database_flush(context->user_database);
++
+ ret = FALSE;
+ _dbus_string_init_const (&config_file, context->config_file);
+ parser = bus_config_load (&config_file, TRUE, NULL, error);
+Index: dbus/dbus-hash.c
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-hash.c,v
+retrieving revision 1.19
+diff -u -r1.19 dbus-hash.c
+--- dbus/dbus-hash.c 17 Jan 2005 03:53:40 -0000 1.19
++++ dbus/dbus-hash.c 5 Mar 2006 17:08:15 -0000
+@@ -422,6 +422,22 @@
+ }
+ }
+
++/**
++ * Removed all entries from a hash table.
++ *
++ * @param table the hash table to remove all entries from.
++ */
++void
++_dbus_hash_table_remove_all (DBusHashTable *table)
++{
++ DBusHashIter iter;
++ _dbus_hash_iter_init (table, &iter);
++ while (_dbus_hash_iter_next (&iter))
++ {
++ _dbus_hash_iter_remove_entry(&iter);
++ }
++}
++
+ static DBusHashEntry*
+ alloc_entry (DBusHashTable *table)
+ {
+Index: dbus/dbus-hash.h
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-hash.h,v
+retrieving revision 1.14
+diff -u -r1.14 dbus-hash.h
+--- dbus/dbus-hash.h 9 Sep 2004 10:20:17 -0000 1.14
++++ dbus/dbus-hash.h 5 Mar 2006 17:08:15 -0000
+@@ -63,6 +63,7 @@
+ DBusFreeFunction value_free_function);
+ DBusHashTable* _dbus_hash_table_ref (DBusHashTable *table);
+ void _dbus_hash_table_unref (DBusHashTable *table);
++void _dbus_hash_table_remove_all (DBusHashTable *table);
+ void _dbus_hash_iter_init (DBusHashTable *table,
+ DBusHashIter *iter);
+ dbus_bool_t _dbus_hash_iter_next (DBusHashIter *iter);
+Index: dbus/dbus-userdb.c
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.c,v
+retrieving revision 1.18
+diff -u -r1.18 dbus-userdb.c
+--- dbus/dbus-userdb.c 24 Feb 2006 16:13:08 -0000 1.18
++++ dbus/dbus-userdb.c 5 Mar 2006 17:08:15 -0000
+@@ -476,6 +476,18 @@
+ return NULL;
+ }
+
++/**
++ * Flush all information out of the user database.
++ */
++void
++_dbus_user_database_flush (DBusUserDatabase *db)
++{
++ _dbus_hash_table_remove_all(db->users_by_name);
++ _dbus_hash_table_remove_all(db->groups_by_name);
++ _dbus_hash_table_remove_all(db->users);
++ _dbus_hash_table_remove_all(db->groups);
++}
++
+ #ifdef DBUS_BUILD_TESTS
+ /**
+ * Increments refcount of user database.
+Index: dbus/dbus-userdb.h
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.h,v
+retrieving revision 1.10
+diff -u -r1.10 dbus-userdb.h
+--- dbus/dbus-userdb.h 22 Mar 2005 17:57:27 -0000 1.10
++++ dbus/dbus-userdb.h 5 Mar 2006 17:08:15 -0000
+@@ -51,6 +51,7 @@
+
+ DBusUserDatabase* _dbus_user_database_new (void);
+ DBusUserDatabase* _dbus_user_database_ref (DBusUserDatabase *db);
++void _dbus_user_database_flush (DBusUserDatabase *db);
+ void _dbus_user_database_unref (DBusUserDatabase *db);
+ dbus_bool_t _dbus_user_database_get_groups (DBusUserDatabase *db,
+ dbus_uid_t uid,
More information about the Pkg-utopia-commits
mailing list