openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/dbus/dbus-sysdeps-unix.c
dbus_bool_t
    _dbus_credentials_add_from_current_process(DBusCredentials* credentials)
{
    /* The POSIX spec certainly doesn't promise this, but
     * we need these assertions to fail as soon as we're wrong about
     * it so we can do the porting fixups
     */
    _DBUS_STATIC_ASSERT(sizeof(pid_t) <= sizeof(dbus_pid_t));
    _DBUS_STATIC_ASSERT(sizeof(uid_t) <= sizeof(dbus_uid_t));
    _DBUS_STATIC_ASSERT(sizeof(gid_t) <= sizeof(dbus_gid_t));

    if (!_dbus_credentials_add_pid(credentials, _dbus_getpid()))
        return FALSE;
    if (!_dbus_credentials_add_unix_uid(credentials, _dbus_geteuid()))
        return FALSE;

    return TRUE;
}
/**
 * Adds the credentials of the current process to the
 * passed-in credentials object.
 *
 * @param credentials credentials to add to
 * @returns #FALSE if no memory; does not properly roll back on failure, so only
 * some credentials may have been added
 */
Adds the credentials of the current process to the
passed-in credentials object.

@param credentials credentials to add to
@returns #FALSE if no memory; does not properly roll back on failure, so only
some credentials may have been added
Adds the credentials of the current process to the passed - in credentials object . @param credentials credentials to add to @returns #FALSE if no memory ; does not properly roll back on failure so only some credentials may have been added
dbus_bool_t
    _dbus_credentials_add_from_current_process(DBusCredentials* credentials)
{
    _DBUS_STATIC_ASSERT(sizeof(pid_t) <= sizeof(dbus_pid_t));
    _DBUS_STATIC_ASSERT(sizeof(uid_t) <= sizeof(dbus_uid_t));
    _DBUS_STATIC_ASSERT(sizeof(gid_t) <= sizeof(dbus_gid_t));
    if (!_dbus_credentials_add_pid(credentials, _dbus_getpid()))
        return FALSE;
    if (!_dbus_credentials_add_unix_uid(credentials, _dbus_geteuid()))
        return FALSE;
    return TRUE;
}
dbus_bool_t _dbus_credentials_add_from_current_process ( DBusCredentials * credentials ) { _DBUS_STATIC_ASSERT ( sizeof ( pid_t ) <= sizeof ( dbus_pid_t ) ) ; _DBUS_STATIC_ASSERT ( sizeof ( uid_t ) <= sizeof ( dbus_uid_t ) ) ; _DBUS_STATIC_ASSERT ( sizeof ( gid_t ) <= sizeof ( dbus_gid_t ) ) ; if ( ! _dbus_credentials_add_pid ( credentials , _dbus_getpid ( ) ) ) return FALSE ; if ( ! _dbus_credentials_add_unix_uid ( credentials , _dbus_geteuid ( ) ) ) return FALSE ; return TRUE ; }
Adds the credentials of the current process to the
 passed-in credentials object.
Adds the credentials of the current process to the passed - in credentials object .
/* The POSIX spec certainly doesn't promise this, but
     * we need these assertions to fail as soon as we're wrong about
     * it so we can do the porting fixups
     */