Gentoo Archives: gentoo-dev

From: Samuli Suominen <ssuominen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] useless set*id binaries
Date: Sat, 28 Jan 2012 08:39:07
Message-Id: 4F23B361.5010805@gentoo.org
In Reply to: Re: [gentoo-dev] useless set*id binaries by "Michał Górny"
1 On 01/28/2012 10:32 AM, Michał Górny wrote:
2 > On Sat, 28 Jan 2012 03:07:45 +0200
3 > Samuli Suominen<ssuominen@g.o> wrote:
4 >
5 >> On 01/28/2012 02:41 AM, Mike Frysinger wrote:
6 >>> On Friday 27 January 2012 19:18:07 Samuli Suominen wrote:
7 >>>> On 01/28/2012 02:14 AM, Mike Frysinger wrote:
8 >>>>> along these lines, why is cdrtools set*id ? if we have a "cdrom"
9 >>>>> group, and we assign our cdroms/dvdroms to that group, then we
10 >>>>> already have access control in place and can skip the set*id.
11 >>>>
12 >>>> cdrtools can't probe the drives without the binary being setuid,
13 >>>> or the user belonging to the 'disk' group (and even that is not
14 >>>> enough in some cases if the permissions vary)
15 >>>
16 >>> the drives are owned by the "cdrom" group and have group +rw. so
17 >>> if the user is in the "cdrom" group, why can't they probe the
18 >>> drives ?
19 >>>
20 >>> "disk" owns the non-removable hard drives.
21 >>>
22 >>> $ ls -l /dev/sr0 /dev/sg0 /dev/sg6
23 >>> crw-rw---- 1 root disk 21, 0 Jan 6 23:07 /dev/sg0
24 >>> crw-rw---- 1 root cdrom 21, 6 Jan 6 23:07 /dev/sg6
25 >>> brw-rw---- 1 root cdrom 11, 0 Jan 17 22:28 /dev/sr0
26 >>> -mike
27 >>
28 >> i dont know why, but it does probe also non-removable disks... it
29 >> probes per bus, iirc
30 >>
31 >> you can try it easily yourself:
32 >>
33 >> ssuominen@null ~ $ cdrecord -scanbus
34 >
35 > Does user actually need to be able to do this? Doesn't passing dev=...
36 > directly work?
37 >
38
39 It will work if you specify it by hand. But how do you know without
40 using -scanbus what to specify?
41
42 Also, burning frontends, such as xfburn, rely on this functionality to
43 automatically find the burner when USE="udev" is disabled.
44
45 And if I don't remember wrong, k3b also uses it as fallback method.