fix(users): when using multi-domains configuration, only request the apopriate usersources.

This commit is contained in:
Hivert Quentin
2025-01-22 16:16:47 +01:00
parent 5c1278a895
commit beb0d9cb1b
2 changed files with 49 additions and 20 deletions
+12 -2
View File
@@ -1429,11 +1429,22 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
NSMutableArray *contacts;
EOQualifier *qualifier;
unsigned int i;
NSMutableString *s;
NSString *sortAttribute;
BOOL sortReverse;
contacts = [NSMutableArray array];
if(theDomain != nil && [theDomain length] > 0)
{
if ([_baseDN rangeOfString: @"%d"].location != NSNotFound)
{
s = [NSMutableString stringWithString: _baseDN];
[s replaceOccurrencesOfString: @"%d" withString: theDomain options: 0 range: NSMakeRange(0, [s length])];
ASSIGN(_baseDN, s);
}
}
if ([match length] > 0 || !_listRequiresDot)
{
ldapConnection = [self _ldapConnection];
@@ -2290,8 +2301,7 @@ _makeLDAPChanges (NGLdapConnection *ldapConnection,
NSRange r;
r = [theLogin rangeOfString: @"@"];
if (r.location != NSNotFound &&
[_pristineBaseDN rangeOfString: @"%d"].location != NSNotFound)
if (r.location != NSNotFound && [_pristineBaseDN rangeOfString: @"%d"].location != NSNotFound)
{
s = [NSMutableString stringWithString: _pristineBaseDN];
[s replaceOccurrencesOfString: @"%d" withString: [theLogin substringFromIndex: r.location+1] options: 0 range: NSMakeRange(0, [s length])];