You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ro...@apache.org on 2016/01/07 06:13:17 UTC
hadoop git commit: HADOOP-12687.
SecureUtil#QualifiedHostResolver#getByName should also try to resolve direct
hostname (Sunil G via rohithsharmaks)
Repository: hadoop
Updated Branches:
refs/heads/trunk 791c1639a -> 2b252844e
HADOOP-12687. SecureUtil#QualifiedHostResolver#getByName should also try to resolve direct hostname (Sunil G via rohithsharmaks)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2b252844
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2b252844
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2b252844
Branch: refs/heads/trunk
Commit: 2b252844e04eebd4f32815d4bd6f914c02994709
Parents: 791c163
Author: rohithsharmaks <ro...@apache.org>
Authored: Thu Jan 7 10:42:48 2016 +0530
Committer: rohithsharmaks <ro...@apache.org>
Committed: Thu Jan 7 10:42:48 2016 +0530
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 4 ++++
.../src/main/java/org/apache/hadoop/security/SecurityUtil.java | 6 ++++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b252844/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 770d37d..4631165 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -660,6 +660,10 @@ Release 2.9.0 - UNRELEASED
BUG FIXES
+ HADOOP-12687. SecureUtil#QualifiedHostResolver#getByName should also try to
+ resolve direct hostname, incase multiple loopback addresses are present in
+ /etc/hosts (Sunil G via rohithsharmaks)
+
Release 2.8.0 - UNRELEASED
INCOMPATIBLE CHANGES
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b252844/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
index 38096ab..714c923 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
@@ -580,7 +580,13 @@ public class SecurityUtil {
addr = getByNameWithSearch(host);
if (addr == null) {
addr = getByExactName(host);
+ // If multiple loopback addresses are present, a direct lookup
+ // will be helpful
+ if (addr == null) {
+ addr = InetAddress.getByName(host);
+ }
}
+
}
}
// unresolvable!