/etc/polkit-1/localauthority.conf.d/ parsed in wrong order?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
policykit-1 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
On 16.04 and using the Xubuntu session (this isn't limited to XFCE) I noticed that my notebook fails to suspend via power-management when the idle timeout expires. When returning to it, if it still has power, I see a polkit-agent GUI dialog asking me to authenticate.
In /var/log/auth.log is:
polkitd(
So I started digging:
# inactive sleep is enabled
$ xfconf-query -c xfce4-power-manager -lv | grep inactivity
/xfce4-
/xfce4-
/xfce4-
$ awk '/login1\.suspend"/ {E=1;print} /defaults/ && E == 1 {E++} E > 1 {print} /<\/action>/ && E > 1 {exit}' /usr/share/
<action id="org.
</action>
# member of sudo and adm
$ groups
tj adm dialout cdrom sudo dip plugdev lpadmin sambashare sbuild lxd libvirtd two_factor_auth
$ sudo find /etc/polkit-1/ -type f -exec sh -c 'echo === {} ===; cat {}' \; | egrep -v '^(#|$)'
=== /etc/polkit-
[Enable hibernate by default in upower]
Identity=
Action=
ResultActive=yes
ResultInactive=yes
[Enable hibernate by default in logind]
Identity=
Action=
ResultActive=yes
ResultInactive=yes
=== /etc/polkit-
[Configuration]
Priority=-10
=== /etc/polkit-
[Configuration]
AdminIdentities
=== /etc/polkit-
[Configuration]
AdminIdentities
ubuntu-admin.conf policy sets AdminIdentities to include group 'sudo' but seems to be ignored
"man 8 pklocalauthority" states that these files are parsed in C locale lexical order, and gives examples of "...given the name 60-desktop-
However:
$ sudo inotifywait -r -m /etc/polkit-
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
/etc/polkit-
This seems to show that the sort order might be high-low not low-high (unless they're sorted once in memory).
In view of the fact that ubuntu-admin.conf appears to be ignored I suspect 50-localauthori
AdminIdentities
AdminIdentities
description: | updated |
description: | updated |
Related Suspend bug (and fix) "Desktop unable to Suspend when Inactive Edit" bug #1757375