+2005-02-14 Havoc Pennington <hp@redhat.com>
+
+ * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
+ properly handle looking up group information by name; fix
+ from j@bootlab.org
+
2005-02-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (dbus_connection_return_message)
return NULL;
}
- if (!_dbus_group_info_fill_gid (info, gid, error))
+ if (gid != DBUS_GID_UNSET)
{
- _DBUS_ASSERT_ERROR_IS_SET (error);
- _dbus_group_info_free_allocated (info);
- return NULL;
+ if (!_dbus_group_info_fill_gid (info, gid, error))
+ {
+ _DBUS_ASSERT_ERROR_IS_SET (error);
+ _dbus_group_info_free_allocated (info);
+ return NULL;
+ }
}
+ else
+ {
+ if (!_dbus_group_info_fill (info, groupname, error))
+ {
+ _DBUS_ASSERT_ERROR_IS_SET (error);
+ _dbus_group_info_free_allocated (info);
+ return NULL;
+ }
+ }
+
+ /* don't use these past here */
+ gid = DBUS_GID_UNSET;
+ groupname = NULL;
if (!_dbus_hash_table_insert_ulong (db->groups, info->gid, info))
{