Bug 16319 - Polkit does not restart automatically after being updated
Summary: Polkit does not restart automatically after being updated
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory has_procedure MGA5-64-OK MGA...
Keywords: validated_update
: 16377 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-07 12:55 CEST by James Kerr
Modified: 2015-10-11 12:36 CEST (History)
11 users (show)

See Also:
Source RPM: polkit-0.113-1.mga5
CVE:
Status comment:


Attachments

Description James Kerr 2015-07-07 12:55:24 CEST
After applying the update: http://advisories.mageia.org/MGASA-2015-0262.html
MCC was inaccessible from the panel icon or the menu. My root password was rejected. Restarting polkit resolved the issue. Some users report that a system re-boot is required to resolve the issue.

Polkit packaging should be reviewed to ensure that polkit is restarted after being updated, or the user should be prompted to re-boot (as for kernel or dbus updates).

https://forums.mageia.org/en/viewtopic.php?f=7&t=9994

https://ml.mageia.org/l/arc/qa-discuss/2015-07/msg00017.html



Reproducible: 

Steps to Reproduce:
Samuel Verschelde 2015-07-07 14:07:41 CEST

Assignee: bugsquad => mageia

Comment 1 Otto Leipälä 2015-07-08 11:55:14 CEST
(In reply to James Kerr from comment #0)
> After applying the update: http://advisories.mageia.org/MGASA-2015-0262.html
> MCC was inaccessible from the panel icon or the menu. My root password was
> rejected. Restarting polkit resolved the issue. Some users report that a
> system re-boot is required to resolve the issue.
> 
> Polkit packaging should be reviewed to ensure that polkit is restarted after
> being updated, or the user should be prompted to re-boot (as for kernel or
> dbus updates).
> 
> https://forums.mageia.org/en/viewtopic.php?f=7&t=9994
> 
> https://ml.mageia.org/l/arc/qa-discuss/2015-07/msg00017.html
> 
> 
> 
> Reproducible: 
> 
> Steps to Reproduce:

This happend to me with lxqt 50 or more times in day affects all polkit apps i even get root password asked when reboot system,so is that reboot solution to fix this no ????. Reboot is not even needed as rpm package have post install script what can run automatically that systemctl restart polkit when package is installed or updated.

CC: (none) => ozkyster

Comment 2 Florian Hubold 2015-07-09 09:23:27 CEST
(In reply to Otto Leipälä from comment #1)
> Reboot is not even needed as rpm package have post
> install script what can run automatically that systemctl restart polkit when
> package is installed or updated.

"systemctl restart polkit" does not seem to work for everybody, see https://forums.mageia.org/en/viewtopic.php?p=57681#p57681
(although I must admit I've not read those reports myself, but I've got quite a mail backlog due to night shift duty)

CC: (none) => doktor5000

Comment 3 James Kerr 2015-07-09 19:27:53 CEST
Same happens on mga4, 32 and 64

Hardware: x86_64 => All
Whiteboard: (none) => MGA4TOO

Comment 4 Otto Leipälä 2015-07-10 10:28:41 CEST
I get this from systemctl status polkit when it stop working when 100 reboots needed.

heinä 10 11:19:39 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c4...us)
heinä 10 11:19:43 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c6 (...-8)
heinä 10 11:20:01 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c6...us)
heinä 10 11:20:05 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c8 (...-8)
heinä 10 11:20:35 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c8...us)
heinä 10 11:20:38 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c10 ...-8)
heinä 10 11:21:42 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c1...us)
heinä 10 11:21:45 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c12 ...-8)
heinä 10 11:24:05 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c1...us)
heinä 10 11:24:10 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c14 ...-8)
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# systemctl status polkit -l
â polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since pe 2015-07-10 10:41:56 EEST; 42min ago
     Docs: man:polkit(8)
 Main PID: 1661 (polkitd)
   CGroup: /system.slice/polkit.service
           ââ1661 /usr/lib/polkit-1/polkitd --no-debug

heinä 10 11:19:39 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c4 (system bus name :1.61, object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8) (disconnected from bus)
heinä 10 11:19:43 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c6 (system bus name :1.75 [lxqt-policykit-agent], object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8)
heinä 10 11:20:01 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c6 (system bus name :1.75, object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8) (disconnected from bus)
heinä 10 11:20:05 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c8 (system bus name :1.87 [lxqt-policykit-agent], object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8)
heinä 10 11:20:35 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c8 (system bus name :1.87, object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8) (disconnected from bus)
heinä 10 11:20:38 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c10 (system bus name :1.102 [lxqt-policykit-agent], object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8)
heinä 10 11:21:42 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c10 (system bus name :1.102, object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8) (disconnected from bus)
heinä 10 11:21:45 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c12 (system bus name :1.115 [lxqt-policykit-agent], object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8)
heinä 10 11:24:05 localhost polkitd[1661]: Unregistered Authentication Agent for unix-session:c12 (system bus name :1.115, object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8) (disconnected from bus)
heinä 10 11:24:10 localhost polkitd[1661]: Registered Authentication Agent for unix-session:c14 (system bus name :1.130 [lxqt-policykit-agent], object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale fi_FI.UTF-8)
Comment 5 Otto Leipälä 2015-07-10 12:14:15 CEST
I have that time of paste i have only logged out and then logged in once not rebooted system,does this mean that polkit thinks user is still logged out from desktop ?.
Comment 6 James Kerr 2015-07-13 22:26:17 CEST
*** Bug 16377 has been marked as a duplicate of this bug. ***

CC: (none) => bjarne.thomsen

Comment 7 Bjarne Thomsen 2015-07-13 23:24:55 CEST
I am confused. I had this problem after an update by urpmi --auto-update.
Then I reverted also by using urpmi.
Now I have updated using the MCC, and afterwards polkit was running,
and MCC accepted the root password.
This was in mga4. I have never had any problems in mga5.
Comment 8 Otto Leipälä 2015-07-14 17:01:29 CEST
Problem is only with updated polkit version.We still need to find where this bug is coming from and how it can be fixed,no notification this point it not fix nothing.
Now i only reboot system not logout login cause this bug
Comment 9 Antonio Pessoa 2015-07-29 00:15:26 CEST
Maybe I found some kind of solution / clue to correct the problem :
I open a terminal, log as root (su -) and then run the mcc.
Then I go to "security", "configure authentication for mageia tools" (I'm sorry that may not be exactly what you have, I run the french version).
I change one of the items authentication (for example "software management") from "default" (what I usually have) to anything else, like "no password", save and close.
Then, I can go to mageia main menu and launch drakrpm from the menu.
I changed the same way the network center and other things, I also tried changing default to "user" and it also works.
I seems that there is a mistake with the default value, that is missing or doesn't work anymore.

CC: (none) => apessoa

Comment 10 Otto Leipälä 2015-07-29 20:03:26 CEST
It's not solution to fix authentication problems by launch program as root from terminal as that polkit gui is used to ask root password to start programs as root.
Second one it's huge security issue to get password off from starting something as root.
And those values is correct ones default but polkit is not working so don't touch to those not at all !!!.
Comment 11 Antonio Pessoa 2015-07-29 22:46:07 CEST
Thanks for your great comment.
I understand now what polkit is for. 
Thank YOU
Angelo Naselli 2015-09-08 09:27:56 CEST

CC: (none) => anaselli

Samuel Verschelde 2015-09-16 14:53:31 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=16396

Morgan Leijström 2015-09-16 18:26:07 CEST

CC: (none) => fri

Comment 12 Florian Hubold 2015-10-04 16:33:25 CEST
@Coling: For the original issue reported here (which should be already fixed for everybody, polkit update was released July 6) can't we simply add an unconditional polkit restart in %post ? Or better, add this to the list of packages for which a reboot is suggested by drakrpm, like kernel, udev or glibc?

We don't have a restart currently:

[doktor5000@Mageia5]â[16:26:55]â[~] rpm -q polkit
polkit-0.113-1.mga5

[doktor5000@Mageia5]â[16:27:24]â[~] rpm -q --scripts --triggers polkit
preinstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/add-user polkit $1 polkitd /usr/lib/polkit-1 /sbin/nologin
postinstall scriptlet (using /bin/sh):
# (cg) Previous package enabled this but it's now purely dbus activated
rm -f /etc/systemd/system/graphical.target.wants/polkitd.service
postuninstall scriptlet (using /bin/sh):
/usr/share/rpm-helper/del-user polkit $1 polkitd


Any objections?

Status: NEW => ASSIGNED
CC: (none) => mageia, mageia
Assignee: mageia => doktor5000

Comment 13 Florian Hubold 2015-10-07 12:29:13 CEST
(In reply to Florian Hubold from comment #12)
> @Coling: For the original issue reported here (which should be already fixed
> for everybody, polkit update was released July 6) can't we simply add an
> unconditional polkit restart in %post ?

Seems an update candidate that contains the restart exists already since several months in core_updates_testing: 

libpolkit1-devel-0.113-1.1.mga5.i586
libpolkit-gir1.0-0.113-1.1.mga5.i586
polkit-0.113-1.1.mga5.i586
libpolkit1_0-0.113-1.1.mga5.i586

lib64polkit1-devel-0.113-1.1.mga5.x86_64
polkit-0.113-1.1.mga5.x86_64
lib64polkit1_0-0.113-1.1.mga5.x86_64
lib64polkit-gir1.0-0.113-1.1.mga5.x86_64
Comment 14 Florian Hubold 2015-10-07 20:06:22 CEST
@QA team: There is new update candidate to test. Steps to test:

- verify that you can successfully gain authorisation via polkit, e.g. via "pkexec whoami" or "drakconf" - run as normal user
- verify the status of the polkit system daemon via "systemctl status polkit.service -a"
- install the update candidate
- verify that you are still able to successfully gain authorisation via polkit, e.g. via "pkexec whoami" or "drakconf" - run as normal user


========================
Suggested advisory:

After applying the last polkit update from http://advisories.mageia.org/MGASA-2015-0262.html the polkit system service was not restarted. Afterwards all authorisations handled by polkit would fail, and e.g. users would be unable to run drakconf (MCC) from the menu. The workaround was to restart the polkit service or to reboot. This update rectifies that problem.


References:
https://bugs.mageia.org/show_bug.cgi?id=16319
https://forums.mageia.org/en/viewtopic.php?f=7&t=9994
https://ml.mageia.org/l/arc/qa-discuss/2015-07/msg00017.html
========================

Updated packages in core/updates_testing:
========================
i586
libpolkit1-devel-0.113-1.1.mga5.i586
libpolkit-gir1.0-0.113-1.1.mga5.i586
polkit-0.113-1.1.mga5.i586
libpolkit1_0-0.113-1.1.mga5.i586

x86_64
lib64polkit1-devel-0.113-1.1.mga5.x86_64
polkit-0.113-1.1.mga5.x86_64
lib64polkit1_0-0.113-1.1.mga5.x86_64
lib64polkit-gir1.0-0.113-1.1.mga5.x86_64

Source RPMs: 
polkit-0.113-1.1.mga5.src.rpm

Assignee: doktor5000 => qa-bugs

Comment 15 Samuel Verschelde 2015-10-08 11:01:08 CEST
Removing MGA4TOO for cleaner QA Updates list.

Whiteboard: MGA4TOO => (none)

Dave Hodgins 2015-10-09 00:42:49 CEST

CC: (none) => davidwhodgins
Whiteboard: (none) => advisory

Comment 16 Yann Cantin 2015-10-10 17:03:04 CEST
mga5 x86_64

Installed packages :
 polkit-0.113-1.1.mga5.x86_64.rpm
 lib64polkit-gir1.0-0.113-1.1.mga5.x86_64.rpm
 lib64polkit1_0-0.113-1.1.mga5.x86_64.rpm

During installation, there's this message popping :
Warning: Unit file of polkit.service changed on disk, 'systemctl daemon-reload' recommended.

Test :

pkexec whoami : OK

# systemctl status polkit.service -a
â polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since sam. 2015-10-10 16:56:54 CEST; 56s ago
     Docs: man:polkit(8)
 Main PID: 11063 (polkitd)
   CGroup: /system.slice/polkit.service
           ââ11063 /usr/lib/polkit-1/polkitd --no-debug

Update OK.

CC: (none) => yann.cantin
Whiteboard: advisory => advisory has_procedure MGA5-64-OK

Comment 17 James Kerr 2015-10-11 10:18:52 CEST
Testing on mga5-32

urpmi --searchmedia "Core Updates Testing" polkit
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Updates Testing")
  libpolkit-gir1.0               0.113        1.1.mga5      i586    
  libpolkit1_0                   0.113        1.1.mga5      i586    
  polkit                         0.113        1.1.mga5      i586   


Polkit was restarted:

systemctl status polkit
â polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since Sun 2015-10-11 09:11:56 IST; 7s ago

and MCC was accessible from the panel icon.

OK for mga5-32

Whiteboard: advisory has_procedure MGA5-64-OK => advisory has_procedure MGA5-64-OK MGA5-32-OK

Comment 18 James Kerr 2015-10-11 10:21:49 CEST
This update is now validated and can be pushed to updates.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 19 Mageia Robot 2015-10-11 12:36:21 CEST
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0151.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.