Skip to content

Commit 6a72ee0

Browse files
committed
spawn/UidGid: rename uid, gid to effective_uid, effective_gid
1 parent ad8f159 commit 6a72ee0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Hook.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ WorkshopSpawnHook::Verify(const PreparedChildProcess &p)
3737
if (!plan)
3838
throw FmtRuntimeError("No such plan: {}", plan_name);
3939

40-
if (p.uid_gid.uid != plan->uid)
40+
if (p.uid_gid.effective_uid != plan->uid)
4141
throw FmtRuntimeError("Wrong uid {}, expected {} for plan {}",
42-
p.uid_gid.uid, plan->uid, plan_name);
42+
p.uid_gid.effective_uid, plan->uid, plan_name);
4343

44-
if (p.uid_gid.gid != plan->gid)
44+
if (p.uid_gid.effective_gid != plan->gid)
4545
throw FmtRuntimeError("Wrong gid {}, expected {} for plan {}",
46-
p.uid_gid.gid, plan->gid, plan_name);
46+
p.uid_gid.effective_gid, plan->gid, plan_name);
4747

4848
if (!CompareGroups(plan->groups, p.uid_gid.supplementary_groups))
4949
throw FmtRuntimeError("Supplementary group mismatch for plan {}",

src/workshop/Workplace.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ WorkshopWorkplace::Start(EventLoop &event_loop, const WorkshopJob &job,
129129
p.control_fd = control_child.ToFileDescriptor();
130130

131131
if (!debug_mode) {
132-
p.uid_gid.uid = plan->uid;
133-
p.uid_gid.gid = plan->gid;
132+
p.uid_gid.effective_uid = plan->uid;
133+
p.uid_gid.effective_gid = plan->gid;
134134

135135
std::copy(plan->groups.begin(), plan->groups.end(),
136136
p.uid_gid.supplementary_groups.begin());

0 commit comments

Comments
 (0)