| Summary: | SELinux is preventing /usr/bin/perl from 'setattr' accesses on the file ddclient.conf. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | dpw818 |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 14 | CC: | dwalsh, mgrepl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:99d222bbc62e4c7bc375bbb9d395522a02e9b1ac6abe699d28172db588e02c90 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-01-31 10:06:34 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
ddclient.conf is mislabeled.
# matchpathcon /etc/ddclient.conf
/etc/ddclient.conf system_u:object_r:ddclient_etc_t:s0
# sesearch -A -s ddclient_t -t ddclient_etc_t -c file
Found 1 semantic av rules:
allow ddclient_t ddclient_etc_t : file { ioctl read getattr setattr lock open } ;
# rpm -ql ddclient | grep ddclient.conf
/etc/ddclient.conf
Which tells me this conf file should get the right context during installation of ddclient package.
Not sure how the file got this bad label. Did you remove/recreate this config file?
Execute
# restorecon -v /etc/ddclient.conf
Will fix.
|
SELinux is preventing /usr/bin/perl from 'setattr' accesses on the file ddclient.conf. ***** Plugin catchall_labels (83.8 confidence) suggests ******************** If you want to allow perl to have setattr access on the ddclient.conf file Then you need to change the label on ddclient.conf Do # semanage fcontext -a -t FILE_TYPE 'ddclient.conf' where FILE_TYPE is one of the following: ddclient_var_lib_t, ddclient_var_run_t, ddclient_tmp_t, ddclient_var_t, ddclient_etc_t, ddclient_log_t, root_t. Then execute: restorecon -v 'ddclient.conf' ***** Plugin catchall (17.1 confidence) suggests *************************** If you believe that perl should be allowed setattr access on the ddclient.conf 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: # grep ddclient /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context unconfined_u:system_r:ddclient_t:s0 Target Context unconfined_u:object_r:etc_t:s0 Target Objects ddclient.conf [ file ] Source ddclient Source Path /usr/bin/perl Port <Unknown> Host (removed) Source RPM Packages perl-5.12.2-140.fc14 Target RPM Packages Policy RPM selinux-policy-3.9.7-25.fc14 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.35.10-74.fc14.i686.PAE #1 SMP Thu Dec 23 16:10:47 UTC 2010 i686 i686 Alert Count 28 First Seen Sat 29 Jan 2011 12:00:59 AM CET Last Seen Sat 29 Jan 2011 12:11:52 AM CET Local ID 1399d4af-ff56-46b8-9e37-f721fcbb2a80 Raw Audit Messages type=AVC msg=audit(1296256312.709:34670): avc: denied { setattr } for pid=2473 comm="ddclient" name="ddclient.conf" dev=dm-0 ino=1181625 scontext=unconfined_u:system_r:ddclient_t:s0 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file ddclient,ddclient_t,etc_t,file,setattr type=SYSCALL msg=audit(1296256312.709:34670): arch=i386 syscall=chmod success=no exit=EACCES a0=926bb18 a1=180 a2=26ed38 a3=90fb9f0 items=0 ppid=1 pid=2473 auid=500 uid=490 gid=486 euid=490 suid=490 fsuid=490 egid=486 sgid=486 fsgid=486 tty=(none) ses=24 comm=ddclient exe=/usr/bin/perl subj=unconfined_u:system_r:ddclient_t:s0 key=(null) ddclient,ddclient_t,etc_t,file,setattr #============= ddclient_t ============== allow ddclient_t etc_t:file setattr;