[ 
https://issues.apache.org/jira/browse/YARN-11151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lujie updated YARN-11151:
-------------------------
    Priority: Critical  (was: Major)

> 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
>            Priority: Critical
>
> we init LevelDBCacheTimelineStore, RollingLevelDBTimelineStore, 
> EntityGroupFSTimelineStore and LeveldbTimelineStore, 
> LeveldbTimelineStateStore 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]

Reply via email to