Bug 32345 - polkit fails without glib credentials support
Summary: polkit fails without glib credentials support
Status: RESOLVED NOTOURBUG
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: libpolkit (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 00:52 UTC by Antoine Jacoutot
Modified: 2011-02-23 09:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Antoine Jacoutot 2010-12-13 00:52:32 UTC
Hi.

I am not sure whether it's a requirement or a bug somewhere, but the new polkit (testing 0.99 currently) requires that glib is compiled with support for credentials, i.e. GCredentials.
Otherwise it fails in ways like (example using polkit-gnome):

(polkit-gnome-authentication-agent-1:13555): polkit-gnome-1-WARNING **: Error getting authority: Error initializing authority: In WaitingForData: unexpected response `REJECTED EXTERNAL DBUS_COOKIE_SHA1 ANONYMOUS'

Are GCredentials really needed? If so, then there should be a check in configure.ac or so. The need to have support for GCredentials make polkit usable only on linux and freebsd currently.

Thanks.
Comment 1 David Zeuthen (not reading bugmail) 2011-02-23 07:21:58 UTC
(In reply to comment #0)
> Hi.
> 
> I am not sure whether it's a requirement or a bug somewhere, but the new polkit
> (testing 0.99 currently) requires that glib is compiled with support for
> credentials, i.e. GCredentials.
> Otherwise it fails in ways like (example using polkit-gnome):
> 
> (polkit-gnome-authentication-agent-1:13555): polkit-gnome-1-WARNING **: Error
> getting authority: Error initializing authority: In WaitingForData: unexpected
> response `REJECTED EXTERNAL DBUS_COOKIE_SHA1 ANONYMOUS'
> 
> Are GCredentials really needed? If so, then there should be a check in
> configure.ac or so. The need to have support for GCredentials make polkit
> usable only on linux and freebsd currently.
> 
> Thanks.

There is no way to compile GLib without GCredentials support. You need a working version of GLib if you want to use PolicyKit...
Comment 2 Antoine Jacoutot 2011-02-23 08:47:18 UTC
> There is no way to compile GLib without GCredentials support. You need a

That's a joke right? Glib 2.28 compiles just fine without GCredentials support.

> working version of GLib if you want to use PolicyKit...
Comment 3 Antoine Jacoutot 2011-02-23 08:49:04 UTC
(In reply to comment #2)
> > There is no way to compile GLib without GCredentials support. You need a
> 
> That's a joke right? Glib 2.28 compiles just fine without GCredentials support.
> 
> > working version of GLib if you want to use PolicyKit...

Err, I pushed the send button a bit fast.
So when you mean a "working version of GLib", you mean a Glib compiled on FreeBSD or Linux right?
Good to know other OS aren't supported anymore.
Comment 4 David Zeuthen (not reading bugmail) 2011-02-23 09:12:12 UTC
(In reply to comment #2)
> > There is no way to compile GLib without GCredentials support. You need a
> 
> That's a joke right? Glib 2.28 compiles just fine without GCredentials support.

Just because something compiles doesn't mean it actually works; for example, the test suite has to pass as well. Which, in the case of GLib, it _cannot_ do if there is no GCredentials support.
Comment 5 David Zeuthen (not reading bugmail) 2011-02-23 09:14:46 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > > There is no way to compile GLib without GCredentials support. You need a
> > 
> > That's a joke right? Glib 2.28 compiles just fine without GCredentials support.
> > 
> > > working version of GLib if you want to use PolicyKit...
> 
> Err, I pushed the send button a bit fast.
> So when you mean a "working version of GLib", you mean a Glib compiled on
> FreeBSD or Linux right?
> Good to know other OS aren't supported anymore.

No, what I said was that if you want PolicyKit to work, then you need to make sure GLib works properly on your OS. That includes making sure GCredentials works as expected, making sure the test suite passes and so on and so on.

Complaining about GLib not working on your OS in the PolicyKit bugzilla, is definitely not helping.
Comment 6 Antoine Jacoutot 2011-02-23 09:29:03 UTC
> No, what I said was that if you want PolicyKit to work, then you need to make
> sure GLib works properly on your OS. That includes making sure GCredentials
> works as expected, making sure the test suite passes and so on and so on.
> 
> Complaining about GLib not working on your OS in the PolicyKit bugzilla, is
> definitely not helping.

Just for the sake of it, I was not complaining about Glib. I was asking that a check was added to configure.ac to make sure Glib was compiled with credentials support before actually compiling polkit.
Comment 7 David Zeuthen (not reading bugmail) 2011-02-23 09:34:38 UTC
(In reply to comment #6)
> > No, what I said was that if you want PolicyKit to work, then you need to make
> > sure GLib works properly on your OS. That includes making sure GCredentials
> > works as expected, making sure the test suite passes and so on and so on.
> > 
> > Complaining about GLib not working on your OS in the PolicyKit bugzilla, is
> > definitely not helping.
> 
> Just for the sake of it, I was not complaining about Glib. I was asking that a
> check was added to configure.ac to make sure Glib was compiled with credentials
> support before actually compiling polkit.

And my response was that it's not possible to compile GLib without credentials. E.g. GCredentials is part of the ABI that GLib provides. E.g. there is no --enable-credentials build option in GLib.

The problem is that GLib lacks support for credentials on your OS. This means that certain GLib applications (in particular the ones using GDBus) just doesn't work. But you will only find out at runtime, not at GLib compile time. We could change GLib such that things fail at GLib compile time (by using e.g. #error) but that's not how GLib currently works.

Hope this clarifies...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.