From 01af5ff4101e540a6456bca01d56272e701bea78 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 4 Jan 2003 07:28:54 +0000 Subject: 2003-01-04 Havoc Pennington * test/watch.c (error_handler): make it safe if the error handler is called multiple times (if we s/error handler/disconnect handler/ we should just guarantee it's called only once) * dbus/dbus-transport.c (_dbus_transport_disconnect): call the error handler on disconnect (it's quite possible we should just change the error handler to a "disconnect handler," I'm not sure we have any other meaningful errors) * configure.in: check for getpwnam_r * dbus/dbus-transport.c, dbus/dbus-transport-unix.c, dbus/dbus-auth.c: add credentials support, add EXTERNAL auth mechanism as in SASL spec, using socket credentials * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function (_dbus_send_credentials_unix_socket): new function * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just dbus_accept() (_dbus_write): only check errno if <0 returned (_dbus_write_two): ditto --- dbus/dbus-auth.h | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'dbus/dbus-auth.h') diff --git a/dbus/dbus-auth.h b/dbus/dbus-auth.h index 824426af..7346f99b 100644 --- a/dbus/dbus-auth.h +++ b/dbus/dbus-auth.h @@ -26,6 +26,7 @@ #include #include #include +#include DBUS_BEGIN_DECLS; @@ -43,26 +44,30 @@ typedef enum DBusAuth* _dbus_auth_server_new (void); DBusAuth* _dbus_auth_client_new (void); -void _dbus_auth_ref (DBusAuth *auth); -void _dbus_auth_unref (DBusAuth *auth); -DBusAuthState _dbus_auth_do_work (DBusAuth *auth); -dbus_bool_t _dbus_auth_get_bytes_to_send (DBusAuth *auth, - const DBusString **str); -void _dbus_auth_bytes_sent (DBusAuth *auth, - int bytes_sent); -dbus_bool_t _dbus_auth_bytes_received (DBusAuth *auth, - const DBusString *str); -dbus_bool_t _dbus_auth_get_unused_bytes (DBusAuth *auth, - DBusString *str); -dbus_bool_t _dbus_auth_needs_encoding (DBusAuth *auth); -dbus_bool_t _dbus_auth_encode_data (DBusAuth *auth, - const DBusString *plaintext, - DBusString *encoded); -dbus_bool_t _dbus_auth_needs_decoding (DBusAuth *auth); -dbus_bool_t _dbus_auth_decode_data (DBusAuth *auth, - const DBusString *encoded, - DBusString *plaintext); +void _dbus_auth_ref (DBusAuth *auth); +void _dbus_auth_unref (DBusAuth *auth); +DBusAuthState _dbus_auth_do_work (DBusAuth *auth); +dbus_bool_t _dbus_auth_get_bytes_to_send (DBusAuth *auth, + const DBusString **str); +void _dbus_auth_bytes_sent (DBusAuth *auth, + int bytes_sent); +dbus_bool_t _dbus_auth_bytes_received (DBusAuth *auth, + const DBusString *str); +dbus_bool_t _dbus_auth_get_unused_bytes (DBusAuth *auth, + DBusString *str); +dbus_bool_t _dbus_auth_needs_encoding (DBusAuth *auth); +dbus_bool_t _dbus_auth_encode_data (DBusAuth *auth, + const DBusString *plaintext, + DBusString *encoded); +dbus_bool_t _dbus_auth_needs_decoding (DBusAuth *auth); +dbus_bool_t _dbus_auth_decode_data (DBusAuth *auth, + const DBusString *encoded, + DBusString *plaintext); +void _dbus_auth_set_credentials (DBusAuth *auth, + const DBusCredentials *credentials); +void _dbus_auth_get_identity (DBusAuth *auth, + DBusCredentials *credentials); DBUS_END_DECLS; -- cgit