summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Monaco <matthew.monaco@0x01b.net>2014-01-24 11:23:01 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-26 12:25:21 -0500
commitd7353ef6095f5e7db63d9cc898c7134b64482550 (patch)
tree652aeda7f5f8932b195057b69b1fcdf1a5fb381a /src
parent62cfb98addf80c25a9ed12683e73859173c65e97 (diff)
pam_systemd: Ignore vtnr when seat != seat0
logind considers it an error for a seat other than seat0 to have a non-zero vtnr for CreateSession
Diffstat (limited to 'src')
-rw-r--r--src/login/pam-module.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index 7400734fdc..18dd4e2e21 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -321,6 +321,12 @@ _public_ PAM_EXTERN int pam_sm_open_session(
get_seat_from_display(display, NULL, &vtnr);
}
+ if (seat && !streq(seat, "seat0")) {
+ pam_syslog(handle, LOG_DEBUG,
+ "Ignoring vtnr %d for %s which is not seat0", vtnr, seat);
+ vtnr = 0;
+ }
+
if (!type)
type = !isempty(display) ? "x11" :
!isempty(tty) ? "tty" : "unspecified";