Commit graph

284 commits

Author SHA1 Message Date
Frank Osterfeld
5012769a3f Add nonce-tcp section to the specification (draft) (cherry picked from commit 7015b2db6c8744c88da9cb0fab8d5e0fcfc0220b) 2009-12-01 08:43:40 +01:00
Will Thompson
7689d71257 Forbid zero serial numbers 2009-11-01 14:32:34 +00:00
Thiago Macieira
37019e9d27 Merge branch 'fd-passing'
Conflicts:
	dbus/dbus-connection.c
	dbus/dbus-message-util.c
	dbus/dbus-sysdeps-unix.c
2009-07-16 16:05:16 +02:00
Tobias Mueller
5baf2f856a Bug 21161 - Update the FSF address
No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-10 19:32:38 -04:00
Lennart Poettering
869291ea5a doc: document Unix FD passing in the specification 2009-05-20 03:01:37 +02:00
Matt McCutchen
0314e701c8 Bug 18446: Keep umask for session bus
Signed-off-by: Colin Walters <walters@verbum.org>
2008-11-10 08:55:27 -05:00
Ray Strode
37853b6dd0 Add new UpdateActivationEnvironment bus message
It adjusts the environment of activated bus clients.
This is important for session managers that get started
after the session bus daemon and want to influence the
environment of desktop services that are started by the
bus.
2008-07-12 13:38:00 -04:00
Simon McVittie
1a5ef4003d Improve description of allowed variant signatures (#10185)
Patch based on one from Kristoffer Lundén, amended as per Havoc's comment.
2007-10-09 14:23:28 +01:00
Simon McVittie
fafd784424 doc/dbus-specification.xml: Clarify description of DBUS_COOKIE_SHA1 (#10184).
Patch from Kristoffer Lundén.
2007-10-09 14:12:31 +01:00
Simon McVittie
bf7c65f521 doc/dbus-specification.xml: Specifically forbid empty structs (#7969) 2007-10-09 14:06:35 +01:00
Ryan Lortie
f6ec4a80ab Add argument path matching support. Bug #11066.
2007-09-20  Ryan Lortie  <desrt@desrt.ca>

        * dbus/signals.c (struct DBusMatchRule, bus_match_rule_new,
        bus_match_rule_set_arg, bus_match_rule_parse_arg_match,
        match_rule_matches): Add support for parsing and matching on
        arg0path='/some/path' type rules.

        * dbus/signals.h (bus_match_rule_set_arg): change to take const
        DBusString instead of const char * for the string to match against.

        * dbus/dbus-bus.c: add a quick note to dbus_bus_add_match
        documentation about the path matching.

        * doc/dbus-specification.xml: add a more detailed description of the
        changes here.
2007-09-20 13:04:38 -04:00
Ryan Lortie
d34905d811 migrate from cvs to git (cvs2svn -> git-svnimport).
2007-09-13  Ryan Lortie  <desrt@desrt.ca>

        migrate from cvs to git (cvs2svn -> git-svnimport).

        * HACKING: update release/branch/tag instructions
        * */.cvsignore: rename to .gitignore

        also, clean up tags and branch names to conform to HACKING
2007-09-13 11:13:40 -04:00
Havoc Pennington
5882fcb12c 2007-07-27 Havoc Pennington <hp@redhat.com>
* release 1.1.2
2007-07-27 20:59:42 +00:00
Richard Hughes
e69af3afee 2007-07-24 Richard Hughes <richard@hughsie.com>
* doc/busconfig.dtd:
Add servicehelper into the dtd, it will soon be a valid part of the
config file.
2007-07-24 11:38:47 +00:00
Richard Hughes
fe052ddb56 2007-07-24 Richard Hughes <richard@hughsie.com>
* doc/system-activation.txt:
Add design document for the system activation parts. I'll shortly be
committing many patches that add system activation using a setuid
launcher into CVS, so expect things to be broken for a few hours.
2007-07-24 11:23:46 +00:00
Havoc Pennington
d012387afe 2007-07-13 Havoc Pennington <hp@redhat.com>
* Add indent-tabs-mode: nil to all file headers.
2007-07-14 02:44:01 +00:00
Havoc Pennington
54b943432c 2007-06-18 Havoc Pennington <hp@redhat.com>
* 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
2007-06-18 19:32:51 +00:00
Simon McVittie
9bdc8322ff doc/dbus-specification.xml: say the protocol version is 1 instead of 0
(patch from Kristoffer Lundén, fd.o#10033)
Also remove the FIXME about removing protocol version from messages (as per
Havoc's comment on that bug)
2007-06-14 09:50:17 +00:00
Simon McVittie
442e8ab1f3 doc/dbus-specification.xml: explicitly specify that STRING cannot contain embedded NULs. 2007-05-21 15:40:59 +00:00
Havoc Pennington
c81036b7ec be consistent about notations 2007-05-18 18:12:24 +00:00
Havoc Pennington
d5b030efcc 2007-05-18 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: add a GetAll to the Properties
	interface.
2007-05-18 18:10:18 +00:00
Simon McVittie
e600d78e41 doc/dbus-specification.xml: mention the reserved o.fd.DBus.Local interface
and the corresponding /o/fd/DBus/Local object path; describe them as reserved
and forbid using them in a sent message, mentioning that in the reference
implementation this will cause the connection to be dropped.
Patch approved by Havoc.
2007-05-04 10:28:12 +00:00
Simon McVittie
5284ed3979 * doc/dbus-tutorial.xml: Replace Python section of tutorial with
a pointer to the tutorial maintained as part of dbus-python
2007-01-25 16:42:54 +00:00
Havoc Pennington
6c2620f242 2006-11-17 Havoc Pennington <hp@redhat.com>
* doc/dbus-faq.xml: minor FAQ tweaks
2006-11-18 03:21:50 +00:00
Havoc Pennington
dbc061b812 2006-11-14 Havoc Pennington <hp@redhat.com>
* dbus/dbus-internals.c (_dbus_generate_uuid): The spec said the
	UUID had the timestamp last, but the implementation had it first;
	move it to last since I think it's a tiny bit nicer (easier to
	compare at a glance, faster to sort, less code), and will not
	cause any practical compatibility problems. Also, always convert
	the timestamp to big endian.

	* doc/dbus-specification.xml: Clean up the docs on the UUID.

	* tools/dbus-uuidgen.1: more prominently say it is not suitable
	as a replacement for regular uuidgen/RFC4122.
2006-11-15 01:52:01 +00:00
Havoc Pennington
3a02d8c132 2006-11-08 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: add a note about protocol stability

	* doc/TODO: Remove "important for 1.0" section, replace with
	"important for 1.2" section
2006-11-09 00:19:29 +00:00
John (J5) Palmieri
b7491d9258 * README: remove some of the out of date flags
* doc/TODO: Remove todo items which are done
2006-11-08 23:17:20 +00:00
Havoc Pennington
151b3aaaef 2006-11-07 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml, doc/dbus-faq.xml, README: various
	documentation updates. Bump faq/spec versions (not to 1.0; I don't
	think the spec will be "finished"/1.0 when we ship the 1.0 library).
2006-11-07 06:13:53 +00:00
Havoc Pennington
d3440ebe9d 2006-10-30 Havoc Pennington <hp@redhat.com>
* tools/dbus-launch.1, doc/TODO: capture intent to change the
	command line options of dbus-launch a bit post 1.0
2006-10-30 06:29:58 +00:00
Havoc Pennington
fbfec98d0f 2006-10-26 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps-pthread.c (_dbus_pthread_mutex_lock): change
	to be recursive
	(_dbus_pthread_mutex_unlock): make it recursive
	(_dbus_pthread_condvar_wait): save/restore the recursion count
	(_dbus_pthread_condvar_wait_timeout): save/restore the recursion count
2006-10-27 03:29:09 +00:00
Havoc Pennington
bdbbf46ca8 2006-10-26 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: clarify the UUID text slightly

	* dbus/dbus-sysdeps-pthread.c: check for and mostly abort on
	pthread errors. Add DBusMutexPThread and DBusCondVarPThread
	in preparation for being able to extend them for e.g. recursive
	mutexes.
2006-10-27 02:17:42 +00:00
John (J5) Palmieri
caae991f97 * dbus-sysdeps-unix.c (_dbus_set_local_creds): Clean up the
LOCAL_CREDS vs CMSGCRED stuff a bit.  Prefer CMSGCRED.  This
  needs to be cleaned up more.

* doc/TODO: Add a todo that *BSD hackers should look at cleaning
  up the CREDS issue.
2006-10-26 19:01:10 +00:00
Havoc Pennington
afa4ffbd85 2006-10-21 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message.h: put #ifndef DBUS_DISABLE_DEPRECATED around
	dbus_message_iter_get_array_len().

	* throughout: documentation improvements.
2006-10-21 17:08:08 +00:00
Havoc Pennington
04964f9562 more todo items 2006-10-20 05:56:57 +00:00
Havoc Pennington
ebb239648b 2006-10-20 Havoc Pennington <hp@redhat.com>
* doc/TODO: remove the int64 thing from 1.0 since it doesn't
	matter, and the message-loader-breaker thing since nobody is going
	to do it.  Add an item to 1.0 about supporting recursive locks
	in dbus_threads_init_default() though, since it should be easy.

	* dbus/dbus-connection.c (_dbus_connection_read_write_dispatch):
	Fix this in the !dispatch case to avoid busy-looping after
	disconnection

        * More misc docs improvements
2006-10-20 05:16:58 +00:00
John (J5) Palmieri
2dd42bd7f5 * doc/TODO: Remove the check TODO item 2006-10-14 16:25:53 +00:00
Havoc Pennington
a2129f7ccc 2006-10-01 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (_dbus_connection_close_if_only_one_ref):
	Add a hack to make DBusNewConnectionFunction work right.

	* dbus/dbus-server-socket.c (handle_new_client_fd_and_unlock): use
	the hack here. Also, fix the todo about refcount leak.

	* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
	and use the hack here

        * dbus/dbus-connection.c: Kill the "shared" flag vs. the
	"shareable" flag; this was completely broken, since it meant
	dbus_connection_open() returned a connection of unknown
	shared-ness. Now, we always hold a ref on anything opened
	as shareable.

	Move the call to notify dbus-bus.c into
	connection_forget_shared_unlocked, so libdbus consistently forgets
	all its knowledge of a connection at once. This exposed numerous
	places where things were totally broken if we dropped a ref inside
	get_dispatch_status_unlocked where
	connection_forget_shared_unlocked was previously, so move
	connection_forget_shared_unlocked into
	_dbus_connection_update_dispatch_status_and_unlock. Also move the
	exit_on_disconnect here.

	(shared_connections_shutdown): this assumed weak refs to the
	shared connections; since we have strong refs now, the assertion
	was failing and stuff was left in the hash. Fix it to close
	still-open shared connections.

	* bus/dispatch.c: fixup to use dbus_connection_open_private on the
	debug pipe connections

	* dbus/dbus-connection.c (dbus_connection_dispatch): only notify
	dbus-bus.c if the closed connection is in fact shared
	(_dbus_connection_close_possibly_shared): rename from
	_dbus_connection_close_internal
	(dbus_connection_close, dbus_connection_open,
	dbus_connection_open_private): Improve docs to explain the deal
	with when you should close or unref or both

	* dbus/dbus-bus.c
	(_dbus_bus_notify_shared_connection_disconnected_unlocked): rename
	from _dbus_bus_check_connection_and_unref_unlocked and modify to
	loop over all connections

	* test/test-utils.c (test_connection_shutdown): don't try to close
	shared connections.

	* test/name-test/test-threads-init.c (main): fix warnings in here

	* dbus/dbus-sysdeps.c (_dbus_abort): support DBUS_BLOCK_ON_ABORT
	env variable to cause blocking waiting for gdb; drop
	DBUS_PRINT_BACKTRACE and just call _dbus_print_backtrace()
	unconditionally.

	* configure.in: add -export-dynamic to libtool flags if assertions enabled
	so _dbus_print_backtrace works.

	* dbus/dbus-sysdeps-unix.c (_dbus_print_backtrace): use fprintf
	instead of _dbus_verbose to print the backtrace, and diagnose lack
	of -rdynamic/-export-dynamic
2006-10-01 15:36:19 +00:00
Havoc Pennington
d8155bf51b 2006-09-30 Havoc Pennington <hp@redhat.com>
* 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
2006-10-01 03:18:47 +00:00
John (J5) Palmieri
57ab23491c * dbus/dbus-threads.c: Allow recursive mutex's to be passed into
dbus_threads_init and be used by the dbus mutex functions to
  avoid deadlocks.

* doc/TODO: Remove recursive mutex dbus_connection_dispatch TODO item
2006-09-14 04:26:00 +00:00
John (J5) Palmieri
1eae184450 * doc/TODO:
- Remove pending call locking todo item
- dbus_connection_open now holds hard ref.  Remove todo item
- do proper locking on _dbus_bus_check_connection_and_unref
  and handle DBUS_BUS_STARTER. Remove todo item
- Warn on closing of a shared connection.  Remove todo item

* bus/bus.c, bus/connection.c, bus/dispatch.c, dbus/dbus-bus.c,
  dbus/dbus-connection.c: Use the dbus_connection_close_internal
  so we don't get the warning when closing shared connections

* test/test-service.c, test/test-shell-service.c: Applications
  don't close shared connections themselves so we unref instead of
  close

* test/test-utils.c (test_connection_shutdown): Close the connection

* dbus/dbus-bus.c (_dbus_bus_check_connection_and_unref): Changed to
  _dbus_bus_check_connection_and_unref_unlocked since we only call this
  method on a locked connection.
  Make sure we call _dbus_connection_unref_unlocked instead of
  dbus_connection_unref also.
  Handle DBUS_BUS_STARTER correctly

* dbus/dbus-connection.c (connection_record_shared_unlocked):
  Mark as shared and hard ref the connection
  (connection_forget_shared_unlocked): Remove the hard ref from the
  connection
  (_dbus_connection_close_internal_and_unlock):  New internal function
  which takes a locked connection and unlocks it after closing it
  (_dbus_connection_close_internal): New internal function which acts
  like the origonal dbus_connection_close method by grabbing a connection
  lock and calling _dbus_connection_close_internal_and_unlock
  (dbus_connection_close): Public close method, warns when the app
  trys to close a shared connection
2006-09-06 22:00:07 +00:00
John (J5) Palmieri
e4f3d0ca17 * doc/TODO: Removed dtd publishing item.
It seems the dtd has already been added at
  http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
2006-09-06 19:40:54 +00:00
John (J5) Palmieri
88f69757b9 * doc/TODO, various source files: Audited todo's and FIXME's and
prepended the ones we should be looking at with 1.0.  Those
  prepended with 1.0? need clerification or might not be needed
  for 1.0
2006-09-06 00:14:06 +00:00
Havoc Pennington
f678f8dd41 add some items related to shared connections 2006-08-24 16:07:25 +00:00
Havoc Pennington
6fcd97c084 2006-08-20 Havoc Pennington <hp@redhat.com>
* doc/dbus-faq.xml, doc/dbus-tutorial.xml: some improvements to
	the docs
2006-08-20 21:41:42 +00:00
Robert McQueen
711c065e59 2006-08-17 Alp Toker <alp@atoker.com>
* doc/dbus-specification.xml: Fix some minor typos.
2006-08-17 21:20:13 +00:00
John (J5) Palmieri
7652304bff * s/D-BUS/D-Bus/g 2006-08-03 20:34:36 +00:00
Havoc Pennington
4bf50e206c add note about fixing locking on pending call 2006-07-21 23:21:54 +00:00
John (J5) Palmieri
b459906a7a * doc/TODO:
* dbus/dbus-bus.c:
* dbus-errors.c:
* dbus/dbus-marshal-validate.c:
  Removed TODO items which were fixed or are no longer relevent
2006-07-17 17:44:07 +00:00
John (J5) Palmieri
7628b54125 * bus/activation.[ch] (bus_activation_list_services): new function to
get the list of services that can be activated

* bus/dispatch.c: test coverage for the new bus method
  ListActivatableNames

* bus/driver.c: new bus method ListActivatableNames to get the list of
  services that can be activated

* doc/dbus-specification.xml: ListActivatableNames method documentation
2006-07-14 01:17:59 +00:00
John (J5) Palmieri
50f88a0322 * dbus/dbus-connection.c (dbus_connection_close): removed deprecated
function
  (dbus_connection_dispatch): On disconnect unref any shared connections

* dbus/dbus-bus.c (_dbus_bus_check_connection_and_unref): new function
  for cleaning up shared connections on disconnect
  (internal_bus_get): get a hard refrence to shared connections when
  they are created

* doc/TODO: Remove items which are no longer relevent or have been fixed
  Split 1.0 todo items with a 0.90 freeze todo list
2006-07-07 19:42:56 +00:00