"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dbus/dbus-userdb-util.c" between
dbus-1.13.12.tar.xz and dbus-1.13.14.tar.xz

About: D-Bus is an inter-process communication (IPC) system, allowing multiple, concurrently-running applications to communicate with one another. D-Bus supplies both a system daemon and a per-user-login-session daemon. Development version.

dbus-userdb-util.c  (dbus-1.13.12.tar.xz):dbus-userdb-util.c  (dbus-1.13.14.tar.xz)
skipping to change at line 401 skipping to change at line 401
*n_group_ids = info->n_group_ids; *n_group_ids = info->n_group_ids;
memcpy (*group_ids, info->group_ids, info->n_group_ids * sizeof (dbus_gid_ t)); memcpy (*group_ids, info->group_ids, info->n_group_ids * sizeof (dbus_gid_ t));
} }
_dbus_user_database_unlock_system (); _dbus_user_database_unlock_system ();
return TRUE; return TRUE;
} }
/** @} */ /** @} */
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include <stdio.h>
/**
* Unit test for dbus-userdb.c.
*
* @returns #TRUE on success.
*/
dbus_bool_t
_dbus_userdb_test (const char *test_data_dir)
{
const DBusString *username;
const DBusString *homedir;
dbus_uid_t uid;
unsigned long *group_ids;
int n_group_ids, i;
DBusError error;
if (!_dbus_username_from_current_process (&username))
_dbus_test_fatal ("didn't get username");
if (!_dbus_homedir_from_current_process (&homedir))
_dbus_test_fatal ("didn't get homedir");
if (!_dbus_get_user_id (username, &uid))
_dbus_test_fatal ("didn't get uid");
if (!_dbus_groups_from_uid (uid, &group_ids, &n_group_ids))
_dbus_test_fatal ("didn't get groups");
_dbus_test_diag (" Current user: %s homedir: %s gids:",
_dbus_string_get_const_data (username),
_dbus_string_get_const_data (homedir));
for (i=0; i<n_group_ids; i++)
_dbus_test_diag ("- %ld", group_ids[i]);
dbus_error_init (&error);
_dbus_test_diag ("Is Console user: %i",
_dbus_is_console_user (uid, &error));
_dbus_test_diag ("Invocation was OK: %s", error.message ? error.message : "yes
");
dbus_error_free (&error);
_dbus_test_diag ("Is Console user 4711: %i",
_dbus_is_console_user (4711, &error));
_dbus_test_diag ("Invocation was OK: %s", error.message ? error.message : "yes
");
dbus_error_free (&error);
dbus_free (group_ids);
return TRUE;
}
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)