propagate flags to sasl-regexp functions (will need it later)

This commit is contained in:
Pierangelo Masarati 2003-12-18 18:32:45 +00:00
parent 113727ba53
commit 42d7d6d743
3 changed files with 7 additions and 5 deletions

View file

@ -989,7 +989,8 @@ LDAP_SLAPD_F (int) slap_parse_user LDAP_P((
LDAP_SLAPD_F (void) slap_sasl2dn LDAP_P((
Operation *op,
struct berval *saslname,
struct berval *dn ));
struct berval *dn,
int flags ));
LDAP_SLAPD_F (int) slap_sasl_authorized LDAP_P((
Operation *op,
struct berval *authcid,

View file

@ -1970,7 +1970,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, char *id, int len,
}
/* Run thru regexp */
slap_sasl2dn( op, dn, &dn2 );
slap_sasl2dn( op, dn, &dn2, flags );
if( dn2.bv_val ) {
sl_free( dn->bv_val, op->o_tmpmemctx );
*dn = dn2;

View file

@ -492,7 +492,8 @@ static void slap_sasl_rx_exp(
LDAP URI to find the matching LDAP entry, using the pattern matching
strings given in the saslregexp config file directive(s) */
static int slap_sasl_regexp( struct berval *in, struct berval *out, void *ctx )
static int slap_sasl_regexp( struct berval *in, struct berval *out,
int flags, void *ctx )
{
char *saslname = in->bv_val;
SaslRegexp_t *reg;
@ -812,7 +813,7 @@ COMPLETE:
* entry, return the DN of that one entry.
*/
void slap_sasl2dn( Operation *opx,
struct berval *saslname, struct berval *sasldn )
struct berval *saslname, struct berval *sasldn, int flags )
{
int rc;
slap_callback cb = { NULL, sasl_sc_sasl2dn, NULL, NULL };
@ -835,7 +836,7 @@ void slap_sasl2dn( Operation *opx,
cb.sc_private = sasldn;
/* Convert the SASL name into a minimal URI */
if( !slap_sasl_regexp( saslname, &regout, opx->o_tmpmemctx ) ) {
if( !slap_sasl_regexp( saslname, &regout, flags, opx->o_tmpmemctx ) ) {
goto FINISHED;
}