1 |
On 01/28/2012 02:41 AM, Mike Frysinger wrote: |
2 |
> On Friday 27 January 2012 19:18:07 Samuli Suominen wrote: |
3 |
>> On 01/28/2012 02:14 AM, Mike Frysinger wrote: |
4 |
>>> along these lines, why is cdrtools set*id ? if we have a "cdrom" group, |
5 |
>>> and we assign our cdroms/dvdroms to that group, then we already have |
6 |
>>> access control in place and can skip the set*id. |
7 |
>> |
8 |
>> cdrtools can't probe the drives without the binary being setuid, or the |
9 |
>> user belonging to the 'disk' group (and even that is not enough in some |
10 |
>> cases if the permissions vary) |
11 |
> |
12 |
> the drives are owned by the "cdrom" group and have group +rw. so if the user |
13 |
> is in the "cdrom" group, why can't they probe the drives ? |
14 |
> |
15 |
> "disk" owns the non-removable hard drives. |
16 |
> |
17 |
> $ ls -l /dev/sr0 /dev/sg0 /dev/sg6 |
18 |
> crw-rw---- 1 root disk 21, 0 Jan 6 23:07 /dev/sg0 |
19 |
> crw-rw---- 1 root cdrom 21, 6 Jan 6 23:07 /dev/sg6 |
20 |
> brw-rw---- 1 root cdrom 11, 0 Jan 17 22:28 /dev/sr0 |
21 |
> -mike |
22 |
|
23 |
i dont know why, but it does probe also non-removable disks... it probes |
24 |
per bus, iirc |
25 |
|
26 |
you can try it easily yourself: |
27 |
|
28 |
ssuominen@null ~ $ cdrecord -scanbus |
29 |
Cdrecord-ProDVD-ProBD-Clone 3.01a06 (x86_64-unknown-linux-gnu) Copyright |
30 |
(C) 1995-2011 Joerg Schilling |
31 |
Linux sg driver version: 3.5.34 |
32 |
Using libscg version 'schily-0.9'. |
33 |
scsibus0: |
34 |
0,0,0 0) 'ATA ' 'WDC WD5000AADS-0' '01.0' Disk |
35 |
0,1,0 1) * |
36 |
0,2,0 2) * |
37 |
0,3,0 3) * |
38 |
0,4,0 4) * |
39 |
0,5,0 5) * |
40 |
0,6,0 6) * |
41 |
0,7,0 7) * |
42 |
scsibus1: |
43 |
1,0,0 100) 'ATA ' 'ST31000333AS ' 'SD25' Disk |
44 |
1,1,0 101) 'TSSTcorp' 'CDDVDW SH-S223C ' 'SB06' Removable CD-ROM |
45 |
1,2,0 102) * |
46 |
1,3,0 103) * |
47 |
1,4,0 104) * |
48 |
1,5,0 105) * |
49 |
1,6,0 106) * |
50 |
1,7,0 107) * |
51 |
scsibus4: |
52 |
4,0,0 400) 'HUAWEI ' 'Mass Storage ' '2.31' Removable CD-ROM |
53 |
4,1,0 401) * |
54 |
4,2,0 402) * |
55 |
4,3,0 403) * |
56 |
4,4,0 404) * |
57 |
4,5,0 405) * |
58 |
4,6,0 406) * |
59 |
4,7,0 407) * |
60 |
scsibus5: |
61 |
5,0,0 500) 'HUAWEI ' 'TF CARD Storage ' ' ' Removable Disk |
62 |
5,1,0 501) * |
63 |
5,2,0 502) * |
64 |
5,3,0 503) * |
65 |
5,4,0 504) * |
66 |
5,5,0 505) * |
67 |
5,6,0 506) * |
68 |
5,7,0 507) * |
69 |
ssuominen@null ~ $ sudo chmod 755 /usr/bin/cdrecord |
70 |
ssuominen@null ~ $ cdrecord -scanbus |
71 |
Cdrecord-ProDVD-ProBD-Clone 3.01a06 (x86_64-unknown-linux-gnu) Copyright |
72 |
(C) 1995-2011 Joerg Schilling |
73 |
cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open or use |
74 |
SCSI driver. |
75 |
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you |
76 |
are root. |
77 |
cdrecord: For possible transport specifiers try 'cdrecord dev=help'. |
78 |
ssuominen@null ~ $ groups |
79 |
wheel audio cdrom video games cdrw usb users portage |
80 |
ssuominen@null ~ $ |