make sure h is set at when we find a match, from [GITHUB #54]

This commit is contained in:
Love Hörnquist Åstrand
2014-01-31 08:45:29 +01:00
parent b7d384392b
commit d8d0e659ce

View File

@@ -391,10 +391,12 @@ struct cb_s {
static krb5_error_code KRB5_LIB_CALL
callback(krb5_context context, const void *plug, void *plugctx, void *userctx)
{
const struct hdb_method *h = (const struct hdb_method *)plug;
struct cb_s *cb_ctx = (struct cb_s *)userctx;
if (strncmp (cb_ctx->filename, cb_ctx->h->prefix, strlen(cb_ctx->h->prefix)) == 0) {
cb_ctx->residual = cb_ctx->filename + strlen(cb_ctx->h->prefix);
if (strncmp(cb_ctx->filename, h->prefix, strlen(h->prefix)) == 0) {
cb_ctx->residual = cb_ctx->filename + strlen(h->prefix);
cb_ctx->h = h;
return 0;
}
return KRB5_PLUGIN_NO_HANDLE;