From 551f54e0d70e6daf96d40c8e23f44146b35c0220 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 26 Feb 2018 13:21:54 +0100 Subject: [PATCH] dsdb:extended_dn_store: pass the full 'struct dsdb_attribute' to extended_store_replace() BUG: https://bugzilla.samba.org/show_bug.cgi?id=13307 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source4/dsdb/samdb/ldb_modules/extended_dn_store.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c index 47bce532b14..119b217f5f6 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c @@ -221,8 +221,9 @@ static int extended_store_replace(struct extended_dn_context *ac, TALLOC_CTX *callback_mem_ctx, struct ldb_val *plain_dn, bool is_delete, - const char *oid) + const struct dsdb_attribute *schema_attr) { + const char *oid = schema_attr->syntax->ldap_oid; int ret; struct extended_dn_replace_list *os; static const char *attrs[] = { @@ -353,7 +354,7 @@ static int extended_dn_add(struct ldb_module *module, struct ldb_request *req) el = &ac->new_req->op.add.message->elements[i]; for (j = 0; j < el->num_values; j++) { ret = extended_store_replace(ac, ac->new_req, &el->values[j], - false, schema_attr->syntax->ldap_oid); + false, schema_attr); if (ret != LDB_SUCCESS) { return ret; } @@ -449,7 +450,7 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req bool is_delete = (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_DELETE); ret = extended_store_replace(ac, ac->new_req, &el->values[j], - is_delete, schema_attr->syntax->ldap_oid); + is_delete, schema_attr); if (ret != LDB_SUCCESS) { talloc_free(ac); return ret; -- 2.34.1