X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Faclparse.c;h=f559ae3e1c7d9f69936e1538072907e7a0738ed1;hb=12d5c6bba210de4a03363567be1c19a37f8e806b;hp=d642c305f67019d9b67c597a7b799fe105c49c04;hpb=6da0f1e48e0bd94c090360bf18a48ce20eb6dce2;p=openldap diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index d642c305f6..f559ae3e1c 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -1,8 +1,27 @@ /* aclparse.c - routines to parse and check acl's */ /* $OpenLDAP$ */ -/* - * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2003 The OpenLDAP Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + */ +/* Portions Copyright (c) 1995 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. */ #include "portable.h" @@ -1565,7 +1584,7 @@ print_access( Access *b ) fprintf( stderr, " %s", b->a_dn_pat.bv_val ); } else { - fprintf( stderr, " dn.%s=%s", + fprintf( stderr, " dn.%s=\"%s\"", style_strings[b->a_dn_style], b->a_dn_pat.bv_val ); } } @@ -1575,25 +1594,19 @@ print_access( Access *b ) } if ( b->a_group_pat.bv_len ) { - fprintf( stderr, " group=%s", b->a_group_pat.bv_val ); - - if ( b->a_group_oc ) { - fprintf( stderr, " objectClass: %s", - b->a_group_oc->soc_oclass.oc_oid ); - - if ( b->a_group_at ) { - fprintf( stderr, " attributeType: %s", - b->a_group_at->ad_cname.bv_val ); - } - } + fprintf( stderr, " group/%s/%s.%s=\"%s\"", + b->a_group_oc ? b->a_group_oc->soc_cname.bv_val : "groupOfNames", + b->a_group_at ? b->a_group_at->ad_cname.bv_val : "member", + style_strings[b->a_group_style], + b->a_group_pat.bv_val ); } if ( b->a_peername_pat.bv_len != 0 ) { - fprintf( stderr, " peername=%s", b->a_peername_pat.bv_val ); + fprintf( stderr, " peername=\"%s\"", b->a_peername_pat.bv_val ); } if ( b->a_sockname_pat.bv_len != 0 ) { - fprintf( stderr, " sockname=%s", b->a_sockname_pat.bv_val ); + fprintf( stderr, " sockname=\"%s\"", b->a_sockname_pat.bv_val ); } if ( b->a_domain_pat.bv_len != 0 ) { @@ -1601,7 +1614,7 @@ print_access( Access *b ) } if ( b->a_sockurl_pat.bv_len != 0 ) { - fprintf( stderr, " sockurl=%s", b->a_sockurl_pat.bv_val ); + fprintf( stderr, " sockurl=\"%s\"", b->a_sockurl_pat.bv_val ); } #ifdef SLAPD_ACI_ENABLED @@ -1657,7 +1670,7 @@ print_acl( Backend *be, AccessControl *a ) if ( a->acl_dn_pat.bv_len != 0 ) { to++; - fprintf( stderr, " dn.%s=%s\n", + fprintf( stderr, " dn.%s=\"%s\"\n", style_strings[a->acl_dn_style], a->acl_dn_pat.bv_val ); } @@ -1687,7 +1700,7 @@ print_acl( Backend *be, AccessControl *a ) if ( a->acl_attrval.bv_len != 0 ) { to++; - fprintf( stderr, " val.%s=%s\n", + fprintf( stderr, " val.%s=\"%s\"\n", style_strings[a->acl_attrval_style], a->acl_attrval.bv_val ); }