summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap.c')
-rw-r--r--src/providers/ldap/sdap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index cfcaff095..4d911c458 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -432,3 +432,21 @@ int build_attrs_from_map(TALLOC_CTX *memctx,
return EOK;
}
+int sdap_control_create(struct sdap_handle *sh, const char *oid, int iscritical,
+ struct berval *value, int dupval, LDAPControl **ctrlp)
+{
+ int ret;
+
+ if (sdap_is_control_supported(sh, oid)) {
+ ret = sss_ldap_control_create(oid, iscritical, value, dupval, ctrlp);
+ if (ret != LDAP_SUCCESS) {
+ DEBUG(1, ("sss_ldap_control_create failed [%d][%s].\n",
+ ret, ldap_err2string(ret)));
+ }
+ } else {
+ DEBUG(3, ("Server does not support the requested control [%s].\n", oid));
+ ret = LDAP_NOT_SUPPORTED;
+ }
+
+ return ret;
+}