You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2004/10/10 22:38:08 UTC
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config realm.xml
markt 2004/10/10 13:38:08
Modified: catalina/src/share/org/apache/catalina/realm JNDIRealm.java
webapps/tomcat-docs/config realm.xml
Log:
Fix bug 31273. Add support for derefAliases.
Revision Changes Path
1.20 +30 -2 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
Index: JNDIRealm.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- JNDIRealm.java 26 Aug 2004 21:37:21 -0000 1.19
+++ JNDIRealm.java 10 Oct 2004 20:38:08 -0000 1.20
@@ -191,6 +191,17 @@
*/
protected String contextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
+
+ /**
+ * How aliases should be dereferenced during search operations.
+ */
+ protected String derefAliases = null;
+
+ /**
+ * Constant that holds the name of the environment property for specifying
+ * the manner in which aliases should be dereferenced.
+ */
+ public final static String DEREF_ALIASES = "java.naming.ldap.derefAliases";
/**
* Descriptive information about this Realm implementation.
@@ -441,6 +452,21 @@
}
+ /**
+ * Return the derefAliases setting to be used.
+ */
+ public java.lang.String getDerefAliases() {
+ return derefAliases;
+ }
+
+ /**
+ * Set the value for derefAliases to be used when searching the directory.
+ *
+ * @param derefAliases New value of property derefAliases.
+ */
+ public void setDerefAliases(java.lang.String derefAliases) {
+ this.derefAliases = derefAliases;
+ }
/**
* Return the protocol to be used.
@@ -1428,7 +1454,7 @@
*/
protected String getName() {
- return (this.name);
+ return (name);
}
@@ -1522,6 +1548,8 @@
env.put(Context.SECURITY_PROTOCOL, protocol);
if (referrals != null)
env.put(Context.REFERRAL, referrals);
+ if (derefAliases != null)
+ env.put(JNDIRealm.DEREF_ALIASES, derefAliases);
return env;
1.9 +6 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/config/realm.xml
Index: realm.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/realm.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- realm.xml 12 Jan 2003 17:26:48 -0000 1.8
+++ realm.xml 10 Oct 2004 20:38:08 -0000 1.9
@@ -298,6 +298,12 @@
assumes that the standard JNDI LDAP provider will be utilized.</p>
</attribute>
+ <attribute name="derefAliases" required="false">
+ <p>A string specifying how aliases are to be dereferenced during
+ search operations. The allowed values are "always", "never",
+ "finding" and "searching". If not specified, "always" is used.</p>
+ </attribute>
+
<attribute name="protocol" required="false">
<p>A string specifying the security protocol to use. If not given
the providers default is used.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org