D-BUS application authentication problem with custom UID and GID

Ziemowit Podwysocki ziemowit.podwysocki at globallogic.com
Thu May 23 10:36:16 UTC 2019


Hello,

I have situation. Linux application which wants to connect via D-BUS to
other one is setting its UID and GID to values not represented by any
existing user or group in the system. The problem is that this
connection always fails during authentication. Apparently setting config
file with policies for non existing UID and GID is impossible so I tried
workaround. Basically I chose existing group in the system and added it
to secondary groups of the running process via 'setgroups' API and set
policies in config file which suppose to allow pretty much anything for
a member of this group regarding D-BUS connection. However this also
seems not working. Only way I was able to connect was after setting
ANONYMOUS authentication method available and allowing it but this is
not solution that is acceptable in the long run. Can someone evaluate is
there any way to make this working? Using existing UID and GID for
application currently is not an option.

Best regards,

zp




More information about the dbus mailing list