summaryrefslogtreecommitdiffstats
path: root/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Ensure messages are locked while marshalling.Will Thompson2009-07-141-0/+15
| | | | | | | | Locking a message has the side-effect of updating the message's length header. Previously, if dbus_message_marshal() was called on an unlocked message, it could yield an invalid message (as discovered by Ben Schwartz in <http://bugs.freedesktop.org/show_bug.cgi?id=19723>). (cherry picked from commit 9f825271f9106c23fe51ab54abdb5156b7751014)
* Bug 21161 - Update the FSF addressTobias Mueller2009-07-14129-131/+131
| | | | | | | No comment. Signed-off-by: Colin Walters <walters@verbum.org> (cherry picked from commit 5baf2f856a9c6625993234855b07680da1c8916f)
* Bug 21646 - Fix a signed char comparisonColin Walters2009-07-141-4/+7
| | | | | | | Original suggested patch from Marc-Andre Lureau <marcandre.lureau@gmail.com> Explicitly cast to unsigned char before we do comparisons. (cherry picked from commit 1f6ac4deef91df3130c61525a2800e6b8a0ddcbf)
* Bug 21347 - Don't fail autolaunching if process has SIGCHLD handlerKurt Miller2009-07-141-0/+13
| | | | | | | | | | If other code in the process set a global SIGCHLD handler, it will make autolaunching fail spuriously due to waitpid() failing. This fix will temporarily block SIGCHLD delivery. Signed-off-by: Colin Walters <walters@verbum.org> (cherry picked from commit 644fc38b249b490981becda4b2de5261865bba23)
* dbus_message_append_args_valist - abandon containerScott James Remnant2009-07-141-2/+6
| | | | | | | | In case of OOM when constructing an array, we should abandon the container to free the resources. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit 3f070088232f82fafce97c4fb3015da098fe00bf)
* bfo22316 - add dbus_message_iter_abandon_container()Scott James Remnant2009-07-143-2/+59
| | | | | | | | | It's not currently possible to abandon creation of a container without either hitting asserts or leaking memory. This new function allows that. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit e57a368c440aec39caf6c3b491cf76ef615dc2e8)
* Add test case for assert when unwinding a container.Scott James Remnant2009-07-141-0/+29
| | | | | | | | | * dbus/dbus-message-util.c: when constructing an array of structures, it's not possible to unwind in case of an error part-way through. This test will therefore assert. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit 4bea3ca2b02098f2513a9902511e4de77ccf9b91)
* Remove 6 hour timeout restriction.Scott James Remnant2009-07-141-7/+0
| | | | | | | | * dbus/dbus-pending-call.c (_dbus_pending_call_new_unlocked): Now that the timeout math won't overflow, don't clamp to six hours. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit 7398ad7374c0a9201d41397c956deee325f3593e)
* Fix issue where timeouts can overflow.Scott James Remnant2009-07-141-14/+7
| | | | | | | | | | * dbus/dbus-connection.c (_dbus_connection_block_pending_call): Rework the timeout math so instead of calculating an end time, which may overflow, we instead calculate the elapsed time which is always smaller than the boundaries. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit 1faa92114f6489d286ad4cebe5e91b2145a4f7d1)
* Update documentation now that INT_MAX means no timeout.Scott James Remnant2009-07-141-6/+4
| | | | | | | | | * dbus/dbus-connection.c (dbus_connection_send_with_reply): Fix documentation now that INT_MAX will not be clamped. (dbus_connection_send_with_reply_and_block): Update documentation too. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit ce0d932d9be5adec22943dd7b268bd4a165ada64)
* Don't allocate DBusTimeout for pending call when passed INT_MAXScott James Remnant2009-07-141-19/+24
| | | | | | | | | | * dbus/dbus-pending-call.c (_dbus_pending_call_new_unlocked): When passed INT_MAX, do not clamp the value and do not allocate a timeout for the call (_dbus_pending_call_get_timeout_unlocked): Document that this may return NULL. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit 92dd55c903b440bc423f1f8f9aeb0bbbbcc11bac)
* Allow a pending call to block foreverScott James Remnant2009-07-141-14/+48
| | | | | | | | | * dbus/dbus-connection.c (_dbus_connection_block_pending_call): Allow the pending call to have no timeout, in which case we simply block until we complete, have data or get disconnected. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit e5eb472d11aa36c67e320edce41d66eb18cdf5d0)
* Make sure a pending call timeout isn't assumed.Scott James Remnant2009-07-141-14/+29
| | | | | | | | | | | * dbus/dbus-connection.c (_dbus_connection_attach_pending_call_unlocked): Don't assume that the pending call has a timeout. (connection_timeout_and_complete_all_pending_call_unlocked): check that the timeout was actually added before removing it; this safeguards us if the pending call doesn't have a timeout. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit ba22606c3b21c55c5c0af30d8f07edd71ded7213)
* bfo20738 - Return a useful error message from dbus_signature_validate()Federico Mena Quintero2009-05-061-3/+9
| | | | Signed-off-by: Federico Mena Quintero <federico@novell.com>
* bfo20738 - Translate DBusValidity into error messageFederico Mena Quintero2009-05-062-0/+73
| | | | Signed-off-by: Federico Mena Quintero <federico@novell.com>
* Bug 19567 - Make marshaling code usable without DBusConnectionWilliam Lachance2009-05-067-21/+90
| | | | | | | | | | Some projects want to reuse the DBus message format, without actually going through a DBusConnection. This set of changes makes a few functions from DBusMessage public, and adds a new function to determine the number of bytes needed to demarshal a message. Signed-off-by: Colin Walters <walters@verbum.org>
* Followup Bug 19502 - Don't attempt to init va_list, not portableColin Walters2009-05-061-1/+1
|
* Bug 19502 - Sparse warning cleanupsKjartan Maraas2009-05-065-7/+8
| | | | | | | This patch makes various things that should be static static, corrects some "return FALSE" where it should be NULL, etc. Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 20494 - Fix signed confusion for dbus_message_get_reply_serial returnJohan Gyllenspetz2009-05-061-2/+2
| | | | | | | We were incorrectly converting the serial to a signed integer and comparing it to -1. Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 20137 - Fix alignment usage when demarshaling basicsColin Walters2009-05-061-12/+28
| | | | | | | | | | | We can't safely type-pun from e.g. char * to DBusBasicValue *, because the latter has higher alignment requirements. Instead, create an explicit pointer for each case. Also, we mark each one volatile to sidestep strict aliasing issues, for the future when we turn on strict aliasing support. Original patch and review from Jay Estabrook <jay.estabrook@hp.com>.
* Bug 17803 - Fix both test case and validation logicColin Walters2009-05-062-7/+8
| | | | | | | | | | | The previous commit had errors in both the test case and the validation logic. The test case was missing a trailing comma before the previous one, so we weren't testing the signature we thought we were. The validation logic was wrong because if the type was not valid, we'd drop through the entire if clause, and thus skip returning an error code, and accept the signature.
* Fix typo in docs.Xan Lopez2009-02-021-1/+1
|
* Bug 18064 - more efficient validation for fixed-size type arraysJon Gosting2009-01-061-11/+60
| | | | | | | * dbus/dbus-marshal-validate.c: If an array is fixed size, skip validation Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 18446: Keep umask for session busMatt McCutchen2009-01-063-6/+14
| | | | Signed-off-by: Colin Walters <walters@verbum.org>
* Various compiler warning fixesColin Walters2009-01-064-5/+6
|
* 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)