extern int slapi_get_supported_controls(char ***ctrloidsp, unsigned long **ctrlopsp);
extern int slapi_control_present( LDAPControl **controls, char *oid,
struct berval **val, int *iscritical);
+extern LDAPControl *slapi_dup_control(LDAPControl *control);
extern void slapi_register_supported_saslmechanism(char *mechanism);
extern char **slapi_get_supported_saslmechanisms();
extern char **slapi_get_supported_extended_ops(void);
#endif /* LDAP_SLAPI */
}
+LDAPControl *
+slapi_dup_control( LDAPControl *ctrl )
+{
+#ifdef LDAP_SLAPI
+ LDAPControl *ret;
+
+ ret = (LDAPControl *)slapi_ch_malloc( sizeof(*ret) );
+ ret->ldctl_oid = slapi_ch_strdup( ctrl->ldctl_oid );
+ ber_dupbv( &ret->ldctl_value, &ctrl->ldctl_value );
+ ret->ldctl_iscritical = ctrl->ldctl_iscritical;
+
+ return ret;
+#else
+ return NULL;
+#endif /* LDAP_SLAPI */
+}
+
void
slapi_register_supported_saslmechanism( char *mechanism )
{