* gssapi_krb5.c (kg_get_ccache_name): Make a copy of the default ccache name,
authorKen Raeburn <raeburn@mit.edu>
Wed, 28 Jul 2004 23:48:05 +0000 (23:48 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 28 Jul 2004 23:48:05 +0000 (23:48 +0000)
because calling krb5_free_context will destroy it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16627 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/ChangeLog
src/lib/gssapi/krb5/gssapi_krb5.c

index 075416d15440ebd112b5b57f2e1fa4096955c115..e18658f3a7dfeb28b3c08b348356744cf44b8bee 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-28  Ken Raeburn  <raeburn@mit.edu>
+
+       * gssapi_krb5.c (kg_get_ccache_name): Make a copy of the default
+       ccache name, because calling krb5_free_context will destroy it.
+
 2004-07-14  Ken Raeburn  <raeburn@mit.edu>
 
        * gssapi_krb5.c (kg_sync_ccache_name): Add context argument
index b19f1a73f789cb912f6eafc881cc94c40165b6cd..de5f50c2446576272b1febba8b4251ccee2c2af3 100644 (file)
@@ -189,8 +189,10 @@ kg_get_ccache_name (OM_uint32 *minor_status, const char **out_name)
            err = krb5_init_context(&context);
            if (!err)
                err = krb5_cc_set_default_name (context, NULL);
-            if (!err)
+            if (!err) {
                 name = krb5_cc_default_name(context);
+               name = strdup(name);
+           }
            if (context)
                krb5_free_context(context);
         }