summaryrefslogtreecommitdiffstats
path: root/bus
Commit message (Collapse)AuthorAgeFilesLines
* 2007-06-18 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-183-5/+76
| | | | | | | | | | | | | | * 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-15 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-152-11/+3
| | | | | | | | | | | * dbus/dbus-sysdeps-unix.c (_dbus_append_session_config_file) (_dbus_append_system_config_file): new functions * bus/main.c (main): use _dbus_append_system_config_file() and _dbus_append_session_config_file() * dbus/Makefile.am (INCLUDES): move DBUS_SYSTEM_CONFIG_FILE and DBUS_SESSION_CONFIG_FILE into this makefile
* 2007-06-15 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-156-3/+15
| | | | | | | | | | | | | | * dbus/dbus-sysdeps.c (_dbus_set_errno_to_zero) (_dbus_get_is_errno_nonzero, _dbus_get_is_errno_eintr) (_dbus_strerror_from_errno): family of functions to abstract errno, though these are somewhat bogus (really we should make our socket wrappers not use errno probably - the issue is that any usage of errno that isn't socket-related probably is not cross-platform, so should either be in a unix-only file that can use errno directly, or is a bug - these general errno wrappers hide issues of this nature in non-socket code, while socket-specific API changes would not since sockets are allowed cross-platform)
* 2007-06-14 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-141-8/+19
| | | | | | * bus/dispatch.c (check_get_connection_unix_process_id): mop up getpid() (noticed by Peter KKümmel) and adapt the test to expect a "pid unknown" error when running on Windows.
* 2007-06-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-132-3/+15
| | | | | | | | | | | | | * dbus/dbus-server-socket.c (_dbus_server_listen_socket): support all_interfaces=true|false for tcp servers * dbus/dbus-sysdeps-unix.c (_dbus_listen_tcp_socket): support inaddr_any flag * bus/selinux.c: fix some missing includes * dbus/dbus-server-socket.c (_dbus_server_listen_socket): allow port to simply be omitted in addition to specifying 0
* 2007-06-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-132-7/+57
| | | | | | | | | | | * configure.ac, bus/selinux.c, dbus/dbus-sysdeps-unix-util.c: add libaudit support, no clue what this means really but now we have it. Patches from Fedora package. * bus/bus.c (bus_context_new): move selinux initialization after changing to daemon user, patch from Fedora package * dbus/dbus-transport.c (auth_via_unix_user_function): fix a typo
* 2007-06-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-097-77/+112
| | | | | | | | | | | | | | | | | | | * 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
* 2007-06-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-06-093-14/+7
| | | | | | | | | | | | | | | | | | | * 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
* * bus/main.c (main): uses _dbus_get_config_file_name() to detect ↵Ralf Habacker2007-06-011-0/+9
| | | | | | | session.conf location on win32. * dbus-sysdeps-win.h (_dbus_get_config_file_name,_dbus_file_exists): new prototyp, undefined interface after including windows.h because t makes trouble when a paramater is named interface. * dbus-sysdeps-win.c (_dbus_get_install_root,_dbus_get_config_file_name,_dbus_file_exists): new functions.
* * bus/config-parser.c (test_service_dir_matches): fixed ordering for unix.Ralf Habacker2007-05-241-6/+12
| | | | * bus/config-parser.c (test_default_session_servicedirs): made allocation of _progs platform independent.
* 2007-05-23 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-05-232-0/+5
| | | | | | | * bus/Makefile.am (install-data-hook): create session.d * bus/session.conf.in: add session.d for the session bus, so security policy can be extended
* * bus/policy (bus_policy_create_client_policy): win32 temporary fix until ↵Ralf Habacker2007-05-191-0/+4
| | | | the userdb stuff is ported completly.
* * bus\config-parser.c (test_default_session_servicedirs):win32 fix.Ralf Habacker2007-05-171-4/+39
|
* * bus/config-parser.c, bus/policy.c, bus/policy.h, ↵Ralf Habacker2007-03-155-17/+25
| | | | bus/dbus-daemon.1.in,bus/session.conf.in: added eavesdrop support for replies - patch by olli.salli at collabora.co.uk approved by Havoc Pennington.
* 2007-03-11 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-03-125-32/+37
| | | | | | | | | | | | | | * tools/dbus-launch.c (do_close_stderr): fix C89 problem and formatting problem * Mostly fix the DBusPipe mess. - put line break after function return types - put space before parens - do not pass structs around by value - don't use dbus_strerror after calling supposedly cross-platform api - don't name pipe variables "fd" - abstract special fd numbers like -1 and 1
* * bus/bus.c, bus/bus.h, bus/main.c, bus/test.c, dbus/dbus-sysdeps-unix.c, ↵Ralf Habacker2007-03-104-21/+24
| | | | dbus/dbus-sysdeps-util-unix.c, dbus/dbus-sysdeps-util-win.c, bus/dbus-sysdeps-win.c,dbus/dbus-sysdeps.h: renamed _dbus_xxx_pipe to _dbus_pipe_xxx, completed _dbus_pipe support.
* * dbus/dbus-sysdeps.h (_dbus_listen_tcp_socket): changed type or port to ↵Ralf Habacker2007-03-101-0/+11
| | | | | | | | pointer, because the port is given back. * dbus/dbus-server-socket.c (_dbus_server_new_for_tcp_socket): implemented returning tcp port. Skipping port parameter and non integer port values in config <listen> statement needs more effort. * dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-win.c (_dbus_listen_tcp_socket): return the real used tcp port. * bus/dbus-daemon.1.in: added <listen> tcp examples
* * bus/bus.c, dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps.h: rename pipe ↵Ralf Habacker2007-03-081-2/+2
| | | | related write() function calls to _dbus_write_pipe().
* * bus/dispatch.c: disabled segfault test on win32 for nowRalf Habacker2007-03-081-0/+11
|
* * bus/activation.c: win32 compile fix.Ralf Habacker2007-03-071-1/+0
| | | | | * test/test-segfault.c: win32 compile fix, rlimit isn't available on win32. * dbus-win.patch: removed some more patches, they are applied or obsolate
* * bus/activation.c: (bus_activation_activate_service):Ralf Habacker2007-03-041-0/+2
| | | | fixed call to _dbus_spawn_async_with_babysitter().
* 2007-01-31 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-02-011-0/+53
| | | | | * bus/dbus-daemon.1.in: write a section in the man page on running a test daemon for debugging purposes
* 2007-01-26 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-01-262-8/+35
| | | | | | | | | | * bus/session.conf.in: override all the default limits with much higher limits on the session bus, there is no reason the session bus should have low limits * bus/config-parser.c (bus_config_parser_new): increase default limits so they are less likely to be hit; in particular the max replies per connection was way too low
* 2006-12-19 Ray Strode <rstrode@redhat.com>Ray Strode2006-12-202-16/+38
| | | | | | | | | | | | | | | * bus/bus.c (process_config_every_time): don't overwrite existing bus context activation object until after we've checked that the new activation is valid. * bus/main.c (signal_handler), (handle_reload_watch): don't call exit() on failure, instead make do and keep going. (close_reload_pipe): new function to turn off hangup-causes-config-reload behavior if an unexpected error occurs
* * dbus/dbus-string.c (_dbus_string_pop_line),Ralf Habacker2006-12-121-11/+11
| | | | | | bus/desktop-file.c (parse_section_start, parse_comment_or_blank,parse_key_value,): uses _dbus_string_find_eol() to support platform independent eol style.
* commit.msgTim Dijkstra2006-12-125-34/+6
|
* * bus/signal.c: Fix match_rule_equal errataJohn (J5) Palmieri2006-12-121-0/+3
| | | | | (CVE-2006-6107 - Patch from Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>)
* * bus/bus.c: Missed patch - pass in the context to the directory watchJohn (J5) Palmieri2006-11-061-1/+1
|
* * bus/activation.c (bus_activation_new): don't fail if we can not readJohn (J5) Palmieri2006-11-031-2/+8
| | | | the directory as it may not exist
* * bus/config-parser.c (service_dirs_find_dir): useJohn (J5) Palmieri2006-11-021-14/+15
| | | | | | | | | | | _dbus_list_get_next_link so we don't get stuck in an infinite loop (start_busconfig_child): move processing of standard_session_servicedirs tags here because they have no content (bus_config_parser_content): check we don't have content in standard_session_servicedirs tag * tools/Makefile.am: Make sure the /var/lib/dbus directory is created Packagers need to own this directory
* 2006-11-01 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-11-021-0/+21
| | | | * bus/dbus-daemon.1.in: document standard_session_servicedirs
* * configure.in: expose DBUS_DATADIRJohn (J5) Palmieri2006-11-012-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/config-parser.c: add the standard_session_servicedirs element to the parser (bus_config_parser_content): process the standard_session_servicedirs element by getting the standard directories from sysdeps and merging them into the service directory list (test_default_session_servicedirs): make sure we get what we expect * bus/session.conf.in: replace the servicedir tag with the standard_session_servicedirs tag * dbus/dbus-list.h: remove the typedef of DBusList and place it in dbus-sysdeps.h to avoid circular header dependencies * dbus/dbus-sysdeps.h: add the typedef of DBusList * dbus/dbus-sysdeps-unix.c (split_paths_and_append): utility function which takes a string of directories delimited by colons, parses them out, appends a suffix and puts them in a list ignoring empty elements (_dbus_get_standard_session_servicedirs): returns the standard directories for a session bus to look for service activation files on Unix which includes the XDG_DATA_HOME, XDG_DATA_DIRS and DBUS_DATADIR directories * test/data/valid-config-files/many-rules.conf: add the standard_session_servicedirs tag to the valid config file tests
* * bus/config-parser.c (service_dirs_find_dir,John (J5) Palmieri2006-10-271-2/+48
| | | | | | | | | service_dirs_append_unique_or_free, service_dirs_append_link_unique_or_free): New static methods for only appending unique service directory names into the service directory list (merge_included, bus_config_parser_content): Only add unique service directory names into the list
* 2006-10-23 David Zeuthen <davidz@redhat.com>David Zeuthen2006-10-232-16/+28
| | | | | | | | | | | | | | * dbus/dbus-memory.c: Use atomic variable to protect n_blocks_outstanding otherwise OOM will be reported using SMP on some arches * bus/dispatch.c: Add missing end of line characters * bus/desktop-file.c (parse_section_start, parse_key_value) (bus_desktop_file_load): Propertly handle OOM * dbus/dbus-threads.c (init_uninitialized_locks): Check that thread_init_generation equals _dbus_current_generation, not 0
* * bus/dir-watch-default.c, bus/dir-watch-dnotify.c,John (J5) Palmieri2006-10-194-5/+7
| | | | | | | | | | bus/dir-watch-kqueue.c (bus_watch_directory): Pass in a BusContext instead of a void *. kqueue uses this to get the context's loop while the other modules ignore the parameter. This allows us to avoid platform conditionals * bus/bus.c (process_config_postinit): Pass in the context to the watch
* * bus/messagebus.in, bus/rc.messagebus.in: run dbus-uuidgen --ensureJohn (J5) Palmieri2006-10-192-0/+8
| | | | when starting the system bus
* 2006-10-01 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-10-012-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-09-30 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-10-012-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-09-16 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-09-162-6/+6
| | | | | | | | | | * dbus/dbus-sysdeps-unix.h: small change to Peter's patch to make dbus-sysdeps-unix-util.c build, add unix-specific sysdeps header. * dbus/dbus-sysdeps.h, dbus-sysdeps-unix.c: patch from Peter Kümmel bug #8249 to make the sysdeps.h read/write/open/close functions specifically for sockets only, and move generic read/write/open/close into unix-specific code.
* * remove a bunch of todo items from the 1.0 listJohn (J5) Palmieri2006-09-112-3/+3
|
* * bus/activation.c, bus/desktop-file.c: Distinguish between OOM andJohn (J5) Palmieri2006-09-113-21/+29
| | | | key not found
* * bus/test-main.c (main): Initialize threading during testsJohn (J5) Palmieri2006-09-081-3/+0
| | | | | | | | | | * dbus/dbus-connection.c (_dbus_connection_new_for_transport): Unlock connection on error (generate_local_error_message): static method for generating an error message when we don't have a message to reply to (_dbus_connection_block_pending_call): Send a disconnect error instead of just a timeout (NULL) when the bus gets disconnected while blocking for a reply.
* * Clean up close calls to use _dbus_close (Patch fromJohn (J5) Palmieri2006-09-071-0/+3
| | | | Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>)
* * bus/driver.c:John (J5) Palmieri2006-09-063-79/+118
| | | | | | | | | | | | (bus_driver_generate_introspect_string): New method for populating a DBusString with the introspect data (bus_driver_handle_introspect): Move introspect generation code to bus_driver_generate_introspect_string * bus/main.c: (introspect): New function which prints out the intropect data and exits (main): Add a --introspect switch
* * doc/TODO, various source files: Audited todo's and FIXME's andJohn (J5) Palmieri2006-09-065-5/+5
| | | | | | 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
* * configure.ac, bus/Makefile.am: Generalize kqueue support so thatJohn (J5) Palmieri2006-08-251-1/+1
| | | | | it works on any system providing this interface, not only FreeBSD. For example, NetBSD. (Patch by Julio M. Merino Vidal <jmmv at NetBSD dot org>)
* * Released 0.92dbus-0.92John (J5) Palmieri2006-08-181-17/+21
| | | | | | | | * dbus/dbus-threads.c (dbus_threads_init): change the documentation to reflect the init late change * bus/bus.c (bus_context_new): Check user before we fork so we can print out an error message a user will be able to see
* Patch provided by Ralf Habacker (ralf dot habacker at freenet dot de)John (J5) Palmieri2006-08-181-1/+26
| | | | | | | | | * 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)
* Patches by Kjartan Maraas <kmaraas at gnome dot org>John (J5) Palmieri2006-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * configure.in: make sure the compiler supports -Wfloat-equalJohn (J5) Palmieri2006-08-101-3/+3
| | | | | | * bus/dir-watch-dnotify.c: move functional code after variable declerations (C99 fix) (patches from Jens Granseuer <jensgr at gmx dot net>