1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:kdc: Add helper functions to create optional int64 values

These values will be used to represent TGT lifetimes, which might or
might not be present.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-06-15 10:18:38 +12:00 committed by Andrew Bartlett
parent b142983069
commit 9585bf9bb7

View File

@ -64,4 +64,19 @@ struct authn_audit_info {
struct authn_int64_optional tgt_lifetime_raw; struct authn_int64_optional tgt_lifetime_raw;
}; };
static inline struct authn_int64_optional authn_int64_some(const int64_t val)
{
return (struct authn_int64_optional) {
.is_present = true,
.val = val,
};
}
static inline struct authn_int64_optional authn_int64_none(void)
{
return (struct authn_int64_optional) {
.is_present = false,
};
}
#endif #endif