Bug 831385 - SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /var/lib/rpm/Packages.
Summary: SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /var/...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4e7a9df020ef61d8bd2231aa3b0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-12 22:21 UTC by sebastián Natanael Barceló
Modified: 2012-06-13 00:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-13 00:58:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description sebastián Natanael Barceló 2012-06-12 22:21:07 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.0-1.fc17.x86_64
time:           mar 12 jun 2012 19:18:11 ART

description:
:SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /var/lib/rpm/Packages.
:
:*****  Plugin restorecon (99.5 confidence) suggests  *************************
:
:If desea arreglar la etiqueta .
:La etiqueta predeterminada de /var/lib/rpm/Packages debería ser rpm_var_lib_t.
:Then puede ejecutar restorecon.
:Do
:# /sbin/restorecon -v /var/lib/rpm/Packages
:
:*****  Plugin catchall (1.49 confidence) suggests  ***************************
:
:If cree que de manera predeterminada, bash debería permitir acceso getattr sobre  Packages file.     
:Then debería reportar esto como un error.
:Puede generar un módulo de política local para permitir este acceso.
:Do
:permita el acceso momentáneamente executando:
:# grep prelink /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:prelink_cron_system_t:s0-s0:c0.c
:                              1023
:Target Context                system_u:object_r:etc_runtime_t:s0
:Target Objects                /var/lib/rpm/Packages [ file ]
:Source                        prelink
:Source Path                   /usr/bin/bash
:Port                          <Desconocido>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           
:Policy RPM                    <Desconocido>
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.0-1.fc17.x86_64 #1 SMP Sun
:                              Jun 3 06:35:17 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    mar 12 jun 2012 03:15:25 ART
:Last Seen                     mar 12 jun 2012 03:15:25 ART
:Local ID                      97a7a835-a1ec-4fee-8b0c-6a52a107f79b
:
:Raw Audit Messages
:type=AVC msg=audit(1339481725.418:146): avc:  denied  { getattr } for  pid=8208 comm="prelink" path="/var/lib/rpm/Packages" dev="dm-1" ino=2883607 scontext=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1339481725.418:146): arch=x86_64 syscall=stat success=no exit=EACCES a0=1281a40 a1=7fff21ab2c50 a2=7fff21ab2c50 a3=1281a40 items=0 ppid=6190 pid=8208 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=10 comm=prelink exe=/usr/bin/bash subj=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 key=(null)
:
:Hash: prelink,prelink_cron_system_t,etc_runtime_t,file,getattr
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Daniel Walsh 2012-06-13 00:58:25 UTC
/var/lib/rpm is mislabed.

restorecon -R -v /var/lib/rpm


Did you have some init script create this directory and mv it to /var/lib?


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