mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
Update krb-types.pac
KerberosString formatting for principal name to be compliant with RFC 4120 section 5.2.2, which states that there can be a few components (and in practice we have seen 3, more than the 1 or 2 that is typical)
This commit is contained in:
parent
7b44974a58
commit
4b4ccabd70
1 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,8 @@ Val* GetStringFromPrincipalName(const KRB_Principal_Name* pname)
|
|||
return bytestring_to_val(pname->data()[0][0]->encoding()->content());
|
||||
if ( pname->data()->size() == 2 )
|
||||
return new StringVal(fmt("%s/%s", (char *) pname->data()[0][0]->encoding()->content().begin(), (char *)pname->data()[0][1]->encoding()->content().begin()));
|
||||
if ( pname->data()->size() == 3 ) # if the name-string has a third value, this will just append it, else this will return unkown as the principal name
|
||||
return new StringVal(fmt("%s/%s/%s", (char *) pname->data()[0][0]->encoding()->content().begin(), (char *)pname->data()[0][1]->encoding()->content().begin(), (char *)pname->data()[0][2]->encoding()->content().begin()));
|
||||
|
||||
return new StringVal("unknown");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue