Skip to content

Commit

Permalink
Set princ type to NT-SMTP-NAME when parsing
Browse files Browse the repository at this point in the history
In krb5_parse_name_flags(), if the principal name is not an enterprise
name, is one component in length and contains an '@', set the principal
type to NT-SMTP-NAME as specified by RFC 4120.
  • Loading branch information
jaltman authored and nicowilliams committed Nov 15, 2016
1 parent 6a1db3f commit 961f543
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/krb5/principal.c
Expand Up @@ -73,6 +73,8 @@ set_default_princ_type(krb5_principal p, NAME_TYPE defnt)
else if (princ_num_comp(p) == 2 &&
strcmp(princ_ncomp(p, 0), KRB5_WELLKNOWN_NAME) == 0)
princ_type(p) = KRB5_NT_WELLKNOWN;
else if (princ_num_comp(p) == 1 && strchr(princ_ncomp(p, 0), '@') != NULL)
princ_type(p) = KRB5_NT_SMTP_NAME;
else
princ_type(p) = defnt;
return 0;
Expand Down

0 comments on commit 961f543

Please sign in to comment.