From e321a9d23c4475ba105a6e892624a65940e7aed2 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sat, 14 Mar 2015 14:29:21 -0400 Subject: [PATCH] Clean up gssrpc timeout code Revert b8b7bd63231094a3583847853bf60cb002781161 (for #6120) now that we are setting the kadmin client timeout the appropriate way. In clnt_create(), do not set a timeout after creating the handle; doing so defeats the purpose of keeping track of whether the caller has set a handle timeout. --- src/lib/kadm5/clnt/client_rpc.c | 2 +- src/lib/rpc/clnt_generic.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib/kadm5/clnt/client_rpc.c b/src/lib/kadm5/clnt/client_rpc.c index e11346d82a..0d2f9530ad 100644 --- a/src/lib/kadm5/clnt/client_rpc.c +++ b/src/lib/kadm5/clnt/client_rpc.c @@ -10,7 +10,7 @@ #endif /* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 120, 0 }; +static struct timeval TIMEOUT = { 25, 0 }; generic_ret * create_principal_2(cprinc_arg *argp, CLIENT *clnt) diff --git a/src/lib/rpc/clnt_generic.c b/src/lib/rpc/clnt_generic.c index 595c5f2ac3..79831e1db9 100644 --- a/src/lib/rpc/clnt_generic.c +++ b/src/lib/rpc/clnt_generic.c @@ -94,17 +94,12 @@ clnt_create( if (client == NULL) { return (NULL); } - tv.tv_sec = 120; - clnt_control(client, CLSET_TIMEOUT, &tv); break; case IPPROTO_TCP: client = clnttcp_create(&sockin, prog, vers, &sock, 0, 0); if (client == NULL) { return (NULL); } - tv.tv_sec = 120; - tv.tv_usec = 0; - clnt_control(client, CLSET_TIMEOUT, &tv); break; default: rpc_createerr.cf_stat = RPC_SYSTEMERROR; -- 2.47.2