Commit cb6b6b2b authored by Simon McVittie's avatar Simon McVittie
Browse files

_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's avatarSimon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent b5c4651b
...@@ -540,8 +540,15 @@ _dbus_credentials_add_from_user (DBusCredentials *credentials, ...@@ -540,8 +540,15 @@ _dbus_credentials_add_from_user (DBusCredentials *credentials,
{ {
_DBUS_STATIC_ASSERT (sizeof (uid) == sizeof (dbus_uid_t)); _DBUS_STATIC_ASSERT (sizeof (uid) == sizeof (dbus_uid_t));
_dbus_credentials_add_unix_uid (credentials, uid); if (_dbus_credentials_add_unix_uid (credentials, uid))
return TRUE; {
return TRUE;
}
else
{
_DBUS_SET_OOM (error);
return FALSE;
}
} }
/* If we aren't allowed to look in NSS or /etc/passwd, fail now. */ /* If we aren't allowed to look in NSS or /etc/passwd, fail now. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment