From e2acb67baaa1d63685dcaf80becf10291f13d086 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 9 Apr 2013 22:18:16 +0200 Subject: logind: introduce an explicit session class for cronjobs and similar cronjobs are neither interactive user session, nor lock screens, nor login screens, hence they should get their own class. --- src/login/pam-module.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/login/pam-module.c') diff --git a/src/login/pam-module.c b/src/login/pam-module.c index c8f4dae77e..609317e9dd 100644 --- a/src/login/pam-module.c +++ b/src/login/pam-module.c @@ -440,9 +440,10 @@ _public_ PAM_EXTERN int pam_sm_open_session( seat = strempty(seat); if (strchr(tty, ':')) { - /* A tty with a colon is usually an X11 display, place - * there to show up in utmp. We rearrange things and - * don't pretend that an X display was a tty */ + /* A tty with a colon is usually an X11 display, + * placed there to show up in utmp. We rearrange + * things and don't pretend that an X display was a + * tty. */ if (isempty(display)) display = tty; @@ -482,7 +483,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( if (isempty(class)) class = class_pam; if (isempty(class)) - class = "user"; + class = streq(type, "unspecified") ? "background" : "user"; remote = !isempty(remote_host) && !streq(remote_host, "localhost") && -- cgit v1.2.3-54-g00ecf