summaryrefslogtreecommitdiff
path: root/src/pam-module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pam-module.c')
-rw-r--r--src/pam-module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pam-module.c b/src/pam-module.c
index e65088638b..46b7becc5d 100644
--- a/src/pam-module.c
+++ b/src/pam-module.c
@@ -463,6 +463,10 @@ _public_ PAM_EXTERN int pam_sm_open_session(
if (isempty(display))
display = tty;
tty = "";
+ } else if (streq(tty, "cron")) {
+ /* cron has been setting PAM_TTY to "cron" for a very long time
+ * and it cannot stop doing that for compatibility reasons. */
+ tty = "";
}
if (!isempty(cvtnr))