+2006-12-12 Tim Dijkstra <tim@famdijkstra.org>
+
+ * configure.in: Added switch to disable user_database caching.
+
+ * dbus/dbus-userdb-util.c, dbus/dbus-userdb.c: Add ifdefs to
+ be able disable user_dabase caching.
+
+2006-12-12 Tim Dijkstra <tim@famdijkstra.org>
+
+ * bus/bus.c, bus/bus.h: Remove DBusUserDatabase from the BusContext
+ struct. It is unnecessary we have a global one already. Also remove
+ bus_context_get_user_database function, it is no longer needed.
+ Flush the global database on reload.
+
+ * dbus/dbus-userdb-util.c: Replace _dbus_user_database_get_groups
+ with _dbus_groups_from_uid. It no longer needs a DBusUserDatabase.
+
+ * dbus/dbus-userdb.c, dbus/dbus-userdb.h:
+ Add _dbus_user_database_flush_system.
+ Make more functions DBUS_USERDB_INCLUDES_PRIVATE.
+ Small unrelated change in _dbus_is_a_number: change
+ _dbus_string_parse_int to _dbus_string_parse_uint.
+
+ * bus/connection.c: Change call to _dbus_user_database_get_groups to
+ _dbus_groups_from_uid.
+
+ * bus/policy.c, bus/policy.h: Change call to
+ _dbus_user_database_get_groups to _dbus_groups_from_uid. Remove
+ DBusUserDatabase from bus_policy_allow_user prototype, it no longer
+ needs it.
+
2006-12-12 John (J5) Palmieri <johnp@redhat.com>
* bus/signal.c: Fix match_rule_equal errata
AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto)
AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
+AC_ARG_ENABLE(userdb-cache, AS_HELP_STRING([--enable-userdb-cache],[build with userdb-cache support]),enable_userdb_cache=$enableval,enable_userdb_cache=yes)
AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
fi
+if test x$enable_userdb_cache = xyes; then
+ AC_DEFINE(DBUS_ENABLE_USERDB_CACHE,1,[Build with caching of user data])
+fi
+
#### gcc warning flags
cc_supports_flag() {
Building X11 code: ${enable_x11}
Building Doxygen docs: ${enable_doxygen_docs}
Building XML docs: ${enable_xml_docs}
+ Building cache support: ${enable_userdb_cache}
Gettext libs (empty OK): ${INTLLIBS}
Using XML parser: ${with_xml}
Init scripts style: ${with_init_scripts}
gid = n;
}
-
+#ifdef DBUS_ENABLE_USER_CACHE
if (gid != DBUS_GID_UNSET)
info = _dbus_hash_table_lookup_ulong (db->groups, gid);
else
return info;
}
else
+#else
+ if (1)
+#endif
{
if (gid != DBUS_GID_UNSET)
_dbus_verbose ("No cache for GID "DBUS_GID_FORMAT"\n",
uid = n;
}
+#ifdef DBUS_ENABLE_USER_CACHE
if (uid != DBUS_UID_UNSET)
info = _dbus_hash_table_lookup_ulong (db->users, uid);
else
info = _dbus_hash_table_lookup_string (db->users_by_name, _dbus_string_get_const_data (username));
-
+
if (info)
{
_dbus_verbose ("Using cache for UID "DBUS_UID_FORMAT" information\n",
return info;
}
else
+#else
+ if (1)
+#endif
{
if (uid != DBUS_UID_UNSET)
_dbus_verbose ("No cache for UID "DBUS_UID_FORMAT"\n",