[ 
https://issues.apache.org/jira/browse/HADOOP-10249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dilli Arumugam updated HADOOP-10249:
------------------------------------


The patch(diff) that fixes the problem:

svn diff
Index: src/main/java/org/apache/hadoop/security/LdapGroupsMapping.java
===================================================================
--- src/main/java/org/apache/hadoop/security/LdapGroupsMapping.java     
(revision 1560166)
+++ src/main/java/org/apache/hadoop/security/LdapGroupsMapping.java     
(working copy)
@@ -356,7 +356,7 @@
         c = reader.read();
       }
       reader.close();
-      return password.toString();
+      return password.toString().trim();
     } catch (IOException ioe) {
       throw new RuntimeException("Could not read password file: " + pwFile, 
ioe);
     }


> LdapGroupsMapping should trim ldap password read from file
> ----------------------------------------------------------
>
>                 Key: HADOOP-10249
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10249
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Dilli Arumugam
>
>  org.apache.hadoop.security.LdapGroupsMapping allows specifying ldap 
> connection password in a file using property key
> hadoop.security.group.mapping.ldap.bind.password.file
> The code in LdapGroupsMapping  that reads the content of the password file 
> does not trim the password value. This causes ldap connection failure as the 
> password in the password file ends up having a trailing newline.
> Most of the text editors and echo adds a new line at the end of file.
> So, LdapGroupsMapping should trim the password read from the file.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to