1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Merge pull request #12194 from NixOS/mergify/bp/2.24-maintenance/pr-11684

libstore: Make our sandbox pivot_root directory accessible to ourself (backport #11684)
This commit is contained in:
mergify[bot] 2025-01-10 20:51:33 +00:00 committed by GitHub
commit 86da8bbbf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1966,7 +1966,7 @@ void LocalDerivationGoal::runChild()
if (chdir(chrootRootDir.c_str()) == -1) if (chdir(chrootRootDir.c_str()) == -1)
throw SysError("cannot change directory to '%1%'", chrootRootDir); throw SysError("cannot change directory to '%1%'", chrootRootDir);
if (mkdir("real-root", 0) == -1) if (mkdir("real-root", 0500) == -1)
throw SysError("cannot create real-root directory"); throw SysError("cannot create real-root directory");
if (pivot_root(".", "real-root") == -1) if (pivot_root(".", "real-root") == -1)