RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 674168 - udev-acl: Correctly handle ENV{ACL_MANAGE}==0
Summary: udev-acl: Correctly handle ENV{ACL_MANAGE}==0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udev
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Harald Hoyer
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-31 20:30 UTC by Bryan Mason
Modified: 2018-11-14 15:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of the udev rules it was not possible to turn off console user ownership of certain devices. For example, if you want to remove console ownership of the CDROM device in a udev rule with SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="0" the ENV{ACL_MANAGE}="0" was not completly honored. This update release fixed udev-acl tool, which is part of udev, to honor "0" as a setting.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:50:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0525 0 normal SHIPPED_LIVE udev bug fix and enhancement update 2011-05-19 09:37:42 UTC

Description Bryan Mason 2011-01-31 20:30:59 UTC
Description of problem:

    The definition of ACL_MANAGE is inconsistent in udev and
    attempting to set up device permissions by setting
    ENV{ACL_MANAGE}="0" does not work as expected.

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

    udev-147-2.29.el6

How reproducible:

    100%

Steps to Reproduce:

 1) Add the following line to etc/security/console.handlers

    /sbin/pam_console_apply lock logfail wait -r -t tty -s -d

 2) Create the file /etc/security/console.perms.d/99-default.perms

    <cdrom>=/dev/cdrom* /dev/sr0
    <console> 0600 <cdrom> 0111 myuser.mygroup

 3) cp /lib/udev/rules.d/70-acl.rules /etc/udev/rules.d/70-acl.rules

 4) Change the line:

    SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="1" 

    to

    SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="0"

 5) Reboot.
  
Actual results:

    udev creates an ACL on the CD-ROM device.

Expected results:

    No ACL should be created on the CD-ROM.

Additional info:

    This has been discussed upstream:

        http://www.spinics.net/lists/hotplug/msg03382.html

    and resolved in http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=5c3ebbf35a2c101e0212c7066f0d65e457fcf40c

Comment 4 Harald Hoyer 2011-02-16 14:30:59 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:
In previous versions of the udev rules it was not possible to turn off console user ownership of certain devices.
For example, if you want to remove console ownership of the CDROM device in a udev rule with
SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="0"
the ENV{ACL_MANAGE}="0" was not completly honored.

This update release fixed udev-acl tool, which is part of udev, to honor "0" as a setting.

Comment 5 Karel Volný 2011-04-21 13:58:24 UTC
I guess I'd need more info on how to reproduce ... following the steps, after logging in as "myuser" I'm always getting

# file: dev/cdrom
# owner: myuser
# group: mygroup
user::--x
group::--x
other::--x

no matter the version of udev or the value of ENV{ACL_MANAGE}

not sure how to understand "udev creates an ACL on the CD-ROM device." - I'd expect something like

user:myuser:--x
group:mygroup:--x

appearing in the (wrong) output

OTOH, I'd expect something like:

user::rw-
group::rw-
other::---

appearing in the correct output ...

Comment 6 Siddhesh Poyarekar 2011-04-22 05:27:13 UTC
You don't even need to be logged in to see this. Here's what I get with just the gdm login screen:

[root@rhel6-x64 ~]# getfacl /dev/cdrom
getfacl: Removing leading '/' from absolute path names
# file: dev/cdrom
# owner: root
# group: cdrom
user::rw-
user:gdm:rw-
group::rw-
mask::rw-
other::---

You need to reboot once you copy over the udev rules (70-acl.rules) for it to take effect.

[root@rhel6-x64 ~]# rpm -q udev
udev-147-2.29.el6.x86_64

Comment 7 Karel Volný 2011-04-27 13:01:47 UTC
SanityOnly

I still cannot reproduce the issue - no user:... or group:... ACL records are being added; my setup must be missing something ...

however, the patch makes sense and is included as:

> Patch500: udev.git-5c3ebbf35a2c101e0212c7066f0d65e457fcf40c.patch

it applies cleanly during the build:

+ echo 'Patch #500 (udev.git-5c3ebbf35a2c101e0212c7066f0d65e457fcf40c.patch):'
Patch #500 (udev.git-5c3ebbf35a2c101e0212c7066f0d65e457fcf40c.patch):
+ /bin/cat /builddir/build/SOURCES/udev.git-5c3ebbf35a2c101e0212c7066f0d65e457fcf40c.patch
+ /usr/bin/patch -s -p1 -b --suffix .git500 --fuzz=0
+ echo 'Patch #501 (udev.git-c54b43e2c233e724f840c4f6a0a81bdd549e40bb.patch):'

as can be seen for example here:

http://download.devel.redhat.com/brewroot/packages/udev/147/2.35.el6/data/logs/i686/build.log

Comment 8 errata-xmlrpc 2011-05-19 11:50:43 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-0525.html


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