Clean up provision and rootdse module to hard-code less stuff.
[samba.git] / source4 / dsdb / samdb / ldb_modules / rootdse.c
index 3235b24ef90a4ce71dc4f0de67b1f1c0f2dc14c5..50f333d09572bfd6d70150641f748ff5be174531 100644 (file)
@@ -26,6 +26,7 @@
 #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;
@@ -202,6 +203,13 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
                }
        }
 
+       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;