Bug 96263 - gnome-disk-image-mounter: Not authorized to perform operation
Summary: gnome-disk-image-mounter: Not authorized to perform operation
Status: RESOLVED NOTOURBUG
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-28 18:04 UTC by Laurent Bigonville
Modified: 2016-06-03 20:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Laurent Bigonville 2016-05-28 18:04:58 UTC
Hi,

With polkit 0.113, I get a "Not authorized to perform operation" when using gnome-disk-image-mounter. On a machine with 0.105 it works.

I'm locally logged on the machine and part of the "sudo" group

I'm using "systemd --user" to start part of the session

** (polkitd:11279): DEBUG: system-bus-name::1.9976 is inquiring whether system-bus-name::1.10174 is authorized for org.freedesktop.udisks2.loop-setup
** (polkitd:11279): DEBUG:  user of caller is unix-user:root
** (polkitd:11279): DEBUG:  user of subject is unix-user:bigon
** (polkitd:11279): DEBUG: checking whether system-bus-name::1.10174 is authorized for org.freedesktop.udisks2.loop-setup
** (polkitd:11279): DEBUG:   (nil)
** (polkitd:11279): DEBUG:  challenge (implicit_authorization = auth_admin)
** (polkitd:11279): DEBUG:  


From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825651
Comment 1 Miloslav Trmac 2016-05-30 14:24:14 UTC
Thanks for your report.

In 0.106, the polkit configuration has been completely replaced, from a set of .pkla files to JavaScript rules. So, “it works with 0.105” basically says nothing about what rules you are using with 0.113 and if or how they differ from the 0.105 configuration.


Anyway, there are other strange things in your log:

The (nil) line says that polkit has not been able to determine a systemd session for your client.  That might well be the root cause.

Also, the configuration, as evaluated by polkit, is that the operation can be approved after you enter an admin password.  At least in the trimmed log fragment there is no indication that a polkit agent has been registered for your client; that may well be a consequence of not knowing the relevant session.


If using (systemd --user) is not the default (and it seems to be something you find worth mentioning), disabling that might be a good first step to diagonsing the session determination problem.
Comment 2 Laurent Bigonville 2016-05-30 19:01:36 UTC
Ok I've look at this further, on the same machine switching to 0.105 is actually not fixing this (I tried on a different machine with this version, both machine should be the same, both using systemd --user)

It seems indeed an issue with the detection of the logind session.

But loginctl shows me the session as active.

Indeed, polkit is never asking for the password. This is the case with some other actions
Comment 3 Laurent Bigonville 2016-06-03 09:14:20 UTC
The problem seems to be more the fact that gnome-shell on this particular machine is not registering as a auth agent...

An idea how to debug that?
Comment 4 Laurent Bigonville 2016-06-03 18:10:44 UTC
Ok so apparently it was a pam module (libpam-cgfs) mangling with the name=systemd cgroup and making logind confused

I guess that bug can be closed.
Comment 5 Miloslav Trmac 2016-06-03 20:22:16 UTC
Good to hear, thanks!


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.