Skip to content

Commit

Permalink
spawn/UidGid: rename uid, gid to effective_uid, effective_gid
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Feb 25, 2025
1 parent da70674 commit 7e82650
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Connection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ struct Connection::Translation {
static void
CheckChildOptions(const ChildOptions &options)
{
if (options.uid_gid.uid == 0)
if (options.uid_gid.effective_uid == 0)
throw std::invalid_argument{"Translation response contains no UID"};

if (options.uid_gid.gid == 0)
if (options.uid_gid.effective_gid == 0)
throw std::invalid_argument{"Translation response contains no GID"};

if (!options.HasHome())
Expand Down Expand Up @@ -332,8 +332,8 @@ Connection::PrepareChildProcess(PreparedChildProcess &p,
}
} else {
#endif // ENABLE_TRANSLATION
p.uid_gid.uid = uid;
p.uid_gid.gid = gid;
p.uid_gid.effective_uid = uid;
p.uid_gid.effective_gid = gid;

if (!home_path.empty())
p.ns.mount.home = home_path.c_str();
Expand Down

0 comments on commit 7e82650

Please sign in to comment.