HADOOP-10418. SaslRpcClient should not assume that remote principals are in the default_realm. Contributed by Aaron T. Myers.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1580666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2014-03-24 00:00:57 +00:00
parent 6784b96913
commit 0710b5890b
2 changed files with 6 additions and 1 deletions

View File

@ -318,6 +318,9 @@ Release 2.5.0 - UNRELEASED
HADOOP-10378. Typo in help printed by hdfs dfs -help.
(Mit Desai via suresh)
HADOOP-10418. SaslRpcClient should not assume that remote principals are in
the default_realm. (atm)
Release 2.4.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -300,7 +300,9 @@ String getServerPrincipal(SaslAuth authType) throws IOException {
}
// construct server advertised principal for comparision
String serverPrincipal = new KerberosPrincipal(
authType.getProtocol() + "/" + authType.getServerId()).getName();
authType.getProtocol() + "/" + authType.getServerId(),
KerberosPrincipal.KRB_NT_SRV_HST).getName();
boolean isPrincipalValid = false;
// use the pattern if defined