diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 9ae894d..75557ec 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -90,6 +90,22 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms } } + if (do_attribute(attrs, "SupportedCapabilities")) { + int i = 0; + while (list_capability[i] != NULL) { + + char *capa = talloc_strdup(msg, list_capability[i]); + if (!capa) { + goto failed; + } + if (ldb_msg_add_steal_string(msg, "SupportedCapabilities", + capa) != 0) { + goto failed; + } + i++; + } + } + if (do_attribute(attrs, "namingContexts")) { int i; for (i = 0; i < priv->num_partitions; i++) { diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h index 49dc14d..5d0b9f7 100644 --- a/source4/dsdb/samdb/samdb.h +++ b/source4/dsdb/samdb/samdb.h @@ -40,6 +40,15 @@ struct tevent_context; #include "dsdb/common/proto.h" #include "dsdb/common/flags.h" +#define LDAP_CAP_ACTIVE_DIRECTORY_OID "1.2.840.113556.1.4.800" +#define LDAP_CAP_ACTIVE_DIRECTORY_V51_OID "1.2.840.113556.1.4.1670" +#define LDAP_CAP_ACTIVE_DIRECTORY_LDAP_INTEG_OID "1.2.840.113556.1.4.1791" + +char* list_capability[] = {LDAP_CAP_ACTIVE_DIRECTORY_OID, + LDAP_CAP_ACTIVE_DIRECTORY_V51_OID, + LDAP_CAP_ACTIVE_DIRECTORY_LDAP_INTEG_OID, + NULL}; + #define DSDB_CONTROL_CURRENT_PARTITION_OID "1.3.6.1.4.1.7165.4.3.2" struct dsdb_control_current_partition { /*