-
Notifications
You must be signed in to change notification settings - Fork 64
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
Conversation
go-selinux/label/label.go
Outdated
@@ -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 |
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.
typo in Changling
go-selinux/label/label_test.go
Outdated
} | ||
|
||
expected = `src,fscontext="foobar"` | ||
if test := FormatMountLabel("src", "foobar", "fscontext"); test != expected { |
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.
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 <[email protected]>
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.
LGTM
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.
LGTM
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 [email protected]