crosvm/sys_util
Fergus Dall 51200519a2 Don't rely on being able to look up users/groups
Some devices need to have their current uid mapped in their sandbox
for bind mounts to work as expected. Currently crosvm looks up the
uid/gid for "crosvm" and maps that.

This logic is dubious anyway, since crosvm should be using whatever
user/group it was started under rather then trying to switch (which is
a priviliged operation), but putting concierge in a user namespace
breaks it entierly because the crosvm user gets remapped to a
different numeric value.

Replace the current approach with mapping the current euid/egid,
whatever it may be.

BUG=chromium:1240116
TEST=Manually tested

Change-Id: I0e9b95ed04834da1adedb72bee52ac4359f06041
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3105907
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Allen Webb <allenwebb@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2021-08-27 17:57:57 +00:00
..
poll_token_derive Update syn, quote, and proc-macro past 1.0 2020-02-06 05:28:15 +00:00
src Don't rely on being able to look up users/groups 2021-08-27 17:57:57 +00:00
.build_test_serial build_test: misc options, improvements, amd bug fixes 2020-10-15 13:40:32 +00:00
Cargo.toml sys_util: Switch syslog error to thiserror 2021-05-18 16:42:20 +00:00