HDFS-11069. Tighten the authorization of datanode RPC. Contributed by Kihwal Lee

This commit is contained in:
Kihwal Lee 2016-10-27 14:17:16 -05:00
parent db41965996
commit ae48c496dc
1 changed files with 2 additions and 2 deletions

View File

@ -989,7 +989,7 @@ public class DataNode extends ReconfigurableBase
// Is this by the DN user itself?
assert dnUserName != null;
if (callerUgi.getShortUserName().equals(dnUserName)) {
if (callerUgi.getUserName().equals(dnUserName)) {
return;
}
@ -1348,7 +1348,7 @@ public class DataNode extends ReconfigurableBase
this.blockPoolTokenSecretManager = new BlockPoolTokenSecretManager();
// Login is done by now. Set the DN user name.
dnUserName = UserGroupInformation.getCurrentUser().getShortUserName();
dnUserName = UserGroupInformation.getCurrentUser().getUserName();
LOG.info("dnUserName = " + dnUserName);
LOG.info("supergroup = " + supergroup);
initIpcServer();