Bug 827853 - SELinux prevents BackupPC from reading /etc/shadow
SELinux prevents BackupPC from reading /etc/shadow
Status: CLOSED DUPLICATE of bug 827854
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-03 06:12 EDT by Joel Uckelman
Modified: 2012-06-04 07:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-04 07:20:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joel Uckelman 2012-06-03 06:12:08 EDT
Description of problem:

SELinux is preventing /usr/bin/perl from open access on the file /etc/shadow.

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

If you believe that perl should be allowed open access on the shadow file 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 BackupPC_Admin. /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


WARNING: Policy would be downgraded from version 27 to 26.
WARNING: Policy would be downgraded from version 27 to 26.
Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:shadow_t:s0
Target Objects                /etc/shadow [ file ]
Source                        BackupPC_Admin.
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          clio.ellipsis.cx
Source RPM Packages           perl-5.14.2-211.fc17.x86_64
Target RPM Packages           setup-2.8.48-1.fc17.noarch
Policy RPM                    selinux-policy-3.10.0-125.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     clio.ellipsis.cx
Platform                      Linux clio.ellipsis.cx 3.3.7-1.fc17.x86_64 #1 SMP
                              Mon May 21 22:32:19 UTC 2012 x86_64 x86_64
Alert Count                   21
First Seen                    Sat Jun  2 12:08:38 2012
Last Seen                     Sun Jun  3 12:04:56 2012
Local ID                      856f1e50-4f23-47a5-a260-d1b6913e9442

Raw Audit Messages
type=AVC msg=audit(1338717896.437:583): avc:  denied  { open } for  pid=13521 comm="BackupPC_Admin." name="shadow" dev="dm-0" ino=41157886 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file


type=SYSCALL msg=audit(1338717896.437:583): arch=x86_64 syscall=open success=no exit=EACCES a0=7f96d6c3d6eb a1=80000 a2=1b6 a3=238 items=0 ppid=13029 pid=13521 auid=4294967295 uid=48 gid=48 euid=498 suid=498 fsuid=498 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=BackupPC_Admin. exe=/usr/bin/perl subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: BackupPC_Admin.,httpd_t,shadow_t,file,open

audit2allow

#============= httpd_t ==============
allow httpd_t shadow_t:file open;

audit2allow -R

#============= httpd_t ==============
allow httpd_t shadow_t:file open;


Version-Release number of selected component (if applicable):

BackupPC-3.2.1-7.fc17.x86_64
selinux-policy-targeted-3.10.0-125.fc17.noarch
Comment 1 Miroslav Grepl 2012-06-04 07:20:40 EDT

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

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