зеркало из https://github.com/mozilla/pjs.git
4.07 main dev tree synch up
This commit is contained in:
Родитель
48060129e5
Коммит
7bd744f913
|
@ -298,7 +298,7 @@ class LDAPConnSetupMgr implements Cloneable{
|
|||
/**
|
||||
* Connect to the server at the given index
|
||||
*/
|
||||
private void connectServer(int idx) {
|
||||
void connectServer(int idx) {
|
||||
ServerEntry entry = m_dsList[idx];
|
||||
Thread currThread = Thread.currentThread();
|
||||
Socket sock = null;
|
||||
|
|
|
@ -215,6 +215,11 @@ public class LDAPConnection
|
|||
*/
|
||||
private LDAPSearchConstraints m_defaultConstraints =
|
||||
new LDAPSearchConstraints();
|
||||
|
||||
// A clone of constraints for the successful bind. Used by
|
||||
// "smart failover" for the automatic rebind
|
||||
private LDAPConstraints m_rebindConstraints;
|
||||
|
||||
private Vector m_responseListeners;
|
||||
private Vector m_searchListeners;
|
||||
private boolean m_bound;
|
||||
|
@ -253,11 +258,11 @@ public class LDAPConnection
|
|||
/**
|
||||
* Properties
|
||||
*/
|
||||
private final static Float SdkVersion = new Float(4.05f);
|
||||
private final static Float SdkVersion = new Float(4.07f);
|
||||
private final static Float ProtocolVersion = new Float(3.0f);
|
||||
private final static String SecurityVersion = new String("none,simple,sasl");
|
||||
private final static Float MajorVersion = new Float(4.0f);
|
||||
private final static Float MinorVersion = new Float(0.5f);
|
||||
private final static Float MinorVersion = new Float(0.07f);
|
||||
private final static String DELIM = "#";
|
||||
private final static String PersistSearchPackageName =
|
||||
"netscape.ldap.controls.LDAPPersistSearchControl";
|
||||
|
@ -1691,6 +1696,7 @@ public class LDAPConnection
|
|||
myListener, cons);
|
||||
checkMsg( myListener.getResponse() );
|
||||
markConnAsBound();
|
||||
m_rebindConstraints = (LDAPConstraints)cons.clone();
|
||||
m_authMethod = "simple";
|
||||
} catch (LDAPReferralException e) {
|
||||
m_referralConnection = createReferralConnection(e, cons);
|
||||
|
@ -1761,7 +1767,11 @@ public class LDAPConnection
|
|||
m_saslBinder.bind(this, false);
|
||||
m_authMethod = "sasl";
|
||||
} else {
|
||||
internalBind (m_protocolVersion, false, cons);
|
||||
//Rebind using m_rebindConstraints
|
||||
if (m_rebindConstraints == null) {
|
||||
m_rebindConstraints = m_defaultConstraints;
|
||||
}
|
||||
internalBind (m_protocolVersion, false, m_rebindConstraints);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,12 +57,18 @@ public class LDAPSaslBind implements LDAPBind, Serializable {
|
|||
_packageName = packageName;
|
||||
_props = props;
|
||||
_cbh = cbh;
|
||||
if ( (cbh != null) &&
|
||||
|
||||
// 12-01-99 Disabled check for instanceof CallbackHandler so that
|
||||
// there is no dependency on the extenal jaas.jar package. This is
|
||||
// reqired for Communicator build where the ldap java package does not
|
||||
// include any sasl classes.
|
||||
|
||||
/*if ( (cbh != null) &&
|
||||
!(cbh instanceof javax.security.auth.callback.CallbackHandler) ) {
|
||||
throw new IllegalArgumentException(
|
||||
"Callback argument must implement " +
|
||||
"javax.security.auth.callback.CallbackHandler" );
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -212,7 +212,7 @@ public class LDAPSchema {
|
|||
* @see netscape.ldap.LDAPSchemaElement#add
|
||||
* @see netscape.ldap.LDAPSchemaElement#remove
|
||||
*/
|
||||
protected void addObjectClass( LDAPObjectClassSchema objectSchema ) {
|
||||
public void addObjectClass( LDAPObjectClassSchema objectSchema ) {
|
||||
objectClasses.put( objectSchema.getName().toLowerCase(),
|
||||
objectSchema );
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ public class LDAPSchema {
|
|||
* @see netscape.ldap.LDAPSchemaElement#add
|
||||
* @see netscape.ldap.LDAPSchemaElement#remove
|
||||
*/
|
||||
protected void addAttribute( LDAPAttributeSchema attrSchema ) {
|
||||
public void addAttribute( LDAPAttributeSchema attrSchema ) {
|
||||
attributes.put( attrSchema.getName().toLowerCase(), attrSchema );
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ public class LDAPSchema {
|
|||
* @see netscape.ldap.LDAPSchemaElement#add
|
||||
* @see netscape.ldap.LDAPSchemaElement#remove
|
||||
*/
|
||||
protected void addMatchingRule( LDAPMatchingRuleSchema matchSchema ) {
|
||||
public void addMatchingRule( LDAPMatchingRuleSchema matchSchema ) {
|
||||
matchingRules.put( matchSchema.getName().toLowerCase(), matchSchema );
|
||||
}
|
||||
|
||||
|
|
|
@ -610,7 +610,9 @@ public class LdapContextImpl implements EventDirContext, LdapContext {
|
|||
close();
|
||||
m_ldapSvc = new LdapService();
|
||||
// This controls are to be set on the the LDAPConnection
|
||||
m_ctxEnv.setProperty(ContextEnv.P_CONNECT_CTRLS, reqCtls);
|
||||
if (reqCtls != null) {
|
||||
m_ctxEnv.setProperty(ContextEnv.P_CONNECT_CTRLS, reqCtls);
|
||||
}
|
||||
m_ldapSvc.connect(this);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче