Bug 582323 - Zarafa and SElinux don't like each other
Summary: Zarafa and SElinux don't like each other
Keywords:
Status: CLOSED DUPLICATE of bug 574788
Alias: None
Product: Fedora
Classification: Fedora
Component: zarafa-webaccess
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-14 16:15 UTC by David Nalley
Modified: 2018-04-11 08:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-01 08:36:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Nalley 2010-04-14 16:15:36 UTC
Apr 14 12:05:43 nalleyx60 setroubleshoot: SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files zarafa. For complete SELinux messages. run sealert -l 26f2a1b3-01e4-45cc-a6eb-4ef474e2cab9
Apr 14 12:06:41 nalleyx60 setroubleshoot: SELinux is preventing /usr/sbin/httpd "connectto" access on /var/run/zarafa. For complete SELinux messages. run sealert -l 776be57c-e0da-4322-9050-224e1cd1ec40
Apr 14 12:09:43 nalleyx60 setroubleshoot: SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files zarafa. For complete SELinux messages. run sealert -l 26f2a1b3-01e4-45cc-a6eb-4ef474e2cab9
Apr 14 12:10:43 nalleyx60 setroubleshoot: SELinux is preventing /usr/sbin/httpd "connectto" access on /var/run/zarafa. For complete SELinux messages. run sealert -l 776be57c-e0da-4322-9050-224e1cd1ec40
Apr 14 12:11:45 nalleyx60 setroubleshoot: SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files zarafa. For complete SELinux messages. run sealert -l 26f2a1b3-01e4-45cc-a6eb-4ef474e2cab9



[root@nalleyx60 ~]# sealert -l 26f2a1b3-01e4-45cc-a6eb-4ef474e2cab9

Summary:

SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files
zarafa.

Detailed Description:

SELinux has denied the httpd access to potentially mislabeled files zarafa. This
means that SELinux will not allow httpd to use these files. If httpd should be
allowed this access to these files you should change the file context to one of
the following types, mysqld_var_run_t, mysqld_db_t, httpd_var_run_t,
nscd_var_run_t, nslcd_var_run_t, slapd_var_run_t, sssd_var_lib_t,
system_dbusd_var_run_t, postgresql_var_run_t, setrans_var_run_t,
postgresql_tmp_t, winbind_var_run_t, devlog_t, httpd_tmpfs_t,
lsassd_var_socket_t, avahi_var_run_t, httpd_nutups_cgi_content_rw_t,
httpd_squid_content_rw_t, httpd_smokeping_cgi_content_rw_t, nscd_var_run_t,
pcscd_var_run_t, httpd_apcupsd_cgi_content_rw_t, httpd_prewikka_content_rw_t,
httpd_awstats_content_rw_t, httpd_w3c_validator_content_rw_t,
httpd_user_content_rw_t, httpd_cobbler_content_rw_t, httpd_munin_content_rw_t,
httpd_bugzilla_content_rw_t, httpd_nagios_content_rw_t, httpd_sys_content_rw_t,
httpd_cvs_content_rw_t, httpd_git_content_rw_t. Many third party apps install
html files in directories that SELinux policy cannot predict. These directories
have to be labeled with a file context which httpd can access.

Allowing Access:

If you want to change the file context of zarafa so that the httpd daemon can
access it, you need to execute it using semanage fcontext -a -t FILE_TYPE
'zarafa'.
where FILE_TYPE is one of the following: mysqld_var_run_t, mysqld_db_t,
httpd_var_run_t, nscd_var_run_t, nslcd_var_run_t, slapd_var_run_t,
sssd_var_lib_t, system_dbusd_var_run_t, postgresql_var_run_t, setrans_var_run_t,
postgresql_tmp_t, winbind_var_run_t, devlog_t, httpd_tmpfs_t,
lsassd_var_socket_t, avahi_var_run_t, httpd_nutups_cgi_content_rw_t,
httpd_squid_content_rw_t, httpd_smokeping_cgi_content_rw_t, nscd_var_run_t,
pcscd_var_run_t, httpd_apcupsd_cgi_content_rw_t, httpd_prewikka_content_rw_t,
httpd_awstats_content_rw_t, httpd_w3c_validator_content_rw_t,
httpd_user_content_rw_t, httpd_cobbler_content_rw_t, httpd_munin_content_rw_t,
httpd_bugzilla_content_rw_t, httpd_nagios_content_rw_t, httpd_sys_content_rw_t,
httpd_cvs_content_rw_t, httpd_git_content_rw_t. You can look at the
httpd_selinux man page for additional information.

Additional Information:

Source Context                unconfined_u:system_r:httpd_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                zarafa [ sock_file ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          nalleyx60
Source RPM Packages           httpd-2.2.15-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.16-2.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   httpd_bad_labels
Host Name                     nalleyx60
Platform                      Linux nalleyx60 2.6.33.1-24.fc13.i686.PAE #1 SMP
                              Tue Mar 30 18:26:25 UTC 2010 i686 i686
Alert Count                   12
First Seen                    Wed Apr 14 11:47:14 2010
Last Seen                     Wed Apr 14 12:03:09 2010
Local ID                      26f2a1b3-01e4-45cc-a6eb-4ef474e2cab9
Line Numbers                  

Raw Audit Messages            

node=nalleyx60 type=AVC msg=audit(1271260989.430:1580): avc:  denied  { write } for  pid=14299 comm="httpd" name="zarafa" dev=dm-5 ino=1236 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=sock_file

node=nalleyx60 type=SYSCALL msg=audit(1271260989.430:1580): arch=40000003 syscall=102 success=no exit=-13 a0=3 a1=bfe6b7f0 a2=1783020 a3=11 items=0 ppid=14291 pid=14299 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=1 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)



[root@nalleyx60 ~]# sealert -l 776be57c-e0da-4322-9050-224e1cd1ec40

Summary:

SELinux is preventing /usr/sbin/httpd "connectto" access on /var/run/zarafa.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by httpd. It is not expected that this access is
required by httpd 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:httpd_t:s0
Target Context                unconfined_u:system_r:initrc_t:s0
Target Objects                /var/run/zarafa [ unix_stream_socket ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          nalleyx60
Source RPM Packages           httpd-2.2.15-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.16-2.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     nalleyx60
Platform                      Linux nalleyx60 2.6.33.1-24.fc13.i686.PAE #1 SMP
                              Tue Mar 30 18:26:25 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Wed Apr 14 12:06:36 2010
Last Seen                     Wed Apr 14 12:10:38 2010
Local ID                      776be57c-e0da-4322-9050-224e1cd1ec40
Line Numbers                  

Raw Audit Messages            

node=nalleyx60 type=AVC msg=audit(1271261438.140:1599): avc:  denied  { connectto } for  pid=14299 comm="httpd" path="/var/run/zarafa" scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=unix_stream_socket

node=nalleyx60 type=SYSCALL msg=audit(1271261438.140:1599): arch=40000003 syscall=102 success=yes exit=0 a0=3 a1=bfe6b7f0 a2=1783020 a3=12 items=0 ppid=14291 pid=14299 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=1 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)




This is with zarafa-webaccess-6.30.12-1.fc13.noarch

Comment 1 Johan Cwiklinski 2010-06-24 21:00:04 UTC
Looks like this bug is related to : https://bugzilla.redhat.com/show_bug.cgi?id=574788


I'd like to proceed a quick zarafa test on my f-13 box ; running :
# setsebool httpd_can_network_connect on
# chcon -t httpd_var_run_t /var/run/zarafa

with that changes, I'm now able to connect from webaccess, waiting for the selinux policy from #574788.

Comment 2 Matěj Cepl 2010-07-17 12:41:25 UTC
(In reply to comment #1)
> with that changes, I'm now able to connect from webaccess, waiting for the
> selinux policy from #574788.    

Shouldn't this be just closed as a duplicate of bug 574788?

Comment 3 Matěj Cepl 2010-10-01 08:36:20 UTC
This certainly will be part of bigger zarafa SELinux policy.

*** This bug has been marked as a duplicate of bug 574788 ***


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