]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/saslauthz.c
Fix log_age_parse days parsing
[openldap] / servers / slapd / saslauthz.c
index 42bb8a136810b99e193f7fd7f0f886832b6fe215..9b8a07f825719f7405f31bc1714949f185c492e2 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * Portions Copyright 2000 Mark Adamson, Carnegie Mellon.
  * All rights reserved.
  *
@@ -202,7 +202,6 @@ int slap_parse_user( struct berval *id, struct berval *user,
        return LDAP_SUCCESS;
 }
 
-#ifdef SLAP_AUTHZ_SYNTAX
 int
 authzValidate(
        Syntax *syntax,
@@ -919,7 +918,6 @@ authzPretty(
        return rc;
 }
 
-#endif /* SLAP_AUTHZ_SYNTAX */
 
 static int
 slap_parseURI(
@@ -936,9 +934,7 @@ slap_parseURI(
        int             rc;
        LDAPURLDesc     *ludp;
 
-#ifdef SLAP_ORDERED_PRETTYNORM
        struct berval   idx;
-#endif /* SLAP_ORDERED_PRETTYNORM */
 
        assert( uri != NULL && !BER_BVISNULL( uri ) );
        BER_BVZERO( base );
@@ -952,7 +948,6 @@ slap_parseURI(
 
        rc = LDAP_PROTOCOL_ERROR;
 
-#ifdef SLAP_ORDERED_PRETTYNORM
        idx = *uri;
        if ( idx.bv_val[ 0 ] == '{' ) {
                char    *ptr;
@@ -965,7 +960,6 @@ slap_parseURI(
                idx.bv_val = ptr;
                uri = &idx;
        }
-#endif /* SLAP_ORDERED_PRETTYNORM */
 
        /*
         * dn[.<dnstyle>]:<dnpattern>
@@ -1677,13 +1671,7 @@ slap_sasl_match( Operation *opx, struct berval *rule,
 
        /* NOTE: don't normalize rule if authz syntax is enabled */
        rc = slap_parseURI( opx, rule, &base, &op.o_req_ndn,
-               &op.ors_scope, &op.ors_filter, &op.ors_filterstr, 
-#ifdef SLAP_AUTHZ_SYNTAX
-               0
-#else /* ! SLAP_AUTHZ_SYNTAX */
-               1
-#endif /* ! SLAP_AUTHZ_SYNTAX */
-               );
+               &op.ors_scope, &op.ors_filter, &op.ors_filterstr, 0 );
 
        if( rc != LDAP_SUCCESS ) goto CONCLUDED;
 
@@ -2055,7 +2043,8 @@ int slap_sasl_authorized( Operation *op,
 
        Debug( LDAP_DEBUG_TRACE,
           "==>slap_sasl_authorized: can %s become %s?\n",
-               authcDN->bv_val, authzDN->bv_val, 0 );
+               authcDN->bv_len ? authcDN->bv_val : "(null)",
+               authzDN->bv_len ? authzDN->bv_val : "(null)",  0 );
 
        /* If person is authorizing to self, succeed */
        if ( dn_match( authcDN, authzDN ) ) {