diff options
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") && |