Bug 445263 - SELinux is preventing /usr/sbin/lvm (lvm_t) "rename" to VolGroup00 (device_t).
SELinux is preventing /usr/sbin/lvm (lvm_t) "rename" to VolGroup00 (device_t).
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
5.0
All Linux
low Severity low
: rc
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-05 16:27 EDT by Dave Malcolm
Modified: 2008-05-06 10:28 EDT (History)
1 user (show)

See Also:
Fixed In Version: 5.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 10:28:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2008-05-05 16:27:53 EDT
Description of problem:
Having moved a drive from another machine, got two VolGroup00, so have to rename
one of them; getting AVC denial at command line:
vgrename qcnIiE-Q8L5-dxgy-xIof-hzfj-SpjE-RnHr4m VolGroup01
  Renaming "/dev/VolGroup00" to "/dev/VolGroup00" failed: Permission denied

Summary
    SELinux is preventing /usr/sbin/lvm (lvm_t) "rename" to VolGroup00
    (device_t).

Detailed Description
    SELinux denied access requested by /usr/sbin/lvm. It is not expected that
    this access is required by /usr/sbin/lvm 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
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for VolGroup00, restorecon -v
    VolGroup00 If this does not work, there is currently no automatic way to
    allow this access. Instead,  you can generate a local policy module to allow
    this access - see http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385
    Or you can disable SELinux protection altogether. Disabling SELinux
    protection is not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Additional Information        

Source Context                root:system_r:lvm_t:SystemLow-SystemHigh
Target Context                system_u:object_r:device_t
Target Objects                VolGroup00 [ dir ]
Affected RPM Packages         lvm2-2.02.16-3.el5 [application]
Policy RPM                    selinux-policy-2.4.6-30.el5
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     dhcp-100-2-213.bos.redhat.com
Platform                      Linux dhcp-100-2-213.bos.redhat.com
                              2.6.18-8.el5xen #1 SMP Fri Jan 26 14:42:21 EST
                              2007 i686 i686
Alert Count                   1
Line Numbers                  

Raw Audit Messages            

avc: denied { rename } for comm="vgrename" dev=tmpfs egid=0 euid=0
exe="/usr/sbin/lvm" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="VolGroup00"
pid=4088 scontext=root:system_r:lvm_t:s0-s0:c0.c1023 sgid=0
subj=root:system_r:lvm_t:s0-s0:c0.c1023 suid=0 tclass=dir
tcontext=system_u:object_r:device_t:s0 tty=pts0 uid=0
Comment 1 Daniel Walsh 2008-05-06 10:28:19 EDT
Could you upgrade machine to at least 5.1 or preferably 5.2 policy

http://people.redhat.com/dwalsh/SELinux/RHEL5

udev/lvm fixes might also have fixed.

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