]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorPierangelo Masarati <ando@openldap.org>
Sat, 17 Jul 2004 15:15:59 +0000 (15:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 17 Jul 2004 15:15:59 +0000 (15:15 +0000)
servers/slapd/slapacl.c

index 31b68b7aac93d8a6058cee419dd09e90db65a91b..8ad1fef0d71a135087602a93f0eb6d84611eab18 100644 (file)
@@ -144,14 +144,25 @@ slapacl( int argc, char **argv )
                        break;
                }
 
-               (void)access_allowed_mask( &op, &e, desc, &val, access,
+               rc = access_allowed_mask( &op, &e, desc, &val, access,
                                NULL, &mask );
 
-               fprintf( stderr, "%s%s%s: %s\n",
-                               desc->ad_cname.bv_val,
-                               val.bv_val ? "=" : "",
-                               val.bv_val ? val.bv_val : "",
-                               accessmask2str( mask, accessmaskbuf ) );
+               if ( accessstr ) {
+                       fprintf( stderr, "%s access to %s%s%s: %s\n",
+                                       accessstr,
+                                       desc->ad_cname.bv_val,
+                                       val.bv_val ? "=" : "",
+                                       val.bv_val ? val.bv_val : "",
+                                       rc ? "ALLOWED" : "DENIED" );
+
+               } else {
+                       fprintf( stderr, "%s%s%s: %s\n",
+                                       desc->ad_cname.bv_val,
+                                       val.bv_val ? "=" : "",
+                                       val.bv_val ? val.bv_val : "",
+                                       accessmask2str( mask, accessmaskbuf ) );
+               }
+               rc = 0;
        }
 
 destroy:;