Hide Forgot
Description of problem: When starting squid on Fedora 28 inside an ansible job, it fails due to an selinux denial. More details in the attached external bug, logs below. Aug 16 18:13:55 f28-os-4786 systemd[1]: Starting Squid caching proxy... Aug 16 18:13:55 f28-os-4786 audit[22168]: AVC avc: denied { dac_override } for pid=22168 comm="cache_swap.sh" capability=1 scontext=system_u:system_r:squid_t:s0 tcontext=system_u:system_r:squid_t:s0 tclass=capability permissive=0 Aug 16 18:13:55 f28-os-4786 cache_swap.sh[22163]: init_cache_dir /var/spool/squid... /usr/libexec/squid/cache_swap.sh: line 14: /var/log/squid/squid.out: Permission denied Aug 16 18:13:55 f28-os-4786 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=squid comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Please, Just change the permissions of /var/log/squid to squid:root 0770 or similar. See: https://danwalsh.livejournal.com/79643.html ---- SELinux is preventing cache_swap.sh from using the dac_override capability. ***** Plugin dac_override (91.4 confidence) suggests ********************** If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system Then turn on full auditing to get path information about the offending file and generate the error again. Do Turn on full auditing # auditctl -w /etc/shadow -p w Try to recreate AVC. Then execute # ausearch -m avc -ts recent If you see PATH record check ownership/permissions on file, and fix it, otherwise report as a bugzilla. ***** Plugin catchall (9.59 confidence) suggests ************************** If you believe that cache_swap.sh should have the dac_override capability by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'cache_swap.sh' --raw | audit2allow -M my-cacheswapsh # semodule -X 300 -i my-cacheswapsh.pp Additional Information: Source Context system_u:system_r:squid_t:s0 Target Context system_u:system_r:squid_t:s0 Target Objects Unknown [ capability ] Source cache_swap.sh Source Path cache_swap.sh Port <Unknown> Host helio Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.1-40.fc28.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name helio Platform Linux helio 4.17.14-202.fc28.x86_64 #1 SMP Wed Aug 15 12:29:25 UTC 2018 x86_64 x86_64 Alert Count 1 First Seen 2018-08-20 16:21:29 CEST Last Seen 2018-08-20 16:21:29 CEST Local ID b9081661-7943-41ae-bad8-55f1e019258f Raw Audit Messages type=AVC msg=audit(1534774889.630:9172): avc: denied { dac_override } for pid=8194 comm="cache_swap.sh" capability=1 scontext=system_u:system_r:squid_t:s0 tcontext=system_u:system_r:squid_t:s0 tclass=capability permissive=0 Hash: cache_swap.sh,squid_t,squid_t,capability,dac_override
squid-4.2-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-902974a33b
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
squid-4.2-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-902974a33b
squid-4.2-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.