-
Notifications
You must be signed in to change notification settings - Fork 0
Set the user on exec #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d459f61 to
62a2e2d
Compare
| return err | ||
| } | ||
| opts := []oci.SpecOpts{ | ||
| coci.WithUser(ec.User), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder this should be guarded by ec.User != nil. Otherwise, if no explicit user is set, this will reset additionalGIDs without any replacement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's guarded by if len(ec.User) > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my bad. 👍
ndeloof
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with an open question on nil ec.User
| return err | ||
| } | ||
| opts := []oci.SpecOpts{ | ||
| coci.WithUser(ec.User), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my bad. 👍
- What I did
Fixed exec when specifiying a user:
- How I did it
By getting the container from containerd and asking it to populate the spec with the right user.