mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-14 16:34:09 +00:00
Race condition in FdManager::Rename because no mutex is used.
This commit is contained in:
parent
cea7d44717
commit
ee6abea956
@ -2116,6 +2116,7 @@ FdEntity* FdManager::ExistOpen(const char* path, int existfd, bool ignore_existf
|
|||||||
|
|
||||||
void FdManager::Rename(const std::string &from, const std::string &to)
|
void FdManager::Rename(const std::string &from, const std::string &to)
|
||||||
{
|
{
|
||||||
|
AutoLock auto_lock(&FdManager::fd_manager_lock);
|
||||||
fdent_map_t::iterator iter = fent.find(from);
|
fdent_map_t::iterator iter = fent.find(from);
|
||||||
if(fent.end() != iter){
|
if(fent.end() != iter){
|
||||||
// found
|
// found
|
||||||
|
Loading…
Reference in New Issue
Block a user