1. 15 Jan, 2018 1 commit
  2. 04 Dec, 2017 1 commit
  3. 15 Nov, 2017 1 commit
  4. 05 Jul, 2017 1 commit
  5. 08 Jun, 2017 1 commit
    • Simon McVittie's avatar
      Make _dbus_get_local_machine_uuid_encoded() properly failable · 6f751caf
      Simon McVittie authored
      This function already raised an error, and all callers handled that
      error as gracefully as they could (because _dbus_generate_uuid() is
      failable, since 2015). Given that, it seems unnecessarily hostile
      to do a _dbus_warn_check_failed() unless we have no better alternative:
      yes, it indicates that dbus has not been installed correctly, but
      during build-time tests it's entirely reasonable that dbus has not
      yet been installed.
      
      Callers are:
      
      * DBusConnection, to implement Peer.GetMachineId()
      * The bus driver, to implement Peer.GetMachineId()
      * X11 autolaunching
      * dbus_get_local_machine_id()
      
      Of those, only the last one is not in a position to return an error
      gracefully, so move the _dbus_warn_check_failed() to there.
      
      Migrate the text about the D-Bus library being incorrectly set up
      into the error emitted by the Unix implementation, and to make it
      less misleading, include separate error messages for both the
      files we try to read:
      
      $ bwrap --ro-bind / / --dev /dev --tmpfs /etc --tmpfs /var \
        ./tools/dbus-uuidgen --get
      D-Bus library appears to be incorrectly set up: see the manual
      page for dbus-uuidgen to correct this issue. (Failed to open
      "/var/lib/dbus/machine-id": No such file or directory; Failed to open
      "/etc/machine-id": No such file or directory)
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
      Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
      6f751caf
  6. 10 Feb, 2017 1 commit
  7. 13 Oct, 2016 1 commit
  8. 30 Sep, 2016 2 commits
  9. 13 May, 2016 2 commits
  10. 12 Feb, 2016 2 commits
  11. 11 Feb, 2016 1 commit
  12. 02 Dec, 2015 1 commit
  13. 01 Dec, 2015 1 commit
  14. 14 May, 2015 2 commits
  15. 13 Apr, 2015 1 commit
  16. 13 Feb, 2015 1 commit
  17. 28 Apr, 2014 1 commit
  18. 30 Aug, 2013 1 commit
  19. 28 Jun, 2013 1 commit
  20. 17 Jun, 2013 2 commits
  21. 12 Apr, 2012 2 commits
    • David Zeuthen's avatar
      Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication method · 87035143
      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: default avatarDavid Zeuthen <davidz@redhat.com>
      Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48580
      87035143
    • David Zeuthen's avatar
      Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication method · 8734e4a1
      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: default avatarDavid Zeuthen <davidz@redhat.com>
      Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48580
      8734e4a1
  22. 21 Feb, 2012 1 commit
  23. 13 Feb, 2012 1 commit
    • Simon McVittie's avatar
      Provide a hook to allow refcounting to be traced · 566a8416
      Simon McVittie authored
      This is designed to be used from a wrapper function, partly to supply
      the same arguments every time for a particular class of object, and partly
      to provide a more specific gdb breakpoint. It has several purposes:
      
      * when under gdb, provide a function which can be used in breakpoints
      * when not under valgrind and DBUS_MESSAGE_TRACE=1 is set, emit a
        _dbus_verbose when a message's refcount changes
      * when under valgrind and DBUS_MESSAGE_TRACE=1 is set, emit a
        VALGRIND_PRINTF_BACKTRACE when a message's refcount changes,
        which lets you see the complete history of each message to track down
        reference leaks
      
      Compile-time support is currently conditional on DBUS_ENABLE_VERBOSE_MODE,
      but could be separated out if desired.
      
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      Reviewed-by: Lennart Poettering's avatarLennart Poettering <lennart@poettering.net>
      566a8416
  24. 10 Feb, 2012 1 commit
  25. 04 Jan, 2012 1 commit
    • Simon McVittie's avatar
      Revert all changes since a36d4918 · 5df8c3db
      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.
      5df8c3db
  26. 13 Aug, 2011 1 commit
  27. 05 Aug, 2011 1 commit
  28. 28 May, 2011 1 commit
  29. 03 Sep, 2010 1 commit
    • Colin Walters's avatar
      Make dbus-uuidgen atomic · 45d53565
      Colin Walters authored
      A Red Hat QA engineer hit in practice a race condition in dbus-uuidgen
      where it could leave an empty file.
      
      dbus-uuidgen (_dbus_create_uuid_file_exclusively) formerly created an
      empty file in the path to the uuid, then filled it in.  At some point,
      the internal libdbus _dbus_string_save_to_file became atomic on Unix
      at least (doing the save to temp file, fsync(), rename() dance).
      
      So _dbus_create_uuid_file_exclusively doesn't need to create the file
      beforehand anymore.  However, it *does* need the file to be
      world-readable, unlike all other consumers of
      _dbus_string_save_to_file.  So add a "world_readable" argument.
      45d53565
  30. 19 Jul, 2010 1 commit
  31. 17 Jun, 2010 1 commit
  32. 14 Jun, 2010 1 commit
    • Ralf Habacker's avatar
      Bug 28460 - Refactored dbus configuration access. · 6f9077ee
      Ralf Habacker authored
      Libdbus uses several config variables. On unix these settings are read from
      environment variables by using _dbus_getenv.
      
      On other platforms like wince there are no environment variables available and
      _dbus_getenv needs an emulation for those plattforms (see
      dbus/dbus-sysdeps-wince-glue.c)
      
      To cleanup this emulation the appended patch adds a config api by adding
      _dbus_config_... functions.
      
      Also having all client config related functions listed in one header file
      provides a good overview about which config attributes  are available.
      
      The default implementation retrieves the config values from environment
      variables. For other os this could be easily extended or replaced by.
      6f9077ee
  33. 19 Mar, 2010 1 commit
  34. 25 Feb, 2010 1 commit