It needs to much tests to verify that the change does not break anything. I had overseen that the signatures are different (** to *) which requires non trivial changes. This is one *major* disadvantage of elumating oop functionality with c. You are responsible for cleaning every object on every function return point, which could be a nightmare if you are not working with dbus all the days.
2007-06-14 Ralf Habacker <ralf.habacker@freenet.de>
+
+ * reverted global rename of function _dbus_username_from_current_process.
+ It needs to much tests to verify that the change does not break anything.
+ I had overseen that the signatures are different and requires non
+ trivial changes.
+ This is one *major* disadvantage of elumating oop functionality with c.
+ You are responsible for cleaning every object on every function return point,
+ which could be a nightmare if you are not working with dbus all the days.
+
+2007-06-14 Ralf Habacker <ralf.habacker@freenet.de>
* dbus/dbus-auth.c (handle_client_initial_response_cookie_sha1_mech):
fixed usage of _dbus_append_desired_identity()
goto out;
}
- if (!_dbus_append_desired_identity (&u) ||
+ if (!_dbus_username_from_current_process (&u) ||
!_dbus_string_copy (u, 0, &username,
_dbus_string_get_length (&username)))
{
handle_client_initial_response_cookie_sha1_mech (DBusAuth *auth,
DBusString *response)
{
- const DBusString username;
+ const DBusString *username;
dbus_bool_t retval;
+
retval = FALSE;
- _dbus_string_init(&username);
- if (!_dbus_append_desired_identity (&username))
+ if (!_dbus_username_from_current_process (&username))
goto out_0;
- if (!_dbus_string_hex_encode (&username, 0,
+ if (!_dbus_string_hex_encode (username, 0,
response,
_dbus_string_get_length (response)))
goto out_0;
retval = TRUE;
out_0:
- _dbus_string_free(&username);
return retval;
}
{
const DBusString *const_homedir;
- if (!_dbus_append_desired_identity (&username) ||
+ if (!_dbus_username_from_current_process (&username) ||
!_dbus_homedir_from_current_process (&const_homedir))
goto failed;
dbus_bool_t _dbus_credentials_parse_and_add_desired (DBusCredentials *credentials,
const DBusString *desired_identity);
-dbus_bool_t _dbus_append_desired_identity (const DBusString **username);
+dbus_bool_t _dbus_username_from_current_process (const DBusString **username);
dbus_bool_t _dbus_append_desired_identity (DBusString *str);
dbus_bool_t _dbus_homedir_from_current_process (const DBusString **homedir);
unsigned long *group_ids;
int n_group_ids, i;
- if (!_dbus_append_desired_identity (&username))
+ if (!_dbus_username_from_current_process (&username))
_dbus_assert_not_reached ("didn't get username");
if (!_dbus_homedir_from_current_process (&homedir))
* @returns #FALSE if no memory
*/
dbus_bool_t
-_dbus_append_desired_identity (const DBusString **username)
+_dbus_username_from_current_process (const DBusString **username)
{
_dbus_user_database_lock_system ();
if (!init_system_db ())