s4-dsdb: Add mem_ctx argument to samdb_ntds_settings_dn
[kai/samba.git] / source4 / rpc_server / drsuapi / getncchanges.c
index 07e64d321de4a1539eb6b6cdb2ca79585d9488b6..22ff6142ebfcaf9a70c5c2a6e9760f55407854d4 100644 (file)
@@ -723,7 +723,7 @@ static WERROR getncchanges_rid_alloc(struct drsuapi_bind_state *b_state,
                return WERR_DS_DRA_INTERNAL_ERROR;
        }
 
-       if (ldb_dn_compare(samdb_ntds_settings_dn(ldb), fsmo_role_dn) != 0) {
+       if (ldb_dn_compare(samdb_ntds_settings_dn(ldb, mem_ctx), fsmo_role_dn) != 0) {
                /* we're not the RID Manager - go away */
                DEBUG(0,(__location__ ": RID Alloc request when not RID Manager\n"));
                ctr6->extended_ret = DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER;
@@ -1064,7 +1064,7 @@ static WERROR getncchanges_change_master(struct drsuapi_bind_state *b_state,
                return WERR_DS_DRA_INTERNAL_ERROR;
        }
 
-       if (ldb_dn_compare(samdb_ntds_settings_dn(ldb), fsmo_role_dn) != 0) {
+       if (ldb_dn_compare(samdb_ntds_settings_dn(ldb, mem_ctx), fsmo_role_dn) != 0) {
                /* we're not the current owner - go away */
                DEBUG(0,(__location__ ": FSMO transfer request when not owner\n"));
                ctr6->extended_ret = DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER;