From 9ada6e2cad0d623fb578f349790a0c62297d2394 Mon Sep 17 00:00:00 2001 From: Joe Shaw Date: Tue, 18 Feb 2003 22:51:35 +0000 Subject: 2003-02-18 Joe Shaw * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get credentials from our currently running process. (get_word): Fix a buglet where we were copying the entire length instead of relative to our position. * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the keys on the stack... it's 640k of data. * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always read the credentials byte off the socket, even if we don't have SO_PEERCRED. (_dbus_poll): Implement poll() using select() for systems which don't have it. * glib/test-dbus-glib.c (main): Print out an error if no parameters are given. * test/data/auth/fallback.auth-script: Added. Tests that a client can fallback to a secondary auth mechanism if the first fails. --- dbus/dbus-auth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-auth.c') diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index dca83ba3..c4e1c5e8 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -321,6 +321,8 @@ handle_server_data_stupid_test_mech (DBusAuth *auth, "OK\r\n")) return FALSE; + _dbus_credentials_from_current_process (&auth->authorized_identity); + auth->authenticated_pending_begin = TRUE; return TRUE; @@ -799,7 +801,7 @@ get_word (const DBusString *str, if (i > *start) { - if (!_dbus_string_copy_len (str, *start, i, word, 0)) + if (!_dbus_string_copy_len (str, *start, i - *start, word, 0)) return FALSE; *start = i; -- cgit