Bug 608483

Summary: SELinux is preventing /usr/libexec/git-core/git-daemon "getattr" access on /var/lib/git.
Product: [Fedora] Fedora Reporter: Giovanni Campagna <scampa.giovanni>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: domg444, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:4a5426fcb965ea214414f9fd4c340230111e8767ba356fe94208ca0eb55cb9d4
Fixed In Version: selinux-policy-3.7.19-33.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-06 17:09:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Giovanni Campagna 2010-06-27 18:34:52 UTC
Sommario:

SELinux is preventing /usr/libexec/git-core/git-daemon "getattr" access on
/var/lib/git.

Descrizione dettagliata:

SELinux denied access requested by git-daemon. It is not expected that this
access is required by git-daemon and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Abilitazione accesso in corso:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Informazioni aggiuntive:

Contesto della sorgente       system_u:system_r:git_system_t:s0-s0:c0.c1023
Contesto target               system_u:object_r:httpd_git_content_t:s0
Oggetti target                /var/lib/git [ dir ]
Sorgente                      git-daemon
Percorso della sorgente       /usr/libexec/git-core/git-daemon
Porta                         <Sconosciuto>
Host                          (removed)
Sorgente Pacchetti RPM        git-daemon-1.7.0.1-1.fc13
Pacchetti RPM target          git-daemon-1.7.0.1-1.fc13
RPM della policy              selinux-policy-3.7.19-28.fc13
Selinux abilitato             True
Tipo di policy                targeted
Modalità Enforcing           Enforcing
Nome plugin                   catchall
Host Name                     (removed)
Piattaforma                   Linux (removed)
                              2.6.33.5-124.fc13.x86_64 #1 SMP Fri Jun 11
                              09:38:12 UTC 2010 x86_64 x86_64
Conteggio avvisi              1
Primo visto                   dom 27 giu 2010 20:33:29 CEST
Ultimo visto                  dom 27 giu 2010 20:33:29 CEST
ID locale                     232627e9-387b-4173-8428-7f657fc3a641
Numeri di linea               

Messaggi Raw Audit            

node=(removed) type=AVC msg=audit(1277663609.887:50): avc:  denied  { getattr } for  pid=14160 comm="git-daemon" path="/var/lib/git" dev=dm-0 ino=140055 scontext=system_u:system_r:git_system_t:s0-s0:c0.c1023 tcontext=system_u:object_r:httpd_git_content_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1277663609.887:50): arch=c000003e syscall=4 success=no exit=-13 a0=7fffa079eeaf a1=7fffa079dc80 a2=7fffa079dc80 a3=7fffa079da00 items=0 ppid=13459 pid=14160 auid=4294967295 uid=99 gid=99 euid=99 suid=99 fsuid=99 egid=99 sgid=99 fsgid=99 tty=(none) ses=4294967295 comm="git-daemon" exe="/usr/libexec/git-core/git-daemon" subj=system_u:system_r:git_system_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,git-daemon,git_system_t,httpd_git_content_t,dir,getattr
audit2allow suggests:

#============= git_system_t ==============
allow git_system_t httpd_git_content_t:dir getattr;

Comment 1 Miroslav Grepl 2010-06-28 12:01:32 UTC
Could you try to execute:

chcon -Rt  git_system_content_t /var/lib/git

It should work.

Comment 2 Dominick Grift 2010-06-30 08:13:38 UTC
$ matchpathcon /var/lib/git
/var/lib/git    system_u:object_r:git_system_content_t:s0

Instead, cgit and gitweb can read git_system_content.

Comment 3 Miroslav Grepl 2010-06-30 08:30:37 UTC
I need to fix the label.

Comment 4 Miroslav Grepl 2010-06-30 11:04:17 UTC
Fixed in selinux-policy-3.7.19-33.fc13

Comment 5 Fedora Update System 2010-06-30 19:55:23 UTC
selinux-policy-3.7.19-33.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 6 Fedora Update System 2010-07-01 18:49:21 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 7 Fedora Update System 2010-07-06 17:07:40 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.