Fix missing chdir in non-CLONE_NEWNS path

This commit is contained in:
Robert Swiecki 2019-08-21 14:29:35 +02:00
parent 5abfae7161
commit c291b11ae6

4
mnt.cc
View File

@ -354,6 +354,10 @@ static bool initNsInternal(nsjconf_t* nsjconf) {
PLOG_E("chdir('/')"); PLOG_E("chdir('/')");
return false; return false;
} }
if (chdir(nsjconf->cwd.c_str()) == -1) {
PLOG_E("chdir('%s')", nsjconf->cwd.c_str());
return false;
}
return true; return true;
} }