diff options
Diffstat (limited to 'src/lib/krb5/krb/sname_match.c')
-rw-r--r-- | src/lib/krb5/krb/sname_match.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/sname_match.c b/src/lib/krb5/krb/sname_match.c index 9520dfc..55a4b7d 100644 --- a/src/lib/krb5/krb/sname_match.c +++ b/src/lib/krb5/krb/sname_match.c @@ -25,6 +25,7 @@ */ #include "k5-int.h" +#include "int-proto.h" krb5_boolean KRB5_CALLCONV krb5_sname_match(krb5_context context, krb5_const_principal matching, @@ -55,3 +56,15 @@ krb5_sname_match(krb5_context context, krb5_const_principal matching, /* All elements match. */ return TRUE; } + +krb5_boolean +k5_sname_wildcard_host(krb5_context context, krb5_const_principal mprinc) +{ + if (mprinc == NULL) + return TRUE; + + if (mprinc->type != KRB5_NT_SRV_HST || mprinc->length != 2) + return FALSE; + + return context->ignore_acceptor_hostname || mprinc->data[1].length == 0; +} |