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:48 -05:00
parent 5b0d32b4aa
commit 40dbf2a18d
1 changed files with 3 additions and 3 deletions

View File

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