Bug 1248190 - SELinux is preventing /usr/bin/git from 'create' accesses on the file exclude.
SELinux is preventing /usr/bin/git from 'create' accesses on the file exclude.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-07-29 16:03 EDT by clnperez
Modified: 2015-10-28 16:22 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-10-28 16:22:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description clnperez 2015-07-29 16:03:48 EDT
Description of problem:
1. clone the docker machine branch
2. make build
SELinux is preventing /usr/bin/git from 'create' accesses during 'go get' commands

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that git should be allowed create access on the exclude file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep git /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c938,c947
Target Context                system_u:object_r:docker_var_lib_t:s0
Target Objects                exclude [ file ]
Source                        git
Source Path                   /usr/bin/git
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           git-2.4.3-6.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.6.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.2-200.fc22.x86_64 #1 SMP Wed
                              Jul 15 20:12:12 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-07-29 14:38:32 CDT
Last Seen                     2015-07-29 14:38:32 CDT
Local ID                      4458ea38-eb00-43ff-83fc-f5e64b54a138

Raw Audit Messages
type=AVC msg=audit(1438198712.414:665): avc:  denied  { create } for  pid=6899 comm="git" name="exclude" scontext=system_u:system_r:svirt_lxc_net_t:s0:c938,c947 tcontext=system_u:object_r:docker_var_lib_t:s0 tclass=file permissive=0

type=SYSCALL msg=audit(1438198712.414:665): arch=x86_64 syscall=open success=no exit=EACCES a0=7ffea2b79160 a1=c1 a2=1b6 a3=0 items=0 ppid=6883 pid=6899 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=git exe=/usr/bin/git subj=system_u:system_r:svirt_lxc_net_t:s0:c938,c947 key=(null)

Hash: git,svirt_lxc_net_t,docker_var_lib_t,file,create

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.1
hashmarkername: setroubleshoot
kernel:         4.1.2-200.fc22.x86_64
type:           libreport
Comment 1 Daniel Walsh 2015-07-29 17:25:46 EDT
Did you volume mount something in labeled docker_var_lib_t without using :Z or :z?
Comment 2 clnperez 2015-10-28 13:24:01 EDT
No, all I did was run that make command, and I don't see any docker calls at all in the build process (though it could have changed between then and now).

However, I'm not seeing this any more. I did recently reinstall my laptop with a fresh FC22, so there very well may have been something out of whack with the docker policy I had.

I think we can close this one.

Note You need to log in before you can comment on or make changes to this bug.