After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696266 - fix checks for logind
fix checks for logind
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: GDM maintainers
GDM maintainers
3.8.1
Depends on:
Blocks:
 
 
Reported: 2013-03-21 10:51 UTC by Martin Pitt
Modified: 2013-03-29 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix checks for logind (8.83 KB, patch)
2013-03-21 11:02 UTC, Martin Pitt
none Details | Review
Fix checks for logind (8.86 KB, patch)
2013-03-24 08:27 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2013-03-21 10:51:10 UTC
Many parts of gdm want to talk to logind, but actually check for systemd with sd_booted(). It is possible to build systemd without logind, in which case sd_booted() would still succeed (sd_booted() was recently fixed upstream to
only be true if systemd init is active [1]).

For running systemd init without logind, or for running logind without systemd
init we need to change the check to test for logind for the parts that deal with session/user/seat tracking. The logging parts talk to journald, for which sd_booted() is fine.

For details, see [2] if you are interested.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=66e411811b8090
[2] https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html
Comment 1 Martin Pitt 2013-03-21 11:02:45 UTC
Created attachment 239450 [details] [review]
Fix checks for logind

Unlike the changes to the other GNOME modules this one is quite large, so I'd appreciate a second pair of eyes. Thanks!
Comment 2 Matthias Clasen 2013-03-22 11:32:29 UTC
Review of attachment 239450 [details] [review]:

Generally looks ok, but the commit message seems to cloud the actual issue that is being addressed here. You are using logind without systemd, not systemd without logind - right ?
Comment 3 Martin Pitt 2013-03-22 13:14:58 UTC
> You are using logind without systemd, not systemd without logind - right ?

That's right, yes. In the current systemd versions the sd_booted() check is true in that mode, so we can currently do that. However, it's not really intended that way, that's why I asked Lennart to fix sd_booted() to actually mean "init", and rather fix all consumers of this; once that gets released, it will affect the "logind without systemd init case" as well, right.

The worse problem is with said mode -- building systemd without logind. sd_booted() is True, but logind is not available and thus gdm is talking into the void. That doesn't directly affect Ubuntu, but it might affect other people.

I'm not wedded to the commit message, of course. How about something like "It is possible to build systemd without logind or run logind without system init, in both cases testing for systemd init is wrong."?
Comment 4 Matthias Clasen 2013-03-22 18:43:10 UTC
sure, that's fine.
Comment 5 Martin Pitt 2013-03-24 08:27:43 UTC
Created attachment 239665 [details] [review]
Fix checks for logind

Updated changelog.
Comment 6 Matthias Clasen 2013-03-28 02:22:49 UTC
Review of attachment 239665 [details] [review]:

ok
Comment 7 Martin Pitt 2013-03-29 10:06:59 UTC
Comment on attachment 239665 [details] [review]
Fix checks for logind

Pushed to master. There is no gnome-3-8 branch yet, so I assume this is sufficient for going into 3.8.1.