1. 17 Jan, 2014 1 commit
  2. 22 Aug, 2013 1 commit
  3. 28 Jun, 2013 1 commit
  4. 12 Mar, 2012 1 commit
    • Lennart Poettering's avatar
      transport: add new unixexec transport on Unix · f67f4597
      Lennart Poettering authored
      The "unixexec:" transport will create a local AF_UNIX socket with
      socketpair(), then fork and execute a binary on one side with STDIN and
      STDOUT connected to it and then use the other side.
      
      This is useful to implement D-Bus tunneling schemes, for example to get
      a D-Bus connection to the system bus on a different host, similar how
      udisks is already doing it. (udisks uses SSH TCP tunneling for this,
      which is a bit ugly and less secure than this solution).
      
      Suggested use is with connection strings like the following:
      
        unixexec:path=ssh,argv1=foobar,argv2=system-bus-bridge
      
      or:
      
        unixexec:path=pkexec,argv1=system-bus-bridge
      
      or even:
      
        unixexec:path=sudo,argv1=system-bus-bridge
      
      The first line would execute the binary 'system-bus-bridge' on host
      'foobar' and then pass D-Bus traffic to it. This (hypothetical) bridge
      binary would then forward the information to the local system bus.
      
      The second and third line use this scheme locally to acquire a
      privileged connection through pkexec resp. sudo: instead of connecting
      directly to the bus, they use the same bridge binary which will forward
      all information to the system bus.
      
      The arguments of the protocol are 'path' for the first execlp()
      argument, and argv0, argv1, and so on for the following arguments. argv0
      can be left out in which case path will be used.
      
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35230Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      f67f4597
  5. 08 Feb, 2012 2 commits
  6. 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
  7. 19 Sep, 2011 2 commits
  8. 18 Jul, 2011 1 commit
  9. 17 Feb, 2011 1 commit
  10. 17 Jun, 2010 1 commit
  11. 14 Jun, 2010 1 commit
    • Ralf Habacker's avatar
      Bug 28460 - Refactored dbus configuration access. · 6f9077ee
      Ralf Habacker authored
      Libdbus uses several config variables. On unix these settings are read from
      environment variables by using _dbus_getenv.
      
      On other platforms like wince there are no environment variables available and
      _dbus_getenv needs an emulation for those plattforms (see
      dbus/dbus-sysdeps-wince-glue.c)
      
      To cleanup this emulation the appended patch adds a config api by adding
      _dbus_config_... functions.
      
      Also having all client config related functions listed in one header file
      provides a good overview about which config attributes  are available.
      
      The default implementation retrieves the config values from environment
      variables. For other os this could be easily extended or replaced by.
      6f9077ee
  12. 14 Jul, 2009 1 commit
  13. 10 Jul, 2009 1 commit
  14. 14 Jul, 2007 1 commit
  15. 09 Jun, 2007 2 commits
    • 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
    • Havoc Pennington's avatar
      2007-06-09 Havoc Pennington <hp@redhat.com> · 23832672
      Havoc Pennington authored
      	* bus/dispatch.c (check_get_connection_unix_process_id): adapt
      	since sysdeps-unix.h stuff isn't included anymore
      
      	* bus/bus.c (bus_context_new): use more abstract functions to
      	change user, so they can be no-ops on Windows
      
      	* dbus/dbus-credentials.c, dbus/dbus-credentials.h,
      	dbus/dbus-credentials-util.c: new files containing a fully opaque
      	DBusCredentials data type to replace the old not opaque one.
      
      	* configure.in (DBUS_UNIX): define DBUS_UNIX to match DBUS_WIN on
      	windows
      
      	* dbus/dbus-userdb.h: prohibit on Windows, next step is to clean
      	up the uses of it in bus/*.c and factor out the parts of
      	cookie auth that depend on it
      23832672
  16. 19 May, 2007 1 commit
  17. 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
  18. 28 Oct, 2006 1 commit
    • Havoc Pennington's avatar
      2006-10-27 Havoc Pennington <hp@redhat.com> · eaefe03a
      Havoc Pennington authored
      	* dbus/dbus-test.c: enclose more of the file in the
      	DBUS_BUILD_TESTS check.
      
      	* dbus/dbus-sysdeps-pthread.c (PTHREAD_CHECK): fix for
      	DBUS_DISABLE_ASSERT case.
      
      	* dbus/dbus-connection.c (dbus_connection_get_unix_user): document
      	that it only works on the server side
      
      	* dbus/dbus-bus.c: add a global lock covering the BusData we
      	attach to each connection
      	(internal_bus_get): lock our access to the BusData
      	(dbus_bus_register): lock the entire registration process
      	with _DBUS_LOCK(bus_datas). If we get the lock and
      	registration is already complete, silently return (vs. previous
      	behavior of aborting).
      	(dbus_bus_set_unique_name): lock the BusData
      	(dbus_bus_get_unique_name): lock the BusData
      eaefe03a
  19. 24 Feb, 2005 1 commit
    • Colin Walters's avatar
      2005-02-24 Colin Walters <walters@verbum.org> · 54a2e9f7
      Colin Walters authored
      	* dbus/dbus-signature.c: New file; implements various functions
      	related to type signatures.  Includes an interator for parsing,
      	validation functions.
      	(dbus_type_is_basic): Moved here from
      	dbus-marshal-basic.c:_dbus_type_is_basic.
      	(dbus_type_is_container): Moved here from
      	dbus-marshal-basic.c:_dbus_type_is_container.
      
      	All callers of _dbus_type_is_container and _dbus_type_is_basic
      	updated, and include dbus-signature.h.
      
      	* dbus/dbus-signature.h: New file; prototypes for the above.
      
      	* dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
      	dbus-signature.h.
      
      	* dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
      	function factored out of _dbus_first_type_in_signature.
      	(_dbus_first_type_in_signature_c_str): New function; returns first
      	type code for a type signature character.
      
      	* dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
      	handle function moves.
      
      	* dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
      
      	* dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
      	function; skips to next complete type in type signature.
      	Implemented using previous skip_one_complete_type.  Now
      	skip_one_complete_type just delegates to
      	_dbus_type_signature_next.
      
      	* dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
      	to dbus-signature.c
      	(_dbus_type_is_container): Ditto.
      
      	* doc/dbus-specification.xml: Update introspection sample to
      	use real type signatures.
      
      	* dbus/dbus-test.h: Prototype signature test.
      
      	* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
      	signature tests.
      
      	* dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
      54a2e9f7
  20. 21 Feb, 2005 1 commit
    • Colin Walters's avatar
      2005-02-21 Colin Walters <walters@verbum.org> · f9a7bcc2
      Colin Walters authored
      	* dbus/dbus-test-main.c (main): Take optional specific test
      	argument.
      
      	* dbus/dbus-test.c (run_test): New function, runs a test function
      	with no data directory.
      	(run_data_test): Like above, but takes data directory.
      	(dbus_internal_do_not_use_run_tests): Take
      	specific test argument.  Replace lots of cut n' paste code
      	with run_test and run_data_test.
      
      	* dbus/dbus-test.h: Update prototype for
      	dbus_internal_do_not_use_run_tests.
      f9a7bcc2
  21. 11 Feb, 2005 1 commit
    • Havoc Pennington's avatar
      2005-02-10 Havoc Pennington <hp@redhat.com> · 71f3b461
      Havoc Pennington authored
      	* dbus/dbus-message-factory.c (generate_special): modify test to
      	avoid using a non-basic dict key
      
      	* dbus/dbus-marshal-validate-util.c: add test for the below
      
      	* doc/dbus-specification.xml: require that dict keys are a basic
      	type
      
      	* dbus/dbus-marshal-validate.c
      	(_dbus_validate_signature_with_reason): require that dict key is a
      	basic type
      71f3b461
  22. 28 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-27 Havoc Pennington <hp@redhat.com> · 3ed9db54
      Havoc Pennington authored
      	* dbus/dbus-arch-deps.h.in: add 16/32-bit types
      
      	* configure.in: find the right type for 16 and 32 bit ints as well
      	as 64
      
      	* dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
      	the 16-bit types so people don't have to stuff them in 32-bit or
      	byte arrays.
      3ed9db54
  23. 27 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-27 Havoc Pennington <hp@redhat.com> · fddbc09c
      Havoc Pennington authored
              * dbus/dbus-message.c: byteswap the message if you init an
      	iterator to read/write from it
      
      	* dbus/dbus-marshal-byteswap.c: new file implementing
      	_dbus_marshal_byteswap()
      
      	* dbus/dbus-marshal-basic.c: add _dbus_swap_array()
      fddbc09c
  24. 23 Jan, 2005 1 commit
  25. 17 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-16 Havoc Pennington <hp@redhat.com> · aad6fa89
      Havoc Pennington authored
      	* dbus/dbus-internals.c (_dbus_real_assert): print the function
      	name the assertion failed in
      
      	* dbus/dbus-internals.h (_dbus_return_if_fail)
      	(_dbus_return_val_if_fail): assert that the name of the function
      	containing the check doesn't start with '_', since we only want to
      	use checks on public functions
      
      	* dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
      	checks to assertions
      
      	* dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
      	change checks to asserts for private function
      
      	* dbus/dbus-message.c (_dbus_message_set_serial): checks
      	to asserts for private function
      
      	* dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
      	broken assertion that was breaking make check
      	(_dbus_type_reader_array_is_empty): remove this rather than fix
      	it, was only used in assertions
      aad6fa89
  26. 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
  27. 10 Aug, 2004 1 commit
  28. 21 Apr, 2004 1 commit
    • Kristian Høgsberg's avatar
      2004-04-21 Kristian Høgsberg <krh@redhat.com> · 6971a06b
      Kristian Høgsberg authored
      	* dbus/dbus-server-unix.c (unix_finalize): Don't unref
      	unix_server->watch here, it is unreffed in disconnect.
      	(_dbus_server_new_for_tcp_socket): convert NULL host to
      	"localhost" here so we don't append NULL to address.
      
      	* dbus/dbus-server.c (_dbus_server_test): Add test case for
      	various addresses, including tcp with no explicit host.
      6971a06b
  29. 02 Dec, 2003 1 commit
  30. 31 Aug, 2003 2 commits
    • Havoc Pennington's avatar
      2003-08-30 Havoc Pennington <hp@pobox.com> · 1dd3f178
      Havoc Pennington authored
      	* dbus/dbus-connection.c: purge DBusMessageHandler
      
      	* dbus/dbus-message-handler.c: remove DBusMessageHandler, just
      	use callbacks everywhere
      1dd3f178
    • Havoc Pennington's avatar
      2003-08-30 Havoc Pennington <hp@pobox.com> · 5fd1e389
      Havoc Pennington authored
      	* test/data/valid-config-files/system.d/test.conf: change to
      	root for the user so warnings don't get printed
      
      	* dbus/dbus-message.c: add dbus_message_get_path,
      	dbus_message_set_path
      
      	* dbus/dbus-object-tree.c (do_test_dispatch): add test of
      	dispatching to a path
      
      	* dbus/dbus-string.c (_dbus_string_validate_path): add
      
      	* dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
      	(_dbus_marshal_object_path): implement
      
      	* dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
      	to contain the path to the target object
      	(DBUS_HEADER_FIELD_SENDER_SERVICE): rename
      	DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
      5fd1e389
  31. 29 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-28 Havoc Pennington <hp@pobox.com> · 8d38a2e2
      Havoc Pennington authored
      	purge DBusObjectID
      
      	* dbus/dbus-connection.c: port to no ObjectID, create a
      	DBusObjectTree, rename ObjectTree to ObjectPath in public API
      
      	* dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
      	everything except UnregisterFunction and MessageFunction
      
      	* dbus/dbus-marshal.c: port away from DBusObjectID,
      	add DBUS_TYPE_OBJECT_PATH
      
      	* dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
      	dbus/dbus-objectid.[hc]: remove these, we are moving to
      	path-based object IDs
      8d38a2e2
  32. 25 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-25 Havoc Pennington <hp@pobox.com> · 24f411a6
      Havoc Pennington authored
              Just noticed that dbus_message_test is hosed, I wonder when I
      	broke that. I thought make check was passing earlier...
      
      	* dbus/dbus-object-tree.c: add new "object tree" to match DCOP
      	container tree, will replace most of dbus-object-registry
      
      	* dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
      	screwup
      24f411a6
  33. 15 Aug, 2003 1 commit
  34. 09 Jul, 2003 1 commit
    • Havoc Pennington's avatar
      2003-07-08 Havoc Pennington <hp@pobox.com> · 824d4a5e
      Havoc Pennington authored
      	* dbus/dbus-object.c: implement some of this
      
      	* dbus/dbus-object-registry.c
      	(_dbus_object_registry_add_and_unlock): fill in the object_id out
      	param
      	(_dbus_object_registry_new): handle OOM
      824d4a5e
  35. 08 Jul, 2003 1 commit
    • Havoc Pennington's avatar
      2003-07-08 Havoc Pennington <hp@pobox.com> · d8abf955
      Havoc Pennington authored
      	* dbus/dbus-object.h: sketch out an API for registering objects
      	with a connection, that allows us to use as little as 24 bytes
      	per object and lets application code represent an object in
      	any conceivable way.
      
      	* dbus/dbus-object-registry.c: implement the hard bits of the
      	DBusConnection aspect of object API. Not yet wired up.
      d8abf955
  36. 07 Jul, 2003 1 commit
    • Havoc Pennington's avatar
      2003-07-06 Havoc Pennington <hp@pobox.com> · 3f1ad214
      Havoc Pennington authored
      	* dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
      	(_dbus_marshal_object_id): new
      	(_dbus_demarshal_object_id): new
      	(_dbus_marshal_get_arg_end_pos): support object ID type, and
      	consolidate identical switch cases. Don't conditionalize handling
      	of DBUS_TYPE_UINT64, need to handle the type always.
      	(_dbus_marshal_validate_arg): consolidate identical cases, and
      	handle DBUS_TYPE_OBJECT_ID
      
      	* dbus/dbus-objectid.c: new file with DBusObjectID data type.
      
      	* dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
      3f1ad214