25 #include "dbus-transport-protected.h"
26 #include "dbus-transport-unix.h"
27 #include "dbus-transport-socket.h"
28 #include "dbus-connection-internal.h"
29 #include "dbus-watch.h"
30 #include "dbus-auth.h"
31 #include "dbus-address.h"
32 #include "dbus-credentials.h"
33 #include "dbus-mainloop.h"
34 #include "dbus-message.h"
35 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
36 #include "dbus-server-debug-pipe.h"
69 _dbus_verbose (
"Size counter value is now %d\n",
71 _dbus_verbose (
"Unix FD counter value is now %d\n",
164 transport->
vtable = vtable;
165 transport->
loader = loader;
166 transport->
auth = auth;
173 transport->
address = address_copy;
200 live_messages_notify,
204 _dbus_verbose (
"Initialized transport on address %s\n", transport->
address);
250 check_address (
const char *address,
DBusError *error)
261 for (i = 0; i < len; i++)
264 if (transport !=
NULL)
281 _dbus_transport_new_for_autolaunch (
const char *scope,
DBusError *error)
286 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
296 _DBUS_ASSERT_ERROR_IS_SET (error);
300 result = check_address (_dbus_string_get_const_data (&address), error);
302 _DBUS_ASSERT_ERROR_IS_SET (error);
304 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
311 static DBusTransportOpenResult
321 if (strcmp (method,
"autolaunch") == 0)
325 *transport_p = _dbus_transport_new_for_autolaunch (scope, error);
327 if (*transport_p ==
NULL)
329 _DBUS_ASSERT_ERROR_IS_SET (error);
330 return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT;
334 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
335 return DBUS_TRANSPORT_OPEN_OK;
340 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
341 return DBUS_TRANSPORT_OPEN_NOT_HANDLED;
345 static const struct {
352 { _dbus_transport_open_autolaunch }
353 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
354 , { _dbus_transport_open_debug_pipe }
371 const char *expected_guid_orig;
376 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
382 if (expected_guid_orig !=
NULL && expected_guid ==
NULL)
384 _DBUS_SET_OOM (error);
390 DBusTransportOpenResult result;
392 _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error);
393 result = (* open_funcs[i].func) (entry, &transport, &tmp_error);
397 case DBUS_TRANSPORT_OPEN_OK:
398 _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error);
401 case DBUS_TRANSPORT_OPEN_NOT_HANDLED:
402 _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error);
405 case DBUS_TRANSPORT_OPEN_BAD_ADDRESS:
406 _DBUS_ASSERT_ERROR_IS_SET (&tmp_error);
409 case DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT:
410 _DBUS_ASSERT_ERROR_IS_SET (&tmp_error);
418 if (transport ==
NULL)
423 "Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")");
425 _DBUS_ASSERT_ERROR_IS_SET (&tmp_error);
431 _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error);
485 _dbus_verbose (
"finalizing\n");
504 _dbus_verbose (
"start\n");
515 _dbus_verbose (
"end\n");
539 void *unix_user_data;
552 _dbus_verbose (
"unlock\n");
555 allow = (* unix_user_function) (connection,
559 _dbus_verbose (
"lock post unix user function\n");
569 " was rejected, disconnecting\n",
584 void *windows_user_data;
597 if (windows_sid ==
NULL)
603 _dbus_verbose (
"unlock\n");
606 allow = (* windows_user_function) (connection,
610 _dbus_verbose (
"lock post windows user function\n");
615 _dbus_verbose (
"Client SID '%s' authorized\n", windows_sid);
619 _dbus_verbose (
"Client SID '%s' was rejected, disconnecting\n",
642 if (our_identity ==
NULL)
654 _dbus_verbose (
"Client authorized as SID '%s'"
655 "matching our SID '%s'\n",
669 _dbus_verbose (
"Client authorized as SID '%s'"
670 " but our SID is '%s', disconnecting\n",
676 _dbus_verbose (
"Client authorized as UID "DBUS_UID_FORMAT
677 " but our UID is "DBUS_UID_FORMAT
", disconnecting\n",
738 maybe_authenticated =
742 if (maybe_authenticated)
746 case DBUS_AUTH_STATE_AUTHENTICATED:
750 maybe_authenticated =
FALSE;
756 if (maybe_authenticated && !transport->
is_server)
758 const char *server_guid;
766 _dbus_verbose (
"Client expected GUID '%s' and we got '%s' from the server\n",
776 if (maybe_authenticated && transport->
is_server)
791 allow = auth_via_unix_user_function (transport);
796 allow = auth_via_windows_user_function (transport);
800 allow = auth_via_default_rules (transport);
804 maybe_authenticated =
FALSE;
810 return maybe_authenticated;
845 return DBUS_TRANSPORT_CAN_SEND_UNIX_FD(transport);
891 unsigned int condition)
986 int timeout_milliseconds)
990 _dbus_verbose (
"Transport iteration flags 0x%x timeout %d connected = %d\n",
993 if ((flags & (DBUS_ITERATION_DO_WRITING |
994 DBUS_ITERATION_DO_READING)) == 0)
1002 timeout_milliseconds);
1005 _dbus_verbose (
"end\n");
1025 encoded, &plaintext))
1034 orig_len = _dbus_string_get_length (buffer);
1043 _dbus_verbose (
" %d unused bytes sent to message loader\n",
1044 _dbus_string_get_length (buffer) -
1064 orig_len = _dbus_string_get_length (buffer);
1073 _dbus_verbose (
" %d unused bytes sent to message loader\n",
1074 _dbus_string_get_length (buffer) -
1089 _dbus_verbose (
"Not enough memory to transfer unused bytes from auth conversation\n");
1110 DBUS_AUTH_STATE_WAITING_FOR_MEMORY)
1117 !recover_unused_bytes (transport))
1145 _dbus_verbose (
"_dbus_transport_queue_messages()\n");
1157 message = link->
data;
1159 _dbus_verbose (
"queueing received message %p\n", message);
1185 _dbus_verbose (
"Corrupted message stream, disconnecting\n");
1256 live_messages_notify,
1274 live_messages_notify,
1326 DBUS_CREDENTIAL_UNIX_USER_ID))
1359 DBUS_CREDENTIAL_UNIX_PROCESS_ID))
1392 DBUS_CREDENTIAL_ADT_AUDIT_DATA_ID))
1437 char **windows_sid_p)
1441 *windows_sid_p =
NULL;
1449 DBUS_CREDENTIAL_WINDOWS_SID))
1497 const char **mechanisms)
1535 void (* callback) (
void *),
1542 #ifdef DBUS_ENABLE_STATS
1550 if (queue_bytes !=
NULL)
1553 if (queue_fds !=
NULL)
1556 if (peak_queue_bytes !=
NULL)
1557 *peak_queue_bytes = _dbus_counter_get_peak_size_value (transport->
live_messages);
1559 if (peak_queue_fds !=
NULL)
1560 *peak_queue_fds = _dbus_counter_get_peak_unix_fd_value (transport->
live_messages);
unsigned int dbus_uint32_t
A 32-bit unsigned integer on all platforms.
void _dbus_transport_set_max_received_unix_fds(DBusTransport *transport, long n)
See dbus_connection_set_max_received_unix_fds().
dbus_uid_t _dbus_credentials_get_unix_uid(DBusCredentials *credentials)
Gets the UNIX user ID in the credentials, or DBUS_UID_UNSET if the credentials object doesn't contain...
const char * _dbus_transport_get_server_id(DBusTransport *transport)
Gets the id of the server we are connected to (see dbus_server_get_id()).
dbus_bool_t(* handle_watch)(DBusTransport *transport, DBusWatch *watch, unsigned int flags)
The handle_watch method handles reading/writing data as indicated by the flags.
long max_live_messages_unix_fds
Max total unix fds of received messages.
DBusDispatchStatus
Indicates the status of incoming data on a DBusConnection.
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_transport_get_address(DBusTransport *transport)
Gets the address of a transport.
Implementation of DBusWatch.
#define NULL
A null pointer, defined appropriately for C or C++.
void(* DBusFreeFunction)(void *memory)
The type of a function which frees a block of memory.
dbus_bool_t _dbus_credentials_include(DBusCredentials *credentials, DBusCredentialType type)
Checks whether the given credential is present.
void _dbus_auth_get_unused_bytes(DBusAuth *auth, const DBusString **str)
Returns leftover bytes that were not used as part of the auth conversation.
long _dbus_message_loader_get_max_message_size(DBusMessageLoader *loader)
Gets the maximum allowed message size in bytes.
DBusTransportOpenResult _dbus_transport_open_platform_specific(DBusAddressEntry *entry, DBusTransport **transport_p, DBusError *error)
Opens platform specific transport types.
void _dbus_message_loader_putback_message_link(DBusMessageLoader *loader, DBusList *link)
Returns a popped message link, used to undo a pop.
dbus_bool_t(* connection_set)(DBusTransport *transport)
Called when transport->connection has been filled in.
void _dbus_message_loader_return_buffer(DBusMessageLoader *loader, DBusString *buffer)
Returns a buffer obtained from _dbus_message_loader_get_buffer(), indicating to the loader how many b...
More memory is needed to continue.
DBusAuth * auth
Authentication conversation.
unsigned int disconnected
TRUE if we are disconnected.
void dbus_free(void *memory)
Frees a block of memory previously allocated by dbus_malloc() or dbus_malloc0().
dbus_int32_t _dbus_credentials_get_adt_audit_data_size(DBusCredentials *credentials)
Gets the ADT audit data size in the credentials, or 0 if the credentials object doesn't contain ADT a...
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...
long max_live_messages_size
Max total size of received messages.
DBusFreeFunction free_windows_user_data
Function to free windows_user_data.
void _dbus_connection_lock(DBusConnection *connection)
Acquires the connection lock.
char * expected_guid
GUID we expect the server to have, NULL on server side or if we don't have an expectation.
#define _dbus_assert(condition)
Aborts with an error message if the condition is false.
void(* live_messages_changed)(DBusTransport *transport)
Outstanding messages counter changed.
Internals of DBusCounter.
#define DBUS_ERROR_INIT
Expands to a suitable initializer for a DBusError on the stack.
void * data
Data stored at this element.
unsigned int authenticated
Cache of auth state; use _dbus_transport_peek_is_authenticated() to query value.
const char * dbus_address_entry_get_method(DBusAddressEntry *entry)
Returns the method string of an address entry.
DBusTransportOpenResult _dbus_transport_open_socket(DBusAddressEntry *entry, DBusTransport **transport_p, DBusError *error)
Opens a TCP socket transport.
void _dbus_warn_check_failed(const char *format,...)
Prints a "critical" warning to stderr when an assertion fails; differs from _dbus_warn primarily in t...
dbus_bool_t _dbus_transport_get_unix_process_id(DBusTransport *transport, unsigned long *pid)
See dbus_connection_get_unix_process_id().
dbus_bool_t _dbus_transport_queue_messages(DBusTransport *transport)
Processes data we've read while handling a watch, potentially converting some of it to messages and q...
void _dbus_transport_set_unix_user_function(DBusTransport *transport, DBusAllowUnixUserFunction function, void *data, DBusFreeFunction free_data_function, void **old_data, DBusFreeFunction *old_free_data_function)
See dbus_connection_set_unix_user_function().
DBusAuthState _dbus_auth_do_work(DBusAuth *auth)
Analyzes buffered input and moves the auth conversation forward, returning the new state of the auth ...
void _dbus_message_loader_unref(DBusMessageLoader *loader)
Decrements the reference count of the loader and finalizes the loader when the count reaches zero...
DBusConnection * connection
Connection owning this transport.
int refcount
Reference count.
void dbus_address_entries_free(DBusAddressEntry **entries)
Frees a NULL-terminated array of address entries.
dbus_bool_t _dbus_transport_get_windows_user(DBusTransport *transport, char **windows_sid_p)
See dbus_connection_get_windows_user().
Implementation details of DBusConnection.
unsigned int send_credentials_pending
TRUE if we need to send credentials
dbus_bool_t(* get_socket_fd)(DBusTransport *transport, int *fd_p)
Get socket file descriptor.
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_bool_t _dbus_string_init(DBusString *str)
Initializes a string.
long _dbus_transport_get_max_message_size(DBusTransport *transport)
See dbus_connection_get_max_message_size().
dbus_bool_t _dbus_string_copy(const DBusString *source, int start, DBusString *dest, int insert_at)
Like _dbus_string_move(), but does not delete the section of the source string that's copied to the d...
#define DBUS_PID_UNSET
an invalid PID used to represent an uninitialized dbus_pid_t field
dbus_bool_t _dbus_message_add_counter(DBusMessage *message, DBusCounter *counter)
Adds a counter to be incremented immediately with the size/unix fds of this message, and decremented by the size/unix fds of this message when this message if finalized.
dbus_bool_t _dbus_transport_get_is_connected(DBusTransport *transport)
Returns TRUE if the transport has not been disconnected.
dbus_bool_t _dbus_get_autolaunch_address(const char *scope, DBusString *address, DBusError *error)
Returns the address of a new session bus.
dbus_bool_t _dbus_transport_set_auth_mechanisms(DBusTransport *transport, const char **mechanisms)
Sets the SASL authentication mechanisms supported by this transport.
dbus_bool_t _dbus_transport_init_base(DBusTransport *transport, const DBusTransportVTable *vtable, const DBusString *server_guid, const DBusString *address)
Initializes the base class members of DBusTransport.
There is more data to potentially convert to messages.
DBusCredentials * _dbus_auth_get_identity(DBusAuth *auth)
Gets the identity we authorized the client as.
Internals of DBusMessage.
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_bool_t _dbus_string_move(DBusString *source, int start, DBusString *dest, int insert_at)
Moves the end of one string into another string.
const char * dbus_address_entry_get_value(DBusAddressEntry *entry, const char *key)
Returns a value from a key of an entry.
long _dbus_transport_get_max_received_unix_fds(DBusTransport *transport)
See dbus_connection_set_max_received_unix_fds().
dbus_bool_t _dbus_credentials_are_anonymous(DBusCredentials *credentials)
Checks whether a credentials object contains a user identity.
void _dbus_transport_set_windows_user_function(DBusTransport *transport, DBusAllowWindowsUserFunction function, void *data, DBusFreeFunction free_data_function, void **old_data, DBusFreeFunction *old_free_data_function)
See dbus_connection_set_windows_user_function().
unsigned int receive_credentials_pending
TRUE if we need to receive credentials
dbus_bool_t _dbus_string_copy_data(const DBusString *str, char **data_return)
Copies the data from the string into a char*.
dbus_bool_t _dbus_transport_get_adt_audit_session_data(DBusTransport *transport, void **data, int *data_size)
See dbus_connection_get_adt_audit_session_data().
DBusCounter * live_messages
Counter for size/unix fds of all live messages.
Internal members of DBusAuth.
void _dbus_message_loader_set_max_message_size(DBusMessageLoader *loader, long size)
Sets the maximum size message we allow.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
DBUS_EXPORT int dbus_watch_get_socket(DBusWatch *watch)
Returns a socket to be watched, on UNIX this will return -1 if our transport is not socket-based so d...
dbus_bool_t _dbus_transport_peek_is_authenticated(DBusTransport *transport)
Returns TRUE if we have been authenticated.
void * unix_user_data
Data for unix_user_function.
All currently available data has been processed.
DBusAllowWindowsUserFunction windows_user_function
Function for checking whether a user is authorized.
DBusCredentials * _dbus_credentials_new_from_current_process(void)
Creates a new object with credentials (user ID and process ID) from the current process.
DBusAuth * _dbus_auth_server_new(const DBusString *guid)
Creates a new auth conversation object for the server side.
void _dbus_counter_unref(DBusCounter *counter)
Decrements refcount of the counter and possibly finalizes the counter.
void _dbus_watch_sanitize_condition(DBusWatch *watch, unsigned int *condition)
Sanitizes the given condition so that it only contains flags that the DBusWatch requested.
unsigned int allow_anonymous
TRUE if an anonymous client can connect
dbus_bool_t(* DBusAllowUnixUserFunction)(DBusConnection *connection, unsigned long uid, void *data)
Called during authentication to check whether the given UNIX user ID is allowed to connect...
Internals of DBusAddressEntry.
DBusMessageLoader * _dbus_message_loader_new(void)
Creates a new message loader.
void _dbus_set_bad_address(DBusError *error, const char *address_problem_type, const char *address_problem_field, const char *address_problem_other)
Sets DBUS_ERROR_BAD_ADDRESS.
void _dbus_connection_unref_unlocked(DBusConnection *connection)
Decrements the reference count of a DBusConnection.
Object representing an exception.
dbus_bool_t _dbus_transport_get_is_anonymous(DBusTransport *transport)
See dbus_connection_get_is_anonymous().
void _dbus_message_loader_set_pending_fds_function(DBusMessageLoader *loader, void(*callback)(void *), void *data)
Register a function to be called whenever the number of pending file descriptors in the loader change...
void dbus_set_error(DBusError *error, const char *name, const char *format,...)
Assigns an error name and message to a DBusError.
unsigned int unused_bytes_recovered
TRUE if we've recovered unused bytes from auth
The virtual table that must be implemented to create a new kind of transport.
char * address
Address of the server we are connecting to (NULL for the server side of a transport) ...
const char * _dbus_auth_get_guid_from_server(DBusAuth *auth)
Gets the GUID from the server if we've authenticated; gets NULL otherwise.
dbus_bool_t _dbus_message_loader_get_is_corrupted(DBusMessageLoader *loader)
Checks whether the loader is confused due to bad data.
dbus_bool_t(* DBusAllowWindowsUserFunction)(DBusConnection *connection, const char *user_sid, void *data)
Called during authentication to check whether the given Windows user ID is allowed to connect...
#define _DBUS_N_ELEMENTS(array)
Computes the number of elements in a fixed-size array using sizeof().
DBusTransport * _dbus_transport_open(DBusAddressEntry *entry, DBusError *error)
Try to open a new transport for the given address entry.
void _dbus_string_free(DBusString *str)
Frees a string created by _dbus_string_init().
dbus_bool_t _dbus_transport_get_unix_user(DBusTransport *transport, unsigned long *uid)
See dbus_connection_get_unix_user().
long _dbus_message_loader_get_max_message_unix_fds(DBusMessageLoader *loader)
Gets the maximum allowed number of unix fds per message.
#define TRUE
Expands to "1".
DBusMessageLoader * loader
Message-loading buffer.
unsigned int is_server
TRUE if on the server side
void _dbus_counter_set_notify(DBusCounter *counter, long size_guard_value, long unix_fd_guard_value, DBusCounterNotifyFunction function, void *user_data)
Sets the notify function for this counter; the notify function is called whenever the counter's value...
dbus_bool_t _dbus_transport_set_connection(DBusTransport *transport, DBusConnection *connection)
Sets the connection using this transport.
void dbus_move_error(DBusError *src, DBusError *dest)
Moves an error src into dest, freeing src and overwriting dest.
Object representing a transport such as a socket.
#define DBUS_UID_FORMAT
an appropriate printf format for dbus_uid_t
void(* do_iteration)(DBusTransport *transport, unsigned int flags, int timeout_milliseconds)
Called to do a single "iteration" (block on select/poll followed by reading or writing data)...
DBusCredentials * _dbus_credentials_new(void)
Creates a new credentials object.
DBusWatch * _dbus_watch_ref(DBusWatch *watch)
Increments the reference count of a DBusWatch object.
dbus_bool_t _dbus_transport_handle_watch(DBusTransport *transport, DBusWatch *watch, unsigned int condition)
Handles a watch by reading data, writing data, or disconnecting the transport, as appropriate for the...
DBusList * _dbus_message_loader_pop_message_link(DBusMessageLoader *loader)
Pops a loaded message inside a list link (passing ownership of the message and link to the caller)...
DBusTransport * _dbus_transport_ref(DBusTransport *transport)
Increments the reference count for the transport.
dbus_bool_t _dbus_transport_try_to_authenticate(DBusTransport *transport)
Returns TRUE if we have been authenticated.
void _dbus_message_loader_get_buffer(DBusMessageLoader *loader, DBusString **buffer)
Gets the buffer to use for reading data from the network.
void _dbus_auth_unref(DBusAuth *auth)
Decrements the refcount of an auth object.
void _dbus_transport_do_iteration(DBusTransport *transport, unsigned int flags, int timeout_milliseconds)
Performs a single poll()/select() on the transport's file descriptors and then reads/writes data as a...
long _dbus_transport_get_max_received_size(DBusTransport *transport)
See dbus_connection_get_max_received_size().
long _dbus_transport_get_max_message_unix_fds(DBusTransport *transport)
See dbus_connection_get_max_message_unix_fds().
DBusAllowUnixUserFunction unix_user_function
Function for checking whether a user is authorized.
dbus_pid_t _dbus_credentials_get_pid(DBusCredentials *credentials)
Gets the UNIX process ID in the credentials, or DBUS_PID_UNSET if the credentials object doesn't cont...
void _dbus_transport_set_pending_fds_function(DBusTransport *transport, void(*callback)(void *), void *data)
Register a function to be called whenever the number of pending file descriptors in the loader change...
DBusCounter * _dbus_counter_new(void)
Creates a new DBusCounter.
void _dbus_connection_queue_received_message_link(DBusConnection *connection, DBusList *link)
Adds a message-containing list link to the incoming message queue, taking ownership of the link and t...
void _dbus_transport_set_allow_anonymous(DBusTransport *transport, dbus_bool_t value)
See dbus_connection_set_allow_anonymous()
#define DBUS_ERROR_NO_MEMORY
There was not enough memory to complete an operation.
#define _DBUS_INT32_MAX
Maximum value of type "int32".
void _dbus_credentials_unref(DBusCredentials *credentials)
Decrement refcount on credentials.
void _dbus_transport_set_max_received_size(DBusTransport *transport, long size)
See dbus_connection_set_max_received_size().
#define FALSE
Expands to "0".
dbus_bool_t _dbus_credentials_same_user(DBusCredentials *credentials, DBusCredentials *other_credentials)
Check whether the user-identifying credentials in two credentials objects are identical.
DBusCredentials * credentials
Credentials of other end read from the socket.
int _dbus_transport_get_pending_fds_count(DBusTransport *transport)
Return how many file descriptors are pending in the loader.
dbus_bool_t dbus_parse_address(const char *address, DBusAddressEntry ***entry, int *array_len, DBusError *error)
Parses an address string of the form:
dbus_bool_t _dbus_transport_can_pass_unix_fd(DBusTransport *transport)
Returns TRUE if the transport supports sending unix fds.
void _dbus_watch_unref(DBusWatch *watch)
Decrements the reference count of a DBusWatch object and finalizes the object if the count reaches ze...
DBusMessage * _dbus_message_loader_peek_message(DBusMessageLoader *loader)
Peeks at first loaded message, returns NULL if no messages have been queued.
const char * _dbus_credentials_get_windows_sid(DBusCredentials *credentials)
Gets the Windows user SID in the credentials, or NULL if the credentials object doesn't contain a Win...
dbus_bool_t _dbus_message_loader_queue_messages(DBusMessageLoader *loader)
Converts buffered data into messages, if we have enough data.
dbus_bool_t _dbus_transport_get_socket_fd(DBusTransport *transport, int *fd_p)
Get the socket file descriptor, if any.
DBusConnection * _dbus_connection_ref_unlocked(DBusConnection *connection)
Increments the reference count of a DBusConnection.
void(* disconnect)(DBusTransport *transport)
Disconnect this transport.
char * _dbus_strdup(const char *str)
Duplicates a string.
void _dbus_transport_disconnect(DBusTransport *transport)
Closes our end of the connection to a remote application.
void _dbus_transport_finalize_base(DBusTransport *transport)
Finalizes base class members of DBusTransport.
unsigned long dbus_uid_t
A user ID.
DBusAuth * _dbus_auth_client_new(void)
Creates a new auth conversation object for the client side.
void _dbus_message_loader_set_max_message_unix_fds(DBusMessageLoader *loader, long n)
Sets the maximum unix fds per message we allow.
const DBusTransportVTable * vtable
Virtual methods for this instance.
void _dbus_connection_unlock(DBusConnection *connection)
Releases the connection lock.
void _dbus_transport_set_max_message_size(DBusTransport *transport, long size)
See dbus_connection_set_max_message_size().
Implementation details of DBusMessageLoader.
void * windows_user_data
Data for windows_user_function.
DBusDispatchStatus _dbus_transport_get_dispatch_status(DBusTransport *transport)
Reports our current dispatch status (whether there's buffered data to be queued as messages...
dbus_bool_t dbus_error_is_set(const DBusError *error)
Checks whether an error occurred (the error is set).
void _dbus_transport_set_max_message_unix_fds(DBusTransport *transport, long n)
See dbus_connection_set_max_message_unix_fds().
DBusFreeFunction free_unix_user_data
Function to free unix_user_data.
void _dbus_transport_unref(DBusTransport *transport)
Decrements the reference count for the transport.
void(* finalize)(DBusTransport *transport)
The finalize method must free the transport.
long _dbus_counter_get_unix_fd_value(DBusCounter *counter)
Gets the current value of the unix fd counter.
int _dbus_message_loader_get_pending_fds_count(DBusMessageLoader *loader)
Return how many file descriptors are pending in the loader.
long _dbus_counter_get_size_value(DBusCounter *counter)
Gets the current value of the size counter.
void * _dbus_credentials_get_adt_audit_data(DBusCredentials *credentials)
Gets the ADT audit data in the credentials, or NULL if the credentials object doesn't contain ADT aud...