svn rev #23874: trunk/src/ include/krb5/ lib/krb5/ccache/

ghudson@MIT.EDU ghudson at MIT.EDU
Thu Apr 8 12:39:31 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23874
Commit By: ghudson
Log Message:
Add krb5_cc_dup() to make it possible to copy ccache handles.



Changed Files:
U   trunk/src/include/krb5/krb5.hin
U   trunk/src/lib/krb5/ccache/ccbase.c
Modified: trunk/src/include/krb5/krb5.hin
===================================================================
--- trunk/src/include/krb5/krb5.hin	2010-04-08 14:54:20 UTC (rev 23873)
+++ trunk/src/include/krb5/krb5.hin	2010-04-08 16:39:31 UTC (rev 23874)
@@ -1850,6 +1850,13 @@
 krb5_error_code KRB5_CALLCONV
 krb5_cc_resolve(krb5_context, const char *, krb5_ccache *);
 
+/**
+ * Create a new handle referring to the same cache as @a in.
+ * The new handle and @a in can be closed independently.
+ */
+krb5_error_code KRB5_CALLCONV
+krb5_cc_dup(krb5_context context, krb5_ccache in, krb5_ccache *out);
+
 const char *KRB5_CALLCONV
 krb5_cc_default_name(krb5_context);
 

Modified: trunk/src/lib/krb5/ccache/ccbase.c
===================================================================
--- trunk/src/lib/krb5/ccache/ccbase.c	2010-04-08 14:54:20 UTC (rev 23873)
+++ trunk/src/lib/krb5/ccache/ccbase.c	2010-04-08 16:39:31 UTC (rev 23874)
@@ -238,6 +238,12 @@
     return ops->resolve(context, cache, resid);
 }
 
+krb5_error_code KRB5_CALLCONV
+krb5_cc_dup(krb5_context context, krb5_ccache in, krb5_ccache *out)
+{
+    return in->ops->resolve(context, out, in->ops->get_name(context, in));
+}
+
 /*
  * cc_getops
  *




More information about the cvs-krb5 mailing list