Summary: SELinux is preventing /usr/sbin/sshd "read" access on /var/lib/gitolite/.ssh/authorized_keys. Detailed Description: SELinux denied access requested by sshd. It is not expected that this access is required by sshd 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. Allowing Access: 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. Additional Information: Source Context unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 Target Context system_u:object_r:var_lib_t:s0 Target Objects /var/lib/gitolite/.ssh/authorized_keys [ file ] Source sshd Source Path /usr/sbin/sshd Port <Unknown> Host (removed) Source RPM Packages openssh-server-5.4p1-2.fc13 Target RPM Packages gitolite-1.4.2-1.fc13 Policy RPM selinux-policy-3.7.19-21.fc13 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name catchall Host Name (removed) Platform Linux localhost.localdomain 2.6.33.5-112.fc13.x86_64 #1 SMP Thu May 27 02:28:31 UTC 2010 x86_64 x86_64 Alert Count 2 First Seen Sat 05 Jun 2010 03:45:41 AM BST Last Seen Sat 05 Jun 2010 01:20:20 PM BST Local ID 046386d4-5dd4-40ec-89a3-1d2a53fcccbc Line Numbers Raw Audit Messages node=localhost.localdomain type=AVC msg=audit(1275740420.70:34): avc: denied { read } for pid=2463 comm="sshd" name="authorized_keys" dev=sdc3 ino=8137093 scontext=unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=file node=localhost.localdomain type=SYSCALL msg=audit(1275740420.70:34): arch=c000003e syscall=2 success=no exit=-13 a0=7f55ac4e5400 a1=800 a2=1 a3=7fff50edc470 items=0 ppid=2459 pid=2463 auid=500 uid=0 gid=0 euid=491 suid=0 fsuid=491 egid=479 sgid=0 fsgid=479 tty=(none) ses=1 comm="sshd" exe="/usr/sbin/sshd" subj=unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null) This issue seems to be identical to [1]. Gitolite is a rewrite of gitosis so it shares the same basic structure and requirements as gitosis too. Probably fix_for_gitosis > s/gitosis/gitolite/ [1] - https://bugzilla.redhat.com/show_bug.cgi?id=470514
# semanage fcontext -a -t home_ssh_t ' /var/lib/gitolite/.ssh(/.*)?' # restorecon -R -v /var/lib/gitolite/.ssh Should fix. Miroslav can you make this the default.
Should be # semanage fcontext -a -t home_ssh_t '/var/lib/gitolite/.ssh(/.*)?' # restorecon -R -v /var/lib/gitolite/.ssh
Dan, we can combine gitosis and gitolite policy and run gitolite in the gitosis domain. Only some changes are needed (I will send you a patch). Also I would label '/var/lib/gitolite' directory as gitosis_var_lib_t and it will work.
Ok I will wait for the patch
Fixed in selinux-policy-3.7.19-25.fc13
selinux-policy-3.7.19-28.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-28.fc13
selinux-policy-3.7.19-28.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-28.fc13
selinux-policy-3.7.19-28.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.