From 76d0193bf3cc12fde1ce454a17a334d97b4533f3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 15 Nov 2006 17:35:24 +0000 Subject: r19726: when a client explicit asks for the 'netlogon' attriubute on LDAP the result entry is skipped! metze (This used to be commit 62aa73f3d56596780fc82fecbc99c688ecbf5b08) --- source4/dsdb/samdb/ldb_modules/rootdse.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4') diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index c174ac65a1..371031be26 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -151,6 +151,15 @@ static int rootdse_callback(struct ldb_context *ldb, void *context, struct ldb_r ac = talloc_get_type(context, struct rootdse_context); if (ares->type == LDB_REPLY_ENTRY) { + /* + * if the client explicit asks for the 'netlogon' attribute + * the reply_entry needs to be skipped + */ + if (ac->attrs && ldb_attr_in_list(ac->attrs, "netlogon")) { + talloc_free(ares); + return LDB_SUCCESS; + } + /* for each record returned post-process to add any dynamic attributes that have been asked for */ if (rootdse_add_dynamic(ac->module, ares->message, ac->attrs) != LDB_SUCCESS) { -- cgit