[gdm] user-switching: don't set PAM_TTY when using systemd
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] user-switching: don't set PAM_TTY when using systemd
- Date: Mon, 19 Mar 2012 19:55:46 +0000 (UTC)
commit 932c65c66d26915b40830a91762ae10ca95458a2
Author: Ray Strode <rstrode redhat com>
Date: Mon Mar 19 14:05:18 2012 -0400
user-switching: don't set PAM_TTY when using systemd
It does it for us, and we don't know it anyway, so
don't bother trying.
https://bugzilla.gnome.org/show_bug.cgi?id=655380
daemon/gdm-server.c | 8 ++++++++
daemon/gdm-session-worker.c | 4 +++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 53d7841..6d2d6cd 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -165,6 +165,14 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
char *
gdm_server_get_display_device (GdmServer *server)
{
+#ifdef WITH_SYSTEMD
+ /* systemd finds the display device out on its own based on the display */
+ return NULL;
+#endif
+
+#ifndef WITH_CONSOLE_KIT
+ return NULL;
+#endif
if (server->priv->display_device == NULL) {
server->priv->display_device =
_gdm_server_query_ck_for_display_device (server);
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 1136bb4..57f1071 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -1142,7 +1142,9 @@ gdm_session_worker_initialize_pam (GdmSessionWorker *worker,
/* set TTY */
pam_tty = _get_tty_for_pam (x11_display_name, display_device);
- error_code = pam_set_item (worker->priv->pam_handle, PAM_TTY, pam_tty);
+ if (pam_tty != NULL && pam_tty[0] != '\0') {
+ error_code = pam_set_item (worker->priv->pam_handle, PAM_TTY, pam_tty);
+ }
g_free (pam_tty);
if (error_code != PAM_SUCCESS) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]