From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 30 Mar 2005 12:05:09 +0000 Subject: Re: [PATCH] udev: add rule based program execution Message-Id: <1112184309.4930.18.camel@localhost.localdomain> List-Id: References: <20050329145403.GA16544@vrfy.org> In-Reply-To: <20050329145403.GA16544@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, 2005-03-30 at 11:39 +0400, Roman Kagan wrote: > On Tue, Mar 29, 2005 at 04:54:03PM +0200, Kay Sievers wrote: > > To get this working, I changed the logic to read all rules and not to > > stop at the first match. > > That's very nice, indeed. > > > If a rule should be the last one to be applied > > to a device it must use OPTION="last_rule". > > IMHO this is going to increase admin's chances to shoot himself in the > foot. Thats one of thousand ways to shoot yourself. I don't see any problem getting bigger here. > Imagine someone having installed a rules file causing the > processing of a particular type to stop early, and then someone (else) > trying to figure out what's wrong with another rules file matching the > same devices but happening to go later in the list. The only thing that can happen is that you get more symlinks or the systems standard permissions gets applied. And that's not bad, I think. > I beleive all rules must be independently processed; the only reason for > the user to care about the order of the rules should be when a rule > depends on the _results_ of the action of another rule. Agreed. > As to the notorious "too many tty devices" problem, I guess it can be > worked around with something like > > SUBSYSTEM="tty", NAME="" I thought you were arguing for "independent" rules? This makes the heaviest dependency on the order of the rules, I can think of. :) > or > > SUBSYSTEM!="tty", HOTPLUG="/some/slow/hotplug/script" And if the hotplug-script should be excluded from two subsystems? > > After the first rule that > > assigns a NAME to a device, all later rules with a NAME key will be > > ignored, so it should not change the current behavior too much. > > Same problem here: changing the order of the (seemingly independent!) > rules may cause unexpected change of which rule applies. What's wrong > with executing all NAME actions? At worst it'll create multiple device > nodes for the same device - big deal... No, I don't see any reason to support more than one device node while we can do an unlimited number of symlinks. It's a security nightmare, to check the permissions of possibly multiple nodes with the same major/minor. And today we have the inconvenience that the kernel logs errors for devices that don't have the same name as the user visible device node. We may need something to match these both together in a sane way - multiple nodes would be a complete mess here. Thanks, Kay ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel