28#include <dbus/dbus-macros.h>
29#include <dbus/dbus-errors.h>
30#include <dbus/dbus-string.h>
31#include <dbus/dbus-sysdeps.h>
39 DBUS_AUTH_STATE_WAITING_FOR_INPUT,
40 DBUS_AUTH_STATE_WAITING_FOR_MEMORY,
41 DBUS_AUTH_STATE_HAVE_BYTES_TO_SEND,
42 DBUS_AUTH_STATE_NEED_DISCONNECT,
43 DBUS_AUTH_STATE_AUTHENTICATED,
44 DBUS_AUTH_STATE_INVALID = -1
57 const char **mechanisms);
DBUS_PRIVATE_EXPORT DBusAuthState _dbus_auth_do_work(DBusAuth *auth)
Analyzes buffered input and moves the auth conversation forward, returning the new state of the auth ...
dbus_bool_t _dbus_auth_encode_data(DBusAuth *auth, const DBusString *plaintext, DBusString *encoded)
Called post-authentication, encodes a block of bytes for sending to the peer.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_auth_dump_supported_mechanisms(DBusString *buffer)
Return a human-readable string containing all supported auth mechanisms.
dbus_bool_t _dbus_auth_needs_encoding(DBusAuth *auth)
Called post-authentication, indicates whether we need to encode the message stream with _dbus_auth_en...
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_auth_set_credentials(DBusAuth *auth, DBusCredentials *credentials)
Sets credentials received via reliable means from the operating system.
dbus_bool_t _dbus_auth_get_unix_fd_negotiated(DBusAuth *auth)
Queries whether unix fd passing was successfully negotiated.
DBUS_PRIVATE_EXPORT DBusAuth * _dbus_auth_ref(DBusAuth *auth)
Increments the refcount of an auth object.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_auth_is_supported_mechanism(DBusString *name)
Queries whether the given auth mechanism is supported.
DBUS_PRIVATE_EXPORT DBusCredentials * _dbus_auth_get_identity(DBusAuth *auth)
Gets the identity we authorized the client as.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_auth_get_bytes_to_send(DBusAuth *auth, const DBusString **str)
Gets bytes that need to be sent to the peer we're conversing with.
dbus_bool_t _dbus_auth_decode_data(DBusAuth *auth, const DBusString *encoded, DBusString *plaintext)
Called post-authentication, decodes a block of bytes received from the peer.
DBUS_PRIVATE_EXPORT void _dbus_auth_unref(DBusAuth *auth)
Decrements the refcount of an auth object.
void _dbus_auth_set_unix_fd_possible(DBusAuth *auth, dbus_bool_t b)
Sets whether unix fd passing is potentially on the transport and hence shall be negotiated.
DBUS_PRIVATE_EXPORT void _dbus_auth_return_buffer(DBusAuth *auth, DBusString *buffer)
Returns a buffer with new data read into it.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_auth_set_mechanisms(DBusAuth *auth, const char **mechanisms)
Sets an array of authentication mechanism names that we are willing to use.
DBUS_PRIVATE_EXPORT void _dbus_auth_delete_unused_bytes(DBusAuth *auth)
Gets rid of unused bytes returned by _dbus_auth_get_unused_bytes() after we've gotten them and succes...
const char * _dbus_auth_get_guid_from_server(DBusAuth *auth)
Gets the GUID from the server if we've authenticated; gets NULL otherwise.
DBUS_PRIVATE_EXPORT void _dbus_auth_get_buffer(DBusAuth *auth, DBusString **buffer)
Get a buffer to be used for reading bytes from the peer we're conversing with.
dbus_bool_t _dbus_auth_needs_decoding(DBusAuth *auth)
Called post-authentication, indicates whether we need to decode the message stream with _dbus_auth_de...
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_auth_set_context(DBusAuth *auth, const DBusString *context)
Sets the "authentication context" which scopes cookies with the DBUS_COOKIE_SHA1 auth mechanism for e...
DBUS_PRIVATE_EXPORT void _dbus_auth_bytes_sent(DBusAuth *auth, int bytes_sent)
Notifies the auth conversation object that the given number of bytes of the outgoing buffer have been...
DBUS_PRIVATE_EXPORT DBusAuth * _dbus_auth_client_new(void)
Creates a new auth conversation object for the client side.
DBUS_PRIVATE_EXPORT DBusAuth * _dbus_auth_server_new(const DBusString *guid)
Creates a new auth conversation object for the server side.
DBUS_PRIVATE_EXPORT void _dbus_auth_get_unused_bytes(DBusAuth *auth, const DBusString **str)
Returns leftover bytes that were not used as part of the auth conversation.
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.
Internal members of DBusAuth.
DBusCredentials * credentials
Credentials read from socket.
DBusString context
Cookie scope.