- 23 Aug, 2013 1 commit
-
-
Simon McVittie authored
It's sufficiently portable that GLib has an equivalent, and I really don't want to have to either open-code it in dbus-run-session or link dbus-run-session statically. We have enough statically-linked rubbish already. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196Reviewed-by:
Colin Walters <walters@verbum.org>
-
- 12 Jun, 2013 1 commit
-
-
Simon McVittie authored
_dbus_threads_lock_platform_specific() is implemented on Windows now.
-
- 10 May, 2013 1 commit
-
-
Simon McVittie authored
On Unix, we use a pthreads mutex, which can be allocated and initialized in global memory. On Windows, we use a CRITICAL_SECTION, together with a call to InitializeCriticalSection() from the constructor of a global static C++ object (thanks to Ralf Habacker for suggesting this approach). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972Signed-off-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by:
Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by:
Ralf Habacker <ralf.habacker@freenet.de>
-
- 08 Apr, 2013 1 commit
-
-
Simon McVittie authored
This causes the test to fail. The assumption implicitly being made was "if pid 1 is systemd, then every caller of _dbus_init_system_log() is a systemd service" which is not valid for the regression test. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63163Signed-off-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by:
Colin Walters <walters@verbum.org>
-
- 12 Feb, 2013 1 commit
-
-
Matt Fischer authored
The QNX operating system uses different values for its poll constants, so they must be added into dbus-sysdeps.h in order for poll() to work correctly. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60339Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
- 28 Sep, 2012 2 commits
-
-
Colin Walters authored
This matches a corresponding change in GLib. See glib/gutils.c:g_check_setuid(). Some programs attempt to use libdbus when setuid; notably the X.org server is shipped in such a configuration. libdbus never had an explicit policy about its use in setuid programs. I'm not sure whether we should advertise such support. However, given that there are real-world programs that do this currently, we can make them safer with not too much effort. Better to fix a problem caused by an interaction between two components in *both* places if possible. How to determine whether or not we're running in a privilege-escalated path is operating system specific. Note that GTK+'s code to check euid versus uid worked historically on Unix, more modern systems have filesystem capabilities and SELinux domain transitions, neither of which are captured by the uid comparison. On Linux/glibc, the way this works is that the kernel sets an AT_SECURE flag in the ELF auxiliary vector, and glibc looks for it on startup. If found, then glibc sets a public-but-undocumented __libc_enable_secure variable which we can use. Unfortunately, while it *previously* worked to check this variable, a combination of newer binutils and RPM break it: http://www.openwall.com/lists/owl-dev/2012/08/14/1 So for now on Linux/glibc, we fall back to the historical Unix version until we get glibc fixed. On some BSD variants, there is a issetugid() function. On other Unix variants, we fall back to what GTK+ has been doing. Reported-by:
Sebastian Krahmer <krahmer@suse.de> Signed-off-by:
Colin Walters <walters@verbum.org>
-
Colin Walters authored
This matches a corresponding change in GLib. See glib/gutils.c:g_check_setuid(). Some programs attempt to use libdbus when setuid; notably the X.org server is shipped in such a configuration. libdbus never had an explicit policy about its use in setuid programs. I'm not sure whether we should advertise such support. However, given that there are real-world programs that do this currently, we can make them safer with not too much effort. Better to fix a problem caused by an interaction between two components in *both* places if possible. How to determine whether or not we're running in a privilege-escalated path is operating system specific. Note that GTK+'s code to check euid versus uid worked historically on Unix, more modern systems have filesystem capabilities and SELinux domain transitions, neither of which are captured by the uid comparison. On Linux/glibc, the way this works is that the kernel sets an AT_SECURE flag in the ELF auxiliary vector, and glibc looks for it on startup. If found, then glibc sets a public-but-undocumented __libc_enable_secure variable which we can use. Unfortunately, while it *previously* worked to check this variable, a combination of newer binutils and RPM break it: http://www.openwall.com/lists/owl-dev/2012/08/14/1 So for now on Linux/glibc, we fall back to the historical Unix version until we get glibc fixed. On some BSD variants, there is a issetugid() function. On other Unix variants, we fall back to what GTK+ has been doing. Reported-by:
Sebastian Krahmer <krahmer@suse.de> Signed-off-by:
Colin Walters <walters@verbum.org>
-
- 12 Apr, 2012 2 commits
-
-
David Zeuthen authored
When libdbus-1 moved to using monotonic time support for the DBUS_COOKIE_SHA1 authentication was broken, in particular interoperability with non-libdbus-1 implementations such as GDBus. The problem is that if monotonic clocks are available in the OS, _dbus_get_current_time() will not return the number of seconds since the Epoch so using it for DBUS_COOKIE_SHA1 will violate the D-Bus specification. If both peers are using libdbus-1 it's not a problem since both ends will use the wrong time and thus agree. However, if the other end is another implementation and following the spec it will not work. First, we change _dbus_get_current_time() back so it always returns time since the Epoch and we then rename it _dbus_get_real_time() to make this clear. We then introduce _dbus_get_monotonic_time() and carefully make all current users of _dbus_get_current_time() use it, if applicable. During this audit, one of the callers, _dbus_generate_uuid(), was currently using monotonic time but it was decided to make it use real time instead. Signed-off-by:
David Zeuthen <davidz@redhat.com> Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48580
-
David Zeuthen authored
When libdbus-1 moved to using monotonic time support for the DBUS_COOKIE_SHA1 authentication was broken, in particular interoperability with non-libdbus-1 implementations such as GDBus. The problem is that if monotonic clocks are available in the OS, _dbus_get_current_time() will not return the number of seconds since the Epoch so using it for DBUS_COOKIE_SHA1 will violate the D-Bus specification. If both peers are using libdbus-1 it's not a problem since both ends will use the wrong time and thus agree. However, if the other end is another implementation and following the spec it will not work. First, we change _dbus_get_current_time() back so it always returns time since the Epoch and we then rename it _dbus_get_real_time() to make this clear. We then introduce _dbus_get_monotonic_time() and carefully make all current users of _dbus_get_current_time() use it, if applicable. During this audit, one of the callers, _dbus_generate_uuid(), was currently using monotonic time but it was decided to make it use real time instead. Signed-off-by:
David Zeuthen <davidz@redhat.com> Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48580
-
- 04 Jan, 2012 1 commit
-
-
Simon McVittie authored
Someone seems to have merged part of master into 1.4. Again. Let's go back to the "last known good" point (the branch-point of some 1.4 branches I had locally), then we can cherry-pick the changes that should have gone in.
-
- 24 Aug, 2011 1 commit
-
-
Simon McVittie authored
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40313Reviewed-by:
Thiago Macieira <thiago@kde.org> Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
- 25 Jul, 2011 1 commit
-
-
Simon McVittie authored
Reviewed-by:
Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
-
- 18 Jul, 2011 1 commit
-
-
Simon McVittie authored
It's only implemented on Unix, internal to dbus, and never called.
-
- 03 Feb, 2011 1 commit
-
-
Colin Walters authored
The default configuration has hardcoded 2048 complete connections, and 64 incomplete. We need at least that number of file descriptors, plus some for internal use. In the bus, attempt to call setrlimit() before we drop privileges. Practically speaking for this means the system bus gets it, the session bus doesn't. http://bugs.freedesktop.org/show_bug.cgi?id=33474Reviewed-By:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
- 29 Dec, 2010 1 commit
-
-
Ralf Habacker authored
-
- 14 Dec, 2010 1 commit
-
-
Ralf Habacker authored
-
- 27 Sep, 2010 1 commit
-
-
Ralf Habacker authored
-
- 17 Jun, 2010 1 commit
-
-
Will Thompson authored
HAVE_STDINT_H is defined in config.h, but that's not much use if config.h isn't included. The new file dbus/dbus-config.c includes this header without including config.h first, so fails to build. Since dbus-sysdeps.h is internal, we can include config.h with impunity, rather than relying on our callers to do so. Also, there's no need to include stdint.h twice.
-
- 10 Jun, 2010 1 commit
-
-
Christian Dywan authored
-
- 18 May, 2010 1 commit
-
-
Thiago Macieira authored
-
- 05 May, 2010 1 commit
-
-
Romain Pokrzywka authored
-
- 03 May, 2010 1 commit
-
-
Fridrich Štrba authored
-
- 21 Apr, 2010 1 commit
-
-
Fridrich Štrba authored
-
- 13 Apr, 2010 2 commits
-
-
Marcus Brinkmann authored
-
Marcus Brinkmann authored
-
- 22 Mar, 2010 1 commit
-
-
Colin Walters authored
Otherwise we don't get GCC warnings.
-
- 19 Mar, 2010 1 commit
-
-
Marcus Brinkmann authored
-
- 16 Mar, 2010 2 commits
-
-
Colin Walters authored
This severity is useful for when we encounter a fatal problem; we get a log message out, then exit.
-
Colin Walters authored
In preparation for a future patch which introduces a fatal logging level, don't duplicate the API here.
-
- 02 Feb, 2010 1 commit
-
-
Colin Walters authored
_dbus_change_to_daemon_user moved into selinux.c for the --with-selinux (and audit) case because that's where all of the relevant libcap headers were being used. However in the --disable-selinux case this didn't compile and wasn't very clean. If we don't have libaudit, use the legacy direct setgid/setuid bits we had before in dbus-sysdeps-util-unix.c.
-
- 29 Jan, 2010 1 commit
-
-
Ralf Habacker authored
_dbus_change_to_daemon_user() is platform related and commit 0a3905d7 broke windows builds
-
- 28 Jan, 2010 1 commit
-
-
Colin Walters authored
(Commit message written by Colin Walters <walters@verbum.org>) A current Fedora goal is to convert projects to libcap-ng which more easily allows dropping Linux capabilities. For software which also links to libdbus, it's problematic to link against libcap as well. Though really, libdbus should have never linked against libcap in the first place, which is another thing this patch changes by moving the libcap-using bits out of dbus/ and into bus/. https://bugzilla.redhat.com/show_bug.cgi?id=518541
-
- 20 Dec, 2009 1 commit
-
-
Ralf Habacker authored
-
- 18 Dec, 2009 4 commits
-
-
Ralf Habacker authored
-
Ralf Habacker authored
-
Ralf Habacker authored
-
Ralf Habacker authored
-
- 01 Dec, 2009 3 commits
-
-
Frank Osterfeld authored
Replace dbus_daemon_init() by dbus_publish_session_bus_address(), publishing the full address. Omit username from mutexes (not necessary as mutex names are local to session). Don't exit if publishing the address failed (allow multiple session bus instances per session). Based on 00ee92ae314 by Tor Lillqvist. Cherry-picked from commit 23945513e9a4da61d286ebfbce3897aa061ddbfe in the dbus4win repository by tml@iki.fi. Remove claim of that commit not being merged from README.dbus4win.
-
Frank Osterfeld authored
Cherry-picked from commit f9bc0f4bd036f6ede5d9850fb0f8587178c85f44 in the dbus4win repository, slightly massaged to apply by tml@iki.fi.
-
Frank Osterfeld authored
Remove the write_file function and use the existing _dbus_string_save_to_file, improve error handling Cherry picked from commit 0f7b026d01be7e0fd444cdb56e5f9b7a5137a062 in the dbus4win repository. Edited to apply and fix whitespace issues by tml@iki.fi.
-