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

View File

@ -989,7 +989,7 @@ private void checkSuperuserPrivilege() throws IOException, AccessControlExceptio
// 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 @@ void startDataNode(List<StorageLocation> dataDirectories,
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();