krb5: decorate PrincipalNameAttrs with krb5_pac

Add krb5_pac to PrincipalNameAttrs to avoid needing to re-parse it each time
gss_get_name_attribute() is called.
This commit is contained in:
Luke Howard
2022-01-07 11:32:28 +11:00
parent 0e8c4ccc6e
commit 5a952ee7b5
5 changed files with 135 additions and 50 deletions

View File

@@ -1080,9 +1080,11 @@ krb5_rd_req_ctx(krb5_context context,
} else if (ret2 != ENOENT)
ret = ret2;
}
krb5_pac_free(context, pac);
if (ret)
if (ret) {
krb5_pac_free(context, pac);
goto out;
}
o->ticket->client->nameattrs->pac = pac;
} else
ret = 0;
}