Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 584884 - Device node creation code should use setfscreatecon()
Device node creation code should use setfscreatecon()
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper (Show other bugs)
5.5
All Linux
low Severity high
: ---
: ---
Assigned To: Peter Rajnoha
Corey Marthaler
:
Depends On: 584381
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-22 12:12 EDT by Daniel Walsh
Modified: 2011-07-21 02:44 EDT (History)
18 users (show)

See Also:
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.
Story Points: ---
Clone Of: 584381
Environment:
Last Closed: 2011-07-21 02:44:36 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0981 normal SHIPPED_LIVE device-mapper bug fix and enhancement update 2011-07-20 11:45:12 EDT

  None (edit)
Comment 1 Daniel Walsh 2010-04-22 12:13:49 EDT
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 15:43:00 EDT
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 13:14:08 EST
So we've another tricky matrix of combinations to work out and support...
Comment 4 Peter Rajnoha 2010-12-13 07:58:59 EST
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 12:48:31 EST
Fix in device-mapper-1.02.63-2.el5
Comment 10 Florian Nadge 2011-05-26 11:40:17 EDT
    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 02:44:36 EDT
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.