Allow relabeling of files/directories under /usr prefix#180
Merged
rhatdan merged 1 commit intoopencontainers:mainfrom Sep 26, 2022
Merged
Allow relabeling of files/directories under /usr prefix#180rhatdan merged 1 commit intoopencontainers:mainfrom
rhatdan merged 1 commit intoopencontainers:mainfrom
Conversation
We already check to make sure users do not accidentily relabel these
excluded paths:
exclude_paths := map[string]bool{
"/": true,
"/bin": true,
"/boot": true,
"/dev": true,
"/etc": true,
"/etc/passwd": true,
"/etc/pki": true,
"/etc/shadow": true,
"/home": true,
"/lib": true,
"/lib64": true,
"/media": true,
"/opt": true,
"/proc": true,
"/root": true,
"/run": true,
"/sbin": true,
"/srv": true,
"/sys": true,
"/tmp": true,
"/usr": true,
"/var": true,
"/var/lib": true,
"/var/log": true,
}
But some users put homedirectories under /usr, and I see no
reason to block them from relabeling.
At a certain point if users do something dumb with relableing we
can not stop them.
Signed-off-by: Daniel J Walsh <[email protected]>
Collaborator
Author
Collaborator
Author
Member
Double-checking; it looks like |
Collaborator
Author
|
We could move it into that function instead of label.Relabel. Where we use this in Podman and Buildah is always throught lable.Relabel. |
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.
We already check to make sure users do not accidentily relabel these excluded paths:
But some users put homedirectories under /usr, and I see no reason to block them from relabeling.
At a certain point if users do something dumb with relableing we can not stop them.
Signed-off-by: Daniel J Walsh [email protected]