Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-8152]
Formatting error in the rootDN inference code. It shouldn't include
attribute name.

Originally-Committed-As: c99fc315dddf707dba3a2dea6a048bd76dce4c2e
  • Loading branch information
kohsuke committed Jan 28, 2012
1 parent 8d6da51 commit c32808c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/security/LDAPSecurityRealm.java
Expand Up @@ -325,8 +325,8 @@ private String inferRootDN(String server) {
DirContext ctx = new InitialDirContext(props);
Attributes atts = ctx.getAttributes("");
Attribute a = atts.get("defaultNamingContext");
if(a!=null) // this entry is available on Active Directory. See http://msdn2.microsoft.com/en-us/library/ms684291(VS.85).aspx
return a.toString();
if(a!=null && a.get()!=null) // this entry is available on Active Directory. See http://msdn2.microsoft.com/en-us/library/ms684291(VS.85).aspx
return a.get().toString();

a = atts.get("namingcontexts");
if(a==null) {
Expand Down

0 comments on commit c32808c

Please sign in to comment.