build/oci: look up subgid from username
the subgid maps are not mapped per group, but per user Change-Id: Iaf367cff159109eefb5ef99d58033082e6151c5d Reviewed-on: https://cl.snix.dev/c/snix/+/30568 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
This commit is contained in:
parent
8502e487c4
commit
3045c52230
1 changed files with 2 additions and 5 deletions
|
|
@ -55,11 +55,8 @@ impl SubordinateInfo {
|
||||||
|
|
||||||
let subuid =
|
let subuid =
|
||||||
first_subordinate_id(&PathBuf::from("/etc/subuid"), user.uid.as_raw(), &user.name)?;
|
first_subordinate_id(&PathBuf::from("/etc/subuid"), user.uid.as_raw(), &user.name)?;
|
||||||
let subgid = first_subordinate_id(
|
let subgid =
|
||||||
&PathBuf::from("/etc/subgid"),
|
first_subordinate_id(&PathBuf::from("/etc/subgid"), user.uid.as_raw(), &user.name)?;
|
||||||
group.gid.as_raw(),
|
|
||||||
&group.name,
|
|
||||||
)?;
|
|
||||||
Ok(SubordinateInfo {
|
Ok(SubordinateInfo {
|
||||||
uid: user.uid.as_raw(),
|
uid: user.uid.as_raw(),
|
||||||
gid: group.gid.as_raw(),
|
gid: group.gid.as_raw(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue