Browse code

c8d/exec: Add additional groups on exec

Signed-off-by: Laura Brehm <laurabrehm@hey.com>

Laura Brehm authored on 2023/10/25 10:28:39
Showing 1 changed files
... ...
@@ -41,6 +41,7 @@ func getUserFromContainerd(ctx context.Context, containerdCli *containerd.Client
41 41
 		coci.WithUser(ec.User),
42 42
 		withResetAdditionalGIDs(),
43 43
 		coci.WithAdditionalGIDs(ec.User),
44
+		coci.WithAppendAdditionalGroups(ec.Container.HostConfig.GroupAdd...),
44 45
 	}
45 46
 	for _, opt := range opts {
46 47
 		if err := opt(ctx, containerdCli, &cinfo, spec); err != nil {