Commit graph

1047 commits

Author SHA1 Message Date
Havoc Pennington
77eac31aee 2003-04-11 Havoc Pennington <hp@pobox.com>
* test/decode-gcov.c: add "below average functions" to the
	coverage report, and change how some of the code works.

	* bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
	not in the coverage stats.

	* test/test-service.c (main): use _dbus_verbose not fprintf in a
	couple places so running the test suite doesn't result in megaspam.
2003-04-11 04:52:29 +00:00
Havoc Pennington
a03e626728 2003-04-11 Havoc Pennington <hp@pobox.com>
* bus/dispatch.c (check_existent_service_activation): accept a no
	memory error in a place we didn't before

	* bus/test.c (bus_test_run_everything): remove hacky "do it twice
	in case the first one failed," since the test suite is less
	broken now.
2003-04-11 03:58:56 +00:00
Havoc Pennington
78e7902231 2003-04-10 Havoc Pennington <hp@pobox.com>
* bus/dispatch.c (check_segfault_service_activation): add test
	for launching an executable that just crashes.

	* test/test-segfault.c (main): try setting coredumpsize to 0 so we
	don't leave a million cores. We'll see how portable this is.
2003-04-11 03:45:40 +00:00
Havoc Pennington
eb63ba5039 2003-04-10 Havoc Pennington <hp@pobox.com>
* dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
	the possible parent failures before we fork, so that we don't
	fail to create a babysitter after creating the child.

	* bus/activation.c (bus_activation_activate_service): kill child
	if we don't successfully complete the activation.
2003-04-11 03:05:58 +00:00
Havoc Pennington
6be547d32f 2003-04-10 Havoc Pennington <hp@redhat.com>
* 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.
2003-04-11 00:03:06 +00:00
Alexander Larsson
7074a24695 2003-04-10 Alexander Larsson <alexl@redhat.com>
* doc/dbus-specification.sgml:
	s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2003-04-10 13:01:44 +00:00
Alexander Larsson
e11e4ca82b 2003-04-10 Alexander Larsson <alexl@redhat.com>
* bus/.cvsignore:
	* glib/.cvsignore:
	* test/.cvsignore:
	Added files to cvsignore

	* dbus/dbus-message.h:
	* dbus/dbus-message.c: (dbus_message_iter_get_named):
	Make get_named() take two out argument and return a boolean.
	(dbus_message_iter_get_args_valist):
	Update usage of get_named().
	(dbus_message_iter_append_byte):
	Fix typo
	(dbus_message_iter_append_named)
	Fix typo
	(message_iter_test), (check_message_handling_type), (_dbus_message_test):
	More tests.
2003-04-10 12:09:00 +00:00
Alexander Larsson
e84c3a03b3 2003-04-10 Alexander Larsson <alexl@redhat.com>
* dbus/dbus-marshal.[ch]:
	Add array_type_pos argument to _dbus_marshal_validate_arg.
	Let you pass a NULL end_pos to _dbus_marshal_validate_type.

	* dbus/dbus-message.[ch]:
	Multi-dimensional arrays have full type specification in the
	outermost array. Iter code re-arranged to handle this.
	Added some more iter tests.

	* doc/dbus-specification.sgml:
	Add me to authors.
	Remove old FIXME.
	Update new array encoding description.
	Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.

	* test/data/invalid-messages/array-with-mixed-types.message:
	* test/data/valid-messages/array-of-array-of-uint32.message:
	Change to the new array format.

	* test/data/invalid-messages/too-short-dict.message:
	Fix bug in test.

	* test/data/valid-messages/recursive-types.message:
	Fix up and extend test.
2003-04-10 11:04:24 +00:00
Havoc Pennington
51781f5410 2003-04-10 Havoc Pennington <hp@pobox.com>
* bus/dispatch.c: lots of fixes

	* dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
	(_dbus_loop_iterate): remove old "quit if no callbacks" code,
	that was crack, broke the test service.

	* dbus/dbus-transport.c (_dbus_transport_open): fix error
	handling to avoid piling up errors if we get a failure on the
	first address.

	* dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
	pid in assertion failures.

	* dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
	to some fixed size of file descriptor array. Don't return TRUE
	anytime a timeout exists, that led to lots of busy loop silliness
	in the tests.
2003-04-10 05:12:19 +00:00
Havoc Pennington
49f6e320d7 2003-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
	I'd checked this in earlier but hadn't.
2003-04-10 01:27:57 +00:00
Havoc Pennington
231fc084cf - 2003-04-10 01:15:28 +00:00
Havoc Pennington
7caf646fdf 2003-04-09 Havoc Pennington <hp@redhat.com>
* test/test-utils.c: use dispatch status function to fix this up

	* bus/connection.c (connection_watch_callback): don't dispatch
	from here
	(connection_timeout_callback): don't dispatch from here
	(bus_connections_setup_connection): set the dispatch status function
	(bus_connection_disconnected): unset it

	* dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
	used to add a connection to be dispatched
	(_dbus_loop_iterate): do the dispatching at the end of each
	iteration

	* dbus/dbus-connection.c
	(dbus_connection_set_dispatch_status_function): new function
	allowing us to fix up main loop usage
	(_dbus_connection_last_unref): free all the various function
	user data
	(dbus_connection_dispatch): call the DispatchStatusFunction
	whenever this function returns
	(dbus_connection_handle_watch): call DispatchStatusFunction
	(dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
	(reply_handler_timeout): call DispatchStatusFunction
	(dbus_connection_flush): call DispatchStatusFunction
2003-04-09 22:15:05 +00:00
Havoc Pennington
1708094c0e 2003-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
	a memory leak

	* bus/dispatch.c (check_service_activated): fix bug in test

	* dbus/dbus-mainloop.c (check_timeout): fix this up

	* dbus/dbus-internals.c (_dbus_verbose_real): include PID in
	verbose output so we can sort out output from different processes,
	e.g. in the activation case.
2003-04-09 20:31:21 +00:00
Havoc Pennington
0e1945b388 2003-04-08 Colin Walters <walters@gnu.org>
* bus/bus.c (struct BusContext) [pidfile]: New member, to store
 	the pid file.
 	(bus_context_new): Set it.
 	(bus_context_unref): Use it to delete the pid file.
2003-04-09 00:27:41 +00:00
Havoc Pennington
0366385618 2003-04-08 Havoc Pennington <hp@redhat.com>
* test/data/invalid-messages/array-with-mixed-types.message:
	regression test that fails for the moment

	* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
	tests for convenience

	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
	array of nil, it broke things.

	* test/data/invalid-messages/array-of-nil.message: regression test

	* test/data/valid-messages/array-of-array-of-uint32.message:
	happened to write this so added it to suite
2003-04-08 22:07:09 +00:00
Havoc Pennington
6c241c1035 2003-04-08 Havoc Pennington <hp@redhat.com>
* bus/driver.c (bus_driver_handle_acquire_service): init
	retval/reply before checking name

	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
	recursion depth argument

	* dbus/dbus-message.h (struct DBusMessageIter): put some padding
	in the public struct for future extension

	* dbus/dbus-message-builder.c (_dbus_message_data_load): fix
	typo

	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
	message

	* doc/dbus-specification.sgml: fix typo
2003-04-08 20:16:03 +00:00
Alexander Larsson
c5020ac870 2003-04-08 Alexander Larsson <alexl@redhat.com>
Implemented recursive types, named types and new-style iters

	* bus/driver.c:
	* glib/test-thread-client.c: (thread_func):
	* glib/test-thread-server.c: (handle_test_message):
	* test/test-service.c: (handle_echo):
	Update to new api

	* dbus/Makefile.am:
	* dbus/dbus-dict.c:
	* dbus/dbus-dict.h:
	* dbus/dbus.h
	Remove DBusDict

	* dbus/dbus-internals.c: (_dbus_type_to_string):
	Update for new types.

	* dbus/dbus-marshal.[ch]:
	Implement recursive types and the new marshalling format.
	Remove hardcoded dict marshalling.
	Marshal named types.

	* dbus/dbus-message-builder.c:
	Add BYTE_ARRAY.
	Remove references to old types

	* dbus/dbus-message.[ch]:
	New non-refcounted iter API that supports recursive iters.
	Use iters for appending, including support for recursive
	iters.
	Add byte and named type support.
	Update everything to new marshalling formats.
	Add tests for new API.

	* dbus/dbus-protocol.h:
	Remove old array types.
	Add types: BYTE, ARRAY, DICT, NAMED

	* dbus/dbus-string.c:
	* dbus/dbus-sysdeps.c:
	Make parse_double locale safe.

	* dbus/dbus-test-main.c:
	Call setlocale.

	* dbus/dbus-test.c:
	Kill dict test

	* doc/dbus-specification.sgml:
	Update spec

	* test/data/incomplete-messages/missing-body.message:
	* test/data/invalid-messages/bad-boolean.message:
	* test/data/invalid-messages/bad-boolean-array.message:
	* test/data/invalid-messages/boolean-array-length-too-long.message-raw:
	* test/data/invalid-messages/boolean-has-no-value.message-raw:
	* test/data/invalid-messages/too-short-dict.message:
	* test/data/valid-messages/dict-simple.message:
	* test/data/valid-messages/dict.message:
	* test/data/valid-messages/emptiness.message:
	* test/data/valid-messages/lots-of-arguments.message:
	* test/data/valid-messages/no-padding.message:
	* test/data/valid-messages/recursive-types.message:
	Add missing NAME fields
	Fix up dicts & arrays

	* test/data/invalid-messages/dict-with-nil-value.message:
	Removed, this is not invalid anymore.

	* test/data/valid-messages/recursive-types.message:
	Add new test for deeply recursive types.
2003-04-08 15:52:51 +00:00
Havoc Pennington
a162febe67 2003-04-07 Havoc Pennington <hp@pobox.com>
* bus/driver.c (bus_driver_handle_acquire_service): return an
	error if you try to acquire a service that starts with ':'
2003-04-08 04:46:05 +00:00
Havoc Pennington
fe22b2194d 2003-04-07 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.sgml: require that base service names
	start with ':' and that the base service is created/deleted
	as first and last things a connection does on the bus

	* bus/dispatch.c (check_existent_service_activation): lots more
	work on the activation test; it doesn't fully pass yet...

	* test/test-service.c (main): fix so we don't memleak the
	connection to the message bus
	(filter_func): accept a message asking us to exit
2003-04-07 23:28:16 +00:00
Havoc Pennington
1617fbe36c having a bad cvs add day apparently 2003-04-07 15:42:22 +00:00
Havoc Pennington
4067152efc commit missing files 2003-04-07 02:48:14 +00:00
Havoc Pennington
a7f69a41d5 2003-04-06 Havoc Pennington <hp@pobox.com>
* qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
	from Colin Walters

	* configure.in: fixes to Qt detection from Colin Walters

	* doc/Makefile.am: Only remove generated docbook dirs if they
	exist, from Colin Walters

	* dbus/dbus-bus.c: change how we set well-known connections to
	NULL, so that it works if a single connection is stored in
	two well-known array slots.

	* test/Makefile.am: remove a lot of stuff that isn't immediately
	useful, it's in CVS history if we want it.

	* test/test-service.c: use dbus-mainloop instead of that
	watch.[hc] crack
2003-04-07 02:01:53 +00:00
Havoc Pennington
98572905e6 2003-04-06 Havoc Pennington <hp@pobox.com>
* test/Makefile.am: remove a lot of stuff that isn't immediately
	useful, it's in CVS history if we want it.

	* test/test-service.c: use dbus-mainloop instead of that
	watch.[hc] crack
2003-04-07 01:07:13 +00:00
Havoc Pennington
df008ef97d 2003-04-06 Havoc Pennington <hp@pobox.com>
* dbus/Makefile.am: split lists of sources into stuff that goes in
	the library, util functions that go in the lib and are also used
	elsewhere, and util functions that are used in tests/daemon but
	don't go in the lib.

	* dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
	here so it can be used in test binaries also
2003-04-06 23:53:27 +00:00
Havoc Pennington
856361ff5b 2003-04-06 Havoc Pennington <hp@pobox.com>
* dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
	here in the parent process, so we can return an error if it
	fails. Also, move some of the code into the child so the parent
	is less hosed if we fail midway through.

	* bus/bus.c (bus_context_new): move pidfile detection further up
	in the function, before we start overwriting sockets and such.

	* bus/messagebus.in: adjust this a bit, not sure if it will work.

	* configure.in: add --with-system-pid-file and --with-system-socket

2003-04-06  Colin Walters  <walters@verbum.org>

	* configure.in (DBUS_SYSTEM_PID_FILE): New variable.

	* bus/system.conf.in: Declare a pidfile.

	* bus/bus.c (bus_context_new): Test for an existing pid file, and
	create one (if appropriate).

	* bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
	(struct BusConfigParser) [pidfile]: New.
	(element_type_to_name, merge_included, start_busconfig_child)
	(bus_config_parser_end_element, bus_config_parser_content): Handle it.
	(bus_config_parser_unref): Free it.
	(bus_config_parser_get_pidfile): New function.

	* bus/config-parser.h (_dbus_write_pid_file): Prototype.

	* dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.

	* dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.

	* dbus/dbus-sysdeps.h: Prototype it.
2003-04-06 23:15:41 +00:00
Havoc Pennington
c8991b0f95 2003-04-06 Havoc Pennington <hp@pobox.com>
* bus/bus.c (bus_context_new): print the address in here, rather
	than in main(), because we need to do it before forking the daemon

	* bus/dispatch.c (send_service_nonexistent_error): set the sender
	on the service nonexistent error

	* bus/driver.c (bus_driver_handle_acquire_service): set the
	sender on the AcquireService reply

	* test/data/valid-config-files/debug-allow-all.conf.in: Make test
	server also listen on a UNIX socket so services can connect to it.
2003-04-06 20:04:47 +00:00
Havoc Pennington
bc8b061eec 2003-04-06 Havoc Pennington <hp@pobox.com>
* dbus/dbus-threads.c: Redo how the fake debug mutexes are done
	so it detects deadlocks and also we actually init threads when
	debugging.
2003-04-06 19:12:45 +00:00
Havoc Pennington
6d54407dbb 2003-04-06 Havoc Pennington <hp@pobox.com>
* dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
	save the domain socket name, and unlink it when we disconnect the
	server. Means that at least when we exit normally, we won't leave
	a bunch of junk in /tmp

	* dbus/dbus-transport-unix.c
	(_dbus_transport_new_for_domain_socket): code cleanup (nicer
	memory management). (I was making a real change here but then
	didn't)
2003-04-06 18:27:23 +00:00
Havoc Pennington
e45e438227 2003-04-06 Havoc Pennington <hp@pobox.com>
* bus/bus.c (bus_context_new): fix wrong handling of
	server_data_slot_unref() in the error case.

	* dbus/dbus-internals.h (_dbus_assert): change so it passes
	"(condition) != 0" to _dbus_real_assert so that
	"_dbus_assert (pointer)" doesn't cause a warning

	* bus/main.c (main): accept --print-address option to print out
	the message bus address

	* dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this

	* dbus/dbus-transport.c (_dbus_transport_open): special error for
	"tmpdir" option to unix: address on client side

	* dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
	to unix: address

	* configure.in (TEST_SOCKET_DIR): locate a temporary directory
	we can use to create sockets in the test suite.

	* bus/main.c (signal_handler): on SIGTERM, exit the daemon
	cleanly. To be used for testing.

	* dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()

	* dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new

	* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
	handle trying to call this when there's no servers active
2003-04-06 18:03:03 +00:00
Havoc Pennington
2618e1a973 0.8 2003-04-06 02:44:49 +00:00
Havoc Pennington
07e3f76f8e 2003-04-05 Havoc Pennington <hp@pobox.com>
* bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
	crash on startup. Need to get "try starting the daemon"
	in the test suite I guess. ;-)

	* dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
	tracked the number of open connections; it's better done in
	application-specific code as you want it to span all servers etc.
2003-04-05 23:50:47 +00:00
Havoc Pennington
5ecb2a781f 2003-04-05 Havoc Pennington <hp@pobox.com>
* bus/Makefile.am (install-data-hook): add missing DESTDIR,
	patch from Colin Walters
2003-04-05 23:07:47 +00:00
Havoc Pennington
2f3fbd451d 2003-04-05 Havoc Pennington <hp@pobox.com>
* doc/config-file.txt (Elements): fix docs of <auth> to reflect
	reality; in fact multiple mechanisms are allowed.

	* dbus/dbus-internals.c (_dbus_real_assert)
	(_dbus_real_assert_not_reached): move guts of _dbus_assert() and
	_dbus_assert_not_reached() into functions, so that they don't show
	up in basic block counts for test coverage, and don't use up as
	much disk space. Does mean slower execution speed though, so
	assumes --disable-asserts is the normal production case.
2003-04-05 20:38:01 +00:00
Havoc Pennington
6164a2e5f4 2003-04-05 Havoc Pennington <hp@pobox.com>
* test/Makefile.am (dist-hook): also dist *.in files

	* NEWS: update

	* configure.in: 0.7
2003-04-05 20:03:58 +00:00
Havoc Pennington
35ab7c6fab 2003-04-05 Havoc Pennington <hp@pobox.com>
* dbus/dbus-string.c: docs warning

	* dbus/dbus-spawn.c: missing docs

	* dbus/dbus-memory.c (struct ShutdownClosure): missing docs
2003-04-05 19:09:49 +00:00
Havoc Pennington
2250539aee 2003-04-05 Havoc Pennington <hp@pobox.com>
* bus/loop.c (bus_loop_iterate): fix the timeout code, using
	magic from GLib

	* dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
	to -1 once we've reaped the babysitter
	(_dbus_babysitter_handle_watch): do as much work as we can, not
	just one go of it

	* bus/activation.c: add code using DBusBabysitter so that we
	handle it when a service fails to start up properly.
	(bus_activation_service_created): don't remove the activation
	entries as we go, just let them get removed when we free the pending
	activation. Unref reply messages after sending them.
2003-04-05 19:03:40 +00:00
Havoc Pennington
0cc7669fb8 2003-04-05 Havoc Pennington <hp@pobox.com>
* test/decode-gcov.c (main): print per-directory stats in the report

	* Makefile.am (coverage-report.txt): don't include test/* in gcov stats
2003-04-05 17:04:23 +00:00
Havoc Pennington
3a96e4ffd9 2003-04-05 Havoc Pennington <hp@pobox.com>
* Makefile.am (coverage-report.txt): add target "coverage-report.txt"

	* test/decode-gcov.c: hack up a little program to suck data
	out of gcov files. Yes this is sort of silly.

	* configure.in: define something in config.h and do an
	AM_CONDITIONAL when gcov is enabled
2003-04-05 10:04:04 +00:00
Havoc Pennington
03b9ca6d4e 2003-04-04 Havoc Pennington <hp@redhat.com>
* dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
	return a "babysitter" object that is used to monitor the status of
	the spawned process and reap it when required.

	* test/test-segfault.c, test/test-exit.c,
	test/test-sleep-forever.c: binaries that do various lame things,
	used in the test suite.

	* dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
2003-04-05 00:37:17 +00:00
Havoc Pennington
45d1479fad 2003-04-03 Havoc Pennington <hp@pobox.com>
* dbus/dbus-spawn.c: Move dbus-spawn into a separate file
	in preparation for modifying it, dbus-sysdeps is getting
	a bit unmanageable.
2003-04-04 01:55:28 +00:00
Havoc Pennington
1b08036103 2003-04-03 Havoc Pennington <hp@redhat.com>
* bus/loop.h, bus/loop.c: make the mainloop an object so we can
	have multiple ones

	* bus/*.[hc]: adapt to mainloop change
2003-04-04 00:39:22 +00:00
Havoc Pennington
f216e81432 2003-04-03 Havoc Pennington <hp@redhat.com>
* bus/activation.c (load_directory): fix up memleaks
	(bus_activation_entry_free): free the entry

	* dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
	we get one from the message bus; fix memleaks.

	* dbus/dbus-message.c (dbus_set_error_from_message): new function
2003-04-03 21:56:22 +00:00
Havoc Pennington
fe9f3b45cc commit adds/removes here before builddir contents confuse matters 2003-04-03 21:25:10 +00:00
Havoc Pennington
eeb88949d8 2003-04-03 Havoc Pennington <hp@pobox.com>
* bus/config-parser.c (bus_config_parser_unref): free
	list of mechanisms, bug discovered by test suite enhancements
	(putting system.conf and session.conf into suite)

	* test/Makefile.am, test/test-service.c: add placeholder for a
	test service that we'll activate as part of test suite. Doesn't
	do anything yet.

	* dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
	setting NULL value, and use system malloc not dbus_malloc()
	when we have unavoidable memleakage.

	* dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
	didn't work, and support DBUS_BUS_ACTIVATION.

	* bus/activation.c (child_setup): pass our well-known bus type to
	the child

	* bus/config-parser.c: support <type> to specify well-known type

	* doc/dbus-specification.sgml: document the env variables to
	locate well-known buses and find service activator
2003-04-03 05:22:49 +00:00
Havoc Pennington
5364beac6c 2003-04-02 Havoc Pennington <hp@redhat.com>
* test/Makefile.am (all-local): add a rule to copy tests to
	builddir, so we can have generated tests. Use this to remove the
	silly hack for testing system.conf and session.conf. Will use this
	shortly to generate .service files pointing to test binaries.
2003-04-03 00:01:15 +00:00
Havoc Pennington
21cef58bc1 2003-04-02 Havoc Pennington <hp@redhat.com>
* dbus/dbus-string.c (set_length): fix a bug - we allocated max of
	current alloc and needed new length, not max of the doubled
	allocation and needed new length. Also, when building tests,
	don't do the double-allocation stuff, just realloc every time.
2003-04-02 21:52:38 +00:00
Havoc Pennington
94790fef4a 2003-04-02 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
	in error messages
	(_dbus_string_get_dirname): new
	(_dbus_sysdeps_test): new
	(_dbus_directory_open): include dirnames in error messages

	* bus/config-parser.c: interpret <include> and <includedir> and
	<servicedir> relative to config file location if the given
	filename is not absolute.

	* dbus/dbus-string.c (_dbus_string_find_byte_backward): new
2003-04-02 21:43:29 +00:00
Havoc Pennington
e55fd2c670 2003-04-02 Havoc Pennington <hp@redhat.com>
* 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
2003-04-02 20:14:52 +00:00
Havoc Pennington
cfa261b49d 2003-04-01 Havoc Pennington <hp@redhat.com>
* bus/config-parser.c, bus/bus.c: implement <servicedir> and
	<includedir> (at least mostly)

	* dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
	first, then the user ID
2003-04-02 00:29:33 +00:00
Havoc Pennington
44ed933284 2003-04-01 Havoc Pennington <hp@pobox.com>
* dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
	function

	* dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new

	* dbus/dbus-internals.c (_dbus_dup_string_array): new function

	* dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
	socket 0777, and unlink any existing socket.

	* bus/bus.c (bus_context_new): change our UID/GID and fork if
	the configuration file so specifies; set up auth mechanism
	restrictions

	* bus/config-parser.c (bus_config_parser_content): add support
	for <fork> option and fill in code for <auth>

	* bus/system.conf.in: add <fork/> to default configuration,
	and limit auth mechanisms to EXTERNAL

	* doc/config-file.txt (Elements): add <fork>

	* dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
	(_dbus_change_identity): new function
2003-04-01 05:33:01 +00:00