From 1f2bea0ca724b8c382fbc423abe668d6ff257276 Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Wed, 6 Sep 2023 14:24:24 +0100 Subject: [PATCH 1/2] fix selinux policy --- scripts/selinux/README.md | 2 +- scripts/selinux/nginx_agent.pp | Bin 143279 -> 95090 bytes scripts/selinux/nginx_agent.te | 208 ++++++++++++++------------------- 3 files changed, 89 insertions(+), 121 deletions(-) diff --git a/scripts/selinux/README.md b/scripts/selinux/README.md index 5bf83b164..340a7c29a 100644 --- a/scripts/selinux/README.md +++ b/scripts/selinux/README.md @@ -56,7 +56,7 @@ sudo ausearch -m AVC,USER_AVC,SELINUX_ERR,USER_SELINUX_ERR --raw -se nginx_agent ``` Generate new rule based on the errors by using `audit2allow`: ``` -sudo ausearch -m AVC,USER_AVC,SELINUX_ERR,USER_SELINUX_ERR --raw -se nms -ts recent | audit2allow +sudo ausearch -m AVC,USER_AVC,SELINUX_ERR,USER_SELINUX_ERR --raw -se nginx_agent -ts recent | audit2allow ``` Update the `scripts/selinux/nginx_agent.te` file with the output from the `audit2allow` command. diff --git a/scripts/selinux/nginx_agent.pp b/scripts/selinux/nginx_agent.pp index 6834be7e8f2d0374fea104c8f0f2162c83e1fd86..055c8e21b7ccc9b1980c37a6533a2b047137def4 100644 GIT binary patch delta 1568 zcmZ8heN3BW5Pz@jOG|0_D$ut00o3gnz)~UpX_eS7pZdJ6$i5lvY!z^`+yS}l}QGc+$4%^zd!Fo=aZr6%xN?F6L zt%qy5RlqEjr{3qN^LpOIl_ML)BuaXQ!3n-*r>CW<*?aI^N0YbNhi8u!W9ISaMOG{` zW2kEzJdtFrJnH;$HEiIT*B^r=@2}-l9jE%lcp1N#O;fU73B?K;|3#ub0BNLK1RD-aO8C)?TTW+=ozP2M>>_rk!KG;%-k-h( z0w#pY@bn#t4}gqYHItH3Nh31Hq|i%PGwGrtku?D*MAK+IR()sScPds1rWpx0-*(Ft zf`&WXzb)a&Yz4~==YDd_lZEpfw+1Cthg=l1;n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&R1Qhe5`_bbLwfb27t97~;25Ze%SLiI>d1l8i3)I! z6yY3IfNR8IdRg{AEueD0^hKUaec!yGt_pN>4c%vaV+nyj*8vRl&7SRd8`Oh_srcQme;c^ zZ>!)(cU^LxQ)Z_4#Vme_pGp4KWI3F==Y(f3@5E;bByjpVG3ziT3~`F?S3^GN7q#UE9#RHi%h zcoy3=mrn0Nj`B}hN~AjatomKpXH*L(EbKG18~uCx3?{ZkN>G;A z7LPJ5@m-VH205_}k{(NJ1F*z4WKx$lCiS%aqa(@5={>j=;aaZRiafLx={@V9cCt>7 zn~$QnQbY_z@3BiF$x8HiM1n`9BNI_a-1%5{JaRYVqE=j~g?o(JMeU>y7D{$u$N4WF z4L9V(lhsEhWk{Xm+1Y(#W^R^TtvWhhs%_|H8?{3om41qo$Y4FiolVT6$NWlVUN)gQ zL)NIA;b%qiqeL46Gxw5WRE+;z7#58v?Jf*-r>1#t3G zac&&jj86;>c3&@n2jdo)=wFwoVi|Poc4lH?qgutlR62)WS)?bCw`l3f59pHTeUH=^I-P4gXJNCb~S ze9&Ik+dcPF4$l7h5!?Z@;f=m*IDOyQ+j#$8KDSSJ$;f@xN?=xqAXDM2jdKXUHgZdZ zF(c>5wIKt+*(7`|%o(|_?QR`TLdOX+dSBpi)kY zE-U4-FjyI57JL?NT^AwC(gWA~B$}+$AqbIDPbjx?k20YohO8ALBw6^HmD^~il9Ps#kYnK| zXx~ZDamM-Lg= Date: Wed, 6 Sep 2023 15:16:37 +0100 Subject: [PATCH 2/2] rocky 8 change --- scripts/selinux/nginx_agent.pp | Bin 95090 -> 95276 bytes scripts/selinux/nginx_agent.te | 2 ++ 2 files changed, 2 insertions(+) diff --git a/scripts/selinux/nginx_agent.pp b/scripts/selinux/nginx_agent.pp index 055c8e21b7ccc9b1980c37a6533a2b047137def4..6a2735074973ed8b2583d1fc6ef3fa4af8e92081 100644 GIT binary patch delta 165 zcmezLjCIWmR-yj?H9r{{7#NsJna!7uIA~2)dgjKcFj?`aC@VKm ux4>k@U&50=RPjvKdmqGTzq#@KB~eDR?IEm;E11PW#$z#f`v(rjrYrzV=r_0k delta 103 zcmZ4Ug7wogR-yj?H9r{{7#Ns