community.general icon indicating copy to clipboard operation
community.general copied to clipboard

sefcontext module should support equivalent paths

Open petracvv opened this issue 4 years ago • 4 comments

SUMMARY

This is a duplicate of ansible/ansible#46367 as that issue was closed because of the collection migration. I'm including the text of the issue below:

The semanage fcontext command has a -e/--equal argument that allows a user to specify a source path to use for filesystem contexts for another directory.

For example, /var/www/html typically has SELinux contexts applied so that web servers can serve content from that directory. However, if a user decides to put web content in /opt/web, that directory won't have the correct SELinux contexts applied. The user could then do something like:

semanage fcontext --add --equal /var/www/html /opt/web
restorecon -Rv /opt/web

This would instruct SELinux to apply the same contexts to /opt/web that it would normally apply to /var/www/html.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

sefcontext

ADDITIONAL INFORMATION

It would be nice if this was part of the sefcontext module but maybe it needs to be its own module.

petracvv avatar Oct 28 '20 18:10 petracvv

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Oct 28 '20 18:10 ansibullbot

cc @MorrisA @bcoca @d-little @dagwieers @flynn1973 @gforster @kairoaraujo @marvin-sinister @mator @molekuul @ramooncamacho @wtcross click here for bot help

ansibullbot avatar Oct 28 '20 18:10 ansibullbot

Just curious on the status of this. Are there plans to add this functionality?

petracvv avatar Jul 07 '22 18:07 petracvv

I don't think this module is actively maintained by anyone, so nothing will happen until someone creates a PR for this functionality.

felixfontein avatar Jul 07 '22 19:07 felixfontein

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Nov 04 '22 20:11 ansibullbot