Skip to content
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

Release SELinux labels on error in init function. #31

Open
wants to merge 1 commit into
base: docker-1.13.1-rhel
Choose a base branch
from
Open

Release SELinux labels on error in init function. #31

wants to merge 1 commit into from

Conversation

robbmanes
Copy link

This is a backport of an upstream fix for:

opencontainers/selinux@fd7b61c

Currently if we have an error in the options, we will leak and allocated
SELinux label. This change will release on error.

Also return the mountlabel, even if the user specifies to disable SELinux separation. This keeps other containers from being able to look at this privileged
containers content, as well makeing sure all content has a label.

This is in conjunction with projectatomic/docker#370; while the leak isn't present as runc itself doesn't call this function as often as dockerd does, I thought it good to include.

This is a backport of an upstream fix for:

opencontainers/selinux@fd7b61c

Currently if we have an error in the options, we will leak and allocated
SELinux label.  This change will release on error.

Also return the mountlabel, even if the user specifies to disable SELinux separation.  This keeps other containers from being able to look at this privileged
containers content, as well makeing sure all content has a label.
Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

2 participants