s4:kdc: Add NTSTATUS e-data to KDC reply
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 17 May 2023 03:47:18 +0000 (15:47 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 18 May 2023 04:53:30 +0000 (04:53 +0000)
commit637fd961bd359c3ca30e21ebae731ead5cfbc673
treefd6669f67397c90bfce1095fdd7921c1fd7bbe33
parent90436389b8118d6c31e5e307036cc84796e60b1e
s4:kdc: Add NTSTATUS e-data to KDC reply

If an NTSTATUS code has been set in the KDC request structure, encode it
as KERB-ERROR-DATA and add it to the KDC reply.

hdb_samba4_set_ntstatus() adds the NTSTATUS code to the request
structure.

hdb_samba4_get_ntstatus() gets that status code back from the request
structure.

hdb_samba4_set_edata_from_ntstatus() encodes the status code and adds it
to the reply.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail_heimdal_kdc
source4/kdc/hdb-samba4.c
source4/kdc/wdc-samba4.c
source4/selftest/tests.py