Skip to content

Commit 3045c52

Browse files
yuyuyurekaYureka
authored andcommitted
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>
1 parent 8502e48 commit 3045c52

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

snix/build/src/oci/subuid.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,8 @@ impl SubordinateInfo {
5555

5656
let subuid =
5757
first_subordinate_id(&PathBuf::from("/etc/subuid"), user.uid.as_raw(), &user.name)?;
58-
let subgid = first_subordinate_id(
59-
&PathBuf::from("/etc/subgid"),
60-
group.gid.as_raw(),
61-
&group.name,
62-
)?;
58+
let subgid =
59+
first_subordinate_id(&PathBuf::from("/etc/subgid"), user.uid.as_raw(), &user.name)?;
6360
Ok(SubordinateInfo {
6461
uid: user.uid.as_raw(),
6562
gid: group.gid.as_raw(),

0 commit comments

Comments
 (0)