summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bug 14259 - Refactor _dbus_get_autolaunch_addressColin Walters2009-07-141-70/+114
| | | | | | | Split out the process-launching code, which can be reused for other applications; in particular, a forthcoming patch to parse output from launchd for MacOS X. (cherry picked from commit 6b163e95e7a2318a98c16c0d0944337e38e62efa)
* Bug 14259 - Make session address lookup system-dependentColin Walters2009-07-144-11/+107
| | | | | | | | On some platforms such as MacOS X and Windows, we can't depend on an environment variable to determine the address of the session bus. Create a sysdep function dbus_lookup_session_address which can be filled in with platform-specific code. (cherry picked from commit 6478ec6949c6bb794237b43d03b68f80eba1288c)
* Bug 14259 - Work around broken getgrouplist on MacOS XBenjamin Reed2009-07-141-11/+39
| | | | | | | | We don't get the number of groups, so allocate an arbitrary larger array. Signed-off-by: Colin Walters <walters@space-ghost.verbum.org> (cherry picked from commit c71403ddde230378e3beffee21a3d1fe6edc9bce)
* Bug 12484 - Ensure initialized variable in dbus_connection_remove_filterKimmo Hämäläinen2009-07-141-0/+1
| | | | | Signed-off-by: Colin Walters <walters@space-ghost.verbum.org> (cherry picked from commit ccfa8e51549f36e09f90a4f5822523a0f50201fc)
* Bug 18121 - Use a monotonic clock for pthread timeoutsColin Walters2009-07-142-3/+65
| | | | | | | | | Patch based on one from Keith Mok <ek9852@gmail.com>, some followup work from Janne Karhunen <Janne.Karhunen@gmail.com>. We don't want condition variable timeouts to be affected by the system clock. Use the POSIX CLOCK_MONOTONIC if available. (cherry picked from commit ae24bb35e2ee3ecde990f55852982b573754ec43)
* Bug 22516 - Ensure inotify fd is set close on execMatthias Clasen2009-07-142-1/+5
| | | | | | | This prevents it leaking into spawned child processes. Signed-off-by: Colin Walters <walters@verbum.org> (cherry picked from commit f4e15893e5be6da6c7642bb7ef9b14d5531afe41)
* Bug 21545 - Move CFLAGS modification towards the end of configureColin Walters2009-07-141-243/+244
| | | | | This prevents the flags from screwing up autoconf tests. (cherry picked from commit 98bbe8c7941f2c643dc55b4e7329c0da57d2c7bc)
* 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 21657 - Fix configure checks for va_list in maintainer modeChristian Persch (GNOME)2009-07-141-3/+6
| | | | | Include the right headers. (cherry picked from commit fe86222d10f0b2532be314a58841db82b1f5887e)
* Bug 21161 - Update the FSF addressTobias Mueller2009-07-14193-196/+196
| | | | | | | 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)
* Add missing include for unistd.h in test-service.cColin Walters2009-07-141-0/+1
| | | | | We use usleep here. (cherry picked from commit e5310abd6cbc4c2e1a9df54f097d6642ad0833c6)
* 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)
* Add tests for pending call timeoutsScott James Remnant2009-07-145-1/+173
| | | | | | | | | | | | * test/test-service.c (handle_delay_echo, path_message_func): Add a variant of the Echo method which sleeps for a short time. * test/name-test/test-pending-call-timeout.c: Run tests with default, specified and infinite timeout to make sure we get the reply. * test/name-test/run-test.sh: Run the new test * test/name-test/Makefile.am: Build the new test Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit c1f165261afcc3bafa9b24ff916bb231628e3782)
* Unrestrict session bus timeout.Scott James Remnant2009-07-141-1/+0
| | | | | | | | * bus/session.conf.in: Remove the reply_timeout stanza, previously intended to increase the reply timeout, this now reduces it. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit bd2063e17e1bb57dee1a5dfed76c9dde76d55ff3)
* Change default reply timeout.Scott James Remnant2009-07-141-1/+1
| | | | | | | | * bus/config-parser.c (bus_config_parser_new): change the default reply timeout to "never" Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit 8f1d2a2fa8ba2f25121465ad82289c0e09c9675a)
* Expire list timeout may be negative for no expiry.Scott James Remnant2009-07-141-2/+2
| | | | | | | | | * bus/expirelist.c (do_expiration_with_current_time): Don't check for expiry if expire_after is negative, will just disable the expiry timer after the call. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit d672d0320628e93a247eeff89945c81926a42163)
* Explicitly check for zero time fields.Scott James Remnant2009-07-141-1/+2
| | | | | | | | * bus/expirelist.c (do_expiration_with_current_time): If the item added time fields are both zero, always expire. Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit d33cfec625bf769384cc370ad0ea660c9993aa15)
* 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)
* configure.in: fail abstract socket test gracefully when cross-compilingMarc Mutz2009-05-131-2/+10
| | | | | | | | * configure.in: only run AC_CACHE_CHECK if enable_abstract_sockets=auto * configure.in: warn that, when cross-compiling, we're unable to detect abstract sockets availability automatically Signed-off-by: Thiago Macieira <thiago@kde.org>
* configure.in: not all gccs support -Wno-pointer-signMarc Mutz2009-05-131-1/+4
| | | | Signed-off-by: Thiago Macieira <thiago@kde.org>
* Release 1.2.14Colin Walters2009-05-061-1/+1
|
* libselinux behavior in permissive mode wrt invalid domainsEamon Walsh2009-05-061-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stephen Smalley wrote: > On Tue, 2009-04-21 at 16:32 -0400, Joshua Brindle wrote: > >> Stephen Smalley wrote: >> >>> On Thu, 2009-04-16 at 20:47 -0400, Eamon Walsh wrote: >>> >>>> Stephen Smalley wrote: >>>> >> <snip> >> >> >>> No, I don't want to change the behavior upon context_to_sid calls in >>> general, as we otherwise lose all context validity checking in >>> permissive mode. >>> >>> I think I'd rather change compute_sid behavior to preclude the situation >>> from arising in the first place, possibly altering the behavior in >>> permissive mode upon an invalid context to fall back on the ssid >>> (process) or the tsid (object). But I'm not entirely convinced any >>> change is required here. >>> >>> >> I just want to follow up to make sure we are all on the same page here. Was the >> suggestion to change avc_has_perm in libselinux or context_to_sid in the kernel >> or leave the code as is and fix the callers of avc_has_perm to correctly handle >> error codes? >> >> I prefer the last approach because of Eamon's explanation, EINVAL is already >> passed in errno to specify the context was invalid (and if object managers >> aren't handling that correctly now there is a good chance they aren't handling >> the ENOMEM case either). >> > > I'd be inclined to change compute_sid (not context_to_sid) in the kernel > to prevent invalid contexts from being formed even in permissive mode > (scenario is a type transition where role is not authorized for the new > type). That was originally to allow the system to boot in permissive > mode. But an alternative would be to just stay in the caller's context > (ssid) in that situation. > > Changing the callers of avc_has_perm() to handle EINVAL and/or ENOMEM > may make sense, but that logic should not depend on enforcing vs. > permissive mode. > > FWIW, the following patch to D-Bus should help: bfo21072 - Log SELinux denials better by checking errno for the cause Note that this does not fully address the bug report since EINVAL can still be returned in permissive mode. However the log messages will now reflect the proper cause of the denial. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Colin Walters <walters@verbum.org>
* 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-0611-13/+14
| | | | | | | 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>
* dbus-launch: use InputOnly X windowEamon Walsh2009-05-061-3/+3
| | | | | | | | | | Working on SELinux policy for X, and came across this issue in dbus-launch: Windows created for use as property/selection placeholders should be of class InputOnly, since no drawing is ever done to them. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Thiago Macieira <thiago@kde.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>.
* Always append closing quote in log commandColin Walters2009-05-061-6/+5
| | | | Patch suggested by Tomas Hoger <thoger@redhat.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.
* configure.in: fix help string alignmentMarc Mutz2009-04-281-1/+1
| | | | | | | * AC_ARG_ENABLE(libaudit: use AS_HELP_STRING for aligned help messages Signed-off-by: Thiago Macieira <thiago@kde.org> (cherry picked from commit 660073925b03cad2f6e95ba9f25a81c2d9727185)
* Fix typo in docs.Xan Lopez2009-02-021-1/+1
|
* Bump for unstable cycleColin Walters2009-01-061-1/+1
|
* Release 1.2.12.dbus-1.2.12Colin Walters2009-01-061-1/+1
|
* Add Scott to HACKINGColin Walters2009-01-061-2/+1
|
* Bug 17060: Explicitly hard fail if expat is not availableColin Walters2009-01-061-11/+8
| | | | * configure.in: Tweak libxml/expat detection and handling.
* Bug 17969: Don't test for abstract sockets if explicitly disabledLionel Landwerlin2009-01-061-0/+2
| | | | Signed-off-by: Colin Walters <walters@verbum.org>
* 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>
* Initialize AVC earlier so we can look up service security contextsJames Carter2009-01-061-5/+5
| | | | | | | * bus/bus.c: Initialize AVC earlier: http://lists.freedesktop.org/archives/dbus/2008-October/010493.html Signed-off-by: Colin Walters <walters@verbum.org>