Commit 11fe198e authored by Ray Strode's avatar Ray Strode

Merge branch 'wip/fix-pam-group' into 'master'

session-worker: don't set PAM_TTY to bogus value on failure

See merge request GNOME/gdm!29
parents 846ea879 4efc0343
......@@ -1220,9 +1220,10 @@ gdm_session_worker_initialize_pam (GdmSessionWorker *worker,
/* Temporarily set PAM_TTY with the currently active VT (login screen)
PAM_TTY will be reset with the users VT right before the user session is opened */
ensure_login_vt (worker);
g_snprintf (tty_string, 256, "/dev/tty%d", worker->priv->login_vt);
pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string);
if (ensure_login_vt (worker)) {
g_snprintf (tty_string, 256, "/dev/tty%d", worker->priv->login_vt);
pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string);
}
if (!display_is_local)
worker->priv->password_is_required = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment