1 |
On 01/28/2012 03:49 AM, Mike Frysinger wrote: |
2 |
> On Friday 27 January 2012 20:07:45 Samuli Suominen wrote: |
3 |
>> On 01/28/2012 02:41 AM, Mike Frysinger wrote: |
4 |
>>> On Friday 27 January 2012 19:18:07 Samuli Suominen wrote: |
5 |
>>>> On 01/28/2012 02:14 AM, Mike Frysinger wrote: |
6 |
>>>>> along these lines, why is cdrtools set*id ? if we have a "cdrom" |
7 |
>>>>> group, and we assign our cdroms/dvdroms to that group, then we already |
8 |
>>>>> have access control in place and can skip the set*id. |
9 |
>>>> |
10 |
>>>> cdrtools can't probe the drives without the binary being setuid, or the |
11 |
>>>> user belonging to the 'disk' group (and even that is not enough in some |
12 |
>>>> cases if the permissions vary) |
13 |
>>> |
14 |
>>> the drives are owned by the "cdrom" group and have group +rw. so if the |
15 |
>>> user is in the "cdrom" group, why can't they probe the drives ? |
16 |
>>> |
17 |
>>> "disk" owns the non-removable hard drives. |
18 |
>>> |
19 |
>>> $ ls -l /dev/sr0 /dev/sg0 /dev/sg6 |
20 |
>>> crw-rw---- 1 root disk 21, 0 Jan 6 23:07 /dev/sg0 |
21 |
>>> crw-rw---- 1 root cdrom 21, 6 Jan 6 23:07 /dev/sg6 |
22 |
>>> brw-rw---- 1 root cdrom 11, 0 Jan 17 22:28 /dev/sr0 |
23 |
>>> -mike |
24 |
>> |
25 |
>> i dont know why, but it does probe also non-removable disks... it probes |
26 |
>> per bus, iirc |
27 |
>> |
28 |
>> you can try it easily yourself: |
29 |
> |
30 |
> this is a failure in cdrecord (not that surprising). it aborts after the first |
31 |
> EACCES it gets on /dev/sg# instead of continuing on. granting set*id to a |
32 |
> binary because they can't be bothered to try the next device is dumb. |
33 |
> |
34 |
> $ sudo mv /dev/sg[0-5] ~/ |
35 |
> $ sudo chmod 755 /usr/bin/cdrecord |
36 |
> $ cdrecord -scanbus |
37 |
> |
38 |
> Cdrecord-ProDVD-ProBD-Clone 3.01a06 (x86_64-unknown-linux-gnu) Copyright (C) |
39 |
> 1995-2011 Joerg Schilling |
40 |
> TOC Type: 1 = CD-ROM |
41 |
> Linux sg driver version: 3.5.34 |
42 |
> Using libscg version 'schily-0.9'. |
43 |
> Using libscg transport code version 'schily-scsi-linux-sg.c-1.95' |
44 |
> Driveropts: 'burnfree' |
45 |
> SCSI buffer size: 32768 |
46 |
> scsibus7: |
47 |
> 7,0,0 700) 'TSSTcorp' 'CDDVDW SH-S222L ' 'SB03' Removable CD-ROM |
48 |
> 7,1,0 701) * |
49 |
> 7,2,0 702) * |
50 |
> 7,3,0 703) * |
51 |
> 7,4,0 704) * |
52 |
> 7,5,0 705) * |
53 |
> 7,6,0 706) * |
54 |
> 7,7,0 707) * |
55 |
> -mike |
56 |
|
57 |
and people have multiple times tried to convince the cdrtools author to |
58 |
change this, but without success. |
59 |
the author can be, well, ... |
60 |
|
61 |
i've improved the situation _a bit_: |
62 |
|
63 |
+*cdrtools-3.01_alpha06-r1 (28 Jan 2012) |
64 |
+ |
65 |
+ 28 Jan 2012; Samuli Suominen <ssuominen@g.o> |
66 |
+ +cdrtools-3.01_alpha06-r1.ebuild: |
67 |
+ Change cdda2wav, cdrecord, readcd and rscsi from suid root to sgid |
68 |
disk for |
69 |
+ udev users (note: tested with cdrecord -scanbus) |