lujie created YARN-11151:
----------------------------
Summary: sensitive infor may leak due to crash
Key: YARN-11151
URL: https://issues.apache.org/jira/browse/YARN-11151
Project: Hadoop YARN
Issue Type: Bug
Reporter: lujie
we init LevelDBCacheTimelineStore and LeveldbTimelineStore like:
{code:java}
try {
localFS = FileSystem.getLocal(conf);
if (!localFS.exists(dbPath)) {
if (!localFS.mkdirs(dbPath)) {
throw new IOException("Couldn't create directory for leveldb " +
"timeline store " + dbPath);
}
localFS.setPermission(dbPath, LeveldbUtils.LEVELDB_DIR_UMASK);
}
} finally {
IOUtils.cleanupWithLogger(LOG, localFS);
} {code}
if node crash before setPermisson, then the permisison will be 755 forever
code should be like :
{code:java}
try {
localFS = FileSystem.getLocal(conf);
if (!localFS.exists(dbPath)) {
if (!localFS.mkdirs(dbPath)) {
throw new IOException("Couldn't create directory for leveldb " +
"timeline store " + dbPath);
}
}
if
(localFS.getStatus(dbPath).getPermmision().equlas(LeveldbUtils.LEVELDB_DIR_UMASK))){
localFS.setPermission(dbPath, LeveldbUtils.LEVELDB_DIR_UMASK);} }
finally {
IOUtils.cleanupWithLogger(LOG, localFS);
} {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]