Gentoo Archives: gentoo-dev

From: Bauno <bauno@××××××.it>
To: Martin Schlemmer <azarah@g.o>
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] CDRW permissions and devfsd
Date: Mon, 02 Sep 2002 20:06:38
Message-Id: 200209030304.08381.bauno@inwind.it
In Reply to: Re: [gentoo-dev] CDRW permissions and devfsd by Martin Schlemmer
1 On Tuesday 03 September 2002 02:37, Martin Schlemmer wrote:
2 > > [snipped]
3 > > The original line in devfsd.conf (that you report above) doesn't work
4 > > if sg is compiled as module. You need to set the permissions on the
5 > > scsi/bus/.../generic and not on the symbolic links /dev/sg*. I *think*
6 > > it's because /dev/sg* doesn't exist (yet) when devfsd tries to apply
7 > > the permissions, but I may be wrong.
8 >
9 > No, the REGISTER means it only gets done when the /dev/sg0 device is
10 > registered in the devfs namespace.
11 >
12 > The real fix for modules, is the line:
13 >
14 > LOOKUP ^sg.*$ MODLOAD ACTION sg
15 >
16 > which cause the "sg" module to be loaded when you "lookup" (try to
17 > open) /dev/sg*
18
19 I really don't think so (everything's wrapped):
20
21 Default Gentoo style:
22
23 ------------------devfsd.conf-----------------------------------------------
24
25 # Give the cdrw group write permissions to /dev/sg0
26 # This is done to have non root user use the burner (scan the scsi bus)
27 LOOKUP ^sg.*$ MODLOAD ACTION sg
28 #REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS
29 root.disk 660
30 REGISTER ^sg.*$ PERMISSIONS root.disk 660
31
32 --------------devfsd.conf---------------------------------------------------
33
34 bauniga root # modprobe sg
35 bauniga root # ll /dev/scsi/host0/bus0/target0/lun0/generic
36 crw-r----- 1 root root 21, 0 Jan 1 1970
37 /dev/scsi/host0/bus0/target0/lun0/generic
38 bauniga root # killall -HUP devfsd
39 bauniga root # ll /dev/scsi/host0/bus0/target0/lun0/generic
40 crw-rw---- 1 root disk 21, 0 Jan 1 1970
41 /dev/scsi/host0/bus0/target0/lun0/generic
42
43
44
45
46 Bauno :) style:
47
48 ----------------------------devfsd.conf------------------------------------
49 # Give the cdrw group write permissions to /dev/sg0
50 # This is done to have non root user use the burner (scan the scsi bus)
51 LOOKUP ^sg.*$ MODLOAD ACTION sg
52 REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS
53 root.disk 660
54 #REGISTER ^sg.*$ PERMISSIONS root.disk 660
55 --------------devfsd.conf---------------------------------------------------
56
57 bauniga root # modprobe sg
58 bauniga root # ll /dev/scsi/host0/bus0/target0/lun0/generic
59 crw-rw---- 1 root disk 21, 0 Jan 1 1970
60 /dev/scsi/host0/bus0/target0/lun0/generic
61
62
63 So, I think the Gentoo default devfsd.conf isn't well suited for the sg
64 module....
65
66 --
67 Bauno - Eurydices, oro, properata retexite fata!
68 "Even now I can feel it. Buried somewhere deep inside. Watching me...
69 waiting. But you know what scares me the most. When I can't fight it
70 anymore. When it takes over. When I totally lose control. I like it."

Replies

Subject Author
Re: [gentoo-dev] CDRW permissions and devfsd Martin Schlemmer <azarah@g.o>