diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-09 22:18:16 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-09 22:18:16 +0200 |
commit | e2acb67baaa1d63685dcaf80becf10291f13d086 (patch) | |
tree | b80a3d73584f350db6de7690ebae3d6911ef906f /src/login/pam-module.c | |
parent | 05d0c3e1fde1794b26afc572ad1acfe52048ecba (diff) |
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.
Diffstat (limited to 'src/login/pam-module.c')
-rw-r--r-- | src/login/pam-module.c | 9 |
1 files changed, 5 insertions, 4 deletions
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") && |