/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
return LDAP_SUCCESS;
}
+#if SASL_VERSION_FULL >= 0x020118
+static int
+#else
static void
+#endif
slap_auxprop_lookup(
void *glob_context,
sasl_server_params_t *sparams,
int i, doit = 0;
Connection *conn = NULL;
lookup_info sl;
+ int rc = LDAP_SUCCESS;
sl.list = sparams->utils->prop_get( sparams->propctx );
sl.sparams = sparams;
op->ors_slimit = 1;
op->ors_filter = &generic_filter;
op->ors_filterstr = generic_filterstr;
+ op->o_authz = conn->c_authz;
/* FIXME: we want all attributes, right? */
op->ors_attrs = NULL;
- op->o_bd->be_search( op, &rs );
+ rc = op->o_bd->be_search( op, &rs );
}
}
}
+#if SASL_VERSION_FULL >= 0x020118
+ return rc != LDAP_SUCCESS ? SASL_FAIL : SASL_OK;
+#endif
}
#if SASL_VERSION_FULL >= 0x020110
/* EXTERNAL */
if( op->orb_cred.bv_len ) {
- rs->sr_text = "proxy authorization not support";
+ rs->sr_text = "proxy authorization not supported";
rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
send_ldap_result( op, rs );