Merge pull request #3510 from kolyshkin/fix-mntns-userns

libct: fix mounting via wrong proc fd
This commit is contained in:
Akihiro Suda
2022-06-23 18:43:25 -05:00
committed by GitHub
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -73,6 +73,8 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig, mountFds []int) (err
// Therefore, we can access mountFds[i] without any concerns.
if mountFds != nil && mountFds[i] != -1 {
mountConfig.fd = &mountFds[i]
} else {
mountConfig.fd = nil
}
if err := mountToRootfs(m, mountConfig); err != nil {