mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
Add dn_subtree() (used for subtree index generation)
This commit is contained in:
parent
00ba798bd4
commit
397294fc40
1 changed files with 18 additions and 2 deletions
|
|
@ -347,8 +347,24 @@ char **dn_subtree(
|
|||
Backend *be,
|
||||
char *dn )
|
||||
{
|
||||
/* not yet implemented */
|
||||
return NULL;
|
||||
char *child, *parent;
|
||||
char **subtree = NULL;
|
||||
|
||||
child = dn;
|
||||
|
||||
do {
|
||||
charray_add( &subtree, child );
|
||||
|
||||
parent = dn_parent( be, child );
|
||||
|
||||
if( child != dn ) {
|
||||
free( child );
|
||||
}
|
||||
|
||||
child = parent;
|
||||
} while ( child != NULL );
|
||||
|
||||
return subtree;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue