summaryrefslogtreecommitdiffstats
path: root/bus
Commit message (Collapse)AuthorAgeFilesLines
* 2007-07-26 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-266-34/+42
| | | | | | | | | | | | | | | * bus/config-parser-trivial.c (check_return_values): disable a test that hardcoded the bus user's name * bus/dispatch.c (bus_dispatch_test_conf): remove the "if (!use_launcher)" around the tests, they were only failing because we didn't pass through all the expected errors from the helper. * bus/activation-exit-codes.h (BUS_SPAWN_EXIT_CODE_CHILD_SIGNALED): add a code for child segfaulting (BUS_SPAWN_EXIT_CODE_GENERIC_FAILURE): make "1" be a generic failure code, so if a third party launch helper were written it could just always return 1 on failure.
* Switch over to using getaddrinfo for TCP clients & servers to enable IPv6Daniel P. Berrange2007-07-251-5/+18
|
* 2007-07-24 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-247-29/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: add AM_PROG_CC_C_O to allow per-target CPPFLAGS * bus/dispatch.c (bus_dispatch_test_conf): Fix up setting TEST_LAUNCH_HELPER_CONFIG to include the full path, and enable test shell_fail_service_auto_start when use_launcher==TRUE * bus/activation-helper-bin.c (convert_error_to_exit_code): pass through the INVALID_ARGS error so the test suite works * bus/activation.c (handle_activation_exit_error): return DBUS_ERROR_NO_MEMORY if we get BUS_SPAWN_EXIT_CODE_NO_MEMORY * dbus/dbus-spawn.c (_dbus_babysitter_get_child_exit_status): return only the exit code of the child, not the entire thingy from waitpid(), and make the return value indicate whether the child exited normally (with a status code) * bus/bus.c (process_config_first_time_only): _dbus_strdup works on NULL so no need to check (process_config_every_time): move servicehelper init here, so we reload it on HUP or config file change * bus/Makefile.am (install-data-hook): remove comment because Emacs make mode seems to be grumpy about it
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-242-1/+107
| | | | | | | | * bus/Makefile.am: * bus/test-system.c: (die), (check_memleaks), (test_pre_hook), (test_post_hook), (main): Add back the test-system.c file - not sure now this got ignored in the diff. I blame git.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-16/+523
| | | | | | | | | | | * bus/dispatch.c: (check_segfault_service_no_auto_start), (check_launch_service_file_missing), (check_launch_service_user_missing), (check_launch_service_exec_missing), (check_launch_service_service_missing), (bus_dispatch_test_conf), (bus_dispatch_test_conf_fail), (bus_dispatch_test): Add unit tests for system activation. Most are copied from the session activation tests, but some didn't apply when using a laucher.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-2/+56
| | | | | * bus/activation.c: (bus_activation_activate_service): If the bus uses a service-laucher, then use the setuid laucher.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-0/+54
| | | | | | * bus/activation.c: (handle_activation_exit_error), (babysitter_watch_callback): Map the child exit status integer to a proper dbus error.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-242-3/+20
| | | | | | | | * bus/bus.c: (process_config_first_time_only), (process_config_every_time), (bus_context_unref), (bus_context_get_servicehelper): * bus/bus.h: Add the concept of a service-helper and allow it's value to be read.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-1/+34
| | | | | | | * bus/activation.c: (bus_activation_entry_unref), (update_desktop_file_entry): Add the concept of, and read the value of user from the desktop file. The user string is not required unless we are using system activation.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-242-4/+7
| | | | | | | * bus/activation.c: * bus/desktop-file.h: Move the defines into the header file, as we use these in the lauch helper as well as the desktop file parsing.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-0/+2
| | | | | * bus/.cvsignore: Add the autogenerated binary files.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-242-3/+83
| | | | | | | * bus/Makefile.am: * bus/test.h: Add the build glue for the lauch helper, and also add the launch-helper OOM checks into make check. I've probably broken the build, give me 2.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-0/+146
| | | | | | * bus/test-launch-helper.c: (die), (check_memleaks), (test_post_hook), (bus_activation_helper_oom_test), (main): Add a test wrapper to allow OOM checks on the launch helper.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-243-0/+679
| | | | | | | | | | | | | | * bus/activation-helper-bin.c: (convert_error_to_exit_code), (main): * bus/activation-helper.c: (desktop_file_for_name), (clear_environment), (check_permissions), (check_service_name), (get_parameters_for_service), (switch_user), (exec_for_correct_user), (check_bus_name), (get_correct_parser), (launch_bus_name), (check_dbus_user), (run_launch_helper): * bus/activation-helper.h: Add the initial launch-helper. This is split into a main section and a binary loader that allows us to lauch the main section in another test harness to do stuff like OOM testing. No build glue yet.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-243-96/+273
| | | | | | | | | | | | | | | * bus/Makefile.am: * bus/config-parser.c: (bus_config_parser_unref), (start_busconfig_child), (bus_config_parser_end_element), (servicehelper_path), (bus_config_parser_content), (bus_config_parser_finished), (bus_config_parser_get_servicehelper), (test_default_session_servicedirs), (test_default_system_servicedirs), (bus_config_parser_test): * bus/config-parser.h: Make the config-parser code use the common config code. Also add the session and systemdirs stuff, and make the config parser aware of the servicehelper field.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-0/+6
| | | | | * bus/system.conf.in: Add new servicehelper fields to the default system.conf file.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-242-0/+764
| | | | | | | | | | | | | | | | | | * bus/config-parser-trivial.c: (service_dirs_find_dir), (service_dirs_append_link_unique_or_free), (bus_config_parser_new), (bus_config_parser_unref), (bus_config_parser_start_element), (bus_config_parser_end_element), (bus_config_parser_content), (bus_config_parser_finished), (bus_config_parser_get_user), (bus_config_parser_get_type), (bus_config_parser_get_service_dirs), (check_return_values), (do_load), (check_loader_oom_func), (process_test_valid_subdir), (make_full_path), (check_file_valid), (bus_config_parser_trivial_test): * bus/config-parser-trivial.h: Add a security sensitive stripped down config parser for the setuid launcher. This file only reads what it needs, and doesn't try to do anything remotely clever like including external files. It is not intended to validate the config file; it is expected that config-parser will do that before the setuid program tries to read it.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-242-0/+228
| | | | | | | | | | | * bus/config-parser-common.c: (bus_config_parser_element_name_to_type), (bus_config_parser_element_type_to_name): * bus/config-parser-common.h: We don't want to run the whole config parser with all it's deps in the setuid program. We need to implement a stripped down config parser just for the launcher, and to do so I need some common functions and defines; add them here.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-0/+27
| | | | | | * bus/dbus-daemon.1.in: Add standard_system_servicedirs and servicehelper into the man file and explain what each does.
* 2007-07-24 Richard Hughes <richard@hughsie.com>Richard Hughes2007-07-241-0/+38
| | | | | | | | * bus/activation-exit-codes.h: Add defines which specify the output codes of the launch helper. We have to use exit codes as this is the only way we can return failure type without going grotty things like redirecting possibly-nonsecure stderr into the error.
* 2007-07-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-1435-35/+35
| | | | * Add indent-tabs-mode: nil to all file headers.
* add a comment about the match rules limitHavoc Pennington2007-06-191-1/+9
|
* 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
|