Hide Forgot
Description of problem: I got this AVC at boot, after a system update. SELinux is preventing sh from 'execute' accesses on the file /etc/aiccu-subnets.sh. ***** Plugin catchall_labels (83.8 confidence) suggests ******************* If you want to allow sh to have execute access on the aiccu-subnets.sh file Then you need to change the label on /etc/aiccu-subnets.sh Do # semanage fcontext -a -t FILE_TYPE '/etc/aiccu-subnets.sh' where FILE_TYPE is one of the following: abrt_helper_exec_t, aiccu_exec_t, ifconfig_exec_t, insmod_exec_t, ld_so_t, lib_t, prelink_exec_t, shell_exec_t, textrel_shlib_t. Then execute: restorecon -v '/etc/aiccu-subnets.sh' ***** Plugin catchall (17.1 confidence) suggests ************************** If you believe that sh should be allowed execute access on the aiccu-subnets.sh file 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 'sh' --raw | audit2allow -M my-sh # semodule -X 300 -i my-sh.pp Additional Information: Source Context system_u:system_r:aiccu_t:s0 Target Context unconfined_u:object_r:etc_t:s0 Target Objects /etc/aiccu-subnets.sh [ file ] Source sh Source Path sh Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-158.21.fc23.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.6.6-200.fc23.x86_64 #1 SMP Wed Aug 10 23:13:35 UTC 2016 x86_64 x86_64 Alert Count 4 First Seen 2016-08-22 11:39:10 CEST Last Seen 2016-08-22 11:47:49 CEST Local ID 0dd7d4e8-e14e-4297-83e6-f182ae8f62c9 Raw Audit Messages type=AVC msg=audit(1471859269.536:349): avc: denied { execute } for pid=7134 comm="sh" name="aiccu-subnets.sh" dev="dm-1" ino=8128460 scontext=system_u:system_r:aiccu_t:s0 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file permissive=0 Hash: sh,aiccu_t,etc_t,file,execute Version-Release number of selected component: selinux-policy-3.13.1-158.21.fc23.noarch Additional info: reporter: libreport-2.6.4 hashmarkername: setroubleshoot kernel: 4.6.6-200.fc23.x86_64 type: libreport
Is this a normal location for an executable shell? Why is this stored under /etc?
(In reply to Daniel Walsh from comment #1) > Is this a normal location for an executable shell? Why is this stored under > /etc? It's a callout script created by the user, so its place is definitely somewhere in /etc. On the other hand there is no such file in the package nor is it referenced from the configuration files, so I guess this is the choice of the user. What is the recommended way to handle the fact that a daemon can call out shell scripts created by the user? I can think of a /etc/aiccu subdirectory but what else is needed?
That is right. The default /etc/aiccu.conf contains: # Script to run after setting up the interfaces (default: none) #setupscript /usr/local/etc/aiccu-subnets.sh and that is why I choose too modify it to: # Script to run after setting up the interfaces (default: none) setupscript /etc/aiccu-subnets.sh That script is used to enable IPv6 forwarding on the machine. I am sorry I forgot that. What would be the correct way to handle the case? It seems that, as the user choosing to setup a special location for a shell script, I should add a rule myself, using `semanage fcontext`.
How about something like # Script to run after setting up the interfaces (default: none) #setupscript /usr/local/etc/aiccu/scripts/aiccu-subnets.sh Then ship wit /etc/aiccu/scripts directory and we could label it bin_t. semanage fcontext -a -t bin_t /etc/aiccu-subnets.sh restorecon /etc/aiccu-subnets.sh Should fix your problem. But I think have in controlled subdir would be the best option for future problems.
(In reply to Daniel Walsh from comment #4) > How about something like > > # Script to run after setting up the interfaces (default: none) > #setupscript /usr/local/etc/aiccu/scripts/aiccu-subnets.sh > Then ship wit /etc/aiccu/scripts directory and we could label it bin_t. > > semanage fcontext -a -t bin_t /etc/aiccu-subnets.sh > restorecon /etc/aiccu-subnets.sh > > Should fix your problem. But I think have in controlled subdir would be the > best option for future problems. That sounds reasonable. Thanks.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.