mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Modify dn2domain code such that domains produced are rooted.
That is, they end with '.'.
This commit is contained in:
parent
fd57c2666b
commit
88411f5c27
1 changed files with 3 additions and 6 deletions
|
|
@ -96,7 +96,7 @@ int ldap_dn2domain(
|
|||
|
||||
ndomain = LDAP_REALLOC( domain,
|
||||
( domain == NULL ? 0 : strlen(domain) )
|
||||
+ strlen(dc) + 2 );
|
||||
+ strlen(dc) + "." );
|
||||
|
||||
if( ndomain == NULL ) {
|
||||
LDAP_FREE( rdn );
|
||||
|
|
@ -106,12 +106,9 @@ int ldap_dn2domain(
|
|||
return -5;
|
||||
}
|
||||
|
||||
if( domain == NULL ) {
|
||||
ndomain[0] = '\0';
|
||||
} else {
|
||||
strcat( ndomain, "." );
|
||||
}
|
||||
strcat( ndomain, dc );
|
||||
strcat( ndomain, "." );
|
||||
|
||||
domain = ndomain;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue