[Pkg-shadow-devel] patch for login - 4

Nicolas François nicolas.francois@centraliens.net
Fri, 3 Jun 2005 01:05:14 +0200


--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello Tomasz,

This patch cancel the alarm earlier.

I can't reproduce the error in my environment. I think it was because
pam_open_session or setup_groups was too long with the LDAP server, so the
timeout always expired.
Once the user is authenticated, the alarm is no more needed.

More info at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=107148

The patch is against your CVS.

Kind Regards,
-- 
Nekral

--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=008_login_cancel_timout_after_authentication

Goal: Cancel login timeout after authentication so that patient people
      timing out on network directory services can log in with local
      accounts.
Fixes: #107148

Status wrt upstream: It should be forwarded to upstream.

--- login.c.orig	2005-06-02 12:37:46.651911000 +0200
+++ login.c	2005-06-02 12:55:54.961911000 +0200
@@ -679,6 +679,8 @@
 				exit (0);
 			}
 
+			/* We don't get here unless they were authenticated above */
+			alarm(0);
 			retcode = pam_acct_mgmt (pamh, 0);
 
 			if (retcode == PAM_NEW_AUTHTOK_REQD) {

--6TrnltStXW4iwmi0--