1. 21 Jun, 2018 1 commit
  2. 16 Aug, 2016 1 commit
  3. 13 Jul, 2015 1 commit
  4. 18 Feb, 2015 1 commit
  5. 05 Jun, 2014 1 commit
    • Alban Crequy's avatar
      CVE-2014-3477: deliver activation errors correctly, fixing Denial of Service · 24c59070
      Alban Crequy authored
      How it should work:
      
      When a D-Bus message activates a service, LSMs (SELinux or AppArmor) check
      whether the message can be delivered after the service has been activated. The
      service is considered activated when its well-known name is requested with
      org.freedesktop.DBus.RequestName. When the message delivery is denied, the
      service stays activated but should not receive the activating message (the
      message which triggered the activation). dbus-daemon is supposed to drop the
      activating message and reply to the sender with a D-Bus error message.
      
      However, it does not work as expected:
      
      1. The error message is delivered to the service instead of being delivered to
         the sender. As an example, the error message could be something like:
      
           An SELinux policy prevents this sender from sending this
           message to this recipient, [...] member="MaliciousMethod"
      
         If the sender and the service are malicious confederates and agree on a
         protocol to insert information in the member name, the sender can leak
         information to the service, even though the LSM attempted to block the
         communication between the sender and the service.
      
      2. The error message is delivered as a reply to the RequestName call from
         service. It means the activated service will believe it cannot request the
         name and might exit. The sender could activate the service frequently and
         systemd will give up activating it. Thus the denial of service.
      
      The following changes fix the bug:
      - bus_activation_send_pending_auto_activation_messages() only returns an error
        in case of OOM. The prototype is changed to return TRUE, or FALSE on OOM
        (and its only caller sets the OOM error).
      - When a client is not allowed to talk to the service, a D-Bus error message
        is pre-allocated to be delivered to the client as part of the transaction.
        The error is not propagated to the caller so RequestName will not fail
        (except on OOM).
      
      [fixed a misleading comment -smcv]
      
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78979Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      Reviewed-by: Colin Walters's avatarColin Walters <walters@verbum.org>
      24c59070
  6. 12 Nov, 2013 1 commit
  7. 22 Mar, 2012 1 commit
  8. 04 Jan, 2012 1 commit
    • Simon McVittie's avatar
      Revert all changes since a36d4918 · 5df8c3db
      Simon McVittie authored
      Someone seems to have merged part of master into 1.4. Again. Let's go
      back to the "last known good" point (the branch-point of some 1.4
      branches I had locally), then we can cherry-pick the changes that
      should have gone in.
      5df8c3db
  9. 19 Sep, 2011 1 commit
  10. 19 Mar, 2010 1 commit
  11. 14 Jul, 2009 1 commit
  12. 10 Jul, 2009 1 commit
  13. 14 Jul, 2007 1 commit
  14. 18 Aug, 2006 1 commit
    • John Palmieri's avatar
      Patch provided by Ralf Habacker (ralf dot habacker at freenet dot de) · 7cd52919
      John Palmieri authored
      * dbus/dbus-sysdeps.c, dbus/dbus-threads.c, dbus/dbus-internals.h:
        Add two more global locks for use on windows platforms.  These are
        unused on non-windows platforms but are not ifdefed out to avoid
        potential bugs (i.e. the few bytes lost does not warrent the extra
        maintanence and complexity that having seperate sets of locks would
        cause)
      7cd52919
  15. 14 Aug, 2006 1 commit
    • John Palmieri's avatar
      Patches by Kjartan Maraas <kmaraas at gnome dot org> · c1091cbb
      John Palmieri authored
              * bus/services.c (bus_service_list_queued_owners):
              Add a pointer cast to fix compiler warning
      
              * dbus/dbus-dataslot.c (_dbus_data_slot_list_get):
              return a NULL instead of FALSE since the return type
              is not expecting a boolean
      
              * dbus/dbus-marshal-basic.c (_dbus_marshal_test):
              Remove unused variable
      
              * dbus/dbus-marshal-recursive-util.c (node_new):
              return a NULL instead of FALSE since the return type
              is not expecting a boolean
      
              * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
              Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
              because we are expecting a pointer not a boolean
      
              * dbus/dbus-sysdeps-util.c (_dbus_get_tmpdir):
              add void as the parameter so some compilers
              don't complain
      
              * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket,
                _dbus_transport_new_for_tcp_socket):
              Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
              because we are expecting a pointer not a boolean
      
              * test/shell-test.c (test_command_line):
              cast the second argument to _dbus_list_append to avoid compiler
              warnings
      
              * test/test-names.c (main): remove unused variable
      
              * test/test-service.c (check_hello_from_self_reply):
              Initialize echo_message and echo_reply to NULL
      
              * test/test-shell-service.c (handle_echo):
              Remove unused variable and cast the third parameter passed to
              dbus_connection_get_object_path_data to avoid compiler warrnings
      
              * test/name-test/test-names.c (clear_message_queue):
              Remove unused function
      
              * test/name-test/test-pending-call-dispatch.c:
              Fix format string in printf
      c1091cbb
  16. 22 Nov, 2005 1 commit
    • John Palmieri's avatar
      * configure.in: Add test/name-test/Makefile to the generated · 1a163e76
      John Palmieri authored
      	Makefile list
      
      	* dbus/dbus-shared.h (#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT):
      	New flag which replaces DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
      	(#define DBUS_NAME_FLAG_DO_NOT_QUEUE): New flag for specifying
      	not to queue an ower if it can't be the primary owner
      
      	* bus/bus.h: Add new internal BusOwner struct
      
      	* bus/driver.c (bus_driver_handle_hello): Send flags (0 for default)
      	to bus_registry_ensure and don't set the prohibit_replacement flag
      	since they are now set per BusOwner and not per name.
      	(bus_driver_handle_list_queued_owners): bus method (ListQueuedOwners)
      	that returns the list of connections in a name's connection queue
      
      	* bus/services.c (struct BusService): remove prohibit_replacement field
      	(struct BusOwner): new struct for keeping track of queued connections
      	and their associated flags for the queue
      	(struct BusRegistry): add a BusOwner memory pool
      	(bus_registry_new): initialize the BusOwner memory pool
      	(bus_registry_unref): free the BusOwner memory pool
      	(_bus_service_find_owner_link): new internal method for
      	searching the queue for a specific connection
      	(bus_owner_set_flags): new method for adding setting the flags on a
      	bus owner
      	(bus_owner_new): new method that creates a BusOwner object from the
      	pool and sets its flags
      	(bus_owner_ref, bus_owner_unref): ref counting for BusOwner objects
      	(bus_registry_ensure): Add the flags parameter
      	(bus_registry_acquire_service): Switch from using raw connections to
      	using the BusOwner struct
      	Add new state machine for dealing with the new set of flags
      	(bus_registry_set_service_context_table, struct OwnershipCancelData,
      	cancel_ownership, free_ownership_cancel_data,
      	add_cancel_ownership_to_transaction, struct OwnershipRestoreData,
      	restore_ownership, free_ownership_restore_data,
      	add_restore_ownership_to_transaction): Switch to using BusOwner
      	instead of raw connections
      	(bus_service_add_owner): Add flags parameter
      	Switch to using BusOwner instead of raw connections
      	Add state machine for dealing with the new set of flags
      	(bus_service_swap_owner): Swaps the first and second owners in the
      	queue.  Used to make sure proper signals are sent when a service looses
      	or gains primary ownership.  We never insert an owner at the top of the
      	queue.  Instead we insert it in the second position and then swap.
      	(bus_service_remove_owner): Remove the owner from the queue sending
      	out the NameLost and NameOwnerChanged signals if the we were the
      	primary owner
      	(bus_service_get_primary_owners_connection): New method that extracts
      	the connection from the primary owner
      	(bus_service_get_primary_owner): Returns the BusOwner instead of the
      	connection
      	(bus_service_get_allow_replacement): Changed from the old
      	bus_service_get_prohibit_replacement method.  Checks the flags of the
      	primary owner and returns if it can be replaced or not
      	(bus_service_set_prohibit_replacement): removed
      	(bus_service_has_owner): returns TRUE if and owner with
      	the specified connection exists in the queue
      
      	* dbus/dbus-bus.c (dbus_bus_connection_get_unique_name): New helper
      	method that only compiles if tests are enabled.  Allows us to get the
      	unique name of a connection so we can check it against the queue when
      	doing regression tests
      
      	* bus/activation.c (bus_activation_send_pending_auto_activate),
      	bus/dispatch.c (bus_dispatch),
      	bus/driver.c (bus_driver_handle_get_service_owner,
      	bus_driver_handle_get_connection_unix_user,
      	bus_driver_handle_get_connection_unix_process_id,
      	bus_driver_handle_get_connection_selinux_security_context),
      	bus/signals.c (connection_is_primary_owner):
      	use bus_service_get_primary_owners_connection instead of
      	bus_service_get_primary_owner
      
      	* dbus/dbus-sysdeps.c (_dbus_connect_unix_socket,
      	_dbus_listen_unix_socket): Calculate the length of the socket
      	path and use that instead of using a fixed length which was
      	causing socket names to contain many trailing Nul bytes.
      
      	* dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c
      	(dbus_g_method_get_sender): New method for extracting the sender
      	from a DBusGMethodInvocation
      	(dbus_g_method_return_get_reply): changed name to
      	dbus_g_method_get_reply
      	(dbus_g_method_return_send_reply): changed name to
      	dbus_g_method_send reply
      
      	* doc/dbus-specification.xml: New docs that describe how the new
      	queueing system works and talks about the changes to the how
      	we specify socket names
      
      	* glib/examples/example-service.c,
      	glib/examples/example-signal-emitter.c,
      	glib/examples/statemachine/statemachine-server.c:
      	Changed the RequestName flags to the new system
      
      	* test/name-test/ (test-names.c, run-test.sh, Makefile.am): New
      	regression test suite for testing various states of the new
      	queueing system
      1a163e76
  17. 15 Nov, 2005 1 commit
    • Robert McQueen's avatar
      2005-11-15 Robert McQueen <robot101@debian.org> · b5e4d26a
      Robert McQueen authored
      	* bus/driver.c, bus/services.c, bus/services.h: Add a ReleaseName
      	method to org.freedesktop.DBus to release a bus name or give up
      	waiting in the queue for it.
      
      	* dbus/dbus-bus.c, dbus/dbus-bus.h, dbus/dbus-shared.h: Add a
      	dbus_bus_release_name method to send the ReleaseName method calls.
      	Add constants for the return values to dbus/dbus-shared.h.
      
      	* doc/dbus-specification.xml: Document the new ReleaseName method
      	in the specification.
      
      	* python/dbus_bindings.pyx: Add a low-level python binding for the
      	release name method.
      
      	* python/exceptions.py, python/service.py: Make freeing BusName
      	objects release the name. Add a NameExistsException, and fix a
      	bug with creating UnknownMethodException.
      
      	* test/python/test-client.py: Add tests for freeing BusName
      	objects causing names to be released.
      b5e4d26a
  18. 13 Apr, 2005 1 commit
    • David Zeuthen's avatar
      2005-04-13 David Zeuthen <davidz@redhat.com> · 44656f53
      David Zeuthen authored
      	* bus/selinux.c: Add c-file-style to top of file
      	(log_audit_callback): Don't free the data here anymore
      	(bus_selinux_check): Don't take spid and tpid since appending
      	that to auxdata may OOM.
      	(bus_selinux_allows_acquire_service): Handle OOM and signal back
      	to the caller if we are OOM by taking an error object.
      	(bus_selinux_allows_send): -do-
      
      	* bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
      	and bus_selinux_allows_send
      
      	* bus/bus.c (bus_context_check_security_policy): Pass error and
      	pass on OOM thrown by bus_selinux_allows_send()
      
      	* bus/services.c (bus_registry_acquire_service): Pass error and
      	pass on OOM thrown by bus_selinux_allows_acquire_service()
      44656f53
  19. 21 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-20 Havoc Pennington <hp@redhat.com> · f5cf6756
      Havoc Pennington authored
      	* doc/dbus-tutorial.xml: replace > with &gt;
      
      	* bus/services.c (bus_registry_acquire_service): validate the name
      	and return a better error if it's no good.
      
      	* doc/dbus-specification.xml: note NO_AUTO_START change
      
      	* dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
      	from AUTO_START, we're toggling the default
      
      	* bus/dispatch.c: adapt the tests to change of auto-start default
      f5cf6756
  20. 18 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-18 Havoc Pennington <hp@redhat.com> · 8873c90f
      Havoc Pennington authored
              * Throughout, grand renaming to strip out the use of "service",
      	just say "name" instead (or "bus name" when ambiguous).  Did not
      	change the internal code of the message bus itself, only the
      	programmer-facing API and messages.
      
      	* doc/dbus-specification.xml: further update the message bus section
      
      	* bus/config-parser.c (all_are_equiv): fix bug using freed string
      	in error case
      8873c90f
  21. 15 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-15 Havoc Pennington <hp@redhat.com> · 9c3d566e
      Havoc Pennington authored
      	* Land the new message args API and type system.
      
      	This patch is huge, but the public API change is not
      	really large. The set of D-BUS types has changed somewhat,
      	and the arg "getters" are more geared toward language bindings;
      	they don't make a copy, etc.
      
      	There are also some known issues. See these emails for details
      	on this huge patch:
      	http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
              http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
      
      	* dbus/dbus-marshal-*: all the new stuff
      
      	* dbus/dbus-message.c: basically rewritten
      
      	* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
      	freed blocks to be all non-nul bytes so using freed memory is less
      	likely to work right
      
      	* dbus/dbus-internals.c (_dbus_test_oom_handling): add
      	DBUS_FAIL_MALLOC=N environment variable, so you can do
      	DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
      	DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
      	thorough.
      
      	* qt/message.cpp: port to the new message args API
      	(operator<<): use str.utf8() rather than str.unicode()
      	(pretty sure this is right from the Qt docs?)
      
      	* glib/dbus-gvalue.c: port to the new message args API
      
      	* bus/dispatch.c, bus/driver.c: port to the new message args API
      
      	* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
      	"locked" flag to TRUE and align_offset to 0; I guess we never
      	looked at these anyhow, but seems cleaner.
      
      	* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
      	move allocation padding macro to this header; use it to implement
      	(_DBUS_STRING_STATIC): ability to declare a static string.
      
      	* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
      	change to return TRUE if the interface is not set.
      
      	* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
      	to dbus-marshal-validate.[hc]
      
      	* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
      	dbus-internals.c
      
      	* dbus/Makefile.am: cut over from dbus-marshal.[hc]
      	to dbus-marshal-*.[hc]
      
      	* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
      	function here from dbus-marshal.c
      9c3d566e
  22. 09 Nov, 2004 1 commit
    • Colin Walters's avatar
      2004-11-09 Colin Walters <walters@verbum.org> · 935a41a0
      Colin Walters authored
      	* dbus/dbus-string.c (_dbus_string_get_length): New
      	function, writes DBusString to C buffer.
      
      	* dbus/dbus-string.h: Prototype it.
      
      	* dbus/dbus-message.c (dbus_message_type_to_string): New
      	function, converts message type into C string.
      
      	* dbus/dbus-message.h: Prototype it.
      
      	* bus/selinux.c (bus_selinux_check): Take source pid,
      	target pid, and audit data.  Pass audit data to
      	avc_has_perm.
      	(log_audit_callback): New function, appends extra
      	audit information.
      	(bus_selinux_allows_acquire_service): Also take
      	service name, add it to audit data.
      	(bus_selinux_allows_send): Also take message
      	type, interface, method member, error name,
      	and destination, and add them to audit data.
      	(log_cb): Initialize func_audit.
      
      	* bus/selinux.h (bus_selinux_allows_acquire_service)
      	(bus_selinux_allows_send): Update prototypes
      
      	* bus/services.c (bus_registry_acquire_service): Pass
      	service name to bus_selinux_allows_acquire_service.
      
      	* bus/bus.c (bus_context_check_security_policy): Pass
      	additional audit data.  Move assignment of dest
      	to its own line.
      935a41a0
  23. 07 Nov, 2004 1 commit
    • Colin Walters's avatar
      2004-11-07 Colin Walters <walters@verbum.org> · cdac3e05
      Colin Walters authored
      	* bus/bus.c (load_config): Break into three
      	separate functions: process_config_first_time_only,
      	process_config_every_time, and process_config_postinit.
      	(process_config_every_time): Move call of
      	bus_registry_set_service_context_table into
      	process_config_postinit.
      	(process_config_postinit): New function, does
      	any processing that needs to happen late
      	in initialization (and also on reload).
      	(bus_context_new): Instead of calling load_config,
      	open config parser here and call process_config_first_time_only
      	and process_config_every_time directly.  Later, after
      	we have forked but before changing UID,
      	invoke bus_selinux_full_init, and then call
      	process_config_postinit.
      	(bus_context_reload_config): As in bus_context_new,
      	load parse file inside here, and call process_config_every_time
      	and process_config_postinit.
      
      	* bus/services.h, bus/services.c
      	(bus_registry_set_service_context_table): Rename
      	from bus_registry_set_sid_table.  Take string hash from config
      	parser, and convert them here into SIDs.
      
      	* bus/config-parser.c (struct BusConfigParser): Have
      	config parser only store a mapping of service->context
      	string.
      	(merge_service_context_hash): New function.
      	(merge_included): Merge context string hashes instead
      	of using bus_selinux_id_table_union.
      	(bus_config_parser_new): Don't use bus_selinux_id_table_new;
      	simply create a new string hash.
      	(bus_config_parser_unref): Unref it.
      	(start_selinux_child): Simply insert strings into hash,
      	don't call bus_selinux_id_table_copy_over.
      
      	* bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
      	(bus_selinux_id_table_copy_over): Delete.
      cdac3e05
  24. 29 Oct, 2004 1 commit
  25. 24 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. 22 Jul, 2004 1 commit
    • Olivier Andrieu's avatar
      2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net> · 7eb304c5
      Olivier Andrieu authored
      	* dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
      	breaking build on Solaris, reported by Farhad Saberi on the ML.
      
      	* dbus/dbus-message.c (dbus_message_append_args_valist): fix the
      	va_arg invocation to account for integer promotion in the case of
      	DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
      
      	* bus/services.c (bus_service_remove_owner): fix bug #902, use
      	_dbus_list_get_first_link, not _dbus_list_get_first.
      
      	* dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
      
      	* dbus/dbus-object-tree.c (free_subtree_recurse): always null
      	handler functions so that the asserts in _dbus_object_subtree_unref
      	do not fail.
      
      	* dbus/dbus-transport-unix.c (do_reading):
      	_dbus_transport_queue_messages return value is of type
      	dbus_bool_t, not DBusDispatchStatus.
      7eb304c5
  29. 16 Mar, 2004 1 commit
    • Richard Hult's avatar
      2004-03-16 Richard Hult <richard@imendio.com> · 93f433a1
      Richard Hult authored
      	* bus/activation.c: (bus_activation_service_created),
      	(bus_activation_send_pending_auto_activation_messages),
      	(bus_activation_activate_service):
      	* bus/activation.h:
      	* bus/dispatch.c: (bus_dispatch),
      	(check_nonexistent_service_auto_activation),
      	(check_service_auto_activated),
      	(check_segfault_service_auto_activation),
      	(check_existent_service_auto_activation), (bus_dispatch_test):
      	* bus/driver.c: (bus_driver_handle_activate_service):
      	* bus/services.c: (bus_registry_acquire_service):
      	* dbus/dbus-message.c: (dbus_message_set_auto_activation),
      	(dbus_message_get_auto_activation):
      	* dbus/dbus-message.h:
      	* dbus/dbus-protocol.h: Implement auto-activation.
      93f433a1
  30. 24 Feb, 2004 1 commit
  31. 02 Dec, 2003 1 commit
  32. 27 Nov, 2003 1 commit
  33. 07 Sep, 2003 1 commit
  34. 27 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-27 Havoc Pennington <hp@pobox.com> · e8d396ef
      Havoc Pennington authored
      	Unbreak my code...
      
      	* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
      	report correct status if we finish processing authentication
      	inside this function.
      
      	* bus/activation.c (try_send_activation_failure): use
      	bus_transaction_send_error_reply
      
      	* bus/connection.c (bus_connection_get_groups): return an error
      	explaining the problem
      
      	* bus/bus.c (bus_context_check_security_policy): implement
      	restriction here that inactive connections can only send the
      	hello message. Also, allow bus driver to send anything to
      	any recipient.
      
      	* bus/connection.c (bus_connection_complete): create the
      	BusClientPolicy here instead of on-demand.
      	(bus_connection_get_policy): don't return an error
      
      	* dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
      	sender field in message being replied to
      
      	* bus/bus.c (bus_context_check_security_policy): fix silly typo
      	causing it to return FALSE always
      
      	* bus/policy.c (bus_client_policy_check_can_send): fix bug where
      	we checked sender rather than destination
      e8d396ef
  35. 25 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-25 Havoc Pennington <hp@redhat.com> · b3bd48ed
      Havoc Pennington authored
              test suite is slightly hosed at the moment, will fix soon
      
      	* bus/connection.c (bus_connections_expire_incomplete): fix to
      	properly disable the timeout when required
      	(bus_connection_set_name): check whether we can remove incomplete
      	connections timeout after we complete each connection.
      
      	* dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
      	probably still broken.
      
      	* bus/services.c (bus_registry_acquire_service): implement max
      	number of services owned, and honor allow/deny rules on which
      	services a connection can own.
      
      	* bus/connection.c (bus_connection_get_policy): report errors here
      
      	* bus/activation.c: implement limit on number of pending
      	activations
      b3bd48ed
  36. 11 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-10 Havoc Pennington <hp@redhat.com> · 6be547d3
      Havoc Pennington authored
      	* dbus/dbus-connection.c (dbus_connection_flush): don't spin on
      	the connection if it's disconnected
      
      	* bus/activation.c (bus_activation_service_created): use new
      	transaction features to roll back removal of pending activation if
      	we don't successfully create the service after all. Don't remove
      	pending activation if the function fails.
      
      	* dbus/dbus-list.c (_dbus_list_insert_before_link)
      	(_dbus_list_insert_after_link): new code to facilitate
      	services.c fixes
      
      	* dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
      	new functionality, so we can preallocate the ability to insert
      	into a hash table.
      
      	* bus/connection.c (bus_transaction_add_cancel_hook): new function
      	allowing us to put custom hooks in a transaction to be used for
      	cancelling said transaction
      
      	* doc/dbus-specification.sgml: add some discussion of secondary
      	service owners, and disallow zero-length service names
      
      	* bus/services.c (bus_registry_acquire_service): new function,
      	splits out part of bus_driver_handle_acquire_service() and fixes
      	a bug where we didn't remove the service doing the acquiring
      	from the secondary queue if we failed to remove the current owner
      	from the front of the queue.
      6be547d3
  37. 02 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-02 Havoc Pennington <hp@redhat.com> · e55fd2c6
      Havoc Pennington authored
      	* bus/connection.c (bus_transaction_send_error_reply): set sender
      	service for the error, and unref the reply on success
      
      	* bus/activation.c: convert to use BusTransaction so OOM can be
      	handled correctly
      	(bus_activation_service_created): set sender of the message
      e55fd2c6
  38. 31 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-31 Havoc Pennington <hp@redhat.com> · fa05de92
      Havoc Pennington authored
              Fix some annoying DBusString API and fix all affected code.
      
      	* dbus/dbus-string.c (_dbus_string_init): get rid of annoying
      	max_length argument
      	(_dbus_string_get_data): change to return string instead of using
      	an out param
      	(_dbus_string_get_const_data): ditto
      	(_dbus_string_get_data_len): ditto
      	(_dbus_string_get_const_data_len): ditto
      fa05de92
  39. 26 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-25 Havoc Pennington <hp@redhat.com> · 90ed1d84
      Havoc Pennington authored
              * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
      
      	* configure.in: add --with-xml option to specify XML library,
      	right now only libxml is supported.
      
      	* bus/config-loader-libxml.c, config-parser.c: sync some minor
      	nonworking code between home and work, still just stubs
      90ed1d84
  40. 16 Mar, 2003 1 commit
    • Anders Carlsson's avatar
      2003-03-16 Anders Carlsson <andersca@codefactory.se> · 3f4086f0
      Anders Carlsson authored
      	* bus/activation.c: (bus_pending_activation_entry_free),
      	(bus_pending_activation_free), (bus_activation_new),
      	(bus_activation_unref), (bus_activation_service_created),
      	(bus_activation_activate_service):
      	* bus/activation.h:
      	* bus/bus.c: (bus_context_new):
      	* bus/desktop-file.c: (new_section):
      	* bus/driver.c: (bus_driver_send_service_deleted),
      	(bus_driver_handle_activate_service):
      	* bus/services.c: (bus_registry_new), (bus_registry_ensure):
      	* bus/services.h:
      	* dbus/dbus-connection.c:
      	(dbus_connection_send_with_reply_and_block):
      	* dbus/dbus-message.c: (dbus_message_append_args_valist):
      	* dbus/dbus-protocol.h:
      	Make activation work better. Now pending activations will be queued
      	and the daemon won't try to activate services that are already registered.
      3f4086f0