Created attachment 75714
A patch for _dbus_file_get_contents() to support procfs files that appear to be 
empty

This is the first patch in hopefully a series of patches that will try
to remedy the problem described in this bug at least on Linux.

First thing to do is to support files in procfs that appear to be empty.
Unfortunately _dbus_file_get_contents() ignores such files upfront.

The patch has been inspired by a patch used in a production system:
https://github.com/kkonopko/dbus/commit/7af563d558808fc91d181b5bf9fe24543a44df4c#L8R148

This one uses _dbus_read() instead of plain read.  It's also tempting to
fold the logic from the last `else' statement into the first one.  And
even further the logic that closes the file (and reverts the output
DBusString size) and returns the status could also be folded.  This will
require writing some tests for this function first.

The patch is to get a brief opinion and views.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/75602

Title:
  DBUS Should Support "Session Groups"
  (pam_group.so,/etc/security/groups.conf)

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/75602/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to