mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Fix dnattr unparsing
This commit is contained in:
parent
854b433489
commit
f5e36e1bbd
1 changed files with 8 additions and 10 deletions
|
|
@ -2323,16 +2323,6 @@ dnaccess2text( slap_dn_access *bdn, char *ptr, int is_realdn )
|
|||
ptr = lutil_strcopy( ptr, bdn->a_pat.bv_val );
|
||||
*ptr++ = '"';
|
||||
}
|
||||
|
||||
if ( bdn->a_at != NULL ) {
|
||||
*ptr++ = ' ';
|
||||
if ( is_realdn ) {
|
||||
ptr = lutil_strcopy( ptr, "real" );
|
||||
}
|
||||
ptr = lutil_strcopy( ptr, "dnattr=" );
|
||||
ptr = lutil_strcopy( ptr, bdn->a_at->ad_cname.bv_val );
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
@ -2346,10 +2336,18 @@ access2text( Access *b, char *ptr )
|
|||
if ( !BER_BVISEMPTY( &b->a_dn_pat ) ) {
|
||||
ptr = dnaccess2text( &b->a_dn, ptr, 0 );
|
||||
}
|
||||
if ( b->a_dn_at ) {
|
||||
ptr = lutil_strcopy( ptr, " dnattr=" );
|
||||
ptr = lutil_strcopy( ptr, b->a_dn_at->ad_cname.bv_val );
|
||||
}
|
||||
|
||||
if ( !BER_BVISEMPTY( &b->a_realdn_pat ) ) {
|
||||
ptr = dnaccess2text( &b->a_realdn, ptr, 1 );
|
||||
}
|
||||
if ( b->a_realdn_at ) {
|
||||
ptr = lutil_strcopy( ptr, " realdnattr=" );
|
||||
ptr = lutil_strcopy( ptr, b->a_realdn_at->ad_cname.bv_val );
|
||||
}
|
||||
|
||||
if ( !BER_BVISEMPTY( &b->a_group_pat ) ) {
|
||||
ptr = lutil_strcopy( ptr, " group/" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue