From: Tom Yu Date: Thu, 13 May 1999 21:25:21 +0000 (+0000) Subject: * client_init.c (_kadm5_init_any): Use gss_krb5_ccache_name() to X-Git-Tag: krb5-1.1-beta1~165 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=833740fd62b9d9f866bb2daaa5405b9236ba229c;p=krb5.git * client_init.c (_kadm5_init_any): Use gss_krb5_ccache_name() to set the gssapi ccache name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11439 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/clnt/ChangeLog b/src/lib/kadm5/clnt/ChangeLog index f7033b62f..9bb42cb26 100644 --- a/src/lib/kadm5/clnt/ChangeLog +++ b/src/lib/kadm5/clnt/ChangeLog @@ -1,3 +1,8 @@ +Thu May 13 17:24:44 1999 Tom Yu + + * client_init.c (_kadm5_init_any): Use gss_krb5_ccache_name() to + set the gssapi ccache name. + 1998-11-13 Theodore Ts'o * Makefile.in: Set the myfulldir and mydir variables (which are diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c index 96c5907af..e86fbe877 100644 --- a/src/lib/kadm5/clnt/client_init.c +++ b/src/lib/kadm5/clnt/client_init.c @@ -429,11 +429,14 @@ static kadm5_ret_t _kadm5_init_any(char *client_name, */ /* use the kadm5 cache */ - ccname_orig = getenv("KRB5CCNAME"); + gssstat = gss_krb5_ccache_name(&minor_stat, handle->cache_name, + &ccname_orig); + if (gssstat != GSS_S_COMPLETE) { + code = KADM5_GSS_ERROR; + goto error; + } if (ccname_orig) ccname_orig = strdup(ccname_orig); - - (void) krb5_setenv("KRB5CCNAME", handle->cache_name, 1); #ifndef INIT_TEST input_name.value = full_service_name; @@ -494,11 +497,19 @@ static kadm5_ret_t _kadm5_init_any(char *client_name, #endif /* ! INIT_TEST */ if (ccname_orig) { - (void) krb5_setenv("KRB5CCNAME", ccname_orig, 1); - free(ccname_orig); - } else - (void) krb5_unsetenv("KRB5CCNAME"); - + gssstat = gss_krb5_ccache_name(&minor_stat, ccname_orig, NULL); + if (gssstat) { + code = KADM5_GSS_ERROR; + goto error; + } + free(ccname_orig); + } else { + gssstat = gss_krb5_ccache_name(&minor_stat, NULL, NULL); + if (gssstat) { + code = KADM5_GSS_ERROR; + goto error; + } + } if (handle->clnt->cl_auth == NULL) { code = KADM5_GSS_ERROR;