summaryrefslogtreecommitdiff
path: root/src/logind-session.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2011-11-19 01:17:46 +0100
committerMichal Schmidt <mschmidt@redhat.com>2011-11-19 01:17:53 +0100
commit1a4459d63323cdfdb8751077e555ddbbf80564b1 (patch)
tree59a52574bdec0b97f60a47f4ac2ff0508fbaa34a /src/logind-session.c
parent1dc995370987660ff045ff4d7cf512da0390cf96 (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/logind-session.c')
-rw-r--r--src/logind-session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/logind-session.c b/src/logind-session.c
index b0a09e3d37..63ee75808b 100644
--- a/src/logind-session.c
+++ b/src/logind-session.c
@@ -536,7 +536,7 @@ int session_start(Session *s) {
if (r < 0)
return r;
- log_full(s->display || s->tty ? LOG_INFO : LOG_DEBUG,
+ log_full(s->type == SESSION_TTY || s->type == SESSION_X11 ? LOG_INFO : LOG_DEBUG,
"New session %s of user %s.", s->id, s->user->name);
/* Create cgroup */
@@ -659,7 +659,7 @@ int session_stop(Session *s) {
assert(s);
if (s->started)
- log_full(s->display || s->tty ? LOG_INFO : LOG_DEBUG,
+ log_full(s->type == SESSION_TTY || s->type == SESSION_X11 ? LOG_INFO : LOG_DEBUG,
"Removed session %s.", s->id);
/* Kill cgroup */