summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-03-19 14:49:01 -0400
committerRay Strode <rstrode@redhat.com>2012-03-19 15:53:07 -0400
commitad7b1851b8d5e1cc5ac9408f931e0b83c9c557c3 (patch)
treebe8ff21c7b029f5d9cb55a5183f45d6016c0eb5f
parent7ae2c9cd92adb41e4bdeac1fc1d4832b81a718bd (diff)
downloadgdm-ad7b1851b8d5e1cc5ac9408f931e0b83c9c557c3.tar.gz
user-switching: fix sd_session_get_uid check
It returns 0 on success. https://bugzilla.gnome.org/show_bug.cgi?id=655380
-rw-r--r--daemon/gdm-slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index d864a3da..a1fded19 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -1347,7 +1347,7 @@ gdm_slave_get_primary_session_id_for_user_from_systemd (GdmSlave *slave,
uid_t other;
res = sd_session_get_uid (sessions[i], &other);
- if (res > 0 && other == uid) {
+ if (res == 0 && other == uid) {
primary_ssid = g_strdup (sessions[i]);
}
}