krb5 commit [krb5-1.13]: Make krb5_cc_new_unique create DIR: directories
Tom Yu
tlyu at MIT.EDU
Tue Aug 12 18:23:15 EDT 2014
https://github.com/krb5/krb5/commit/f678ea7b849248d678b9369edfc124b0589e6eb4
commit f678ea7b849248d678b9369edfc124b0589e6eb4
Author: Nalin Dahyabhai <nalin at redhat.com>
Date: Fri Aug 8 16:58:03 2014 -0400
Make krb5_cc_new_unique create DIR: directories
When we use krb5_cc_new_unique to create a new cache in a directory
cache collection, we will fail if the directory doesn't exist yet.
Go ahead and preemptively create it, as we do during krb5_cc_resolve,
before attempting to create a new file under it.
(cherry picked from commit bca1191210eb582fe09e94486e2631d72b8a5ca5)
ticket: 7988
version_fixed: 1.13
status: resolved
src/lib/krb5/ccache/cc_dir.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/lib/krb5/ccache/cc_dir.c b/src/lib/krb5/ccache/cc_dir.c
index d82f335..b00a6bb 100644
--- a/src/lib/krb5/ccache/cc_dir.c
+++ b/src/lib/krb5/ccache/cc_dir.c
@@ -401,6 +401,9 @@ dcc_gen_new(krb5_context context, krb5_ccache *cache_out)
"is not a directory collection"));
return KRB5_DCC_CANNOT_CREATE;
}
+ ret = verify_dir(context, dirname);
+ if (ret)
+ goto cleanup;
ret = k5_path_join(dirname, "tktXXXXXX", &template);
if (ret)
goto cleanup;
More information about the cvs-krb5
mailing list