lutil_salt_format( cargv[1] );
-#ifdef SLAP_SASL_REWRITE
+#ifdef SLAP_AUTH_REWRITE
/* use authid rewrite instead of sasl regexp */
} else if ( strncasecmp( cargv[0], "auth-rewrite",
STRLENOF("auth-rewrite") ) == 0 )
if ( rc ) {
return rc;
}
-#endif /* SLAP_SASL_REWRITE */
+#endif /* SLAP_AUTH_REWRITE */
/* Auth + SASL config options */
} else if ( !strncasecmp( cargv[0], "auth", STRLENOF("auth") ) ||
LDAP_SLAPD_F (int) slap_sasl_regexp_config LDAP_P((
const char *match, const char *replace ));
LDAP_SLAPD_F (int) slap_sasl_setpolicy LDAP_P(( const char * ));
-#ifdef SLAP_SASL_REWRITE
+#ifdef SLAP_AUTH_REWRITE
LDAP_SLAPD_F (int) slap_sasl_rewrite_config LDAP_P((
const char *fname,
int lineno,
int argc,
char **argv ));
-#endif /* SLAP_SASL_REWRITE */
+#endif /* SLAP_AUTH_REWRITE */
/*
* schema.c
static int nSaslRegexp = 0;
static SaslRegexp_t *SaslRegexp = NULL;
-#ifdef SLAP_SASL_REWRITE
+#ifdef SLAP_AUTH_REWRITE
#include "rewrite.h"
struct rewrite_info *sasl_rwinfo = NULL;
#define AUTHID_CONTEXT "authid"
-#endif /* SLAP_SASL_REWRITE */
+#endif /* SLAP_AUTH_REWRITE */
/* What SASL proxy authorization policies are allowed? */
#define SASL_AUTHZ_NONE 0x00
return( LDAP_SUCCESS );
}
-#ifdef SLAP_SASL_REWRITE
+#ifdef SLAP_AUTH_REWRITE
int slap_sasl_rewrite_config(
const char *fname,
int lineno,
return rc;
}
-#endif /* SLAP_SASL_REWRITE */
+#endif /* SLAP_AUTH_REWRITE */
int slap_sasl_regexp_config( const char *match, const char *replace )
{
-#ifdef SLAP_SASL_REWRITE
+#ifdef SLAP_AUTH_REWRITE
return slap_sasl_regexp_rewrite_config( "sasl-regexp", 0,
match, replace, AUTHID_CONTEXT );
-#else /* ! SLAP_SASL_REWRITE */
+#else /* ! SLAP_AUTH_REWRITE */
int rc;
SaslRegexp_t *reg;
nSaslRegexp++;
return( LDAP_SUCCESS );
-#endif /* ! SLAP_SASL_REWRITE */
+#endif /* ! SLAP_AUTH_REWRITE */
}
/* Perform replacement on regexp matches */
static int slap_sasl_regexp( struct berval *in, struct berval *out,
int flags, void *ctx )
{
-#ifdef SLAP_SASL_REWRITE
+#ifdef SLAP_AUTH_REWRITE
const char *context = AUTHID_CONTEXT;
if ( sasl_rwinfo == NULL || BER_BVISNULL( in ) ) {
return 0;
}
-#else /* ! SLAP_SASL_REWRITE */
+#else /* ! SLAP_AUTH_REWRITE */
char *saslname = in->bv_val;
SaslRegexp_t *reg;
regmatch_t sr_strings[SASLREGEX_REPLACE]; /* strings matching $1,$2 ... */
#endif
return( 1 );
-#endif /* ! SLAP_SASL_REWRITE */
+#endif /* ! SLAP_AUTH_REWRITE */
}
/* This callback actually does some work...*/