]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/saslauthz.c
add logs; fix bug in group/dn selection logic
[openldap] / servers / slapd / saslauthz.c
index 75c675904b723d3f93f4e5a8ff2d69e808893f25..8935182ccc3d6dbddbb3cd6c05c593de18bb74cb 100644 (file)
@@ -45,7 +45,7 @@
  * dn.exact:   the value must pass normalization and is used 
  *             in exact DN match.
  * dn.regex:   the value is treated as a regular expression 
- *             in matching DN values in saslAuthz{To|From}
+ *             in matching DN values in authz{To|From}
  *             attributes.
  * dn:         for backwards compatibility reasons, the value 
  *             is treated as a regular expression, and thus 
@@ -73,11 +73,11 @@ typedef struct sasl_regexp {
 static int nSaslRegexp = 0;
 static SaslRegexp_t *SaslRegexp = NULL;
 
-#ifdef SLAP_X_SASL_REWRITE
+#ifdef SLAP_SASL_REWRITE
 #include "rewrite.h"
 struct rewrite_info    *sasl_rwinfo = NULL;
 #define AUTHID_CONTEXT "authid"
-#endif /* SLAP_X_SASL_REWRITE */
+#endif /* SLAP_SASL_REWRITE */
 
 /* What SASL proxy authorization policies are allowed? */
 #define        SASL_AUTHZ_NONE 0x00
@@ -406,7 +406,7 @@ static int slap_sasl_rx_off(char *rep, int *off)
        return( LDAP_SUCCESS );
 }
 
-#ifdef SLAP_X_SASL_REWRITE
+#ifdef SLAP_SASL_REWRITE
 int slap_sasl_rewrite_config( 
                const char      *fname,
                int             lineno,
@@ -493,14 +493,14 @@ int slap_sasl_regexp_rewrite_config(
 
        return rc;
 }
-#endif /* SLAP_X_SASL_REWRITE */
+#endif /* SLAP_SASL_REWRITE */
 
 int slap_sasl_regexp_config( const char *match, const char *replace )
 {
-#ifdef SLAP_X_SASL_REWRITE
+#ifdef SLAP_SASL_REWRITE
        return slap_sasl_regexp_rewrite_config( "sasl-regexp", 0,
                        match, replace, AUTHID_CONTEXT );
-#else /* ! SLAP_X_SASL_REWRITE */
+#else /* ! SLAP_SASL_REWRITE */
        int rc;
        SaslRegexp_t *reg;
 
@@ -533,7 +533,7 @@ int slap_sasl_regexp_config( const char *match, const char *replace )
 
        nSaslRegexp++;
        return( LDAP_SUCCESS );
-#endif /* ! SLAP_X_SASL_REWRITE */
+#endif /* ! SLAP_SASL_REWRITE */
 }
 
 /* Perform replacement on regexp matches */
@@ -595,7 +595,7 @@ static void slap_sasl_rx_exp(
 static int slap_sasl_regexp( struct berval *in, struct berval *out,
                int flags, void *ctx )
 {
-#ifdef SLAP_X_SASL_REWRITE
+#ifdef SLAP_SASL_REWRITE
        const char      *context = AUTHID_CONTEXT;
 
        if ( sasl_rwinfo == NULL || BER_BVISNULL( in ) ) {
@@ -632,7 +632,7 @@ static int slap_sasl_regexp( struct berval *in, struct berval *out,
                return 0;
        }
 
-#else /* ! SLAP_X_SASL_REWRITE */
+#else /* ! SLAP_SASL_REWRITE */
        char *saslname = in->bv_val;
        SaslRegexp_t *reg;
        regmatch_t sr_strings[SASLREGEX_REPLACE];       /* strings matching $1,$2 ... */
@@ -680,7 +680,7 @@ static int slap_sasl_regexp( struct berval *in, struct berval *out,
 #endif
 
        return( 1 );
-#endif /* ! SLAP_X_SASL_REWRITE */
+#endif /* ! SLAP_SASL_REWRITE */
 }
 
 /* This callback actually does some work...*/