odd issue when running dbus-launch [cause found, but no fix found yet]

Thiago Macieira thiago at kde.org
Mon Dec 18 04:48:44 PST 2006


Vulpes Velox wrote:
>That was in regards to the code snip it you sent me.
>
>I did find the same problem in the dbus code though. After looking at
>dbus-sysdeps-unix.c, I found there was a integer named buf_count
>being used in the same way you used the the integer variable named ng.
>
>After including sys/syslimits.h in dbus-sysdeps-unix.c and setting it
>to set buf_count equal to NGROUPS_MAX, dbus now works properly for a
>user that is a member of more than 16 groups. The buf_count is set to
>17, but it is 16 because the user's main group is getting included
>twice.

Right, but I don't think you understood the code.

It chose an arbitrary number of groups that should work for most people. 
In case it isn't enough, it should reallocate with a larger count. That's 
why getgrouplist is called twice.

I had understood that the program I gave you worked out-of-the-box. If it 
didn't, tell me. What is the value of "ng" in the test program after the 
first getgrouplist?

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20061218/d573dcd5/attachment.pgp


More information about the dbus mailing list