summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-08-30 14:01:55 -0400
committerRay Strode <rstrode@redhat.com>2018-08-31 16:43:21 -0400
commit923a778519e1987dc2dc26ae493e9d7bea2f00c9 (patch)
tree8308ebd9e5bfefeebb64ae59976f775f8f3af828
parent83666d60c8d08b89bfd2299323156cb5eb94e2ef (diff)
downloadgdm-923a778519e1987dc2dc26ae493e9d7bea2f00c9.tar.gz
manager: better logind handling
commit 9ee68d5c8 highlights we've incorrectly used ENOENT instead of ENXIO when checking for non-existing sessions/seats with logind. This commit mops up all the other cases.
-rw-r--r--daemon/gdm-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index b52512d2..b42e9b9e 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -371,7 +371,7 @@ is_remote_session (GdmManager *self,
seat = NULL;
ret = sd_session_get_seat (session_id, &seat);
- if (ret < 0 && ret != -ENOENT) {
+ if (ret < 0 && ret != -ENXIO) {
g_debug ("GdmManager: Error while retrieving seat for session %s: %s",
session_id, strerror (-ret));
}
@@ -396,7 +396,7 @@ get_seat_id_for_session_id (const char *session_id,
seat = NULL;
ret = sd_session_get_seat (session_id, &seat);
- if (ret == -ENOENT) {
+ if (ret == -ENXIO) {
out_seat = NULL;
} else if (ret < 0) {
g_set_error (error,
@@ -423,7 +423,7 @@ get_tty_for_session_id (const char *session_id,
ret = sd_session_get_tty (session_id, &tty);
- if (ret == -ENOENT) {
+ if (ret == -ENXIO) {
out_tty = NULL;
} else if (ret < 0) {
g_set_error (error,