Support uid in WithAdditionalGIDs.#2641
Merged
crosbymichael merged 1 commit intocontainerd:masterfrom Sep 13, 2018
Merged
Conversation
Random-Liu
added a commit
to Random-Liu/cri-containerd
that referenced
this pull request
Sep 13, 2018
Signed-off-by: Lantao Liu <lantaol@google.com>
Random-Liu
added a commit
to Random-Liu/cri-containerd
that referenced
this pull request
Sep 13, 2018
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
35613da to
178db32
Compare
Random-Liu
commented
Sep 13, 2018
| return u.Uid == uid | ||
| }) | ||
| if err != nil { | ||
| if os.IsNotExist(err) || err == errNoUsersFound { |
Member
Author
There was a problem hiding this comment.
We should ignore not found error here, because it is normal that a built from scratch image doesn't have /etc/passwd.
| return false | ||
| }) | ||
| if err != nil { | ||
| if os.IsNotExist(err) { |
Member
Author
There was a problem hiding this comment.
We should ignore not found error here, because it is possible that a built from scratch image has /etc/passwd (thus username is valid), but doesn't have /etc/group.
Random-Liu
added a commit
to Random-Liu/cri-containerd
that referenced
this pull request
Sep 13, 2018
Signed-off-by: Lantao Liu <lantaol@google.com>
Member
|
Thanks @Random-Liu; argh--should have caught that in my implementation. I remember looking over that and only thinking about |
Member
|
LGTM |
Random-Liu
added a commit
to Random-Liu/containerd
that referenced
this pull request
Sep 13, 2018
Signed-off-by: Lantao Liu <lantaol@google.com>
dmcgowan
referenced
this pull request
Sep 14, 2018
[release/1.1] Backport: Support uid in WithAdditionalGIDs
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.
I can do another temporary mount to convert uid to username, but I think it is better to just do it in
WithAdditionalGIDsreusing the same temporary mount.Signed-off-by: Lantao Liu lantaol@google.com