1. 11 Mar, 2015 2 commits
  2. 13 Jun, 2011 1 commit
    • Simon McVittie's avatar
      DBusSocketSet: new abstraction for struct pollfd[] or whatever · d3d44dd3
      Simon McVittie authored
      In this second version of this patch, DBusSocketSet is an "abstract base
      class" so that when using a better OS-specific API fails, we can always fall
      back to _dbus_poll(). For instance, this is necessary when the "better
      OS-specific API" is epoll on Linux, the build machine has a modern glibc
      version, and the host machine either has an old kernel, is emulated in qemu
      (which does not support the epoll syscalls yet), or both.
      
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
      Bug-NB: NB#197191
      Bug-NB: NB#225019
      d3d44dd3
  3. 16 Mar, 2010 1 commit
  4. 14 Jul, 2009 1 commit
  5. 10 Jul, 2009 1 commit
  6. 20 May, 2009 2 commits
  7. 05 Jun, 2008 1 commit
    • Colin Walters's avatar
      Bug 15740: Solaris/ADT auditing support (simon zheng) · ab1eb1fd
      Colin Walters authored
      	* bus/driver.c: Add GetAdtAuditSessionData method
      	which returns audit data for a connection.
      	* configure.in: Detect ADT auditing support
      	* dbus/dbus-auth.c: Read ADT auditing creds.
      	* dbus/dbus-connection.c: Implement
      	dbus_connection_get_adt_audit_session_data.
      	* dbus/dbus-connection.h: Export it.
      	* dbus/dbus-credentials.c: Add support for
      	gathering adt_audit_data and retrieving it
      	via _dbus_credentials_get_adt_audit_data.
      	* dbus/dbus-credentials.h: Add
      	DBUS_CREDENTIAL_ADT_AUDIT_DATA_ID.
      	* dbus/dbus-protocol.h: New error
      	DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN.
      	* dbus/dbus-sysdeps.c: Support for reading
      	audit credentials via ADT API.
      	* dbus/dbus-transport.c: New function
      	_dbus_transport_get_adt_audit_session_data
      	to retrieve credentials.
      	* dbus/dbus-transport.h: Export it.
      ab1eb1fd
  8. 10 Oct, 2007 1 commit
  9. 14 Jul, 2007 1 commit
  10. 18 Jun, 2007 2 commits
    • Havoc Pennington's avatar
      2007-06-18 Havoc Pennington <hp@redhat.com> · 54b94343
      Havoc Pennington authored
      	* doc/dbus-specification.xml: document org.freedesktop.DBus.GetId()
      
      	* bus/driver.c (bus_driver_handle_get_id): implement org.freedesktop.DBus.GetId()
      
      	* bus/bus.c (bus_context_new): generate a unique ID for each bus context
      
      	* dbus/dbus-connection.c (dbus_connection_get_server_id): new function
      
      	* dbus/dbus-bus.c (dbus_bus_get_id): new function
      
      	* dbus/dbus-server.c (dbus_server_get_id): new function
      54b94343
    • Havoc Pennington's avatar
      2007-06-18 Havoc Pennington <hp@redhat.com> · 98f19852
      Havoc Pennington authored
      	* dbus/dbus-watch.c (dbus_watch_get_socket)
      	(dbus_watch_get_unix_fd): new API to match DBusConnection
      	(dbus_watch_get_fd): deprecate this
      
      	Throughout: just s/dbus_watch_get_fd/dbus_watch_get_socket/g for
      	now since all the transports use sockets anyway
      98f19852
  11. 12 Jun, 2007 1 commit
    • Havoc Pennington's avatar
      2007-06-12 Havoc Pennington <hp@redhat.com> · 94125e89
      Havoc Pennington authored
      	* dbus/dbus-auth.c (sha1_handle_second_client_response)
      	(handle_server_data_anonymous_mech): add the process ID from
      	socket credentials, if available, even if not using EXTERNAL
      
      	* dbus/dbus-transport.c (auth_via_default_rules): support
      	allow_anonymous flag
      
      	* dbus/dbus-connection.c (dbus_connection_get_is_anonymous)
      	(dbus_connection_set_allow_anonymous): new API for controlling
      	anonymous access
      94125e89
  12. 09 Jun, 2007 1 commit
    • Havoc Pennington's avatar
      2007-06-09 Havoc Pennington <hp@redhat.com> · 7be5fd95
      Havoc Pennington authored
      	* bus/policy.c (bus_policy_create_client_policy): gracefully
      	continue if the connection has no unix user - just don't apply
      	any unix user dependent rules.
      
      	* bus/config-parser.c: remove dbus-userdb.h usage
      
      	* bus/bus.c: remove dbus-userdb.h usage
      
      	* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
      	support Windows user function; also, fix the logic for checking
      	auth as root in the default auth code (broken in the previous
      	commit)
      
      	* dbus/dbus-connection.c
      	(dbus_connection_set_windows_user_function): new function
      	(dbus_connection_get_windows_user): new function
      7be5fd95
  13. 15 Nov, 2006 1 commit
    • Havoc Pennington's avatar
      2006-11-14 Havoc Pennington <hp@redhat.com> · d3204dc4
      Havoc Pennington authored
      	* dbus/dbus-misc.c, dbus/dbus-misc.h: Move
      	dbus_get_local_machine_id() to its own file, no substantive
      	changes. There are a couple other things we might want to add that
      	are "misc" so moving out of dbus-connection.[hc] which is big
      	enough already.
      d3204dc4
  14. 21 Oct, 2006 4 commits
  15. 01 Oct, 2006 1 commit
    • Havoc Pennington's avatar
      2006-09-30 Havoc Pennington <hp@redhat.com> · d8155bf5
      Havoc Pennington authored
      	* configure.in (LT_CURRENT, LT_AGE): increment current and age to
      	reflect addition of interfaces.
      
      	* doc/dbus-specification.xml: describe a new
      	org.freedesktop.DBus.Peer.GetMachineId method
      
      	* dbus/dbus-string.c (_dbus_string_skip_white_reverse): new function
      	(_dbus_string_skip_white, _dbus_string_skip_blank): use new
      	DBUS_IS_ASCII_BLANK, DBUS_IS_ASCII_WHITE macros and fix assertion
      	at end of skip_white
      	(_dbus_string_chop_white): new function
      
      	* bus/connection.c (bus_connections_setup_connection): call
      	dbus_connection_set_route_peer_messages.
      
      	* dbus/dbus-connection.c
      	(_dbus_connection_peer_filter_unlocked_no_update): modify to
      	support a GetMachineId method.
      
      	Also, support a new flag to let the bus pass peer methods through
      	to apps on the bus, which can be set with
      	dbus_connection_set_route_peer_messages.
      
      	Finally, handle and return an error for anything unknown on the
      	Peer interface, which will allow us to extend the Peer interface
      	in the future without fear that we're now intercepting something
      	apps were wanting to see.
      
      	* tools/dbus-uuidgen.c: a thin wrapper around the functions in
      	dbus/dbus-uuidgen.c
      
      	* dbus/dbus-uuidgen.c: implement the bulk of the dbus-uuidgen
      	binary here, since most of the code is already in libdbus
      
      	* dbus/dbus-sysdeps.c (_dbus_read_local_machine_uuid): read the
      	uuid from the system config file
      
      	* dbus/dbus-internals.c (_dbus_generate_uuid, _dbus_uuid_encode)
      	(_dbus_read_uuid_file_without_creating)
      	(_dbus_create_uuid_file_exclusively, _dbus_read_uuid_file): new
      	uuid-related functions, partly factored out from dbus-server.c
      
      	* dbus/dbus-sysdeps.c (_dbus_error_from_errno): convert EEXIST to
      	DBUS_ERROR_FILE_EXISTS instead of EEXIST
      
      	* dbus/dbus-protocol.h (DBUS_ERROR_FILE_EXISTS): add file exists error
      
      	* tools/dbus-cleanup-sockets.1: explain what the point of this
      	thing is a bit more
      
      	* autogen.sh (run_configure): add --config-cache to default
      	configure args
      
      	* dbus/dbus-internals.h (_DBUS_ASSERT_ERROR_IS_SET): disable the
      	error set/clear assertions when DBUS_DISABLE_CHECKS is defined
      
      	* tools/dbus-launch.c (main): if xdisplay hasn't been opened,
      	don't try to save address, fixes crash in make check
      d8155bf5
  16. 16 Sep, 2006 1 commit
    • Havoc Pennington's avatar
      2006-09-16 Havoc Pennington <hp@redhat.com> · e001455a
      Havoc Pennington authored
              Attempt auditing public API to remove all cases where a Unix
      	function returns weird emulated goo to Windows. This probably
      	breaks the bus daemon on Windows, to fix it again we may
      	need to stop processing unix-specific config options on Windows,
      	and may need to add Windows-specific public API or config options.
      
      	* configure.in (LT_CURRENT, LT_AGE): increment current and age,
      	to reflect added interfaces; should not break soname.
      
      	* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated): do
      	not invoke unix user function on Windows. Kind of a hacky fix, but
      	we don't want a "unix uid" leaking out on Windows.
      
      	* dbus/dbus-connection.c (dbus_connection_get_socket): add new API
      	to get the socket fd on Windows or UNIX
      	(dbus_connection_get_unix_fd): make this always fail on Windows
      e001455a
  17. 07 Jul, 2006 2 commits
  18. 30 Nov, 2005 1 commit
    • John Palmieri's avatar
      * dbus/dbus-connection.c (dbus_connection_read_write): Add new · 263d1dfd
      John Palmieri authored
        method for getting messages off the bus in the absence of a
        mainloop.  This method is much like
        dbus_connection_read_write_dispatch except it does not dispatch
        the messages to a registered filter function.  Instead it
        allows a developer to process messages by directly popping
        them off the bus.
      263d1dfd
  19. 06 Jun, 2005 1 commit
    • David Zeuthen's avatar
      2005-06-06 David Zeuthen <davidz@redhat.com> · 982de718
      David Zeuthen authored
              * doc/TODO: Add item about need to remove deprecated functions.
      
              * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
      
              * dbus/dbus-connection.c (dbus_connection_disconnect): New function
              to repair the ABI which was broken with the last commit.
      982de718
  20. 02 Jun, 2005 1 commit
    • John Palmieri's avatar
      * dbus/dbus-connection.c, dbus/dbus-connection.h · 11fd3b96
      John Palmieri authored
      	(dbus_connection_disconnect): renamed to dbus_connection_close
      	for API symmetry with dbus_connection_open
      	(_dbus_connection_open_internal):
      	s/dbus_connection_disconnect/dbus_connection_close
      
      	* dbus/dbus-bus.c (dbus_bus_get):
      	s/dbus_connection_disconnect/dbus_connection_close
      
      	* bus/connection.c (bus_connections_unref,
      	bus_connections_setup_connection, bus_connections_expire_incomplete):
      	s/dbus_connection_disconnect/dbus_connection_close
      
      	* bus/dispatch.c (bus_dispatch, kill_client_connection,
      	kill_client_connection_unchecked, check_hello_connection):
      	s/dbus_connection_disconnect/dbus_connection_close
      
      	* bus/bus.c (new_connection_callback):
      	s/dbus_connection_disconnect/dbus_connection_close
      11fd3b96
  21. 24 Apr, 2005 1 commit
    • Havoc Pennington's avatar
      2005-04-23 Havoc Pennington <hp@redhat.com> · 64f3d8f6
      Havoc Pennington authored
      	* dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
      	reported by Tony Houghton
      
      	* test/test-service.c (main): test
      	dbus_connection_get_object_path_data()
      
      	* dbus/dbus-object-tree.c (find_handler): be sure we always init
      	the exact_match
      	(_dbus_object_tree_get_user_data_unlocked): new function used by
      	dbus_connection_get_object_path_data()
      	(do_register): add assertion test for get_user_data_unlocked
      	(object_tree_test_iteration): more tests
      
      	* dbus/dbus-connection.c (dbus_connection_get_object_path_data):
      	new function from Dan Reed to let you get the user data from
      	dbus_connection_register_object_path()
      64f3d8f6
  22. 09 Apr, 2005 1 commit
    • Havoc Pennington's avatar
      2005-04-09 Havoc Pennington <hp@redhat.com> · 8475b3a8
      Havoc Pennington authored
      	* dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
      
      	* glib/dbus-glib-tool.c (main): fix warning
      
      	* glib/dbus-binding-tool-glib.c (generate_glue): fix warning
      
      	* dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
      	add a new function that can be used in simple applications that
      	don't have a main loop and are willing to block
      8475b3a8
  23. 26 Feb, 2005 1 commit
    • Havoc Pennington's avatar
      2005-02-26 Havoc Pennington <hp@redhat.com> · ee27481d
      Havoc Pennington authored
      	* doc/TODO: remove the "guid" item
      
      	* test/glib/test-profile.c (no_bus_thread_func): use open_private
      	(with_bus_thread_func): use open_private
      
      	* dbus/dbus-connection.c (dbus_connection_open_private): new
      	function that works like the old dbus_connection_open()
      	(dbus_connection_open): now returns an existing connection if
      	possible
      
      	* dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
      	through the GUID to the transport
      
      	* dbus/dbus-server.c (_dbus_server_init_base): keep around the
      	GUID in hex-encoded form.
      
      	* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
      	pass GUID argument in to the transport
      
      	* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
      	guid argument
      
      	* dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
      
      	* dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
      ee27481d
  24. 26 Nov, 2004 1 commit
    • Havoc Pennington's avatar
      2004-11-25 Havoc Pennington <hp@redhat.com> · dbdea921
      Havoc Pennington authored
              The primary change here is to always write() once before adding
      	the write watch, which gives us about a 10% performance increase.
      
      	* dbus/dbus-transport-unix.c: a number of modifications to cope
      	with removing messages_pending
      	(check_write_watch): properly handle
      	DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
      	messages_pending stuff
      	(check_read_watch): properly handle WAITING_FOR_MEMORY and
      	AUTHENTICATED cases
      	(unix_handle_watch): after writing, see if the write watch can be
      	removed
      	(unix_do_iteration): assert that write_watch/read_watch are
      	non-NULL rather than testing that they aren't, since they
      	aren't allowed to be NULL. check_write_watch() at the end so
      	we add the watch if we did not finish writing (e.g. got EAGAIN)
      
      	* dbus/dbus-transport-protected.h: remove messages_pending call,
      	since it resulted in too much inefficient watch adding/removing;
      	instead we now require that the transport user does an iteration
      	after queueing outgoing messages, and after trying the first
      	write() we add a write watch if we got EAGAIN or exceeded our
      	max bytes to write per iteration setting
      
      	* dbus/dbus-string.c (_dbus_string_validate_signature): add this
      	function
      
      	* dbus/dbus-server-unix.c (unix_finalize): the socket name was
      	freed and then accessed, valgrind flagged this bug, fix it
      
      	* dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
      	as the last valid field plus 1, where really it is equal to the
      	last valid field. Corrects some message corruption issues.
      
      	* dbus/dbus-mainloop.c: verbosity changes
      
      	* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
      	instead of aborting in one of the test codepaths
      
      	* dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
      	caused not printing the pid ever again if a verbose was missing
      	the newline at the end
      	(_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
      
      	* dbus/dbus-connection.c: verbosity changes;
      	(dbus_connection_has_messages_to_send): new function
      	(_dbus_connection_message_sent): no longer call transport->messages_pending
      	(_dbus_connection_send_preallocated_unlocked): do one iteration to
      	try to write() immediately, so we can avoid the write watch. This
      	is the core purpose of this patchset
      	(_dbus_connection_get_dispatch_status_unlocked): if disconnected,
      	dump the outgoing message queue, so nobody will get confused
      	trying to send them or thinking stuff is pending to be sent
      
      	* bus/test.c: verbosity changes
      
      	* bus/driver.c: verbosity/assertion changes
      
      	* bus/dispatch.c: a bunch of little tweaks to get it working again
      	because this patchset changes when/where you need to block.
      dbdea921
  25. 09 Sep, 2004 1 commit
  26. 10 Aug, 2004 1 commit
  27. 30 Jul, 2004 1 commit
    • Havoc Pennington's avatar
      2004-07-24 Havoc Pennington <hp@redhat.com> · 1e9b185b
      Havoc Pennington authored
      	SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
      
      	* bus/selinux.c, bus/selinux.h: new file encapsulating selinux
      	functionality
      
      	* configure.in: add --enable-selinux
      
      	* bus/policy.c (bus_policy_merge): add FIXME to a comment
      
      	* bus/main.c (main): initialize and shut down selinux
      
      	* bus/connection.c: store SELinux ID on each connection, to avoid
      	repeated getting of the string context and converting it into
      	an ID
      
      	* bus/bus.c (bus_context_get_policy): new accessor, though it
      	isn't used
      	(bus_context_check_security_policy): check whether the security
      	context of sender connection can send to the security context of
      	recipient connection
      
      	* bus/config-parser.c: add parsing for <selinux> and <associate>
      
      	* dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
      	implement dbus_connection_get_unix_fd()
      
      	* dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
      	function, used by the selinux stuff
      1e9b185b
  28. 19 Jul, 2004 1 commit
    • David Zeuthen's avatar
      2004-07-19 David Zeuthen <david@fubar.dk> · c9c0adce
      David Zeuthen authored
      	* dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
      
      	* bus/dispatch.c:
      	(check_get_connection_unix_user): Debug says GetProperty; but the
      	method is called GetConnectionUnixUser
      	(check_get_connection_unix_process_id): New function
      	(bus_dispatch_test): Actually call check_get_connection_unix_user();
      	also call check_get_connection_unix_process_id()
      
      	* bus/driver.c:
      	(bus_driver_handle_get_connection_unix_process_id): New function,
      	handles GetConnectionUnixProcessID on the org.freedesktop.DBus
      	interface
      
      	* dbus/dbus-auth.c:
      	(handle_server_data_external_mech): Set pid from the credentials
      	obtained from the socket
      
      	* dbus/dbus-connection.c:
      	(dbus_connection_get_unix_process_id): New function
      
      	* dbus/dbus-connection.h:
      	Add prototype for dbus_connection_get_unix_process_id
      
      	* dbus/dbus-transport.c:
      	(_dbus_transport_get_unix_process_id): New function
      
      	* dbus/dbus-transport.h:
      	Add prototype for _dbus_transport_get_unix_process_id
      c9c0adce
  29. 20 Jun, 2004 1 commit
    • Havoc Pennington's avatar
      2004-06-20 Havoc Pennington <hp@redhat.com> · 961e6ca4
      Havoc Pennington authored
              * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
      	codes from the dbus error names
      
              * glib/dbus-glib.h: move to subdir dbus/ since it's included
      	as dbus/dbus-glib.h and that breakage is now visible due to
      	including dbus/dbus-glib.h in dbus-glib-lowlevel.h
      
      	* glib/dbus-glib.h: s/gproxy/g_proxy/
      
      	* dbus/dbus-shared.h: new header to hold stuff shared with
      	binding APIs
      
      	* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
      	than dbus-errors.h
      
      	* glib/dbus-glib.h (dbus_set_g_error): move to
      	dbus-glib-lowlevel.h
      
      	* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
      	of stuff to enable this
      
      	* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
      
      	* a bunch of other changes with the same basic "separate glib
      	bindings from dbus.h" theme
      961e6ca4
  30. 05 Jun, 2004 1 commit
    • Olivier Andrieu's avatar
      2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net> · 96f6740f
      Olivier Andrieu authored
      	* dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
      	registration functions take the path argument as char* instead of
      	char**.
      
      	* dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
      	split off the path decompostion part of
      	_dbus_demarshal_object_path. Some misc. fixes to silence compiler
      	warnings.
      
      	* glib/dbus-gobject.c, test/test-service.c: update accordingly.
      96f6740f
  31. 02 Dec, 2003 1 commit
  32. 27 Nov, 2003 1 commit
  33. 22 Sep, 2003 1 commit
    • Havoc Pennington's avatar
      2003-09-21 Havoc Pennington <hp@pobox.com> · 25cb8619
      Havoc Pennington authored
      	* dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
      	by default for message bus connections.
      
      	* dbus/dbus-connection.c (dbus_connection_dispatch): exit if
      	exit_on_disconnect flag is set and we process the disconnected
      	signal.
      	(dbus_connection_set_exit_on_disconnect): new function
      25cb8619