linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Re: [PATCH] udev callout for reading filesystem labels
Date: Thu, 06 May 2004 22:59:16 +0000	[thread overview]
Message-ID: <20040506225916.GA991@vrfy.org> (raw)
In-Reply-To: <20040429210446.GA9836@vrfy.org>

On Fri, May 07, 2004 at 12:44:01AM +0200, Arnd Bergmann wrote:
> Kay Sievers <kay.sievers@vrfy.org> 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

  parent reply	other threads:[~2004-05-06 22:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-29 21:04 [PATCH] udev callout for reading filesystem labels Kay Sievers
2004-04-30 13:35 ` Kevin P. Fleming
2004-04-30 14:36 ` Oliver Neukum
2004-04-30 22:29 ` Greg KH
2004-05-05  1:14 ` Kay Sievers
2004-05-05 21:24 ` Greg KH
2004-05-06  9:30 ` Arnd Bergmann
2004-05-06 20:18 ` Kay Sievers
2004-05-06 22:59 ` Kay Sievers [this message]
2004-05-07 14:02 ` Kay Sievers
2004-05-07 18:25 ` Arnd Bergmann
2004-05-07 21:52 ` Kay Sievers
2004-05-08 11:29 ` Kay Sievers
  -- strict thread matches above, loose matches on Subject: below --
2004-05-06 22:44 Arnd Bergmann
2004-05-07 22:54 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040506225916.GA991@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).