HADOOP-12567. NPE in SaslRpcServer. Contributed by Sergey Shelukhin.

(cherry picked from commit 7fab5c8cec)
This commit is contained in:
cnauroth 2015-11-17 15:59:57 -08:00
parent d8e60080e9
commit 397836a7b3
2 changed files with 5 additions and 2 deletions

View File

@ -705,6 +705,8 @@ Release 2.8.0 - UNRELEASED
HADOOP-12560: Fix sprintf warnings in {{DomainSocket.c}} introduced by
HADOOP-12344 (Mingliang Liu via Colin P. McCabe)
HADOOP-12567: NPE in SaslRpcServer (Sergey Shelukhin via cnauroth)
OPTIMIZATIONS
HADOOP-12051. ProtobufRpcEngine.invoke() should use Exception.toString()

View File

@ -322,8 +322,9 @@ public void handle(Callback[] callbacks) throws InvalidToken,
}
if (ac.isAuthorized()) {
if (LOG.isDebugEnabled()) {
String username =
getIdentifier(authzid, secretManager).getUser().getUserName();
UserGroupInformation logUser =
getIdentifier(authzid, secretManager).getUser();
String username = logUser == null ? null : logUser.getUserName();
LOG.debug("SASL server DIGEST-MD5 callback: setting "
+ "canonicalized client ID: " + username);
}