HDFS-11069. Tighten the authorization of datanode RPC. Contributed by Kihwal Lee
(cherry picked from commit ae48c496dc
)
This commit is contained in:
parent
6c11a11918
commit
5057abc390
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue