29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From 2373386db2501528c74e2f547c2c5d27d81be35b Mon Sep 17 00:00:00 2001
|
|
From: Matthew Monaco <matthew.monaco@0x01b.net>
|
|
Date: Fri, 24 Jan 2014 11:23:01 -0700
|
|
Subject: [PATCH] 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
|
|
---
|
|
src/login/pam-module.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
|
|
index 973daf7..7ebb5d2 100644
|
|
--- a/src/login/pam-module.c
|
|
+++ b/src/login/pam-module.c
|
|
@@ -335,6 +335,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";
|