Lines Matching refs:bv_val
174 switch ( *bv.bv_val ) {
262 if ( strncasecmp( val->bv_val, left.bv_val, left.bv_len ) == 0 ) {
290 bv.bv_val, attr->bv_val );
297 bv.bv_val, attr->bv_val );
310 bv.bv_val, mask );
414 bv.bv_val = (char *)&buf;
426 slap_sl_free( ndn.bv_val, op->o_tmpmemctx );
565 sdn.bv_val = type.bv_val + type.bv_len + STRLENOF( "#" );
566 sdn.bv_len = aci->bv_len - ( sdn.bv_val - aci->bv_val );
570 opts.bv_len = type.bv_len - ( opts.bv_val - type.bv_val );
571 type.bv_len = opts.bv_val - type.bv_val - 1;
801 bv->bv_val = ch_malloc( STRLENOF(" aci=") + ad->ad_cname.bv_len + 1 );
802 ptr = lutil_strcopy( bv->bv_val, " aci=" );
803 ptr = lutil_strcopy( ptr, ad->ad_cname.bv_val );
804 bv->bv_len = ptr - bv->bv_val;
897 Debug( LDAP_DEBUG_ACL, " checking ACI of \"%s\"\n", parent_ndn.bv_val );
1030 tail->bv_val = sub->bv_val + sub->bv_len;
1031 head_len = (unsigned long) tail->bv_val - (unsigned long) val->bv_val;
1059 switch ( perms->bv_val[ i ] ) {
1069 Debug( LDAP_DEBUG_ACL, "aciValidatePerms: perms needs to be one of x,d,c,s,r,w in '%s'\n", perms->bv_val );
1077 while ( i < perms->bv_len && perms->bv_val[ i ] == ' ' )
1082 if ( perms->bv_val[ i ] != ',' ) {
1083 Debug( LDAP_DEBUG_ACL, "aciValidatePerms: missing comma in '%s'\n", perms->bv_val );
1089 } while ( perms->bv_val[ i ] == ' ' );
1112 Debug( LDAP_DEBUG_ACL, "aciValidateRight: '%s' must be either 'grant' or 'deny'\n", bv.bv_val );
1146 Debug( LDAP_DEBUG_ACL, "aciValidateRight: unknown attribute: '%s'\n", attr.bv_val );
1152 Debug( LDAP_DEBUG_ACL, "aciValidateRight: unknown attribute: '%s'\n", left.bv_val );
1165 Debug( LDAP_DEBUG_ACL, "aciValidateRight: perms:attr need to be pairs in '%s'\n", action->bv_val );
1186 Debug( LDAP_DEBUG_ACL, "aciNormalizeRight: missing ';' in '%s'\n", action->bv_val );
1191 Debug( LDAP_DEBUG_ACL, "aciNormalizeRight: '%s' must be grant or deny\n", grantdeny.bv_val );
1241 ber_memfree_x( nattrs.bv_val, ctx );
1251 ber_memfree_x( nattrs.bv_val, ctx );
1252 Debug( LDAP_DEBUG_ACL, "aciNormalizeRight: unknown attribute: '%s'\n", attr.bv_val );
1259 ber_memfree_x( nattrs.bv_val, ctx );
1260 Debug( LDAP_DEBUG_ACL, "aciNormalizeRight: unknown attribute: '%s'\n", left.bv_val );
1268 nattrs.bv_val = slap_sl_realloc( nattrs.bv_val, len + 1, ctx );
1269 ptr = &nattrs.bv_val[ nattrs.bv_len ];
1273 ptr = lutil_strncopy( ptr, ad->ad_cname.bv_val, ad->ad_cname.bv_len );
1280 naction->bv_val = slap_sl_realloc( naction->bv_val,
1286 ptr = &naction->bv_val[ naction->bv_len ];
1289 ptr = lutil_strncopy( ptr, perms.bv_val, perms.bv_len );
1292 ptr = lutil_strncopy( ptr, nattrs.bv_val, nattrs.bv_len );
1297 ber_memfree_x( nattrs.bv_val, ctx );
1307 Debug( LDAP_DEBUG_ACL, "aciNormalizeRight: perms:attr need to be pairs in '%s'\n", action->bv_val );
1346 ber_memfree_x( nactions->bv_val, ctx );
1355 nactions->bv_val = slap_sl_realloc( nactions->bv_val,
1359 nactions->bv_val[ nactions->bv_len ] = '$';
1360 AC_MEMCPY( &nactions->bv_val[ nactions->bv_len + 1 ],
1361 nbv.bv_val, nbv.bv_len + 1 );
1362 ber_memfree_x( nbv.bv_val, ctx );
1432 Debug( LDAP_DEBUG_ACL, "aciValidate: invalid oid '%s'\n", oid.bv_val );
1440 Debug( LDAP_DEBUG_ACL, "aciValidate: invalid scope '%s'\n", scope.bv_val );
1453 Debug( LDAP_DEBUG_ACL, "aciValidate: missing type in '%s'\n", val->bv_val );
1461 Debug( LDAP_DEBUG_ACL, "aciValidate: invalid type '%s'\n", type.bv_val );
1467 Debug( LDAP_DEBUG_ACL, "aciValidate: invalid type '%s'\n", isgr.bv_val );
1474 if ( subject.bv_val[ 0 ] != '#' ) {
1475 Debug( LDAP_DEBUG_ACL, "aciValidate: missing subject in '%s'\n", val->bv_val );
1486 Debug( LDAP_DEBUG_ACL, "aciValidate: unknown dn attribute '%s'\n", subject.bv_val );
1492 Debug( LDAP_DEBUG_ACL, "aciValidate: wrong syntax for dn attribute '%s'\n", subject.bv_val );
1507 ocbv.bv_val = ber_bvchr( &type, '/' );
1508 if ( ocbv.bv_val != NULL ) {
1509 ocbv.bv_val++;
1511 - ( ocbv.bv_val - type.bv_val );
1513 atbv.bv_val = ber_bvchr( &ocbv, '/' );
1514 if ( atbv.bv_val != NULL ) {
1519 atbv.bv_val++;
1521 - ( atbv.bv_val - type.bv_val );
1522 ocbv.bv_len = atbv.bv_val - ocbv.bv_val - 1;
1526 Debug( LDAP_DEBUG_ACL, "aciValidate: unknown group attribute '%s'\n", atbv.bv_val );
1532 Debug( LDAP_DEBUG_ACL, "aciValidate: unknown group '%s'\n", ocbv.bv_val );
1540 Debug( LDAP_DEBUG_ACL, "aciValidate: missing dn in '%s'\n", val->bv_val );
1544 subject.bv_val++;
1550 Debug( LDAP_DEBUG_ACL, "aciValidate: invalid dn '%s'\n", subject.bv_val );
1587 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: invalid oid '%s'\n", oid.bv_val );
1593 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: missing scope in '%s'\n", val->bv_val );
1598 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: invalid scope '%s'\n", scope.bv_val );
1605 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: missing rights in '%s'\n", val->bv_val );
1616 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: missing type in '%s'\n", val->bv_val );
1625 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: invalid type '%s'\n", type.bv_val );
1632 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: invalid type '%s'\n", isgr.bv_val );
1642 if ( BER_BVISEMPTY( &subject ) || subject.bv_val[ 0 ] != '#' ) {
1643 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: missing subject in '%s'\n", val->bv_val );
1648 subject.bv_val++;
1664 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: invalid subject dn '%s'\n", subject.bv_val );
1675 ocbv.bv_val = ber_bvchr( &type, '/' );
1676 if ( ocbv.bv_val != NULL ) {
1685 ocbv.bv_val++;
1686 ocbv.bv_len = type.bv_len - ( ocbv.bv_val - type.bv_val );
1688 atbv.bv_val = ber_bvchr( &ocbv, '/' );
1689 if ( atbv.bv_val != NULL ) {
1690 atbv.bv_val++;
1692 - ( atbv.bv_val - type.bv_val );
1693 ocbv.bv_len = atbv.bv_val - ocbv.bv_val - 1;
1697 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: unknown group attribute '%s'\n", atbv.bv_val );
1707 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: invalid group '%s'\n", ocbv.bv_val );
1713 bv.bv_val = slap_sl_malloc( bv.bv_len + 1, ctx );
1715 ptr = bv.bv_val;
1716 ptr = lutil_strncopy( ptr, ntype.bv_val, ntype.bv_len );
1720 oc->soc_cname.bv_val,
1726 ad->ad_cname.bv_val,
1743 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: unknown dn attribute '%s'\n", subject.bv_val );
1750 Debug( LDAP_DEBUG_ACL, "aciPrettyNormal: wrong syntax for dn attribute '%s'\n", subject.bv_val );
1772 out->bv_val = slap_sl_malloc( out->bv_len + 1, ctx );
1773 ptr = lutil_strncopy( out->bv_val, oid.bv_val, oid.bv_len );
1776 ptr = lutil_strncopy( ptr, scope.bv_val, scope.bv_len );
1779 ptr = lutil_strncopy( ptr, nrights.bv_val, nrights.bv_len );
1782 ptr = lutil_strncopy( ptr, ntype.bv_val, ntype.bv_len );
1786 ptr = lutil_strncopy( ptr, nsubject.bv_val, nsubject.bv_len );
1792 ber_memfree_x( nsubject.bv_val, ctx );
1796 ber_memfree_x( ntype.bv_val, ctx );
1800 ber_memfree_x( nrights.bv_val, ctx );