Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 100610

Summary: udev-[063-064] GROUP= rule specifier not honored for certain devices
Product: Gentoo Linux Reporter: Philip Kovacs <pkdevel>
Component: [OLD] Core systemAssignee: Greg Kroah-Hartman (RETIRED) <gregkh>
Status: VERIFIED TEST-REQUEST    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Philip Kovacs 2005-07-28 10:24:35 UTC
Certain devices, e.g. sr[0-9]*, cannot be created outside of group disk.  Using
a local rule with an alternate GROUP specifier, e.g. GROUP="cdrw", udev does not
honor the GROUP specifier.   I am specifically interested in replacing this
stock rule on 50-udev.rules:

BUS=="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k",
SYMLINK+="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"

with this rule in 10-local-udev.rules:

BUS=="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k",
SYMLINK+="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}", NAME="%k", GROUP="cdrw"

in order to create /dev/sr0 as root/cdrw (uid/gid)and not root/disk, while also
creating the convenient symlinks output by cdsymlinks.sh.

My 'cdsymlinks.sh sr0' output is "cdrom1 cdrw dvd dvdrw" and those symlinks are
created and pointing correctly to /dev/sr0.

The larger goal is to eliminate non-privileged users access to group disk by
placing devices like burners into an alternate group such as cdrw.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.5-r0, 2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com
http://gentoo.ccccom.com"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X alsa avi cdr cups divx4linux dvd dvdr encode fbcon gif gpm gtk gtk2
jpeg mad mikmod mmx mpeg ncurses nls nptl oggvorbis opengl oss perl png python
readline sdl slang spell sse ssl tcpd truetype unicode xml2 xprint xv xvid zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-28 11:23:39 UTC
Use "GROUP:=" instead of "GROUP=" and see if that fixes your custom rule.
Comment 2 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-28 11:24:00 UTC
oops, need to assign this to me...
Comment 3 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-28 11:24:33 UTC
ok, now can mark "test-request"...
Comment 4 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-28 11:25:04 UTC
ugh...
Comment 5 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-28 11:25:46 UTC
am not having fun with bugzilla today...
Comment 6 Philip Kovacs 2005-07-28 12:06:12 UTC
greg, it works perfectly.... beautiful.   the udev man pages mention using that
:= syntax to "disallow later changes", but in practice i've never used it.  
looks good here now.  many thanks.  phil
Comment 7 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-28 12:25:08 UTC
great, I'll mark this as closed then.