summaryrefslogtreecommitdiffstats
path: root/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Add uid, pid, and command to security logsColin Walters2008-12-182-0/+101
| | | | | | | | Extend the current security logs with even more relevant information than just the message content. This requires some utility code to look up and cache (as a string) the data such as the uid/pid/command when a connection is authenticated.
* Add syslog of security denials and configuration file reloadsColin Walters2008-12-123-1/+36
| | | | | We need to start logging denials so that they become more easily trackable and debuggable.
* 2008-08-24 Peter McCurdy <pmccurdy@skeptopotamus>Peter McCurdy2008-10-011-1/+1
| | | | | | | | * dbus/dbus-marshal-recursive.c: A stray comma between two string literals caused incorrect output and a compiler warning. Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 17280: Add a prototype for _dbus_credentials_add_adt_audit_data()Peter McCurdy2008-10-011-0/+3
| | | | | | | * dbus/dbus-credentials.h: Add a prototype for _dbus_credentials_add_adt_audit_data() Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 17803: Panic from dbus_signature_validateColin Walters2008-10-012-0/+2
| | | | | | * dbus/dbus-marshal-validate.c: Ensure we validate a basic type before calling is_basic on it. * dbus-marshal-validate-util.c: Test.
* Bug 17061: Handle error return from sysconf correctlyJoe Marcus Clarke2008-10-012-2/+10
| | | | | | | | | * dbus/dbus-sysdeps-unix.c: * dbus/dbus-sysdeps-util-unix.c: Cast return from sysconf temporarily so we actually see -1. Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 13387: Fix compilation failure with AI_ADDRCONFIGJens Granseuer2008-10-011-2/+2
| | | | Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 17352: synchronize the file before renamingArtem Bityutskiy2008-10-011-0/+9
| | | | | | | | | | | | | | Dbus is doing atomic file updates by copying them, changing the copy, and re-naming them. However, it does not synchronize the file before re-naming, which results in corruption in case of unclean reboots. The reason for this is that file-systems have write-back cache and they postpone writing data to the media. This patch adds the missed fsync() for the Unix part. I do not have windows so cannot provide a windows port fix. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 15646: Remove spurious debugging fprintf(stderrColin Walters2008-07-281-1/+0
|
* Bug 16727: Handle ERANGE for getgr; fixes user in many groupsMarc Brockschmidt2008-07-282-27/+96
| | | | | | | | | | Patch originally from Noèl Köthe. Modified by Colin Walters <walters@verbum.org> * dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-unix-utils.c: Use a while() loop to reallocate buffer if we get ERANGE return. This fixes the case where a user is in a large number of groups.
* When spawning processes, don't ignore the passed in environmentRay Strode2008-07-121-1/+14
| | | | | | | | Previously, we'd always call execv() and unconditionally use the environment of the parent. Now we call execve() with the passed in environment. For compatibility, we detect if the passed in environment is NULL and for that case, use the environment from the parent instead.
* Add new function _dbus_string_split_on_byteRay Strode2008-07-113-0/+70
| | | | | It allows you to turn a string like KEY=VALUE into two strings key and value.
* Add new _dbus_get_environment callRay Strode2008-07-112-0/+43
| | | | | | | | It's a wrapper around the environ external variable. It will be important in the future when we allow bus clients to modify the environment of future activated clients. Presently, we just always use the bus daemon environment wholesale.
* Merge branch 'dbus-1.2'Thiago Macieira2008-06-071-6/+5
|\
| * Fix inverted return value from dbus_connection_read_write()Oswald Buddenhagen2008-06-071-4/+6
| | | | | | | | | | | | | | | | | | * dbus/dbus-connection.c (_dbus_connection_read_write_dispatch): The double negation re no_progress_possible was obviously too confusing: the path for dispatch = FALSE would return an inverted status. So make it progress_possible and fix the logic. Signed-off-by: Thiago Macieira <thiago@kde.org>
* | Bug 15740: Solaris/ADT auditing support (simon zheng)Colin Walters2008-06-059-2/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/driver.c: Add GetAdtAuditSessionData method which returns audit data for a connection. * configure.in: Detect ADT auditing support * dbus/dbus-auth.c: Read ADT auditing creds. * dbus/dbus-connection.c: Implement dbus_connection_get_adt_audit_session_data. * dbus/dbus-connection.h: Export it. * dbus/dbus-credentials.c: Add support for gathering adt_audit_data and retrieving it via _dbus_credentials_get_adt_audit_data. * dbus/dbus-credentials.h: Add DBUS_CREDENTIAL_ADT_AUDIT_DATA_ID. * dbus/dbus-protocol.h: New error DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN. * dbus/dbus-sysdeps.c: Support for reading audit credentials via ADT API. * dbus/dbus-transport.c: New function _dbus_transport_get_adt_audit_session_data to retrieve credentials. * dbus/dbus-transport.h: Export it.
* | Bug 15635: Hold a reference during read/write dispatch (Scott James Remnant)Colin Walters2008-05-301-0/+10
| | | | | | | | | | | | | | | | * dbus/dbus-connection.c (_dbus_connection_read_write_dispatch): Reference the D-Bus connection during the function call since we call other functions that may free the last reference and we still expect to be able to check the connection after they return to decide our own return value.
* | Bug 15571: Clean up GUID-less connections correctly (Scott James Remnant)Colin Walters2008-05-301-3/+8
| | | | | | | | | | | | | | | | | | * dbus/dbus-connection.c (connection_forget_shared_unlocked): Remove shared connections which lack a GUID from the list that caches those, otherwise references to them will remain after they have been freed. * test/name-test/test-privserver-client.c: Update test to try GUID-less connections too.
* | Bug 15570: Reset initialized state on dbus_shutdown (Scott James Remnant)Colin Walters2008-05-301-0/+2
| | | | | | | | | | | | | | | | * dbus/dbus-bus.c (addresses_shutdown_func): Reset initialized back to FALSE after cleaning up the address list so that it will be reinitialized again if D-Bus is used after dbus_shutdown() * test/name-test/test-privserver-client.c: Uncomment part of test which should now pass.
* | Bug 15588: Fix typo in #ifdef for userdb cache (Scott James Remnant)Colin Walters2008-05-302-2/+2
| | | | | | | | | | | | * dbus/dbus-userdb-util.c, dbus/dbus-userdb.c: Correct name of macro used in #ifdef block to match that defined by configure, otherwise the userdb cache will never be enabled.
* | Bug 15947: Close file descriptors before execing helper (Markus Rechberger)Colin Walters2008-05-281-4/+13
|/ | | | | * dbus/dbus-sysdeps-unix.c (_dbus_get_autolaunch_address): Close file descriptors before exec.
* Prevent a crash in some applications due to timers leaking after theThiago Macieira2008-05-171-0/+7
| | | | | | | DVusPendingCall object was freed. * dbus-connection.c: Remove the timer for the pending call's timeout in case the reply has timed out in blocking code. This fixes bug 15684.
* fix memleak due to autolaunch and recursive calls to _dbus_open_transportJohn (J5) Palmieri2008-04-031-1/+16
| | | | | | * Patch from Sumit <sumitskj_20@yahoo.com>, comments added * dbus/dbus-transport.c(_dbus_transport_open): fix mem leak
* modify dbus_connection_send documentationJohn (J5) Palmieri2008-04-031-6/+12
| | | | | | | | * dbus/dbus-connection.c (dbus_connection_send): add documentation to describe when to call dbus_connection_flush and dbus_connection_unref after a call to dbus_connection_send is made Initial wording by Stanislav Brabec <sbrabec at suse.cz> (fd.o bug#13558)
* Set default exit_on_disconnect after registrationColin Walters2008-03-261-6/+6
| | | | | | | | | | 2008-03-26 Colin Walters <walters@verbum.org> Patch from Scott James Remnant <scott@netsplit.com> * dbus/dbus-bus.c: Set default exit_on_disconnect after registration with the bus, not before. This ensures that programs which wish to set exit_on_disconnect to FALSE will not be terminated if the bus exits during registration. (FDO Bug #15112)
* fix broken poll on Mac OSX - build patch by Benjamin ReedJohn (J5) Palmieri2008-03-041-1/+1
| | | | | | * configure.in: check for OSX's deadlocking poll * dbus/dbus-sysdeps-unix.c (_dbus_poll): if we have a broken poll don't use poll
* define _AI_ADDRCONFIG if not defined so that we can compile with an older glibcJohn (J5) Palmieri2008-02-281-0/+4
|
* correctly unref connections without guids during shutdownJohn (J5) Palmieri2008-02-261-13/+45
| | | | | | | | | | * dbus/dbus-connection.c (close_connection_on_shutdown): new method split out from shared_connections_shutdown (shared_connections_shutdown): shutdown all shared connections without guids (_dbus_connection_ref_unlocked): handle OOM when prepending no guid connections to the shared_connections_no_guid list * Patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
* fix build against the latest gcc/glibcJohn (J5) Palmieri2008-02-211-0/+2
| | | | | | * dbus/dbus-sysdeps-unix.c: define _GNU_SOURCE * bus/selinux.c: include limits.h * Patch by Matthias Clasen <mclasen at redhat.com>
* wrap all_reader_classes[] in #ifndef DBUS_DISABLE_ASSERT (FDO Bug #9030)John (J5) Palmieri2008-01-151-0/+2
| | | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Sébastien Couret <10function at gmail dot com> * dbus/dbus-marshal-recursive.c (all_reader_classes[]): wrap in #ifndef DBUS_DISABLE_ASSERT since it is only used in asserts which are noop
* handle SASL EXTERNAL's inital empty responce (FDO Bug #9945)John (J5) Palmieri2008-01-151-0/+1
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Magnus Henoch <henoch plus bfdo at dtek dot chalmers dot se> * dbus/dbus-auth.c (handle_server_data_external_mech): handle SASL EXTERNAL's inital empty responce (FDO Bug #9945)
* check write return value so we don't hang (FDO Bug #11665)John (J5) Palmieri2008-01-151-3/+3
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Peter O'Gorman <pogma at thewrittenword dot com> * dbus/dbus-spawn.c (babysit_signal_handler): check write return value so we don't hang (FDO Bug #11665)
* support for AIX poll implementation (FDO Bug #11666)John (J5) Palmieri2008-01-151-0/+27
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Peter O'Gorman <pogma at thewrittenword dot com> * dbus/dbus-sysdeps.h: support for AIX poll implementation (FDO Bug #11666)
* don't check for < 0 on an unsigned variable (FDO Bug #12924)John (J5) Palmieri2008-01-151-3/+3
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-connection.c (_dbus_connection_get_next_client_serial): don't check for < 0 on an unsigned variable (FDO Bug #12924)
* the API contract says sitter_p can be NULL, so let's check it (FDO Bug #12919)John (J5) Palmieri2008-01-151-1/+3
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): the API contract says sitter_p can be NULL, so let's check it (FDO Bug #12919)
* use correct ssize_t type instead of size_t (FDO Bug #12862)John (J5) Palmieri2008-01-151-2/+2
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-spawn.c (read_ints, read_pid): use correct ssize_t type instead of size_t (FDO Bug #12862)
* make sure to call va_end if we hit an OOM error inside va_start (FDO Bug #12846)John (J5) Palmieri2008-01-151-0/+1
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-errors.c (dbus_set_error): make sure to call va_end if we hit an OOM error inside va_start (FDO Bug #12846)
* fix possible crash if pending_return is NULL (FDO Bug #12673)John (J5) Palmieri2008-01-151-2/+0
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix possible crash if pending_return is NULL (FDO Bug #12673)
* add OOM handling in various placesJohn (J5) Palmieri2008-01-153-4/+17
| | | | | | | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patches by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-sysdeps-unix (_dbus_get_autolaunch_address): handle OOM (FDO Bug #12945) * dbus/dbus-uuidgen.c (return_uuid): handle OOM (FDO Bug #12928) * dbus/dbus-misc.c (dbus_get_local_machine_id): handle OOM, fix return value to return NULL not FALSE (FDO Bug #12946)
* add OOM handlingJohn (J5) Palmieri2008-01-151-3/+17
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-internals.c (_dbus_read_uuid_file_without_creating, _dbus_create_uuid_file_exclusively): add OOM handling (FDO Bug #12952)
* add error handling when polling (FDO Bug #12954)John (J5) Palmieri2008-01-151-4/+19
| | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-spawn.c (babysit, babysitter_iteration): add error handling when polling (FDO Bug #12954)
* remove dead codeJohn (J5) Palmieri2008-01-152-67/+0
| | | | | | | | | | | 2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * bus/config-parser.c (locate_attributes): remove dead code which always evaluated to TRUE * dbus/dbus-shell.c (_dbus_shell_quote): remove unused code
* return message loader buffer in case of OOM (FDO Bug#12666)John (J5) Palmieri2008-01-141-0/+4
| | | | | | | | | 2008-01-14 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * dbus/dbus-transport-socket.c(do_reading): return message loader buffer in case of OOM (FDO Bug#12666)
* add _dbus_geteuid to fix EXTERNAL authentication in setuid applicationsJohn (J5) Palmieri2008-01-144-5/+24
| | | | | | | | | | | | | | | | | | | | | | 2008-01-14 John (J5) Palmieri <johnp@redhat.com> * Patch by Andrea Luzzardi <scox at sig11 dot org>: creates a _dbus_geteuid function to fix EXTERNAL authentication in setuid applications * dbus/dbus-sysdeps-unix.c (_dbus_geteuid): used to get the effective uid of the running program (_dbus_credentials_add_from_current_process): use geteuid instead of getuid (_dbus_append_user_from_current_process): use geteuid instead of getuid * dbus/dbus-sysdeps-util-unix.c (_dbus_change_to_daemon_user): use geteuid instead of getuid (_dbus_unix_user_is_at_console): use geteuid instead of getuid * dbus/dbus-sysdeps-win.c (_dbus_geteuid): add a windows equivilant that returns DBUS_UID_UNSET
* fix some curly braces that were on the wrong lineHavoc Pennington2007-12-181-4/+5
| | | | | | | 2007-12-18 Havoc Pennington <hp@redhat.com> * dbus/dbus-connection.c (_dbus_connection_block_pending_call): fix location of curly braces
* Fix a problem where a nul byte was wrongly introduced into UUIDs, due to ↵Havoc Pennington2007-10-312-7/+30
| | | | | | | | | | | | | | | | | | _dbus_string_copy_to_buffer weird behavior. 2007-10-31 Havoc Pennington <hp@redhat.com> * bus/selinux.c (log_audit_callback): rewrite to use _dbus_string_copy_to_buffer_with_nul() * dbus/dbus-string.c (_dbus_string_copy_to_buffer): change to NOT nul-terminate the buffer; fail an assertion if there is not enough space in the target buffer. This fixes two bugs where copy_to_buffer was used to copy the binary bytes in a UUID, where nul termination did not make sense. Bug reported by David Castelow. (_dbus_string_copy_to_buffer_with_nul): new function that always nul-terminates the buffer, and fails an assertion if there is not enough space in the buffer.
* do not call audit_init() from bus/ directory from files in dbus/Havoc Pennington2007-10-191-1/+0
| | | | | | | | | | | | 2007-10-19 Havoc Pennington <hp@redhat.com> * bus/bus.c (bus_context_new): put the audit_init() in here instead, which I believe ends up being the same as where it was before, though I'm not sure I understand why it goes here. * dbus/dbus-sysdeps-util-unix.c (_dbus_change_to_daemon_user): remove audit_init() from here, this file can't depend on code in bus/ directory
* Use DBUS_ERROR_INIT instead of dbus_error_init wherever it's clearly equivalentSimon McVittie2007-10-1115-115/+52
|
* Merge branch 'atomic'Simon McVittie2007-10-112-3/+13
|\ | | | | | | | | | | Conflicts: ChangeLog
| * Fix detection of i486 atomic ops.Simon McVittie2007-10-112-3/+13
| | | | | | | | | | | | Previously, the attempts to determine support at compile-time on Darwin were causing the i486 atomic ops to be used on *all* i386 or x86-64 GCC builds (AH_VERBATIM can't be conditionalized like we were trying to).