From: Andrew Bartlett Date: Wed, 31 May 2023 02:29:57 +0000 (+1200) Subject: dsdb: Indicate in rootdse.c why samdb_ntds_settings_dn() is not used X-Git-Tag: talloc-2.4.1~411 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4919e8d8088d80a8a708df5033b22a07eab6f03b;p=thirdparty%2Fsamba.git dsdb: Indicate in rootdse.c why samdb_ntds_settings_dn() is not used Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 865a43256d8..e4f8f83fca7 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -1078,8 +1078,14 @@ static int rootdse_init(struct ldb_module *module) } } - /* For now, our own server's location in the DB is recorded in - * the @ROOTDSE record */ + + /* + * For now, our own server's location in the DB is recorded in + * the @ROOTDSE record + * + * We can't call samdb_ntds_settings_dn() in the rootdse, as + * that routine used the rootdse result! + */ ret = dsdb_module_search(module, mem_ctx, &res, ldb_dn_new(mem_ctx, ldb, "@ROOTDSE"), LDB_SCOPE_BASE, ds_attrs,