Bug 584884 - Device node creation code should use setfscreatecon()
Summary: Device node creation code should use setfscreatecon()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper
Version: 5.5
Hardware: All
OS: Linux
low
high
Target Milestone: ---
: ---
Assignee: Peter Rajnoha
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On: 584381
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-22 16:12 UTC by Daniel Walsh
Modified: 2011-07-21 06:44 UTC (History)
18 users (show)

Fixed In Version: device-mapper-1.02.63-2.el5
Doc Type: Bug Fix
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore.
Clone Of: 584381
Environment:
Last Closed: 2011-07-21 06:44:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0981 0 normal SHIPPED_LIVE device-mapper bug fix and enhancement update 2011-07-20 15:45:12 UTC

Comment 1 Daniel Walsh 2010-04-22 16:13:49 UTC
lvm should be useing setfscreatecon before creating the device, rather then changing the device label afterwards.  This opens us to a potential race condition.

Comment 2 Milan Broz 2010-05-18 19:43:00 UTC
I have no idea why the bug is private, but this is the core problem: 

"Looking at the lvm2 source code, it does create the device node and then
relabels it after the fact via lsetfilecon rather than using setfscreatecon()
before calling mknod()."

In rawhide is this code probably obsolete, all nodes and symlinks are created by udev. Ditto for RHEL6. Crypsetup was exception, but it now uses udev too
(I updated it recently with udev code added.)

Anyway I think the upstream should fix even the old path (it is used in RHEL5).

Moving it to RHEL5, because it is main concern there (all fixes are upstream first anyway) and try to do something with that.

Comment 3 Alasdair Kergon 2010-12-06 18:14:08 UTC
So we've another tricky matrix of combinations to work out and support...

Comment 4 Peter Rajnoha 2010-12-13 12:58:59 UTC
Patch for setting the context before the actual node creation is upstream now (device-mapper 1.02.60/lvm2 2.02.79).

Comment 6 Milan Broz 2011-03-04 17:48:31 UTC
Fix in device-mapper-1.02.63-2.el5

Comment 10 Florian Nadge 2011-05-26 15:40:17 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.

Comment 11 errata-xmlrpc 2011-07-21 06:44:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0981.html


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