mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-18 06:00:27 +01:00
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
This commit is contained in:
parent
be672187a5
commit
7b340cdb43
2 changed files with 26 additions and 4 deletions
|
|
@ -1,3 +1,9 @@
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -218,12 +218,28 @@ _dbus_user_database_lookup_group (DBusUserDatabase *db,
|
|||
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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue