HDFS-11069. Tighten the authorization of datanode RPC. Contributed by Kihwal Lee
This commit is contained in:
parent
db41965996
commit
ae48c496dc
@ -989,7 +989,7 @@ private void checkSuperuserPrivilege() throws IOException, AccessControlExceptio
|
|||||||
|
|
||||||
// Is this by the DN user itself?
|
// Is this by the DN user itself?
|
||||||
assert dnUserName != null;
|
assert dnUserName != null;
|
||||||
if (callerUgi.getShortUserName().equals(dnUserName)) {
|
if (callerUgi.getUserName().equals(dnUserName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1348,7 +1348,7 @@ void startDataNode(List<StorageLocation> dataDirectories,
|
|||||||
this.blockPoolTokenSecretManager = new BlockPoolTokenSecretManager();
|
this.blockPoolTokenSecretManager = new BlockPoolTokenSecretManager();
|
||||||
|
|
||||||
// Login is done by now. Set the DN user name.
|
// Login is done by now. Set the DN user name.
|
||||||
dnUserName = UserGroupInformation.getCurrentUser().getShortUserName();
|
dnUserName = UserGroupInformation.getCurrentUser().getUserName();
|
||||||
LOG.info("dnUserName = " + dnUserName);
|
LOG.info("dnUserName = " + dnUserName);
|
||||||
LOG.info("supergroup = " + supergroup);
|
LOG.info("supergroup = " + supergroup);
|
||||||
initIpcServer();
|
initIpcServer();
|
||||||
|
Loading…
Reference in New Issue
Block a user