Hide Forgot
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
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.
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 ...
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
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
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