Re: polkit fails to authenticate on dbus

"karu.pruun" <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CADdF=ML3puCH3herQbw+OAiPadYtXD=podSdSmHdg0aa_FwDQw@mail.gmail.com>
On Thu, Jan 22, 2015 at 10:20 PM, Simon McVittie wrote:
> polkitd uses GDBus, part of the GIO module in GLib, so that's the place
> to start looking to find out why polkitd is saying "hi, I'm uid
> (uint32_t) -1" instead of "hi, I'm uid 0". My guess is that some API
> call used by GLib is failing and returning -1, and GLib isn't catching
> that failure.
>
> If my theory is correct, then gdbus(1) and other tools that use GDBus
> will fail to authenticate in exactly the same way polkitd does, but
> libdbus applications like dbus-send(1) and dbus-monitor(1) might be
> fine. Please try that and see what happens.

You were right! dbus was fine: in dbus, DragonFly runs through the
same codepath as FreeBSD, namely, the one defined by the HAVE_CMSGCRED
macro. (Interestingly DragonFly is mentioned in the code.)

However, the problem was with GLib where the support for the same
mechanism is implemented via a #defined macro. Adding #elif
defined(__DragonFly__) etc in gio/gcredentialsprivate.h did the trick.
polkitd now runs and authenticates fine.

I'll try and see if I can submit a patch to GLib directly.

Thanks again for your helpful comments, as well as others above. They
were crucial in fixing the issue.

Peeter

--
_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.