1. 28 Jun, 2013 1 commit
  2. 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
  3. 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
  4. 13 Jun, 2011 1 commit
  5. 27 Mar, 2010 1 commit
  6. 19 Mar, 2010 1 commit
  7. 14 Jul, 2009 3 commits
  8. 10 Jul, 2009 1 commit
  9. 28 May, 2009 2 commits
  10. 03 Apr, 2008 1 commit
    • Kimmo Hämäläinen's avatar
      fix expiration of pending replies · 7c4b3458
      Kimmo Hämäläinen authored
      * bus/expirelist.c
        (do_expiration_with_current_time): calculate correct min wait time
        and next interval
        (bus_expire_list_add, bus_expire_list_add_link): if the timeout is
        disabled when we add an item to the expire list, enable the timeout
        (do_expiration_with_current_time): only set timeout if there are
        items to expire
      7c4b3458
  11. 04 Mar, 2008 1 commit
    • Havoc Pennington's avatar
      Make BusExpireList an opaque data type · a3740411
      Havoc Pennington authored
      2007-11-08  Havoc Pennington  <hp@redhat.com>
      
      	* bus/connection.c, bus/expirelist.c: Make the BusExpireList
      	struct opaque, adding accessors for manipulating the list. In this
      	commit there should be no change in functionality or behavior. The
      	purpose of this change is to improve encapsulation prior to fixing
      	some bugs Kimmo Hämäläinen found where the timeout is not properly
      	updated, since we need to e.g. take some action whenever adding
      	and removing stuff from the expire list.
      a3740411
  12. 14 Jul, 2007 1 commit
  13. 08 Aug, 2006 1 commit
    • John Palmieri's avatar
      These are all patches from Kjartan Maraas <kmaraas at gnome dot org> · 9a3145b9
      John Palmieri authored
      with cleanups of bugs found from Coverity reports:
      
      * dbus/dbus-sysdeps-util.c (_dbus_write_pid_file):
        close the file on error to avoid a leak
      
      * bus/expirelist.c (bus_expire_list_test):
        Check for NULL on dbus_new0
      
      * bus/activation.c (update_directory):
        remove dead code
      
      * bus/config-parser.c (merge_service_context_hash, start_selinux_child):
        Fix some leaks
      
      * bus/bus.c (process_config_every_time):
        Fixed a leak
      
      * bus/desktop-file.c (parse_key_value):
        Fixed leak
      
      * bus/selinux.c (bus_selinux_id_table_insert):
        Fixed leak
      9a3145b9
  14. 10 Aug, 2004 1 commit
  15. 20 May, 2004 1 commit
    • Kristian Høgsberg's avatar
      * doc/TODO: Remove resolved items. · df23f08f
      Kristian Høgsberg authored
      	* bus/expirelist.h (struct BusExpireList): remove unused n_items
      	field.
      
      	* bus/connection.c (bus_connections_expect_reply): Enforce the
      	per-connection limit on pending replies.
      df23f08f
  16. 02 Dec, 2003 1 commit
  17. 28 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-28 Havoc Pennington <hp@redhat.com> · bebc830f
      Havoc Pennington authored
      	* bus/expirelist.c (do_expiration_with_current_time): detect
      	failure of the expire_func due to OOM
      
      	* bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
      
      	* bus/dispatch.c (check_send_exit_to_service): fix to handle the
      	NoReply error that's now created by the bus when the service exits
      bebc830f
  18. 14 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-14 Havoc Pennington <hp@redhat.com> · 64f5ae1a
      Havoc Pennington authored
      	* bus/connection.c: implement pending reply tracking using
      	BusExpireList
      
      	* bus/bus.c (bus_context_check_security_policy): verify that a
      	reply is pending in order to allow a reply to be sent. Deny
      	messages of unknown type.
      
      	* bus/dbus-daemon-1.1.in: update to mention new resource limits
      
      	* bus/bus.c (bus_context_get_max_replies_per_connection): new
      	(bus_context_get_reply_timeout): new
      64f5ae1a
  19. 11 Oct, 2003 1 commit