HDFS-11069. Tighten the authorization of datanode RPC. Contributed by Kihwal Lee
(cherry picked from commit ae48c496dce8d0eae4571fc64e6850d602bae688)
This commit is contained in:
parent
6c11a11918
commit
5057abc390
@ -996,7 +996,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;
|
||||
}
|
||||
|
||||
@ -1315,7 +1315,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();
|
||||
@ -3322,4 +3322,4 @@ ScheduledThreadPoolExecutor getMetricsLoggerTimer() {
|
||||
void setBlockScanner(BlockScanner blockScanner) {
|
||||
this.blockScanner = blockScanner;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user