| Summary: | SELinux is preventing /bin/mkdir from 'mac_admin' accesses on the capability2 Unknown. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Keith Burton <kmb4215> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | anross, ch.zo, dwalsh, dzrudy, jlaska, kmb4215, kparal, mcepl, mcepl, me, mgrepl, mnowak, palango, social, subscribed-lists, twoerner |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:a1834286f0a52f3da3aa2daca6cb3b7acd0209ae42b7dd0b0270a3adb3ca0575 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-03-31 15:20:52 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
This error means some process running as initrc_t was trying to chcon to a context that SELinux does not understand. What does # ps -eZ |grep initrc_t # rpm -qa --scripts |grep chcon # grep -r chcon /etc/init.d/ (In reply to comment #1) > This error means some process running as initrc_t was trying to chcon to a > context that SELinux does not understand. > > What does > > # ps -eZ |grep initrc_t nothing > # rpm -qa --scripts |grep chcon Slightly more complicated: bradford:~# rpm -qa |while read PKG ; do SCRIPT=$(rpm -q --scripts $PKG); if ( echo "$SCRIPT" | grep chcon >/dev/null 2>&1 ) ; then echo "${PKG}:"; echo $SCRIPT; fi; done bluegriffon-0.9-0.2.svn540.fc15.x86_64: postinstall scriptlet (using /bin/sh): chcon -t textrel_shlib_t /usr/lib64/bluegriffon/libxul.so &>/dev/null || : update-desktop-database &> /dev/null || : touch --no-create /usr/share/icons/hicolor &>/dev/null || : if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor || : fi postuninstall scriptlet (using /bin/sh): if [ $1 -eq 0 ] ; then touch --no-create /usr/share/icons/hicolor &>/dev/null gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || : fi update-desktop-database &> /dev/null || : util-linux-2.19-3.fc15.x86_64: postinstall scriptlet (using /bin/sh): # only for minimal buildroots without /var/log [ -d /var/log ] || /bin/mkdir -p /var/log /bin/touch /var/log/lastlog /bin/chown root:root /var/log/lastlog /bin/chmod 0644 /var/log/lastlog # Fix the file context, do not use restorecon if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then SECXT=$( /usr/sbin/matchpathcon -n /var/log/lastlog 2> /dev/null ) if [ -n "$SECXT" ]; then # Selinux enabled, but without policy? It's true for buildroots # without selinux stuff on host machine with enabled selinux. # We don't want to use any RPM dependence on selinux policy for # matchpathcon(2). SELinux policy should be optional. /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : fi fi rm -f /etc/mtab ln -s /proc/mounts /etc/mtab bradford:~# Bluegriffon is almost certainly innocent, I tried to install it almost month ago, and then I haven't touched it at all. > # grep -r chcon /etc/init.d/ nothing (In reply to comment #1) > This error means some process running as initrc_t was trying to chcon to a > context that SELinux does not understand. > > What does > > # ps -eZ |grep initrc_t > Nothing > # rpm -qa --scripts |grep chcon > /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : > # grep -r chcon /etc/init.d/ Nothing. Not sure if it's relevant, but this occurred during yum update. Noticed the following message: Cleanup : mdadm-3.1.3-0.git20100804.2.fc15.x86_64 133/182 Non-fatal POSTUN scriptlet failure in rpm package mdadm Cleanup : nc-1.84-25.fc15.x86_64 134/182 warning: %postun(mdadm-3.1.3-0.git20100804.2.fc15.x86_64) scriptlet failed, exit status 1 Ok, I have just updated and I am getting the same. *** This bug has been marked as a duplicate of bug 692559 *** |
SELinux is preventing /bin/mkdir from 'mac_admin' accesses on the capability2 Unknown. ***** Plugin catchall (100. confidence) suggests *************************** If you believe that mkdir should be allowed mac_admin access on the Unknown capability2 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 mkdir /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:initrc_t:s0 Target Context system_u:system_r:initrc_t:s0 Target Objects Unknown [ capability2 ] Source mkdir Source Path /bin/mkdir Port <Unknown> Host (removed) Source RPM Packages coreutils-8.10-2.fc15 Target RPM Packages Policy RPM selinux-policy-3.9.16-6.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.38.2-8.fc15.x86_64 #1 SMP Mon Mar 28 02:14:51 UTC 2011 x86_64 x86_64 Alert Count 1 First Seen Tue 29 Mar 2011 09:11:18 EST Last Seen Tue 29 Mar 2011 09:11:18 EST Local ID 40eb772b-130d-458b-b127-f62c5c8c733d Raw Audit Messages type=AVC msg=audit(1301353878.116:11): avc: denied { mac_admin } for pid=789 comm="mkdir" capability=33 scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=capability2 type=SYSCALL msg=audit(1301353878.116:11): arch=x86_64 syscall=write success=no exit=EINVAL a0=3 a1=a11050 a2=22 a3=7fffa0a46dc0 items=0 ppid=736 pid=789 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=mkdir exe=/bin/mkdir subj=system_u:system_r:initrc_t:s0 key=(null) Hash: mkdir,initrc_t,initrc_t,capability2,mac_admin audit2allow #============= initrc_t ============== allow initrc_t self:capability2 mac_admin; audit2allow -R #============= initrc_t ============== allow initrc_t self:capability2 mac_admin;