From: Greg Hudson Date: Sat, 14 Mar 2015 18:21:06 +0000 (-0400) Subject: Extend kadmin client timeout to one hour X-Git-Tag: krb5-1.14-alpha1~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11f0cf7928b239be45c5d3cb7e2eccd2ff1e1bfc;p=thirdparty%2Fkrb5.git 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 --- diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c index 7fac2a8e7a..b96cc35781 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;