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
This commit is contained in:
parent
8f625f6292
commit
9be1c93f84
|
@ -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>
|
2012-07-31 Jean Raby <jraby@inverse.ca>
|
||||||
|
|
||||||
* sogo.spec:
|
* sogo.spec:
|
||||||
|
|
|
@ -99,25 +99,21 @@ static NSMapTable *contextsTable = nil;
|
||||||
|
|
||||||
- (NSString *) _readUserPassword: (NSString *) newUsername
|
- (NSString *) _readUserPassword: (NSString *) newUsername
|
||||||
{
|
{
|
||||||
NSString *password;
|
NSString *password, *path;
|
||||||
NSData *content;
|
NSData *content;
|
||||||
id plist;
|
|
||||||
NSPropertyListFormat plistFormat;
|
|
||||||
NSString *error;
|
|
||||||
|
|
||||||
password = nil;
|
password = nil;
|
||||||
|
|
||||||
content = [NSData dataWithContentsOfFile: SAMBA_PRIVATE_DIR
|
path = [NSString stringWithFormat: SAMBA_PRIVATE_DIR
|
||||||
@"/mapistore/SOGo/userpwds.plist"];
|
@"/mapistore/%@/password", newUsername];
|
||||||
|
|
||||||
|
content = [NSData dataWithContentsOfFile: path];
|
||||||
|
|
||||||
if (content)
|
if (content)
|
||||||
{
|
{
|
||||||
plist = [NSPropertyListSerialization
|
password = [[NSString alloc] initWithData: content
|
||||||
propertyListFromData: content
|
encoding: NSUTF8StringEncoding];
|
||||||
mutabilityOption: NSPropertyListImmutable
|
[password autorelease];
|
||||||
format: &plistFormat
|
|
||||||
errorDescription: &error];
|
|
||||||
if ([plist respondsToSelector: @selector (objectForKey:)])
|
|
||||||
password = [plist objectForKey: newUsername];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return password;
|
return password;
|
||||||
|
|
Loading…
Reference in a new issue