From: Theodore Tso Date: Fri, 12 Mar 1999 00:16:47 +0000 (+0000) Subject: set_ccache.c (gss_krb5_ccache_name): Added new Krb5 specific interface X-Git-Tag: krb5-1.1-beta1~296 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=caa7db5660263ecde24e083d9865351916369789;p=krb5.git set_ccache.c (gss_krb5_ccache_name): Added new Krb5 specific interface to set the default credentials cache name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11266 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 8f3f616c1..a7538745f 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,8 @@ +1999-03-11 Theodore Ts'o + + * set_ccache.c (gss_krb5_ccache_name): Added new Krb5 specific + interface to set the default credentials cache name. + 1999-02-19 Theodore Ts'o * Makefile.in (DLL_FILE_DEF): Tell the Makefile template that we diff --git a/src/lib/gssapi/krb5/Makefile.in b/src/lib/gssapi/krb5/Makefile.in index ad8aa1d47..b1bfc1d5c 100644 --- a/src/lib/gssapi/krb5/Makefile.in +++ b/src/lib/gssapi/krb5/Makefile.in @@ -51,6 +51,7 @@ SRCS = \ $(srcdir)/rel_name.c \ $(srcdir)/seal.c \ $(srcdir)/ser_sctx.c \ + $(srcdir)/set_ccache.c \ $(srcdir)/sign.c \ $(srcdir)/unseal.c \ $(srcdir)/util_cksum.c \ @@ -98,6 +99,7 @@ OBJS = \ rel_name.$(OBJEXT) \ seal.$(OBJEXT) \ ser_sctx.$(OBJEXT) \ + set_ccache.$(OBJEXT) \ sign.$(OBJEXT) \ unseal.$(OBJEXT) \ util_cksum.$(OBJEXT) \ diff --git a/src/lib/gssapi/krb5/set_ccache.c b/src/lib/gssapi/krb5/set_ccache.c new file mode 100644 index 000000000..a643ed6d0 --- /dev/null +++ b/src/lib/gssapi/krb5/set_ccache.c @@ -0,0 +1,25 @@ +#include "gssapiP_krb5.h" + +OM_uint32 +gss_krb5_ccache_name(minor_status, name, out_name) + OM_uint32 *minor_status; + const char *name, const char **out_name; +{ + if (GSS_ERROR(kg_get_context(minor_status, &context))) + return (GSS_S_FAILURE); + + if (out_name) + *out_name = krb5_cc_default_name(context); + if (name) { + retval = krb5_cc_set_default_name(context, name); + if (retval) { + *minor_status = retval; + return GSS_S_FAILURE; + } + } + return GSS_S_SUCCESS; +} + + + +