mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-21 06:52:40 +00:00
Moved DN cache to SOGoCache
This commit is contained in:
1 parent
9885211a5b
commit
3950e9d4c3
5 files changed
+39
-19
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/* LDAPSource.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
* Copyright (C) 2007-2014 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -37,6 +37,7 @@
|
||||
#import "NSArray+Utilities.h"
|
||||
#import "NSString+Utilities.h"
|
||||
#import "NSString+Crypto.h"
|
||||
#import "SOGoCache.h"
|
||||
#import "SOGoDomainDefaults.h"
|
||||
#import "SOGoSystemDefaults.h"
|
||||
|
||||
@@ -118,7 +119,6 @@ static Class NSStringK;
|
||||
|
||||
MSExchangeHostname = nil;
|
||||
|
||||
_dnCache = [[NSMutableDictionary alloc] init];
|
||||
modifiers = nil;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,6 @@ static Class NSStringK;
|
||||
[_scope release];
|
||||
[searchAttributes release];
|
||||
[domain release];
|
||||
[_dnCache release];
|
||||
[kindField release];
|
||||
[multipleBookingsField release];
|
||||
[MSExchangeHostname release];
|
||||
@@ -528,7 +527,7 @@ static Class NSStringK;
|
||||
if (queryTimeout > 0)
|
||||
[bindConnection setQueryTimeLimit: queryTimeout];
|
||||
|
||||
userDN = [_dnCache objectForKey: _login];
|
||||
userDN = [[SOGoCache sharedCache] distinguishedNameForLogin: _login];
|
||||
|
||||
if (!userDN)
|
||||
{
|
||||
@@ -551,8 +550,9 @@ static Class NSStringK;
|
||||
if (userDN)
|
||||
{
|
||||
// We cache the _login <-> userDN entry to speed up things
|
||||
[_dnCache setObject: userDN forKey: _login];
|
||||
|
||||
[[SOGoCache sharedCache] setDistinguishedName: userDN
|
||||
forLogin: _login];
|
||||
|
||||
if (!passwordPolicy)
|
||||
didBind = [bindConnection bindWithMethod: @"simple"
|
||||
binddn: userDN
|
||||
@@ -1238,7 +1238,7 @@ static Class NSStringK;
|
||||
|
||||
- (NSString *) lookupDNByLogin: (NSString *) theLogin
|
||||
{
|
||||
return [_dnCache objectForKey: theLogin];
|
||||
return [[SOGoCache sharedCache] distinguishedNameForLogin: theLogin];
|
||||
}
|
||||
|
||||
- (NGLdapEntry *) _lookupGroupEntryByAttributes: (NSArray *) theAttributes
|
||||
|
||||
Reference in new issue
Block a user