]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb: Make argument order of dsdb_update_gmsa_{entry_,}keys() consistant with other...
authorAndrew Bartlett <abartlet@samba.org>
Tue, 23 Apr 2024 04:17:04 +0000 (16:17 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 10 Jun 2024 04:27:30 +0000 (04:27 +0000)
Other functions in this file are TALLOC_CTX, struct ldb_context *, not
the other way around.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
source4/dsdb/common/util.c
source4/dsdb/gmsa/util.c
source4/dsdb/gmsa/util.h
source4/ldap_server/ldap_backend.c

index 01fb1dd4df6105e87809f2dd678c619a7325e248..38cd30c47dca4cd35679c4f1b0041df3e6c7a2de 100644 (file)
@@ -5755,7 +5755,7 @@ int dsdb_search(struct ldb_context *ldb,
                 * • whenCreated
                 */
 
-               ret = dsdb_update_gmsa_keys(ldb, tmp_ctx, res, &retry);
+               ret = dsdb_update_gmsa_keys(tmp_ctx, ldb, res, &retry);
                if (ret) {
                        talloc_free(tmp_ctx);
                        return ret;
index b0a0691ae1c7769d74c00c629c513c73adffcc3f..bda64bdc77ab3c47ba0246c1cb89ed984e518e1a 100644 (file)
@@ -1529,8 +1529,8 @@ static bool dsdb_data_blobs_equal(const DATA_BLOB *d1, const DATA_BLOB *d2)
        }
 }
 
-int dsdb_update_gmsa_entry_keys(struct ldb_context *ldb,
-                               TALLOC_CTX *mem_ctx,
+int dsdb_update_gmsa_entry_keys(TALLOC_CTX *mem_ctx,
+                               struct ldb_context *ldb,
                                const struct gmsa_update *gmsa_update)
 {
        TALLOC_CTX *tmp_ctx = NULL;
@@ -1650,8 +1650,8 @@ out:
        return ret;
 }
 
-int dsdb_update_gmsa_keys(struct ldb_context *ldb,
-                         TALLOC_CTX *mem_ctx,
+int dsdb_update_gmsa_keys(TALLOC_CTX *mem_ctx,
+                         struct ldb_context *ldb,
                          const struct ldb_result *res,
                          bool *retry_out)
 {
@@ -1750,7 +1750,9 @@ int dsdb_update_gmsa_keys(struct ldb_context *ldb,
                        continue;
                }
 
-               ret = dsdb_update_gmsa_entry_keys(ldb, tmp_ctx, gmsa_update);
+               ret = dsdb_update_gmsa_entry_keys(tmp_ctx,
+                                                 ldb,
+                                                 gmsa_update);
                if (ret) {
                        goto out;
                }
index 0db77a521d454be5c0d466c4dd42fc357963b601..f97841c25733b1e9ee170a82b0e9eb1a5996f303 100644 (file)
@@ -118,12 +118,12 @@ int gmsa_recalculate_managed_pwd(TALLOC_CTX *mem_ctx,
                                 struct gmsa_update **update_out,
                                 struct gmsa_return_pwd *return_out);
 
-int dsdb_update_gmsa_entry_keys(struct ldb_context *ldb,
-                               TALLOC_CTX *mem_ctx,
+int dsdb_update_gmsa_entry_keys(TALLOC_CTX *mem_ctx,
+                               struct ldb_context *ldb,
                                const struct gmsa_update *gmsa_update);
 
-int dsdb_update_gmsa_keys(struct ldb_context *ldb,
-                         TALLOC_CTX *mem_ctx,
+int dsdb_update_gmsa_keys(TALLOC_CTX *mem_ctx,
+                         struct ldb_context *ldb,
                          const struct ldb_result *res,
                          bool *retry_out);
 
index cb033e823b45772d4b21684be529fcf4c97a30c8..3aa7ac3821207e218781e3ed61141bc799c85894 100644 (file)
@@ -956,8 +956,9 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
                for (n = 0; n < len; ++n) {
                        int ret;
 
-                       ret = dsdb_update_gmsa_entry_keys(
-                               samdb, local_ctx, callback_ctx->updates[n]);
+                       ret = dsdb_update_gmsa_entry_keys(local_ctx,
+                                                         samdb,
+                                                         callback_ctx->updates[n]);
                        if (ret) {
                                /* Ignore the error. */
                                DBG_WARNING("Failed to update keys for Group "