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

Fix se linux policy gen #197

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nitai-nahaliel
Copy link

When i followed the selinux policy configuration procedure in the documentaion i encountered an error:

# fgrep "mysqld" /var/log/audit/audit.log | audit2allow -m MySQL_galera -o galera.te
# checkmodule -M -m galera.te -o galera.mod
checkmodule: loading policy configuration from galera.te
checkmodule: module name Mysql_galera is different than the output base filename

The problem (according to what i found) is that the module name (MySQL_galera) is different than the output file name (galera.mod), so i changed the module name to 'galera' :

# fgrep "mysqld" /var/log/audit/audit.log | audit2allow -m galera -o galera.te
# checkmodule -M -m galera.te -o galera.mod
checkmodule: loading policy configuration from galera.te
checkmodule: policy configuration loaded
checkmodule: writing binary representation (version 17) to galera.mod

It is also possible to change the file name in the checkmodule command instead (to 'MySQL_galera.mod').

Also fixed a typo ('mysql' -> 'mysqld') in the final command (to return selinux enforcement on mysqld):
from -
# semanage permissive -d mysql_t
to -
# semanage permissive -d mysqld_t

…module error)

Changed audit2allow command from "audit2allow -m MySQL_galera -o galera.te" to "audit2allow -m galera -o galera.te"
Fixed typo in "semanage permissive -d mysql_t" -> semanage permissive -d mysqld_t
@kirjaamo kirjaamo requested a review from byte March 17, 2021 10:53
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.

1 participant