From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 06 May 2004 22:59:16 +0000 Subject: Re: Re: [PATCH] udev callout for reading filesystem labels Message-Id: <20040506225916.GA991@vrfy.org> List-Id: References: <20040429210446.GA9836@vrfy.org> In-Reply-To: <20040429210446.GA9836@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, May 07, 2004 at 12:44:01AM +0200, Arnd Bergmann wrote: > Kay Sievers schrieb am 06.05.2004, 22:18:41: > > On Thu, May 06, 2004 at 11:30:23AM +0200, Arnd Bergmann wrote: > > > On Thursday 29 April 2004 23:04, Kay Sievers wrote: > > > > Sure, we can do this. How much code do we need, for the parsing? > > The attachment contains the code from the linux kernel that does > the equivalent, somewhat adapted to user interfaces (but probably > not functional due to lack of sleep). I'll try to do a working > patch tomorrow. > > What would you do to find out the disk minor when udev is > called for a partition of the disk? Is this handled by udev > already or do we need additional logic in the callout program? Hmm, we can take libsysfs's get_parent() for the partition, to get the main device. > > > This looks like a malicious user can easily prevent it from working > > > by creating files in /tmp. You might need to use something similar > > > to tmpfile(3) here. > > > > Hmm, I really like to be able to compile with klibc and it doesn't > > support tmpfile(). What about simply unlinking it, before creating the node? > > Well, I did not mean tmpfile itself, just something similar enough. > Unlinking the file certainly avoids the security problem, but it > sounds a little rude. Are you sure there is no race when udev is > called multiple times for the same device node and we unlink before > the other udev opens the node? We may include the PID in the filename? thanks, Kay ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ 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