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

Tap plugin - alternative PR #794

Closed

Conversation

mmirecki
Copy link
Contributor

@mmirecki mmirecki commented Dec 7, 2022

Alternative to #784
with selinux stuff encapsulated in a seprate package

Signed-off-by: mmirecki <mmirecki@redhat.com>
@mmirecki mmirecki changed the title Tap plugin Tap plugin - alternative PR Dec 7, 2022
// main instance of the plugin which performs the rest of the configuration.
func (sm SELinuxSecurityModel) ReRunCommandWithSecurityLabels(addLinkString string, tmpName string, mtu int, nsFd int, multique bool, mac string) error {
// Apply the appropriate se linux label. This will affect the newly executed plugin process.
if err := selinux.SetExecLabel("system_u:system_r:container_t:s0"); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I see these labels are hard-coded; is that the norm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is specific to just the selinux security module. Other modules would of course have different mechanisms (if present).
This PR was a proposal on how to extract the security module specific items from the main plugin code, but it seems this approach has not met with approval either, so I'm closing it.

@mmirecki mmirecki closed this Jan 11, 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.

None yet

3 participants