summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/login/pam-module.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index 0d387918c7..af108c46d5 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -428,8 +428,14 @@ _public_ PAM_EXTERN int pam_sm_open_session(
pam_get_item(handle, PAM_TTY, (const void**) &tty);
pam_get_item(handle, PAM_RUSER, (const void**) &remote_user);
pam_get_item(handle, PAM_RHOST, (const void**) &remote_host);
+
seat = pam_getenv(handle, "XDG_SEAT");
+ if (isempty(seat))
+ seat = getenv("XDG_SEAT");
+
cvtnr = pam_getenv(handle, "XDG_VTNR");
+ if (isempty(cvtnr))
+ cvtnr = getenv("XDG_VTNR");
service = strempty(service);
tty = strempty(tty);
@@ -468,6 +474,8 @@ _public_ PAM_EXTERN int pam_sm_open_session(
class = pam_getenv(handle, "XDG_SESSION_CLASS");
if (isempty(class))
+ class = getenv("XDG_SESSION_CLASS");
+ if (isempty(class))
class = "user";
remote = !isempty(remote_host) &&