diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2011-11-19 01:17:46 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2011-11-19 01:17:53 +0100 |
commit | 1a4459d63323cdfdb8751077e555ddbbf80564b1 (patch) | |
tree | 59a52574bdec0b97f60a47f4ac2ff0508fbaa34a /src/pam-module.c | |
parent | 1dc995370987660ff045ff4d7cf512da0390cf96 (diff) |
pam-module: treat "cron" in PAM_TTY as empty tty
cron sets PAM_TTY to "cron" and it has been doing it for a long time.
It cannot be changed because user configurations may depend on it.
https://bugzilla.redhat.com/show_bug.cgi?id=727315
Diffstat (limited to 'src/pam-module.c')
-rw-r--r-- | src/pam-module.c | 4 |
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)) |