1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-23 10:49:36 +01:00

Remove buildUser from DerivationBuilder

The use of a `buildUser` is an implementation detail of some types of
sandboxes that shouldn't exposed.
This commit is contained in:
Eelco Dolstra 2025-05-26 15:53:05 +02:00 committed by Cole Helbling
parent 7469e7aa57
commit c6617d6f2e
3 changed files with 7 additions and 7 deletions

View file

@ -895,8 +895,8 @@ Goal::Co DerivationGoal::tryToBuild()
builder->startBuilder();
} catch (BuildError & e) {
builder.reset();
outputLocks.unlock();
builder->buildUser.reset();
worker.permanentFailure = true;
co_return done(BuildResult::InputRejected, {}, std::move(e));
}

View file

@ -113,6 +113,11 @@ public:
private:
/**
* User selected for running the builder.
*/
std::unique_ptr<UserLock> buildUser;
/**
* The cgroup of the builder, if any.
*/
@ -271,7 +276,7 @@ public:
/**
* Start building a derivation.
*/
void startBuilder() override;;
void startBuilder() override;
/**
* Tear down build environment after the builder exits (either on

View file

@ -145,11 +145,6 @@ struct DerivationBuilderCallbacks
*/
struct DerivationBuilder : RestrictionContext
{
/**
* User selected for running the builder.
*/
std::unique_ptr<UserLock> buildUser;
/**
* The process ID of the builder.
*/