mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-09 15:40:22 +01:00
_dbus_credentials_add_from_user: Check return of add_unix_uid
Coverity CID 253543. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104588 Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
b5c4651b20
commit
cb6b6b2bc3
1 changed files with 9 additions and 2 deletions
|
|
@ -540,8 +540,15 @@ _dbus_credentials_add_from_user (DBusCredentials *credentials,
|
|||
{
|
||||
_DBUS_STATIC_ASSERT (sizeof (uid) == sizeof (dbus_uid_t));
|
||||
|
||||
_dbus_credentials_add_unix_uid (credentials, uid);
|
||||
return TRUE;
|
||||
if (_dbus_credentials_add_unix_uid (credentials, uid))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_DBUS_SET_OOM (error);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we aren't allowed to look in NSS or /etc/passwd, fail now. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue