]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: only pass sdb_entry to samba_kdc_message2entry_keys()
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Mar 2022 02:16:32 +0000 (03:16 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 24 Mar 2022 09:19:33 +0000 (09:19 +0000)
sdb_entry_ex will be removed as it just contains sdb_entry.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/db-glue.c

index dfe9308e9fd0fb8d6a494fd94f05f2039c385f99..249d7049930a7ea781e3ba2bee0a7f046ddb54e6 100644 (file)
@@ -588,11 +588,10 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
                                                    bool is_rodc,
                                                    uint32_t userAccountControl,
                                                    enum samba_kdc_ent_type ent_type,
-                                                   struct sdb_entry_ex *entry_ex,
+                                                   struct sdb_entry *entry,
                                                    bool is_protected,
                                                    uint32_t *supported_enctypes_out)
 {
-       struct sdb_entry *entry = &entry_ex->entry;
        krb5_error_code ret = 0;
        enum ndr_err_code ndr_err;
        struct samr_Password *hash;
@@ -888,6 +887,7 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
                                               struct ldb_message *msg,
                                               struct sdb_entry_ex *entry_ex)
 {
+       struct sdb_entry *entry = &entry_ex->entry;
        struct loadparm_context *lp_ctx = kdc_db_ctx->lp_ctx;
        uint32_t userAccountControl;
        uint32_t msDS_User_Account_Control_Computed;
@@ -1311,7 +1311,8 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
        /* Get keys from the db */
        ret = samba_kdc_message2entry_keys(context, kdc_db_ctx, p, msg,
                                           rid, is_rodc, userAccountControl,
-                                          ent_type, entry_ex, protected_user, &supported_enctypes);
+                                          ent_type, entry,
+                                          protected_user, &supported_enctypes);
        if (ret) {
                /* Could be bogus data in the entry, or out of memory */
                goto out;