-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix panic when Linux is nil #1551
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
| func setupUserNamespace(spec *specs.Spec, config *configs.Config) error { | ||
| if len(spec.Linux.UIDMappings) == 0 { | ||
| return nil | ||
| } |
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.
this removal seems unintended. i think if spec.Linux is nil here we shoud just bail to be the same as the old code.
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.
The nil check should be on 613 now
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.
nvm, fixed it
Linux is not always not nil. If Linux is nil, panic will occur. Signed-off-by: Ma Shimiao <[email protected]> Signed-off-by: Michael Crosby <[email protected]>
076206e to
527dc5a
Compare
Linux is not always not nil.
If Linux is nil, panic will occur.
Closes #1449
This is a rebase of #1449
Signed-off-by: Ma Shimiao [email protected]
Signed-off-by: Michael Crosby [email protected]