Skip to content

Conversation

@Mashimiao
Copy link

Signed-off-by: Ma Shimiao [email protected]

@Mashimiao Mashimiao force-pushed the runtime-test-id-mappings-validation branch from 1a3d905 to 77affb7 Compare September 13, 2016 01:07
case "uid_map":
mapFile = "/proc/1/uid_map"
case "gid_map":
mapFile = "/proc/1/gid_map"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we look at /proc/self/*_map instead? Then we don't have to think about “is it ok to look at PID 1's maps?”. I can't think of a case where looking at PID 1 would be wrong, but I know looking at /proc/self/*_map will be right ;).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I'd bump this choice up to the caller and have getIDMappings take a path:

func getIDMappings(path string) ([]rspec.IDMapping, error)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks.

@Mashimiao Mashimiao force-pushed the runtime-test-id-mappings-validation branch 2 times, most recently from e5725bd to c746333 Compare September 14, 2016 08:44
@Mashimiao Mashimiao force-pushed the runtime-test-id-mappings-validation branch from c746333 to 46fea50 Compare October 8, 2016 02:00
@Mashimiao
Copy link
Author

@mrunalp @liangchenye rebased.

@mrunalp
Copy link
Contributor

mrunalp commented Oct 12, 2016

LGTM

@mrunalp mrunalp merged commit 15b0436 into opencontainers:master Oct 12, 2016
@Mashimiao Mashimiao deleted the runtime-test-id-mappings-validation branch November 14, 2016 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants