#include "portable.h"
#include <stdio.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
#include <ac/stdlib.h>
#include <ac/string.h>
#include "slap.h"
-#include <limits.h>
-
#include "lutil.h"
#define SASLREGEX_REPLACE 10
{
char u;
- assert( id );
+ assert( id != NULL );
assert( !BER_BVISNULL( id ) );
- assert( user );
- assert( realm );
- assert( mech );
+ assert( user != NULL );
+ assert( realm != NULL );
+ assert( mech != NULL );
u = id->bv_val[ 0 ];
return( rc );
}
+#ifndef SLAP_AUTH_REWRITE
static int slap_sasl_rx_off(char *rep, int *off)
{
const char *c;
off[n] = -1;
return( LDAP_SUCCESS );
}
+#endif /* ! SLAP_AUTH_REWRITE */
#ifdef SLAP_AUTH_REWRITE
int slap_sasl_rewrite_config(
void slap_sasl_regexp_unparse( BerVarray *out )
{
int i;
- struct berval bv;
BerVarray bva = NULL;
char ibuf[32], *ptr;
struct berval idx;
*out = bva;
}
+#ifndef SLAP_AUTH_REWRITE
/* Perform replacement on regexp matches */
static void slap_sasl_rx_exp(
const char *rep,
out->bv_val[insert] = '\0';
}
+#endif /* ! SLAP_AUTH_REWRITE */
/* Take the passed in SASL name and attempt to convert it into an
LDAP URI to find the matching LDAP entry, using the pattern matching
BER_BVZERO( &base );
}
ber_dupbv_x( &op.o_req_dn, &op.o_req_ndn, op.o_tmpmemctx );
+ op.ors_deref = LDAP_DEREF_NEVER;
op.ors_slimit = 1;
op.ors_tlimit = SLAP_NO_LIMIT;
op.ors_attrs = slap_anlist_no_attrs;
AttributeDescription *ad,
struct berval *authc )
{
- int i, rc;
+ int rc;
BerVarray vals = NULL;
Debug( LDAP_DEBUG_TRACE,