From ee6abea956f71a0085507f44453c1cdea9c708fe Mon Sep 17 00:00:00 2001 From: Paul Wulff Date: Fri, 15 Dec 2017 15:27:51 +0100 Subject: [PATCH] Race condition in FdManager::Rename because no mutex is used. --- src/fdcache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fdcache.cpp b/src/fdcache.cpp index 52f502a..d551ebb 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -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) { + AutoLock auto_lock(&FdManager::fd_manager_lock); fdent_map_t::iterator iter = fent.find(from); if(fent.end() != iter){ // found