summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2007-06-14 20:08:48 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2007-06-14 20:08:48 +0000
commit323790705782bee0d54ea9a342718a49b4ee5be6 (patch)
tree57f31fda6922efe707f1a0bc25ca0a26ec1ef024
parentab4ce38906a6ac696d2c673025ec1a2d1e302b6f (diff)
* 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.
-rw-r--r--ChangeLog10
-rw-r--r--dbus/dbus-auth-script.c2
-rw-r--r--dbus/dbus-auth.c9
-rw-r--r--dbus/dbus-keyring.c2
-rw-r--r--dbus/dbus-sysdeps.h2
-rw-r--r--dbus/dbus-userdb-util.c2
-rw-r--r--dbus/dbus-userdb.c2
7 files changed, 19 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ac3d8d1..e8354508 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,14 @@
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()
diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c
index 225569fc..eb145e49 100644
--- a/dbus/dbus-auth-script.c
+++ b/dbus/dbus-auth-script.c
@@ -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)))
{
diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
index 9651df74..e47f6e36 100644
--- a/dbus/dbus-auth.c
+++ b/dbus/dbus-auth.c
@@ -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;
}
diff --git a/dbus/dbus-keyring.c b/dbus/dbus-keyring.c
index af8ef080..17c6b179 100644
--- a/dbus/dbus-keyring.c
+++ b/dbus/dbus-keyring.c
@@ -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;
diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h
index 154619a5..0cb92c61 100644
--- a/dbus/dbus-sysdeps.h
+++ b/dbus/dbus-sysdeps.h
@@ -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);
diff --git a/dbus/dbus-userdb-util.c b/dbus/dbus-userdb-util.c
index 5f0ec56d..6e1653e6 100644
--- a/dbus/dbus-userdb-util.c
+++ b/dbus/dbus-userdb-util.c
@@ -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))
diff --git a/dbus/dbus-userdb.c b/dbus/dbus-userdb.c
index 6ef20553..46e2275a 100644
--- a/dbus/dbus-userdb.c
+++ b/dbus/dbus-userdb.c
@@ -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 ())