Fix sandbox escape patch

This commit is contained in:
Eelco Dolstra 2024-03-07 13:16:15 +01:00
parent 9179bc5a6e
commit 7794354a98

View File

@ -2546,8 +2546,8 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
// Replace the output by a fresh copy of itself to make sure
// that there's no stale file descriptor pointing to it
Path tmpOutput = actualPath + ".tmp";
renameFile(actualPath, tmpOutput);
copyFile(tmpOutput, actualPath, true);
copyFile(actualPath, tmpOutput, true);
renameFile(tmpOutput, actualPath);
auto newInfo0 = newInfoFromCA(DerivationOutput::CAFloating {
.method = dof.ca.method,