mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-06-19 11:58:26 +02:00
Merge branch 'empty-group-list' into 'master'
dbus-sysdeps-unix: Handle empty supplementary group list See merge request dbus/dbus!422
This commit is contained in:
commit
7ab384de57
1 changed files with 2 additions and 7 deletions
|
|
@ -1956,6 +1956,8 @@ add_groups_to_credentials (int client_fd,
|
|||
{
|
||||
#if defined(__linux__) && defined(SO_PEERGROUPS)
|
||||
_DBUS_STATIC_ASSERT (sizeof (gid_t) <= sizeof (dbus_gid_t));
|
||||
/* This function assumes socklen_t is unsigned, which is true on Linux */
|
||||
_DBUS_STATIC_ASSERT (((socklen_t) -1) > 0);
|
||||
gid_t *buf = NULL;
|
||||
socklen_t len = 1024;
|
||||
dbus_bool_t oom = FALSE;
|
||||
|
|
@ -2001,13 +2003,6 @@ add_groups_to_credentials (int client_fd,
|
|||
_dbus_verbose ("will try again with %lu\n", (unsigned long) len);
|
||||
}
|
||||
|
||||
if (len <= 0)
|
||||
{
|
||||
_dbus_verbose ("getsockopt(SO_PEERGROUPS) yielded <= 0 bytes: %ld\n",
|
||||
(long) len);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (len > n_gids * sizeof (gid_t))
|
||||
{
|
||||
_dbus_verbose ("%lu > %zu", (unsigned long) len, n_gids * sizeof (gid_t));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue