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

(cherry picked from commit ae48c496dc)
This commit is contained in:
Kihwal Lee 2016-10-27 14:18:10 -05:00
parent 6c11a11918
commit 5057abc390
1 changed files with 3 additions and 3 deletions

View File

@ -996,7 +996,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;
}
@ -1315,7 +1315,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();
@ -3322,4 +3322,4 @@ public class DataNode extends ReconfigurableBase
void setBlockScanner(BlockScanner blockScanner) {
this.blockScanner = blockScanner;
}
}
}