diff options
author | Ray Strode <rstrode@redhat.com> | 2015-03-19 22:16:43 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-03-19 22:29:38 -0400 |
commit | 9ba521c06b5ed0bb58b5b9b87f233fa9f9a590ee (patch) | |
tree | 158f744964bb4555ca3aeba8ee48142ae5165e52 | |
parent | c0c56178c941e144305af318e3f42637529ca862 (diff) | |
download | gdm-9ba521c06b5ed0bb58b5b9b87f233fa9f9a590ee.tar.gz |
local-display-factory: don't use seat0 if logind not running
We currently only allow ConsoleKit seats if GDM is built without systemd
support, but it's possible to build GDM with systemd support and not
be running logind.
This commit fixes it to do a run time check.
https://bugzilla.gnome.org/show_bug.cgi?id=746497
-rw-r--r-- | daemon/gdm-local-display-factory.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index ba01b2f5..af15617f 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -197,15 +197,19 @@ store_display (GdmLocalDisplayFactory *factory, static const char * get_seat_of_transient_display (GdmLocalDisplayFactory *factory) { - const char *seat_id; + const char *seat_id = NULL; /* FIXME: don't hardcode seat */ #ifdef WITH_SYSTEMD - seat_id = SYSTEMD_SEAT0_PATH; -#else - seat_id = CK_SEAT1_PATH; + if (LOGIND_RUNNING() > 0) { + seat_id = SYSTEMD_SEAT0_PATH; + } #endif + if (seat_id == NULL) { + seat_id = CK_SEAT1_PATH; + } + return seat_id; } |