linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev-140 Bug: udevadm test changing mode of /dev to 660, so making /dev unusuable for users
Date: Wed, 18 Mar 2009 15:00:27 +0000	[thread overview]
Message-ID: <200903181600.28672.zzam@gentoo.org> (raw)
In-Reply-To: <200903181121.48924.zzam@gentoo.org>

On Mittwoch, 18. März 2009, Matthias Schwarzott wrote:
> Hi there!
>
> This time I have a very strange error. I tried what happens when using
> # udevadm test /sys/class/mem/null
>
> and strange, a bit later some user processes had problems accessing
> /dev/null. A quick check showed, that the permissions of /dev were
> destroyed.
>
> # ls -ld /dev /dev/null
> drw-rw---- 16 root root 4280 18. Mär 11:14 /dev
> crw-rw-rw-  1 root root 1, 3 17. Mär 08:05 /dev/null
>

I found out how the error occurs:
It is a difference between
A. udevadm test /sys/class/mem/null/
and
B. udevadm test /sys/class/mem/null

Case A was the case that showed the error behaviour. It seems udevadm is 
confused by the trailing slash. This behaviour seems to be there since ages. 
So there are 2 things that might be done.
1. Make the code more robust, fix error path of failing rename operation to 
not call chmod after it. (I did not fully understand this code).
2. Catch the above case and either strip of the trailing slash or add a better 
solution that normalizes the path and extracts "KERNEL".

Regards
Matthias

  parent reply	other threads:[~2009-03-18 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 10:21 udev-140 Bug: udevadm test changing mode of /dev to 660, so making /dev unusuable for users Matthias Schwarzott
2009-03-18 10:43 ` udev-140 Bug: udevadm test changing mode of /dev to 660, so Kay Sievers
2009-03-18 15:00 ` Matthias Schwarzott [this message]
2009-03-18 17:52 ` Kay Sievers
2009-03-18 20:37 ` udev-140 Bug: udevadm test changing mode of /dev to 660, so making /dev unusuable for users Matthias Schwarzott

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=200903181600.28672.zzam@gentoo.org \
    --to=zzam@gentoo.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).