From: kouril Date: Sat, 9 Sep 2006 08:01:03 +0000 (+0000) Subject: Use krb5_rc_resolve_full() to detect the "none" rcache type. The previous code was... X-Git-Tag: v5.2~3 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mod_auth_kerb.cvs%2F.git;a=commitdiff_plain;h=dda1d7e4425e0aac9bc01c3b59adcdbbf4475ceb Use krb5_rc_resolve_full() to detect the "none" rcache type. The previous code was based on an internal function using non-public data structure. --- diff --git a/src/mod_auth_kerb.c b/src/mod_auth_kerb.c index 71ce099..880b6ea 100644 --- a/src/mod_auth_kerb.c +++ b/src/mod_auth_kerb.c @@ -1554,18 +1554,18 @@ have_rcache_type(const char *type) { krb5_error_code ret; krb5_context context; - krb5_rcache id; + krb5_rcache id = NULL; int found; - memset(&id, 0, sizeof(id)); - ret = krb5_init_context(&context); if (ret) return 0; - ret = krb5_rc_resolve_type(context, &id, type); + ret = krb5_rc_resolve_full(context, &id, "none:"); found = (ret == 0); + if (ret == 0) + krb5_rc_destroy(context, id); krb5_free_context(context); return found;