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

Add ability to set fscontext mounts points #196

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

rhatdan
Copy link
Collaborator

@rhatdan rhatdan commented Feb 7, 2023

SELinux supports mounting file systems with multiple different file system types, adding new interface FormatMountLabelByType, allows the caller to specify the SELinux context type to mount the file system with.

Mount supports multiple different file system types.

context, fscontext, rootcontext, defcontext.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

@@ -78,19 +78,37 @@ func ReleaseLabel(label string) error {
// Deprecated: use selinux.DupSecOpt
var DupSecOpt = selinux.DupSecOpt

// FormatMountLabel returns a string to be used by the mount command. Using
// the SELinux `context` mount option. Changling labels of files on mount
Copy link
Member

Choose a reason for hiding this comment

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

typo in Changling

}

expected = `src,fscontext="foobar"`
if test := FormatMountLabel("src", "foobar", "fscontext"); test != expected {
Copy link
Member

Choose a reason for hiding this comment

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

FormatMountLabelByType?

SELinux supports mounting file systems with multiple different file
system types, adding new interface FormatMountLabelByType, allows the
caller to specify the SELinux context type to mount the file system
with.

Mount supports multiple different file system types.

context, fscontext, rootcontext, defcontext.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Collaborator Author

rhatdan commented Feb 8, 2023

@thaJeztah @kolyshkin @vrothberg PTAL

Copy link
Collaborator

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan rhatdan merged commit 861be7b into opencontainers:main Feb 8, 2023
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