瀏覽代碼

HADOOP-10249. LdapGroupsMapping should trim ldap password read from file. Contributed by Dilli Armugam.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1568164 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 11 年之前
父節點
當前提交
9d89fb8ca1

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -339,6 +339,9 @@ Release 2.4.0 - UNRELEASED
     HADOOP-10338. Cannot get the FileStatus of the root inode from the new
     Globber (cmccabe)
 
+    HADOOP-10249. LdapGroupsMapping should trim ldap password read from file.
+    (Dilli Armugam via suresh)
+
 Release 2.3.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/LdapGroupsMapping.java

@@ -356,7 +356,7 @@ public class LdapGroupsMapping
         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);
     }