From: Joseph Sutton Date: Fri, 29 Sep 2023 07:11:52 +0000 (+1300) Subject: s4:kdc: Add function to determine whether a KDC entry represents a trust X-Git-Tag: tevent-0.16.0~258 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79b33eeaccb2f352924ad1f96483f87bb01c14b6;p=thirdparty%2Fsamba.git s4:kdc: Add function to determine whether a KDC entry represents a trust Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c index febc38f9403..c122a9b46c5 100644 --- a/source4/kdc/pac-glue.c +++ b/source4/kdc/pac-glue.c @@ -854,6 +854,11 @@ NTSTATUS samba_kdc_add_compounded_auth(enum samba_compounded_auth compounded_aut return NT_STATUS_INVALID_PARAMETER; } +bool samba_kdc_entry_is_trust(const struct samba_kdc_entry *entry) +{ + return entry != NULL && entry->is_trust; +} + /* * Return true if this entry has an associated PAC issued or signed by a KDC * that our KDC trusts. We trust the main krbtgt account, but we don’t trust any diff --git a/source4/kdc/pac-glue.h b/source4/kdc/pac-glue.h index e52a6711a9a..01d6290e428 100644 --- a/source4/kdc/pac-glue.h +++ b/source4/kdc/pac-glue.h @@ -57,6 +57,8 @@ enum { SAMBA_KDC_FLAG_DELEGATED_PROXY_IS_TRUSTED = 0x00000040, }; +bool samba_kdc_entry_is_trust(const struct samba_kdc_entry *entry); + struct samba_kdc_entry_pac { struct samba_kdc_entry *entry; krb5_const_pac pac; /* NULL indicates that no PAC is present. */