From ad6bb002b1684ed4a7d4ecf16f0faa52faf69809 Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Mon, 8 Dec 2014 12:15:44 -0500 Subject: If a timeout is configured by PAM, make sure we set the tac_readtimeout_enable to a non-zero value to get TACACS+ timeouts to work as expected. --- support.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support.c b/support.c index 292a3a9..1558a74 100644 --- a/support.c +++ b/support.c @@ -259,8 +259,11 @@ int _pam_parse (int argc, const char **argv) { /* FIXME atoi() doesn't handle invalid numeric strings well */ tac_timeout = atoi(*argv + 8); - if (tac_timeout < 0) + if (tac_timeout < 0) { tac_timeout = 0; + } else { + tac_readtimeout_enable = 1; + } } else { _pam_log (LOG_WARNING, "unrecognized option: %s", *argv); } -- cgit v1.2.3