-
Notifications
You must be signed in to change notification settings - Fork 26
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: Ensure selinux type for used ports, set default data and log dirmode #253
fix: Ensure selinux type for used ports, set default data and log dirmode #253
Conversation
doesn't this indicate that there is some sort of selinux problem with the way mssql-conf works? |
It does yeah. Moreover, after this "fix" there is still one message, this one:
But there were much more messages before. So this is not a proper fix, it can be done only on the |
We could use the selinux role to add the policy to allow that command. https://github.com/linux-system-roles/selinux#selinux_ports maybe something like this: selinux_ports:
- ports: 1433
proto: tcp
setype: mssql_conf_t
state: present
local: true ? |
The port 1433 has this selinux context set correctly after
Prior to this change,
And after this change, only one message that I wrote above. It is a good idea to ensure setype for ports anyway. My plan is to make the most that the role can do and report all issues to Microsoft. So that when they fix issues on their side the role starts to work. Users still can do |
@richm And I couldn't set port context to
Could you get any other useful information on what the role can do to fix selinux issues from the ausearch output that I pasted in the comment above? |
No, not sure - @bachradsusi is there a way to take the output of ausearch or audit2allow, and convert that to some sort of input for the selinux role? |
This problem can't be solved using
It's also possible to ship local policy which would allow this. The policy could be generated using something like
But it could be dangerous to do automatically and it's always necessary to review generated rules. EDIT: s/sesearch/ausearch/ |
[citest] |
Even though |
533d69a
to
176252f
Compare
[citest] |
176252f
to
c58d025
Compare
[citest] |
c58d025
to
a082831
Compare
[citest] |
fix: Set default data and log dirmode to omit
a082831
to
7c4147f
Compare
[citest] |
Enhancement:
Reason:
mssql_port_t
SELinux typemssql_datadir_mode
andmssql_logdir_mode
should have a default value for securityResult:
true
, the role configures used ports with themssql_port_t
SELinux typemssql_datadir_mode
andmssql_logdir_mode
variables have a default value of'755'