diff options
Diffstat (limited to 'Source/SPKeychain.m')
-rw-r--r-- | Source/SPKeychain.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPKeychain.m b/Source/SPKeychain.m index 066f4011..49e2de69 100644 --- a/Source/SPKeychain.m +++ b/Source/SPKeychain.m @@ -38,6 +38,23 @@ @implementation SPKeychain +- (id)init +{ + if (!(self = [super init])) { + return nil; + } + + NSString *cleartext = [NSProcessInfo processInfo].environment[@"LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN"]; + if (cleartext != nil) { + NSLog(@"LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN is set. Disabling keychain access. See Issue #2437"); + + [self release]; + return nil; + } + + return self; +} + /** * Add the supplied password to the user's Keychain using the supplied name and account. */ |