summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-06-08 17:01:04 -0600
committerRich Megginson <rmeggins@redhat.com>2010-08-31 13:35:53 -0600
commit3af5af9a7e4fbd7a5f374d89fd360ddcc84f0d9d (patch)
treebba05a6806cc2a3ec8a1dec9594239757bb3d6af
parente394d61b29d8e234ae396deb55aa33e7d6d92a0f (diff)
downloadds-3af5af9a7e4fbd7a5f374d89fd360ddcc84f0d9d.tar.gz
ds-3af5af9a7e4fbd7a5f374d89fd360ddcc84f0d9d.tar.xz
ds-3af5af9a7e4fbd7a5f374d89fd360ddcc84f0d9d.zip
use the mozldap versions of the proxy auth control create function
Since these functions are present in mozldap, just use them directly Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
-rw-r--r--ldap/servers/slapd/ldaputil.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 92b06954..97162874 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -261,8 +261,9 @@ slapi_ldap_create_proxyauth_control (
LDAPControl **ctrlp /* value to return */
)
{
- BerElement *ber = NULL;
int rc = 0;
+#if defined(USE_OPENLDAP)
+ BerElement *ber = NULL;
int beropts = 0;
char *berfmtstr = NULL;
char *ctrloid = NULL;
@@ -270,9 +271,7 @@ slapi_ldap_create_proxyauth_control (
/* note - there is currently no way to get the beroptions from the ld*,
so we just hard code it here */
-#if defined(USE_OPENLDAP)
beropts = LBER_USE_DER; /* openldap seems to use DER by default */
-#endif
if (ctrlp == NULL) {
return LDAP_PARAM_ERROR;
}
@@ -311,7 +310,13 @@ slapi_ldap_create_proxyauth_control (
rc = ldap_control_create(ctrloid, ctl_iscritical, bv, 1, ctrlp);
ber_bvfree(bv);
ber_free(ber, 1);
-
+#else
+ if (usev2) {
+ rc = ldap_create_proxiedauth_control(ld, dn, ctrlp);
+ } else {
+ rc = ldap_create_proxyauth_control(ld, dn, ctl_iscritical, ctrlp);
+ }
+#endif
return rc;
}