]> git.sur5r.net Git - openldap/commitdiff
fix ITS#3416
authorPierangelo Masarati <ando@openldap.org>
Fri, 3 Dec 2004 08:41:06 +0000 (08:41 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 3 Dec 2004 08:41:06 +0000 (08:41 +0000)
servers/slapd/aclparse.c

index d7a99c0351d55a7169bba68e7806d0ff09ffac51..17f0274d561b0e601bc19e9011d384038f0a3579 100644 (file)
@@ -1050,7 +1050,7 @@ parse_acl(
                                                acl_usage();
                                        }
 
-                                       if ( BER_BVISEMPTY( &b->a_peername_pat ) ) {
+                                       if ( !BER_BVISEMPTY( &b->a_peername_pat ) ) {
                                                fprintf( stderr, "%s: line %d: "
                                                        "peername pattern already specified.\n",
                                                        fname, lineno );
@@ -2240,8 +2240,11 @@ print_acl( Backend *be, AccessControl *a )
                        if ( ! first ) fprintf( stderr, "," );
                        if (an->an_oc) {
                                fputc( an->an_oc_exclude ? '!' : '@', stderr);
+                               fputs( an->an_oc->soc_cname.bv_val, stderr );
+
+                       } else {
+                               fputs( an->an_name.bv_val, stderr );
                        }
-                       fputs( an->an_name.bv_val, stderr );
                        first = 0;
                }
                fprintf(  stderr, "\n" );