krb5 commit: Extend kadmin client timeout to one hour

Greg Hudson ghudson at mit.edu
Tue Mar 17 14:54:52 EDT 2015


https://github.com/krb5/krb5/commit/11f0cf7928b239be45c5d3cb7e2eccd2ff1e1bfc
commit 11f0cf7928b239be45c5d3cb7e2eccd2ff1e1bfc
Author: Greg Hudson <ghudson at 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;


More information about the cvs-krb5 mailing list