From 6aca8c16c631526a50cb1e3c57e30db671581be0 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 17 Jul 2004 15:15:59 +0000 Subject: [PATCH] cleanup --- servers/slapd/slapacl.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/servers/slapd/slapacl.c b/servers/slapd/slapacl.c index 31b68b7aac..8ad1fef0d7 100644 --- a/servers/slapd/slapacl.c +++ b/servers/slapd/slapacl.c @@ -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:; -- 2.39.5