diff options
Diffstat (limited to 'mcs/class/Novell.Directory.Ldap')
-rw-r--r-- | mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog new file mode 100644 index 00000000000..0b2f00d3f92 --- /dev/null +++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog @@ -0,0 +1,4 @@ +2005-10-30 Konstantin Triger <kostat@mainsoft.com> + + * LdapConnection.cs: TARGET_JVM: if no credentials supplied, + try to login with current user credentials. diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs index 5ae24c17383..70d960e90f9 100644 --- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs +++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs @@ -1592,8 +1592,13 @@ namespace Novell.Directory.Ldap if ((authenticationTypes & AuthenticationTypes.Secure) != 0) { LoginContext loginContext = null; try { - AuthenticationCallbackHandler callbackHandler = new AuthenticationCallbackHandler (username,password); - loginContext = new LoginContext (SecurityAppName, callbackHandler); + if (username != null && password != null) { + AuthenticationCallbackHandler callbackHandler = new AuthenticationCallbackHandler (username,password); + loginContext = new LoginContext (SecurityAppName, callbackHandler); + } + else + loginContext = new LoginContext (SecurityAppName); + loginContext.login (); } catch (LoginException e) { |