* 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 (** 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.
This commit is contained in:
Ralf Habacker 2007-06-14 20:08:48 +00:00
parent ab4ce38906
commit 3237907057
7 changed files with 19 additions and 10 deletions

View file

@ -1,3 +1,13 @@
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):

View file

@ -522,7 +522,7 @@ _dbus_auth_script_run (const DBusString *filename)
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)))
{

View file

@ -780,15 +780,15 @@ static dbus_bool_t
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;
@ -796,7 +796,6 @@ handle_client_initial_response_cookie_sha1_mech (DBusAuth *auth,
retval = TRUE;
out_0:
_dbus_string_free(&username);
return retval;
}

View file

@ -738,7 +738,7 @@ _dbus_keyring_new_homedir (const DBusString *username,
{
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;

View file

@ -168,7 +168,7 @@ dbus_bool_t _dbus_credentials_add_from_current_process (DBusCredentials *creden
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);

View file

@ -414,7 +414,7 @@ _dbus_userdb_test (const char *test_data_dir)
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))

View file

@ -360,7 +360,7 @@ _dbus_user_database_flush_system (void)
* @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 ())