Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1485765 Details for
Bug 1631814
rpm macro %selinux_set_booleans requires selinux-policy-targeted installed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
macros.selinux-policy.patch (text/plain), 6.09 KB, created by
Petr Menšík
on 2018-09-21 18:53:27 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Petr Menšík
Created:
2018-09-21 18:53:27 UTC
Size:
6.09 KB
patch
obsolete
>--- /usr/lib/rpm/macros.d/macros.selinux-policy 2018-09-17 06:51:17.000000000 -0400 >+++ macros.selinux-policy 2018-09-21 14:40:30.589388614 -0400 >@@ -21,12 +21,13 @@ > %_selinux_policy_version 3.13.1-227.el7 > > %_selinux_store_path /etc/selinux >+%_selinux_store_policy_path %{_selinux_store_path}/${_policytype} > > %_file_context_file %{_sysconfdir}/selinux/${SELINUXTYPE}/contexts/files/file_contexts > %_file_context_file_pre %{_localstatedir}/lib/rpm-state/file_contexts.pre > >-%_file_custom_defined_booleans %{_selinux_store_path}/${_policytype}/rpmbooleans.custom >-%_file_custom_defined_booleans_tmp %{_selinux_store_path}/${_policytype}/rpmbooleans.custom.tmp >+%_file_custom_defined_booleans %{_selinux_store_policy_path}/rpmbooleans.custom >+%_file_custom_defined_booleans_tmp %{_selinux_store_policy_path}/rpmbooleans.custom.tmp > > # %selinux_requires > %selinux_requires \ >@@ -108,33 +109,35 @@ > if [ -z "${_policytype}" ]; then \ > _policytype="targeted" \ > fi \ >-LOCAL_MODIFICATIONS=$(semanage boolean -E) \ >-if [ ! -f %_file_custom_defined_booleans ]; then \ >- /bin/echo "# This file is managed by macros.selinux-policy. Do not edit it manually" > %_file_custom_defined_booleans \ >-fi \ >-semanage_import='' \ >-for boolean in %*; do \ >- boolean_name=${boolean%=*} \ >- boolean_value=${boolean#*=} \ >- boolean_local_string=$(grep "$boolean_name\$" <<<$LOCAL_MODIFICATIONS) \ >- if [ -n "$boolean_local_string" ]; then \ >- semanage_import="${semanage_import}\\nboolean -m -$boolean_value $boolean_name" \ >- boolean_customized_string=$(grep "$boolean_name\$" %_file_custom_defined_booleans | tail -n 1) \ >- if [ -n "$boolean_customized_string" ]; then \ >- /bin/echo $boolean_customized_string >> %_file_custom_defined_booleans \ >- else \ >- /bin/echo $boolean_local_string >> %_file_custom_defined_booleans \ >- fi \ >- else \ >- semanage_import="${semanage_import}\\nboolean -m -$boolean_value $boolean_name" \ >- boolean_default_value=$(semanage boolean -l | grep "^$boolean_name " | sed 's/[^(]*([^,]*, *\\(on\\|off\\).*/\\1/') \ >- /bin/echo "boolean -m --$boolean_default_value $boolean_name" >> %_file_custom_defined_booleans \ >- fi \ >-done; \ >-if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ >- /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" \ >-else \ >- /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype} -N" \ >+if [ -d "%{_selinux_store_policy_path}" ]; then \ >+ LOCAL_MODIFICATIONS=$(%{_sbindir}/semanage boolean -E) \ >+ if [ ! -f %_file_custom_defined_booleans ]; then \ >+ /bin/echo "# This file is managed by macros.selinux-policy. Do not edit it manually" > %_file_custom_defined_booleans \ >+ fi \ >+ semanage_import='' \ >+ for boolean in %*; do \ >+ boolean_name=${boolean%=*} \ >+ boolean_value=${boolean#*=} \ >+ boolean_local_string=$(grep "$boolean_name\$" <<<$LOCAL_MODIFICATIONS) \ >+ if [ -n "$boolean_local_string" ]; then \ >+ semanage_import="${semanage_import}\\nboolean -m -$boolean_value $boolean_name" \ >+ boolean_customized_string=$(grep "$boolean_name\$" %_file_custom_defined_booleans | tail -n 1) \ >+ if [ -n "$boolean_customized_string" ]; then \ >+ /bin/echo $boolean_customized_string >> %_file_custom_defined_booleans \ >+ else \ >+ /bin/echo $boolean_local_string >> %_file_custom_defined_booleans \ >+ fi \ >+ else \ >+ semanage_import="${semanage_import}\\nboolean -m -$boolean_value $boolean_name" \ >+ boolean_default_value=$(LC_ALL=C %{_sbindir}/semanage boolean -l | grep "^$boolean_name " | sed 's/[^(]*([^,]*, *\\(on\\|off\\).*/\\1/') \ >+ /bin/echo "boolean -m --$boolean_default_value $boolean_name" >> %_file_custom_defined_booleans \ >+ fi \ >+ done; \ >+ if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ >+ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" \ >+ else \ >+ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype} -N" \ >+ fi \ > fi \ > %{nil} > >@@ -145,20 +148,22 @@ > if [ -z "${_policytype}" ]; then \ > _policytype="targeted" \ > fi \ >-semanage_import='' \ >-for boolean in %*; do \ >- boolean_name=${boolean%=*} \ >- boolean_customized_string=$(grep "$boolean_name\$" %_file_custom_defined_booleans | tail -n 1) \ >- if [ -n "$boolean_customized_string" ]; then \ >- awk "/$boolean_customized_string/ && !f{f=1; next} 1" %_file_custom_defined_booleans > %_file_custom_defined_booleans_tmp && mv %_file_custom_defined_booleans_tmp %_file_custom_defined_booleans \ >- if ! grep -q "$boolean_name\$" %_file_custom_defined_booleans; then \ >- semanage_import="${semanage_import}\\n${boolean_customized_string}" \ >- fi \ >- fi \ >-done; \ >-if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ >- /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" \ >-else \ >- /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype} -N" \ >+if [ -d "%{_selinux_store_policy_path}" ]; then \ >+ semanage_import='' \ >+ for boolean in %*; do \ >+ boolean_name=${boolean%=*} \ >+ boolean_customized_string=$(grep "$boolean_name\$" %_file_custom_defined_booleans | tail -n 1) \ >+ if [ -n "$boolean_customized_string" ]; then \ >+ awk "/$boolean_customized_string/ && !f{f=1; next} 1" %_file_custom_defined_booleans > %_file_custom_defined_booleans_tmp && mv %_file_custom_defined_booleans_tmp %_file_custom_defined_booleans \ >+ if ! grep -q "$boolean_name\$" %_file_custom_defined_booleans; then \ >+ semanage_import="${semanage_import}\\n${boolean_customized_string}" \ >+ fi \ >+ fi \ >+ done; \ >+ if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ >+ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" \ >+ else \ >+ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype} -N" \ >+ fi \ > fi \ > %{nil}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1631814
: 1485765