[PATCH 40/49] login: use LOGIN_TIMEOUT from login.defs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>
---
 login-utils/login.1 |    5 +++++
 login-utils/login.c |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/login-utils/login.1 b/login-utils/login.1
index 8aba16f..ef71539 100644
--- a/login-utils/login.1
+++ b/login-utils/login.1
@@ -133,6 +133,11 @@ Note that the same functionality is also provided by
 .BR pam_motd (8)
 PAM module.
 .RE
+.PP
+\fBLOGIN_TIMEOUT\fR (number)
+.RS 4
+Max time in seconds for login. The default value is 60.
+.RE
 
 .SH FILES
 .nf
diff --git a/login-utils/login.c b/login-utils/login.c
index 8431af8..9822d9a 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -1105,6 +1105,8 @@ int main(int argc, char **argv)
 		.conv = { misc_conv, NULL }	/* PAM conversation function */
 	};
 
+	timeout = getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
+
 	signal(SIGALRM, timedout);
 	siginterrupt(SIGALRM, 1);	/* we have to interrupt syscalls like ioclt() */
 	alarm((unsigned int)timeout);
-- 
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux