diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/heimdal/lib/krb5/pac.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/heimdal/lib/krb5/pac.c b/source4/heimdal/lib/krb5/pac.c index 5bc7235459..283759c98b 100644 --- a/source4/heimdal/lib/krb5/pac.c +++ b/source4/heimdal/lib/krb5/pac.c @@ -850,12 +850,12 @@ _krb5_pac_sign(krb5_context context, krb5_data_zero(&logon); + if (p->logon_name == NULL) + num++; if (p->server_checksum == NULL) num++; if (p->privsvr_checksum == NULL) num++; - if (p->logon_name == NULL) - num++; if (num) { void *ptr; @@ -867,6 +867,11 @@ _krb5_pac_sign(krb5_context context, } p->pac = ptr; + if (p->logon_name == NULL) { + p->logon_name = &p->pac->buffers[p->pac->numbuffers++]; + memset(p->logon_name, 0, sizeof(*p->logon_name)); + p->logon_name->type = PAC_LOGON_NAME; + } if (p->server_checksum == NULL) { p->server_checksum = &p->pac->buffers[p->pac->numbuffers++]; memset(p->server_checksum, 0, sizeof(*p->server_checksum)); @@ -877,11 +882,6 @@ _krb5_pac_sign(krb5_context context, memset(p->privsvr_checksum, 0, sizeof(*p->privsvr_checksum)); p->privsvr_checksum->type = PAC_PRIVSVR_CHECKSUM; } - if (p->logon_name == NULL) { - p->logon_name = &p->pac->buffers[p->pac->numbuffers++]; - memset(p->logon_name, 0, sizeof(*p->logon_name)); - p->logon_name->type = PAC_LOGON_NAME; - } } /* Calculate LOGON NAME */ |