HDFS-11069. Tighten the authorization of datanode RPC. Contributed by Kihwal Lee
(cherry picked from commit ae48c496dc
)
This commit is contained in:
parent
5b0d32b4aa
commit
40dbf2a18d
|
@ -982,7 +982,7 @@ public class DataNode extends ReconfigurableBase
|
||||||
|
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1300,7 +1300,7 @@ public class DataNode extends ReconfigurableBase
|
||||||
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(conf);
|
initIpcServer(conf);
|
||||||
|
@ -3307,4 +3307,4 @@ public class DataNode extends ReconfigurableBase
|
||||||
void setBlockScanner(BlockScanner blockScanner) {
|
void setBlockScanner(BlockScanner blockScanner) {
|
||||||
this.blockScanner = blockScanner;
|
this.blockScanner = blockScanner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue