See ChangeLog

Monotone-Parent: 7a464f08b5ba1b713a0beec23ddfa576c9023439
Monotone-Revision: 22735bbc1319155936115d59c7f2699c32dc60f1

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2012-08-02T13:18:09
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Ludovic Marcotte 2012-08-02 13:18:09 +00:00
parent 8f625f6292
commit 9be1c93f84
2 changed files with 16 additions and 14 deletions

View File

@ -1,3 +1,9 @@
2012-08-02 Ludovic Marcotte <lmarcotte@inverse.ca>
* OpenChange/MAPIStoreUserContext.m (-_readUserPassword:)
We now read per-user passwords instead of relying on
a global file.
2012-07-31 Jean Raby <jraby@inverse.ca>
* sogo.spec:

View File

@ -99,25 +99,21 @@ static NSMapTable *contextsTable = nil;
- (NSString *) _readUserPassword: (NSString *) newUsername
{
NSString *password;
NSString *password, *path;
NSData *content;
id plist;
NSPropertyListFormat plistFormat;
NSString *error;
password = nil;
path = [NSString stringWithFormat: SAMBA_PRIVATE_DIR
@"/mapistore/%@/password", newUsername];
content = [NSData dataWithContentsOfFile: path];
content = [NSData dataWithContentsOfFile: SAMBA_PRIVATE_DIR
@"/mapistore/SOGo/userpwds.plist"];
if (content)
{
plist = [NSPropertyListSerialization
propertyListFromData: content
mutabilityOption: NSPropertyListImmutable
format: &plistFormat
errorDescription: &error];
if ([plist respondsToSelector: @selector (objectForKey:)])
password = [plist objectForKey: newUsername];
password = [[NSString alloc] initWithData: content
encoding: NSUTF8StringEncoding];
[password autorelease];
}
return password;