From: Andrew Bartlett Date: Fri, 19 Dec 2014 01:41:40 +0000 (+1300) Subject: dsdb: Use a fixed set of attributes in search in dns_notify module X-Git-Url: http://git.samba.org/?p=obnox%2Fsamba%2Fsamba-obnox.git;a=commitdiff_plain;h=bb886401e8b1c991684c0b9d855b976728e44f13 dsdb: Use a fixed set of attributes in search in dns_notify module Pair-programmed-with: Garming Sam Signed-off-by: Garming Sam Signed-off-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/dns_notify.c b/source4/dsdb/samdb/ldb_modules/dns_notify.c index 2d3ed86163b..bee6a6e1d04 100644 --- a/source4/dsdb/samdb/ldb_modules/dns_notify.c +++ b/source4/dsdb/samdb/ldb_modules/dns_notify.c @@ -180,6 +180,7 @@ static int dns_notify_modify(struct ldb_module *module, struct ldb_request *req) struct ldb_result *res; struct dsdb_schema *schema; const struct dsdb_class *objectclass; + const char * const attrs[] = { "objectClass", NULL }; int ret; if (ldb_dn_is_special(req->op.mod.message->dn)) { @@ -206,7 +207,7 @@ static int dns_notify_modify(struct ldb_module *module, struct ldb_request *req) if (ldb_dn_compare_base(w->dn, req->op.add.message->dn) == 0) { dn = ldb_dn_copy(tmp_ctx, req->op.mod.message->dn); - ret = dsdb_module_search_dn(module, tmp_ctx, &res, dn, NULL, + ret = dsdb_module_search_dn(module, tmp_ctx, &res, dn, attrs, DSDB_FLAG_NEXT_MODULE | DSDB_SEARCH_SHOW_RECYCLED | DSDB_SEARCH_REVEAL_INTERNALS | @@ -254,6 +255,7 @@ static int dns_notify_delete(struct ldb_module *module, struct ldb_request *req) struct ldb_result *res; struct dsdb_schema *schema; const struct dsdb_class *objectclass; + const char * const attrs[] = { "objectClass", NULL }; int ret; if (ldb_dn_is_special(req->op.del.dn)) { @@ -279,7 +281,7 @@ static int dns_notify_delete(struct ldb_module *module, struct ldb_request *req) for (w = data->watched; w; w = w->next) { if (ldb_dn_compare_base(w->dn, req->op.add.message->dn) == 0) { old_dn = ldb_dn_copy(tmp_ctx, req->op.del.dn); - ret = dsdb_module_search_dn(module, tmp_ctx, &res, old_dn, NULL, + ret = dsdb_module_search_dn(module, tmp_ctx, &res, old_dn, attrs, DSDB_FLAG_NEXT_MODULE | DSDB_SEARCH_SHOW_RECYCLED | DSDB_SEARCH_REVEAL_INTERNALS |