static int authz_policy = SASL_AUTHZ_NONE;
-static
-int slap_sasl_match( Operation *opx, struct berval *rule,
+static int
+slap_sasl_match( Operation *opx, struct berval *rule,
struct berval *assertDN, struct berval *authc );
int slap_sasl_setpolicy( const char *arg )
"slap_parseURI: parsing %s\n", uri->bv_val, 0, 0 );
rc = LDAP_PROTOCOL_ERROR;
+
/*
* dn[.<dnstyle>]:<dnpattern>
* <dnstyle> ::= {exact|regex|children|subtree|onelevel}
/*
* must be ldap:///
*/
- return LDAP_PROTOCOL_ERROR;
+ rc = LDAP_PROTOCOL_ERROR;
+ goto done;
}
break;
*
* NOTE: must pass DN normalization
*/
+ ldap_free_urldesc( ludp );
bv.bv_val = uri->bv_val;
*scope = LDAP_X_SCOPE_EXACT;
goto is_dn;
default:
- return LDAP_PROTOCOL_ERROR;
+ rc = LDAP_PROTOCOL_ERROR;
+ goto done;
}
if ( ( ludp->lud_host && *ludp->lud_host )
* The assertDN should not have the dn: prefix
*/
-static
-int slap_sasl_match( Operation *opx, struct berval *rule,
+static int
+slap_sasl_match( Operation *opx, struct berval *rule,
struct berval *assertDN, struct berval *authc )
{
int rc;
* an internal search must be done, and if that search returns exactly one
* entry, return the DN of that one entry.
*/
-void slap_sasl2dn( Operation *opx,
- struct berval *saslname, struct berval *sasldn, int flags )
+void
+slap_sasl2dn(
+ Operation *opx,
+ struct berval *saslname,
+ struct berval *sasldn,
+ int flags )
{
int rc;
slap_callback cb = { NULL, sasl_sc_sasl2dn, NULL, NULL };