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:
Yureka 2025-06-11 12:57:47 +02:00 committed by Yureka
parent 8502e487c4
commit 3045c52230

View file

@ -55,11 +55,8 @@ impl SubordinateInfo {
let subuid =
first_subordinate_id(&PathBuf::from("/etc/subuid"), user.uid.as_raw(), &user.name)?;
let subgid = first_subordinate_id(
&PathBuf::from("/etc/subgid"),
group.gid.as_raw(),
&group.name,
)?;
let subgid =
first_subordinate_id(&PathBuf::from("/etc/subgid"), user.uid.as_raw(), &user.name)?;
Ok(SubordinateInfo {
uid: user.uid.as_raw(),
gid: group.gid.as_raw(),