-
Notifications
You must be signed in to change notification settings - Fork 197
ENT-13666: Added RHEL 10 specific SELinux policy #6035
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
Open
aleksandrychev
wants to merge
1
commit into
cfengine:master
Choose a base branch
from
aleksandrychev:ENT-13666
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+49
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| require { | ||
| type devpts_t; | ||
| type systemd_userdbd_runtime_t; | ||
| type systemd_userdbd_t; | ||
| } | ||
|
|
||
| #============= cfengine_apachectl_t ============== | ||
| allow cfengine_apachectl_t devpts_t:dir { getattr search }; | ||
| allow cfengine_apachectl_t proc_t:file getattr; | ||
| allow cfengine_apachectl_t self:capability { dac_override dac_read_search sys_ptrace }; | ||
| allow cfengine_apachectl_t sysfs_t:dir read; | ||
| allow cfengine_apachectl_t sysfs_t:file { open read }; | ||
| allow cfengine_apachectl_t tty_device_t:chr_file getattr; | ||
| allow cfengine_apachectl_t user_devpts_t:chr_file getattr; | ||
|
|
||
| # selinux-policy requires the following http_port permissions whereas 3.14.3 does not. | ||
| # these permissions are not be needed if changes from ENT-12954 to masterfiles policy move inventory from common to an agent bundle are in place. | ||
| #============= cfengine_execd_t ============== | ||
| allow cfengine_execd_t http_port_t:tcp_socket name_connect; | ||
aleksandrychev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #============= cfengine_httpd_t ============== | ||
| allow cfengine_httpd_t hugetlbfs_t:file { read write }; | ||
| allow cfengine_httpd_t systemd_userdbd_runtime_t:dir { open read getattr search }; | ||
| allow cfengine_httpd_t systemd_userdbd_runtime_t:lnk_file read; | ||
| allow cfengine_httpd_t systemd_userdbd_runtime_t:sock_file write; | ||
| allow cfengine_httpd_t systemd_userdbd_t:unix_stream_socket connectto; | ||
| allow cfengine_httpd_t kernel_t:unix_stream_socket connectto; | ||
|
|
||
| #============= cfengine_hub_t ============== | ||
| allow cfengine_hub_t cfengine_httpd_exec_t:file getattr; | ||
| allow cfengine_hub_t sysfs_t:lnk_file read; | ||
|
|
||
| #============= cfengine_postgres_t ============== | ||
| allow cfengine_postgres_t systemd_userdbd_runtime_t:dir { open read getattr search }; | ||
| allow cfengine_postgres_t systemd_userdbd_runtime_t:lnk_file read; | ||
| allow cfengine_postgres_t systemd_userdbd_runtime_t:sock_file write; | ||
| allow cfengine_postgres_t systemd_userdbd_t:unix_stream_socket connectto; | ||
| allow cfengine_postgres_t kernel_t:unix_stream_socket connectto; | ||
|
|
||
| #============= cfengine_reactor_t ============== | ||
| allow cfengine_reactor_t systemd_userdbd_runtime_t:dir { open read getattr search }; | ||
| allow cfengine_reactor_t systemd_userdbd_runtime_t:lnk_file read; | ||
| allow cfengine_reactor_t systemd_userdbd_runtime_t:sock_file write; | ||
| allow cfengine_reactor_t systemd_userdbd_t:unix_stream_socket connectto; | ||
| allow cfengine_reactor_t kernel_t:unix_stream_socket connectto; | ||
|
|
||
| #============= cfengine_serverd_t ============== | ||
| allow cfengine_serverd_t http_port_t:tcp_socket name_connect; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be interesting to compare this to a standard apache httpd policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devpts_t:dir { getattr search } — needed for ps to access terminal info, apachectl runs ps to check whether httpd processes are running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to inherit all the "standard" apachectl bits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standard selinux apache policy has no apachectl type or domain at all https://github.com/fedora-selinux/selinux-policy/blob/rawhide/policy/modules/contrib/apache.te .