Skip to content

Commit

Permalink
s4:kdc: Explicitly initialize SDBFlags structures
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
  • Loading branch information
jsutton24 authored and abartlet committed Oct 17, 2023
1 parent 9fcace5 commit 7405a8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source4/kdc/db-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static time_t ldb_msg_find_krb5time_ldap_time(struct ldb_message *msg, const cha

static struct SDBFlags uf2SDBFlags(krb5_context context, uint32_t userAccountControl, enum samba_kdc_ent_type ent_type)
{
struct SDBFlags flags = int2SDBFlags(0);
struct SDBFlags flags = {};

/* we don't allow kadmin deletes */
flags.immutable = 1;
Expand Down Expand Up @@ -2172,7 +2172,7 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
entry->keys.len++;
}

entry->flags = int2SDBFlags(0);
entry->flags = (struct SDBFlags) {};
entry->flags.immutable = 1;
entry->flags.invalid = 0;
entry->flags.server = 1;
Expand Down

0 comments on commit 7405a8f

Please sign in to comment.