pam-module: fix warning about ignoring vtnr

Feb 19 22:15:01 server crond[26418]: pam_systemd(crond:session): Ignoring vtnr
0 for  which is not seat0
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2014-02-23 12:42:03 +00:00
committed by Colin Guthrie
parent a2ca1771f9
commit 3696a356bb
+1 -1
View File
@@ -335,7 +335,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
get_seat_from_display(display, NULL, &vtnr);
}
if (seat && !streq(seat, "seat0")) {
if (seat && !streq(seat, "seat0") && vtnr != 0) {
pam_syslog(handle, LOG_DEBUG,
"Ignoring vtnr %d for %s which is not seat0", vtnr, seat);
vtnr = 0;