#include "lib/ldb/include/ldb_private.h"
#include "system/time.h"
#include "dsdb/samdb/samdb.h"
+#include "version.h"
struct private_data {
int num_controls;
}
}
+ if (schema && do_attribute_explicit(attrs, "vendorVersion")) {
+ if (ldb_msg_add_fmt(msg, "vendorVersion",
+ "%s", SAMBA_VERSION_STRING) != 0) {
+ goto failed;
+ }
+ }
+
/* TODO: lots more dynamic attributes should be added here */
return LDB_SUCCESS;
}
down_req->operation = req->operation;
- /* in our db we store the rootDSE with a DN of cn=rootDSE */
- down_req->op.search.base = ldb_dn_new(down_req, module->ldb, "cn=rootDSE");
+ /* in our db we store the rootDSE with a DN of @ROOTDSE */
+ down_req->op.search.base = ldb_dn_new(down_req, module->ldb, "@ROOTDSE");
down_req->op.search.scope = LDB_SCOPE_BASE;
down_req->op.search.tree = ldb_parse_tree(down_req, NULL);
if (down_req->op.search.base == NULL || down_req->op.search.tree == NULL) {
return ldb_next_init(module);
}
-static const struct ldb_module_ops rootdse_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_rootdse_module_ops = {
.name = "rootdse",
.init_context = rootdse_init,
.search = rootdse_search,
.request = rootdse_request
};
-
-int rootdse_module_init(void)
-{
- return ldb_register_module(&rootdse_ops);
-}
-