From 42d7d6d7432b87d37bfb4beba489cc141ee2edf9 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 18 Dec 2003 18:32:45 +0000 Subject: [PATCH] propagate flags to sasl-regexp functions (will need it later) --- servers/slapd/proto-slap.h | 3 ++- servers/slapd/sasl.c | 2 +- servers/slapd/saslauthz.c | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index c83caf886f..4e8f412aab 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -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, diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 14ed0b64c0..9021c9505f 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -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; diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index 07539ef03e..78bb9ea7d8 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -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, ®out, opx->o_tmpmemctx ) ) { + if( !slap_sasl_regexp( saslname, ®out, flags, opx->o_tmpmemctx ) ) { goto FINISHED; } -- 2.39.5