Skip to content

Add ability to set fscontext mounts points#196

Merged
rhatdan merged 1 commit intoopencontainers:mainfrom
rhatdan:fscontext
Feb 8, 2023
Merged

Add ability to set fscontext mounts points#196
rhatdan merged 1 commit intoopencontainers:mainfrom
rhatdan:fscontext

Conversation

@rhatdan
Copy link
Copy Markdown
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 [email protected]

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
Copy Markdown
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
Copy Markdown
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 <[email protected]>
@rhatdan
Copy link
Copy Markdown
Collaborator Author

rhatdan commented Feb 8, 2023

@thaJeztah @kolyshkin @vrothberg PTAL

Copy link
Copy Markdown
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
Copy Markdown
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