Oops - after chroot, the root is /.

This commit is contained in:
Noam Yorav-Raphael 2024-09-09 19:11:31 +03:00
parent d6fd7eee56
commit fdc5d1e894

View File

@ -1971,7 +1971,7 @@ void LocalDerivationGoal::runChild()
throw SysError("cannot remove real-root directory");
// Make build root read-only, so `mkdir /homeless-shelter` would fail.
chmod_(chrootRootDir, 01555);
chmod_("/", 0555);
/* Switch to the sandbox uid/gid in the user namespace,
which corresponds to the build user or calling user in