mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:kdc: Add function to get device PAC entry from Heimdal request structure
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
79b33eeacc
commit
bad7a3fcea
@ -66,3 +66,27 @@ int kdc_check_pac(krb5_context context,
|
||||
return check_pac_checksum(srv_sig, kdc_sig,
|
||||
context, &keyblock);
|
||||
}
|
||||
|
||||
struct samba_kdc_entry_pac samba_kdc_get_device_pac(const astgs_request_t r)
|
||||
{
|
||||
const hdb_entry *device = kdc_request_get_armor_client(r);
|
||||
struct samba_kdc_entry *device_skdc_entry = NULL;
|
||||
const hdb_entry *device_krbtgt = NULL;
|
||||
const struct samba_kdc_entry *device_krbtgt_skdc_entry = NULL;
|
||||
const krb5_const_pac device_pac = kdc_request_get_armor_pac(r);
|
||||
|
||||
if (device != NULL) {
|
||||
device_skdc_entry = talloc_get_type_abort(device->context,
|
||||
struct samba_kdc_entry);
|
||||
|
||||
device_krbtgt = kdc_request_get_armor_server(r);
|
||||
if (device_krbtgt != NULL) {
|
||||
device_krbtgt_skdc_entry = talloc_get_type_abort(device_krbtgt->context,
|
||||
struct samba_kdc_entry);
|
||||
}
|
||||
}
|
||||
|
||||
return samba_kdc_entry_pac(device_pac,
|
||||
device_skdc_entry,
|
||||
samba_kdc_entry_is_trust(device_krbtgt_skdc_entry));
|
||||
}
|
||||
|
@ -56,4 +56,7 @@ int kdc_check_pac(krb5_context krb5_context,
|
||||
DATA_BLOB server_sig,
|
||||
struct PAC_SIGNATURE_DATA *kdc_sig,
|
||||
hdb_entry *ent);
|
||||
|
||||
struct samba_kdc_entry_pac samba_kdc_get_device_pac(const astgs_request_t r);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user