Add oci.WithUser helper function.#2257
Merged
crosbymichael merged 1 commit intocontainerd:masterfrom Mar 30, 2018
Merged
Conversation
Signed-off-by: Lantao Liu <lantaol@google.com>
Codecov Report
@@ Coverage Diff @@
## master #2257 +/- ##
==========================================
+ Coverage 41.13% 41.19% +0.06%
==========================================
Files 66 66
Lines 7758 7758
==========================================
+ Hits 3191 3196 +5
+ Misses 4063 4060 -3
+ Partials 504 502 -2
Continue to review full report at Codecov.
|
Member
|
LGTM |
1 similar comment
Member
|
LGTM |
mlaventure
reviewed
Mar 30, 2018
| } | ||
| return WithUserID(uint32(v))(ctx, client, c, s) | ||
| case 2: | ||
| var username, groupname string |
| } | ||
| } | ||
|
|
||
| // WithUser accepts a valid user string in OCI Image Spec v1.0.0: |
Contributor
There was a problem hiding this comment.
nit: The first line should be self contained usually
May something like
// WithUser sets the user to be used within the container
// It accepts a valid user string as defined in the OCI Image Spec v1.0.0:
// user, uid, user:group, uid:gid, uid:group, user:gid?
Member
Author
|
@mlaventure Will address your comments in another PR soon. :) |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For containerd/cri#710.
Add a
oci.WithUserhelper function which accepts valid user string defined in OCI image config.This also addresses the
// TODO: support username and groupname. In Kubernetes 1.10, we recently supported group id, and will support group name soon. This helper function will be very useful. :)Signed-off-by: Lantao Liu lantaol@google.com