clone 717403 -1
retitle -1 libpam-systemd: no login when PAM_SESSION_ERR is triggered
thanks
Am 20.07.2013 14:20, schrieb Michael Biebl:
> Jul 20 14:08:08 pluto login[3476]: pam_unix(login:session): session opened 
> for user michael by LOGIN(uid=0)
> Jul 20 14:08:08 pluto systemd-logind[5664]: New session 13 of user michael.
> Jul 20 14:08:08 pluto login[3476]: pam_systemd(login:session): Failed to 
> parse message: Message has only 5 arguments, but more were expected
> Jul 20 14:08:08 pluto systemd-logind[5664]: Removed session 13.
> Jul 20 14:08:08 pluto systemd[1]: getty@tty2.service holdoff time over, 
> scheduling restart.
> Jul 20 14:08:08 pluto systemd[1]: Stopping Getty on tty2...
> Jul 20 14:08:08 pluto systemd[1]: Starting Getty on tty2...
> Jul 20 14:08:08 pluto systemd[1]: Started Getty on tty2.
> 
> 
> When I try to login on the console, I get immediately thrown back to the
> login prompt. This means I'm no longer able to login!
> 
> A few thoughts/observations
> 3/ Failing to register a logind session in pam_systemd should not result
> in a failed login attempt.

I'm splitting this issue into a separate bug report, since it is not
directly related to the v44 to v204 incompatibility.

The attached patch simulates an error condition, and returns
PAM_SESSION_ERR.

As a result, I can no longer login on the console. We should investigate
why, since the pam module is setup as
 session optional pam_systemd.so
in /etc/pam.d/common-session, so this shouldn't happen


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
index 2486fa5..150fd33 100644
--- a/src/login/pam-module.c
+++ b/src/login/pam-module.c
@@ -553,6 +553,9 @@ _public_ PAM_EXTERN int pam_sm_open_session(
                 r = PAM_SESSION_ERR;
                 goto finish;
         }
+        pam_syslog(handle, LOG_ERR, "Simulating an error condition");
+        r = PAM_SESSION_ERR;
+        goto finish;
 
         if (debug)
                 pam_syslog(handle, LOG_DEBUG, "Reply from logind: "

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to