[28833] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Extend kadmin client timeout to one hour

daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Mar 17 14:54:58 2015

Date: Tue, 17 Mar 2015 14:54:52 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201503171854.t2HIsqVJ026555@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/11f0cf7928b239be45c5d3cb7e2eccd2ff1e1bfc
commit 11f0cf7928b239be45c5d3cb7e2eccd2ff1e1bfc
Author: Greg Hudson <ghudson@mit.edu>
Date:   Sat Mar 14 14:21:06 2015 -0400

    Extend kadmin client timeout to one hour
    
    Retrieving the list of principals can take a long time for some
    databases.  Extend the libkadm5 client timeout from two minutes to one
    hour.  (We can't easily remove the timeout entirely.)
    
    ticket: 8027

 src/lib/kadm5/clnt/client_init.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c
index 7fac2a8..b96cc35 100644
--- a/src/lib/kadm5/clnt/client_init.c
+++ b/src/lib/kadm5/clnt/client_init.c
@@ -152,6 +152,7 @@ init_any(krb5_context context, char *client_name, enum init_type init_type,
     rpcvers_t rpc_vers;
     krb5_ccache ccache;
     krb5_principal client = NULL, server = NULL;
+    struct timeval timeout;
 
     kadm5_server_handle_t handle;
     kadm5_config_params params_local;
@@ -261,6 +262,12 @@ init_any(krb5_context context, char *client_name, enum init_type init_type,
 #endif
         goto error;
     }
+
+    /* Set a one-hour timeout. */
+    timeout.tv_sec = 3600;
+    timeout.tv_usec = 0;
+    (void)clnt_control(handle->clnt, CLSET_TIMEOUT, &timeout);
+
     handle->client_socket = fd;
     handle->lhandle->clnt = handle->clnt;
     handle->lhandle->client_socket = fd;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post