karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject [3/3] git commit: KARAF-2916 - Add fully qualified DN replacement for role search
Date Wed, 16 Apr 2014 16:16:11 GMT
KARAF-2916 - Add fully qualified DN replacement for role search


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/824c575f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/824c575f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/824c575f

Branch: refs/heads/karaf-2.x
Commit: 824c575f49a8f219f6c294d2856a4894b8c2f483
Parents: 6d88fd3
Author: Jonathan Anstey <janstey@gmail.com>
Authored: Wed Apr 16 13:45:01 2014 -0230
Committer: Jonathan Anstey <janstey@gmail.com>
Committed: Wed Apr 16 13:45:50 2014 -0230

----------------------------------------------------------------------
 .../java/org/apache/karaf/jaas/modules/ldap/LDAPLoginModule.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/824c575f/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/ldap/LDAPLoginModule.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/ldap/LDAPLoginModule.java
b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/ldap/LDAPLoginModule.java
index bfd911e..c3b55db 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/ldap/LDAPLoginModule.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/ldap/LDAPLoginModule.java
@@ -277,6 +277,7 @@ public class LDAPLoginModule extends AbstractKarafLoginModule {
             logger.debug("  base DN: " + roleBaseDN);
             roleFilter = roleFilter.replaceAll(Pattern.quote("%u"), Matcher.quoteReplacement(user));
             roleFilter = roleFilter.replaceAll(Pattern.quote("%dn"), Matcher.quoteReplacement(userDN));
+            roleFilter = roleFilter.replaceAll(Pattern.quote("%fqdn"), Matcher.quoteReplacement(userDN
+ "," + userBaseDN));
             roleFilter = roleFilter.replace("\\", "\\\\");
             logger.debug("  filter: " + roleFilter);
             NamingEnumeration namingEnumeration = context.search(roleBaseDN, roleFilter,
controls);


Mime
View raw message