[systemd-devel] [PATCH] logind: handle closing sessions over daemon restarts

Martin Pitt martin.pitt at ubuntu.com
Wed Jan 28 09:42:11 PST 2015


Hello,

We restart logind in our systemd package on package upgrades, as that
should generally be safe and our policy is to do that whenever
possible to avoid reboots and apply security and other fixes
immediately.

We got several reports (https://launchpad.net/bugs/1415104) about
users losing their device ACLs and polkit privileges when they install
package updates involving systemd. I found out that this happens if
you have older sessions around in state "closing", i. e. there's still
some leftover process in them [1]. After restarting logind, that old
"closing" session suddenly becomes Active=yes, and the "real" active
session becomes Active=no.

Patch attached, I tested it fairly thoroughly.

Thanks for considering!

Martin

[1] In many cases that's of course a bug in its own right. E. g.
pulseaudio ought to die with the session instead of keeping it open,
but there's also legitimate use cases like screen.
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-logind-handle-closing-sessions-over-daemon-restarts.patch
Type: text/x-diff
Size: 4107 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150128/18606a39/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150128/18606a39/attachment.sig>


More information about the systemd-devel mailing list