summaryrefslogtreecommitdiffstats
path: root/utils/gssd/gssd_proc.c
diff options
context:
space:
mode:
authorLukas Hejtmanek <xhejtman@ics.muni.cz>2008-07-15 10:07:45 -0400
committerSteve Dickson <steved@redhat.com>2008-07-15 10:07:45 -0400
commit1e1c7be98749fff054beec4bf67b436b58f6edac (patch)
tree28ee55efacdd07dee888f7317c421135e724cb0f /utils/gssd/gssd_proc.c
parentb13f13b0f2ebdadc47eef8bf3fd4eb076e144fda (diff)
downloadnfs-utils-1e1c7be98749fff054beec4bf67b436b58f6edac.tar.gz
nfs-utils-1e1c7be98749fff054beec4bf67b436b58f6edac.tar.xz
nfs-utils-1e1c7be98749fff054beec4bf67b436b58f6edac.zip
The default expiration of kernel gss contexts is the expiration
of the Kerberos ticket used in its creation. (For contexts created using the Kerberos mechanism.) Thus kdestroy has no effect in nullifying the kernel context. This patch adds -t <timeout> option to rpc.gssd so that the client's administrator may specify a timeout for expiration of contexts in kernel. After this timeout, rpc.gssd is consulted to create a new context. By default, timeout is 0 (i.e., no timeout at all) which follows the previous behavior. Signed-off-by: Lukas Hejtmanek <xhejtman@ics.muni.cz> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/gssd_proc.c')
-rw-r--r--utils/gssd/gssd_proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
index a145081..f415a10 100644
--- a/utils/gssd/gssd_proc.c
+++ b/utils/gssd/gssd_proc.c
@@ -427,7 +427,7 @@ do_downcall(int k5_fd, uid_t uid, struct authgss_private_data *pd,
gss_buffer_desc *context_token)
{
char *buf = NULL, *p = NULL, *end = NULL;
- unsigned int timeout = 0; /* XXX decide on a reasonable value */
+ unsigned int timeout = context_timeout;
unsigned int buf_size = 0;
printerr(1, "doing downcall\n");
@@ -438,7 +438,6 @@ do_downcall(int k5_fd, uid_t uid, struct authgss_private_data *pd,
end = buf + buf_size;
if (WRITE_BYTES(&p, end, uid)) goto out_err;
- /* Not setting any timeout for now: */
if (WRITE_BYTES(&p, end, timeout)) goto out_err;
if (WRITE_BYTES(&p, end, pd->pd_seq_win)) goto out_err;
if (write_buffer(&p, end, &pd->pd_ctx_hndl)) goto out_err;