summaryrefslogtreecommitdiff
path: root/source3/lib/tldap_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/tldap_util.c')
-rw-r--r--source3/lib/tldap_util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c
index e217cccd0b..5f85e7a113 100644
--- a/source3/lib/tldap_util.c
+++ b/source3/lib/tldap_util.c
@@ -527,3 +527,14 @@ bool tldap_entry_has_attrvalue(struct tldap_message *msg,
}
return false;
}
+
+bool tldap_supports_control(struct tldap_context *ld, const char *oid)
+{
+ struct tldap_message *rootdse = tldap_rootdse(ld);
+
+ if (rootdse == NULL) {
+ return false;
+ }
+ return tldap_entry_has_attrvalue(rootdse, "supportedControl",
+ data_blob_const(oid, strlen(oid)));
+}