summaryrefslogtreecommitdiffstats
path: root/bus
Commit message (Collapse)AuthorAgeFilesLines
* 2004-11-26 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-11-271-5/+4
| | | | | | | | | | * test/glib/test-profile.c: add with_bus mode to profile echoes that go through the bus. * test/glib/run-test.sh: add ability to run test-profile * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial config file reload.
* 2004-11-25 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-11-263-40/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary change here is to always write() once before adding the write watch, which gives us about a 10% performance increase. * dbus/dbus-transport-unix.c: a number of modifications to cope with removing messages_pending (check_write_watch): properly handle DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of messages_pending stuff (check_read_watch): properly handle WAITING_FOR_MEMORY and AUTHENTICATED cases (unix_handle_watch): after writing, see if the write watch can be removed (unix_do_iteration): assert that write_watch/read_watch are non-NULL rather than testing that they aren't, since they aren't allowed to be NULL. check_write_watch() at the end so we add the watch if we did not finish writing (e.g. got EAGAIN) * dbus/dbus-transport-protected.h: remove messages_pending call, since it resulted in too much inefficient watch adding/removing; instead we now require that the transport user does an iteration after queueing outgoing messages, and after trying the first write() we add a write watch if we got EAGAIN or exceeded our max bytes to write per iteration setting * dbus/dbus-string.c (_dbus_string_validate_signature): add this function * dbus/dbus-server-unix.c (unix_finalize): the socket name was freed and then accessed, valgrind flagged this bug, fix it * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken as the last valid field plus 1, where really it is equal to the last valid field. Corrects some message corruption issues. * dbus/dbus-mainloop.c: verbosity changes * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM instead of aborting in one of the test codepaths * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that caused not printing the pid ever again if a verbose was missing the newline at the end (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE * dbus/dbus-connection.c: verbosity changes; (dbus_connection_has_messages_to_send): new function (_dbus_connection_message_sent): no longer call transport->messages_pending (_dbus_connection_send_preallocated_unlocked): do one iteration to try to write() immediately, so we can avoid the write watch. This is the core purpose of this patchset (_dbus_connection_get_dispatch_status_unlocked): if disconnected, dump the outgoing message queue, so nobody will get confused trying to send them or thinking stuff is pending to be sent * bus/test.c: verbosity changes * bus/driver.c: verbosity/assertion changes * bus/dispatch.c: a bunch of little tweaks to get it working again because this patchset changes when/where you need to block.
* 2004-11-09 Colin Walters <walters@verbum.org>Colin Walters2004-11-094-19/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-string.c (_dbus_string_get_length): New function, writes DBusString to C buffer. * dbus/dbus-string.h: Prototype it. * dbus/dbus-message.c (dbus_message_type_to_string): New function, converts message type into C string. * dbus/dbus-message.h: Prototype it. * bus/selinux.c (bus_selinux_check): Take source pid, target pid, and audit data. Pass audit data to avc_has_perm. (log_audit_callback): New function, appends extra audit information. (bus_selinux_allows_acquire_service): Also take service name, add it to audit data. (bus_selinux_allows_send): Also take message type, interface, method member, error name, and destination, and add them to audit data. (log_cb): Initialize func_audit. * bus/selinux.h (bus_selinux_allows_acquire_service) (bus_selinux_allows_send): Update prototypes * bus/services.c (bus_registry_acquire_service): Pass service name to bus_selinux_allows_acquire_service. * bus/bus.c (bus_context_check_security_policy): Pass additional audit data. Move assignment of dest to its own line.
* 2004-11-07 Colin Walters <walters@verbum.org>Colin Walters2004-11-078-167/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/bus.c (load_config): Break into three separate functions: process_config_first_time_only, process_config_every_time, and process_config_postinit. (process_config_every_time): Move call of bus_registry_set_service_context_table into process_config_postinit. (process_config_postinit): New function, does any processing that needs to happen late in initialization (and also on reload). (bus_context_new): Instead of calling load_config, open config parser here and call process_config_first_time_only and process_config_every_time directly. Later, after we have forked but before changing UID, invoke bus_selinux_full_init, and then call process_config_postinit. (bus_context_reload_config): As in bus_context_new, load parse file inside here, and call process_config_every_time and process_config_postinit. * bus/services.h, bus/services.c (bus_registry_set_service_context_table): Rename from bus_registry_set_sid_table. Take string hash from config parser, and convert them here into SIDs. * bus/config-parser.c (struct BusConfigParser): Have config parser only store a mapping of service->context string. (merge_service_context_hash): New function. (merge_included): Merge context string hashes instead of using bus_selinux_id_table_union. (bus_config_parser_new): Don't use bus_selinux_id_table_new; simply create a new string hash. (bus_config_parser_unref): Unref it. (start_selinux_child): Simply insert strings into hash, don't call bus_selinux_id_table_copy_over. * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union) (bus_selinux_id_table_copy_over): Delete.
* *** empty log message ***Colin Walters2004-11-041-1/+1
|
* 2004-11-03 Colin Walters <walters@verbum.org>Colin Walters2004-11-041-3/+0
| | | | | * bus/selinux.c (bus_selinux_pre_init): Kill some unused variables.
* 2004-11-03 Colin Walters <walters@verbum.org>Colin Walters2004-11-031-2/+2
| | | | | * bus/test-main.c (test_pre_hook): Fix test logic, thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
* 2004-11-02 Colin Walters <walters@verbum.org>Colin Walters2004-11-024-7/+33
| | | | | | | | | | | | | | | * bus/selinux.c (bus_selinux_init): Split into two functions, bus_selinux_pre_init and bus_selinux_post_init. (bus_selinux_pre_init): Just determine whether SELinux is enabled. (bus_selinux_post_init): Do everything else. * bus/main.c (main): Call bus_selinux_pre_init before parsing config file, and bus_selinux_post_init after. This ensures that we don't lose the policyreload notification thread that bus_selinux_init created before forking previously. * bus/test-main.c (test_pre_hook): Update for split.
* 2004-10-29 Colin Walters <walters@redhat.com>Colin Walters2004-10-291-1/+3
| | | | | | | | | | * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take parameter for fd to write pid to. * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it. * bus/bus.c (bus_context_new): Pass print_pid_fd to _dbus_become_daemon (bug #1720)
* 2004-10-29 Colin Walters <walters@redhat.com>Colin Walters2004-10-291-0/+1
| | | | * bus/.cvsignore, qt/.cvsignore: Update.
* 2004-10-29 Colin Walters <walters@redhat.com>Colin Walters2004-10-292-1/+88
| | | | | | | | Patch from Kristof Vansant <de_lupus@pandora.be> * configure.in: Detect Slackware. * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in. * bus/rc.messagebus.in: New file.
* 2004-10-29 Colin Walters <walters@redhat.com>Colin Walters2004-10-291-2/+2
| | | | | | | | Patch from Matthew Rickard <mjricka@epoch.ncsc.mil> * bus/services.c (bus_registry_acquire_service): Correctly retrieve service name from DBusString for printing.
* John (J5) Palmieri <johnp@redhat.com>John (J5) Palmieri2004-10-252-2/+2
| | | | | | | | | | | * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free the DBusUserInfo structure since this is passed into the function. This would cause a double free when the function that allocated the structure would try to free it when an error occured. * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in): use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services for service activation to avoid 32bit/64bit parallel install issues
* 2004-10-18 Colin Walters <walters@verbum.org>Colin Walters2004-10-181-0/+4
| | | | | * bus/selinux.c (bus_selinux_enabled): Handle --disable-selinux case.
* 2004-10-18 Colin Walters <walters@verbum.org>Colin Walters2004-10-185-0/+40
| | | | | | | | | | | | | | | | | | | | | | * bus/selinux.h: Add bus_selinux_enabled. * bus/selinux.c (bus_selinux_enabled): Implement it. * bus/config-parser.c (struct include): Add if_selinux_enabled member. (start_busconfig_child): Parse if_selinux_enabled attribute for include. (bus_config_parser_content): Handle it. * bus/session.conf.in, bus/system.conf.in: Add inclusion of context mapping to default config files; conditional on SELinux being enabled. * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD. * test/data/invalid-config-files/badselinux-1.conf, test/data/invalid-config-files/badselinux-2.conf: Test files for bad syntax.
* * bus/signals.c (bus_match_rule_parse): validate the components ofOlivier Andrieu2004-09-271-48/+59
| | | | | | match rules (bug #1439). * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
* * doc/dbus-specification.xml: document ServiceOwnerChanged signal.Olivier Andrieu2004-09-244-423/+462
| | | | | | | * bus/driver.c, bus/driver.h, bus/services.c: Use ServiceOwnerChanged signal instead of ServiceCreated and ServiceDeleted. * bus/dispatch.c: update testcase for the new signal.
* * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.Olivier Andrieu2004-09-172-1/+104
| | | | | | | | | | | * doc/busconfig.dtd: update the DTD for the at_console attribute. * bus/driver.c (bus_driver_handle_hello): correctly handle Hello messages after the first one (bug #1389). * bus/dispatch.c (check_double_hello_message): add a test case for the double hello message bug. (check_existent_service_activation): fix check of spawning error.
* 2004-09-12 David Zeuthen <david@fubar.dk>David Zeuthen2004-09-123-11/+20
| | | | | | | | | | | Patch from Kay Sievers <kay.sievers@vrfy.org> * bus/bus.c (bus_context_new): * bus/bus.h: * bus/main.c (usage) (main): Add commandline option --nofork to override configuration file setting.
* 2004-08-26 Jon Trowbridge <trow@ximian.com>Jon Trowbridge2004-08-261-4/+13
| | | | | | * bus/driver.c (bus_driver_handle_service_exists): Respond with TRUE if we are inquiring about the existence of the built-in org.freedesktop.DBus service.
* Console user security policyJohn (J5) Palmieri2004-08-253-20/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/config-parser.c: (struct PolicyType): Add POLICY_CONSOLE (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console (start_busconfig_child): Sets up console element when <policy at_console=""> is encountered in a policy file (append_rule_from_element): Convert console elements to console rules. * bus/policy.c: (bus_policy_create_client_policy): Add console rules to the client policy based on if the client is at the console (bus_policy_append_console_rule): New function for adding a console rule to a policy (bus_policy_merge): Handle console rule merging * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant where we check for console user files * dbus/dbus-sysdeps.c: (_dbus_file_exists): New function which checks if the given file exists (_dbus_user_at_console): New function which does the system specific process of checking if the user is at the console * dbus/dbus-userdb.c: (_dbus_is_console_user): New function converts a UID to user name and then calls the system specific _dbus_user_at_console to see if the user is at the console and therefor a console user
* * bus/config-parser.c (set_limit):Olivier Andrieu2004-08-253-3/+9
| | | | | | | | | | * bus/dbus-daemon-1.1.in: * test/data/valid-config-files/many-rules.conf: set the max_match_rules_per_connection limt from the config file. * doc/busconfig.dtd: update the DTD. * bus/driver.c: remove some unused variables.
* 2004-08-23 Colin Walters <walters@redhat.com>Colin Walters2004-08-234-34/+232
| | | | | | | | | | | | | | | | | | | | | | | | | * bus/selinux.h: Prototype bus_selinux_get_policy_root. * bus/selinux.c: Create a thread for policy reload notification. (bus_selinux_get_policy_root): Implement. Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil> * bus/config-parser.c (start_busconfig_child) (bus_config_parser_content): Support SELinux-root relative inclusion. * configure.in <HAVE_SELINUX>: Add -lpthread. * bus/test-main.c (test_pre_hook, test_post_hook): New. (test_post_hook): Move memory checking into here. (test_pre_hook, test_post_hook): Move SELinux checks in here, but conditional on a DBUS_TEST_SELINUX environment variable. Unfortunately we can't run the SELinux checks as a normal user, since they won't have any permissions for /selinux. So this will have to be tested manually for now, until we have virtualization for most of libselinux.
* 2004-08-20 Colin Walters <walters@redhat.com>Colin Walters2004-08-202-4/+1
| | | | | | | | * bus/config-parser.c (start_busconfig_child): Remove some unused variables. * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler warning.
* * bus/bus.c (process_config_first_time_only): get rid of an unusedOlivier Andrieu2004-08-102-4/+3
| | | | | | | | | DBusError that was causing a memoy leak (bug #989). * dbus/dbus-keyring.c, dbus/dbus-message.c: fix compilation on Solaris/Forte C (bug #974) * bus/main.c (main): plug two minuscule memleaks.
* 2004-08-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-08-1032-32/+32
| | | | | * COPYING: switch to Academic Free License version 2.1 instead of 2.0, to resolve complaints about patent termination clause.
* * bus/config-parser.c (bus_config_parser_new): fix an invalid _unrefOlivier Andrieu2004-07-312-25/+21
| | | | | | | | | | | | | in the SELinux support. * doc/busconfig.dtd: update DTD for SELinux support. * bus/config-loader-libxml.c: fix error handler and parser initialisation/cleanup. OOM test now works with libxml2 HEAD. * configure.in: remove the warning about libxml2 * dbus/dbus-bus.c: silence doxygen warning.
* * dbus/dbus-internals.h (_DBUS_SET_OOM):Olivier Andrieu2004-07-312-12/+17
| | | | | | | | * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of dbus_error_set. * bus/dispatch.c (check_send_exit_to_service): fix the test case, broken by the change in the _SET_OOM macros.
* 2004-07-31 Colin Walters <walters@redhat.com>Colin Walters2004-07-311-0/+1
| | | | | * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get BUS_SET_OOM.
* 2004-07-24 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-07-3015-21/+1105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil> * bus/selinux.c, bus/selinux.h: new file encapsulating selinux functionality * configure.in: add --enable-selinux * bus/policy.c (bus_policy_merge): add FIXME to a comment * bus/main.c (main): initialize and shut down selinux * bus/connection.c: store SELinux ID on each connection, to avoid repeated getting of the string context and converting it into an ID * bus/bus.c (bus_context_get_policy): new accessor, though it isn't used (bus_context_check_security_policy): check whether the security context of sender connection can send to the security context of recipient connection * bus/config-parser.c: add parsing for <selinux> and <associate> * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to implement dbus_connection_get_unix_fd() * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new function, used by the selinux stuff
* * bus/config-loader-libxml.c: complete the implementation of libxmlOlivier Andrieu2004-07-292-102/+234
| | | | | | | | | | | | | | | | | | | | | | backend for config file loader. Doesn't work with full OOM test yet. * configure.in: change error when selecting libxml into a warning. * test/data/invalid-config-files: add two non-well-formed XML files. * glib/Makefile.am: libdbus_gtool always uses expat, not libxml. * dbus/dbus-transport-unix.c (unix_handle_watch): do not disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may be necessary to read all the buffer. (bug #894) * bus/activation.c (bus_activation_activate_service): fix a potential assertion failure (bug #896). Small optimization in the case of auto-activation messages. * dbus/dbus-message.c (verify_test_message, _dbus_message_test): add test case for byte-through-vararg bug (#901). patch by Kimmo Hämäläinen.
* 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>Olivier Andrieu2004-07-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name, breaking build on Solaris, reported by Farhad Saberi on the ML. * dbus/dbus-message.c (dbus_message_append_args_valist): fix the va_arg invocation to account for integer promotion in the case of DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901) * bus/services.c (bus_service_remove_owner): fix bug #902, use _dbus_list_get_first_link, not _dbus_list_get_first. * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak. * dbus/dbus-object-tree.c (free_subtree_recurse): always null handler functions so that the asserts in _dbus_object_subtree_unref do not fail. * dbus/dbus-transport-unix.c (do_reading): _dbus_transport_queue_messages return value is of type dbus_bool_t, not DBusDispatchStatus.
* 2004-07-19 David Zeuthen <david@fubar.dk>David Zeuthen2004-07-192-2/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN * bus/dispatch.c: (check_get_connection_unix_user): Debug says GetProperty; but the method is called GetConnectionUnixUser (check_get_connection_unix_process_id): New function (bus_dispatch_test): Actually call check_get_connection_unix_user(); also call check_get_connection_unix_process_id() * bus/driver.c: (bus_driver_handle_get_connection_unix_process_id): New function, handles GetConnectionUnixProcessID on the org.freedesktop.DBus interface * dbus/dbus-auth.c: (handle_server_data_external_mech): Set pid from the credentials obtained from the socket * dbus/dbus-connection.c: (dbus_connection_get_unix_process_id): New function * dbus/dbus-connection.h: Add prototype for dbus_connection_get_unix_process_id * dbus/dbus-transport.c: (_dbus_transport_get_unix_process_id): New function * dbus/dbus-transport.h: Add prototype for _dbus_transport_get_unix_process_id
* * bus/driver.c (bus_driver_handle_get_connection_unix_user)Olivier Andrieu2004-06-282-0/+214
| | | | | | | | * dbus/bus.c (dbus_bus_get_unix_user) * doc/dbus-specification.xml: implement GetConnectionUnixUser method of org.freedesktop.DBus interface. * bus/dispatch.c: test case
* 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>Olivier Andrieu2004-06-091-1/+1
| | | | | * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for the reply value of the ServiceExists message.
* 2004-05-29 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-05-296-36/+105
| | | | | | | | | | | | | | | | | | | | | * bus/config-parser.c (process_test_valid_subdir): temporarily stop testing config parser OOM handling, since expat has issues http://freedesktop.org/pipermail/dbus/2004-May/001153.html * bus/dbus-daemon-1.1.in: change requested_reply to send_requested_reply/receive_requested_reply so we can send the replies, not just receive them. * bus/config-parser.c: parse the new send_requested_reply/receive_requested_reply * bus/policy.c (bus_client_policy_check_can_send): add requested_reply argument and use it * bus/bus.c (bus_context_check_security_policy): pass through requested_reply status to message send check * bus/system.conf.in: adapt to requested_reply change
* * doc/TODO: Remove resolved items.Kristian Høgsberg2004-05-203-3/+11
| | | | | | | | * bus/expirelist.h (struct BusExpireList): remove unused n_items field. * bus/connection.c (bus_connections_expect_reply): Enforce the per-connection limit on pending replies.
* Patch from Jon Trowbridge <trow@ximian.com>:Kristian Høgsberg2004-05-202-11/+115
| | | | | | | | | | | | | * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets up a watch that triggers a config reload when one end of the pipe becomes readable. (signal_handler): Instead of doing the config reload in our SIGHUP handler, just write to the reload pipe and let the associated watch handle the reload when control returns to the main loop. * bus/driver.c (bus_driver_handle_reload_config): Added. Implements a ReloadConfig method for requesting a configuration file reload via the bus driver.
* * dbus/dbus-message.c (decode_header_data, decode_string_field):Olivier Andrieu2004-04-211-2/+4
| | | | | | | | | | | | fix incorrect setting of .name_offset in the HeaderField (it was off by two bytes, positioned right after the name and typecode) * bus/bus.c (bus_context_new, bus_context_unref): test before calling dbus_server_free_data_slot and _dbus_user_database_unref in case of an error. * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed by libdbus-gtool.
* 2004-04-15 Jon Trowbridge <trow@ximian.com>Jon Trowbridge2004-04-163-114/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | * bus/main.c (signal_handler): Reload the configuration files on SIGHUP. (main): Set up our SIGHUP handler. * bus/bus.c (struct BusContext): Store the config file, user and fork flag in the BusContext. (process_config_first_time_only): Added. Contains the code (previously in bus_context_new) for setting up the BusContext from the BusConfigParser that should only be run the first time the config files are read. (process_config_every_time): Added. Contains the code (previously in bus_context_new) for setting up the BusContext from the BusConfigParser that should be run every time the config files are read. (load_config): Added. Builds a BusConfigParser from the config files and passes the resulting structure off to process_config_first_time_only (assuming this is the first time) and process_config_every_time. (bus_context_new): All of the config-related code has been moved to process_config_first_time_only and process_config_every_time. Now this function just does the non-config-related initializations and calls load_config. (bus_context_reload_config): Added.
* 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>Olivier Andrieu2004-04-151-1/+75
| | | | | | | | | | | | | | * bus/driver.c (bus_driver_handle_get_service_owner): implement a GetServiceOwner method. * doc/dbus-specification.xml: document it. * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error. * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner): implement, using the bus GetServiceOwner method. * test/glib/test-dbus-glib.c: use dbus_gproxy_new_for_service_owner so that we can receive the signal.
* 2004-04-12 Jon Trowbridge <trow@ximian.com>Jon Trowbridge2004-04-131-3/+55
| | | | | | | | | | | | | | | * bus/config-parser.c (struct BusConfigParser): Added included_files field. (seen_include): Added. Checks whether or not a file has already been included by any parent BusConfigParser. (bus_config_parser_new): Copy the parent's included_files. (include_file): Track which files have been included, and fail on circular inclusions. (process_test_valid_subdir): Changed printf to report if we are testing valid or invalid conf files. (all_are_equiv): Changed printf to be a bit clearer about what we are actually doing. (bus_config_parser_test): Test invalid configuration files.
* 2004-04-09 Jon Trowbridge <trow@ximian.com>Jon Trowbridge2004-04-095-58/+430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/config-parser.c (bus_config_parser_new): Added a 'parent' argument. If non-null, the newly-constructed BusConfigParser will be initialized with the parent's BusLimits instead of the default values. (include_file): When including a config file, pass in the current parser as the parent and then copy the BusLimits from the included BusConfigParser pack to the current parser. (process_test_valid_subdir): Renamed from process_test_subdir. (process_test_equiv_subdir): Added. Walks through a directory, descending into each subdirectory and loading the config files it finds there. If any subdirectory contains two config files that don't produce identical BusConfigParser structs, fail. For now, the BusConfigParser's BusPolicies are not compared. (bus_config_parser_test): Call both process_test_valid_subdir and process_test_equiv_subdir. * bus/config-loader-libxml.c (bus_config_load): Take a parent argument and pass it along to the call to bus_config_parser_new. Also made a few small changes to allow this code to compile. * bus/config-loader-expat.c (bus_config_load): Take a parent argument and pass it along to the call to bus_config_parser_new. * bus/bus.c (bus_context_new): Load the config file with a NULL parent argument.
* 2004-03-16 Richard Hult <richard@imendio.com>Richard Hult2004-03-165-32/+671
| | | | | | | | | | | | | | | | | | * bus/activation.c: (bus_activation_service_created), (bus_activation_send_pending_auto_activation_messages), (bus_activation_activate_service): * bus/activation.h: * bus/dispatch.c: (bus_dispatch), (check_nonexistent_service_auto_activation), (check_service_auto_activated), (check_segfault_service_auto_activation), (check_existent_service_auto_activation), (bus_dispatch_test): * bus/driver.c: (bus_driver_handle_activate_service): * bus/services.c: (bus_registry_acquire_service): * dbus/dbus-message.c: (dbus_message_set_auto_activation), (dbus_message_get_auto_activation): * dbus/dbus-message.h: * dbus/dbus-protocol.h: Implement auto-activation.
* 2004-03-12 Mikael Hallendal <micke@imendio.com>Mikael Hallendal2004-03-121-8/+56
| | | | | | | | * bus/activation.c: (babysitter_watch_callback): notify all pending activations waiting for the same exec that the activation failed. (bus_activation_activate_service): shortcut the activation if we already waiting for the same executable to start up.
* 2004-03-12 Mikael Hallendal <micke@imendio.com>Mikael Hallendal2004-03-123-78/+785
| | | | | | | | | | | | | | | | * bus/activation.c: - Added service file reloading. Each service files directory is kept in an hash table in BusActivation and each BusActivationEntry knows what .service-file it was read from. So when you try to activate a service the bus will check if it's been updated, removed or if new .service-files has been installed. - Test code at the bottom for the service file reloading. * bus/test-main.c: (main): * bus/test.h: - added service reloading test. * dbus/dbus-sysdeps.c: * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
* 2004-02-24 Joe Shaw <joe@ximian.com>Joe Shaw2004-02-241-1/+2
| | | | | * bus/services.c (bus_registry_acquire_service): We need to pass in the service name to dbus_set_error() to prevent a crash.
* 2003-12-02 Richard Hult <richard@imendio.com>Richard Hult2003-12-0230-30/+30
| | | | | * Update AFL version to 2.0 throughout the source files to reflect the update that was done a while ago.
* 2003-11-26 Mikael Hallendal <micke@imendio.com>Mikael Hallendal2003-11-2714-23/+47
| | | | | | * bus/*.[ch]: * dbus/*.[ch]: * glib/*.[ch]: Made ref functions return the pointer
* 2003-10-28 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-10-284-31/+82
| | | | | | | | | | * bus/expirelist.c (do_expiration_with_current_time): detect failure of the expire_func due to OOM * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM * bus/dispatch.c (check_send_exit_to_service): fix to handle the NoReply error that's now created by the bus when the service exits