]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/acl.c
Plug leaks
[openldap] / servers / slapd / acl.c
index d523a5aa0e0107783a847b72dbbd0e9d30d1b135..59478d83a6b2c4605ab2ccb5767e3ac3c6a0406b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -351,7 +351,10 @@ access_allowed_mask(
        assert( attr != NULL );
 
        if ( op ) {
-               if ( op->o_is_auth_check &&
+               if ( op->o_acl_priv != ACL_NONE ) {
+                       access = op->o_acl_priv;
+
+               } else if ( op->o_is_auth_check &&
                        ( access_level == ACL_SEARCH || access_level == ACL_READ ) )
                {
                        access = ACL_AUTH;
@@ -1326,7 +1329,7 @@ slap_acl_mask(
                                                char            buf[] = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF";
                                                struct berval   ip;
                                                struct in6_addr addr;
-                                               int             port_number = -1, i;
+                                               int             port_number = -1;
                                                
                                                if ( strncasecmp( op->o_conn->c_peer_name.bv_val, 
                                                                        acl_bv_ipv6_eq.bv_val,