linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Steiner <fsteiner-mail@bio.ifi.lmu.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: permissions: udev vs. pam_devperm.so
Date: Wed, 27 Oct 2004 05:59:40 +0000	[thread overview]
Message-ID: <417F394C.6010401@bio.ifi.lmu.de> (raw)
In-Reply-To: <417DF0A8.2060108@bio.ifi.lmu.de>

Kay Sievers wrote


>>Just one comment:
>>Having "hdc*:root:disk:660" in udev.permissions and calling "udevstart"
>>will always set /dev/hdc to root:disk and 600. With owner and group
>>fields empty, udevstart will not change the owner and the group. I'm
>>not sure if udevstart triggers "add" events, likely not?
> 
> 
> Sure, udevstart simulates a "add" event for every device it can find. I
> can't reproduce the failure. I expect you have a earlier line matching in
> one of your .permissions files.
> udev searches the list from the top and the first match will make it. Do
> you have "hd*:..." or similar before the "hdc*"?

No, but I don't see a failure here (except that I wrote the permission
was set to 600. Sorry, it was indeed changed to 660 like defined. Sorry for
the confusion). With your explanation it seems correct that udevstart sets
the owner and permission back to the values defined in the permissions file,
if it triggers an "add" for every device.

>>With the permission field empty, udevstart will set the permissions
>>to 000, although udev.conf specifies 0600 as default, so I guess this
>>is wrong...
> 
> 
> Yes, it is wrong. We only apply the defaults if we don't match any rule.
> The attached patch should fix this.

Yes, that works. Thanks! Now I can just remove the values from the
permission lines for all entries pam_devperm handles on login. And
whenever udev works on one of these devices (like detecting /dev/hdc
as block device after the user logged in), it won't change the permissions
if the device already exists.
So that's indeed the feature I needed :-)

cu,
Frank

-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&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

      parent reply	other threads:[~2004-10-27  5:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-26  6:37 permissions: udev vs. pam_devperm.so Frank Steiner
2004-10-26 12:25 ` Kay Sievers
2004-10-26 12:30 ` Frank Steiner
2004-10-26 13:16 ` Kay Sievers
2004-10-26 13:20 ` Frank Steiner
2004-10-26 13:49 ` Frank Steiner
2004-10-26 14:47 ` Kay Sievers
2004-10-26 14:57 ` Kay Sievers
2004-10-27  0:02 ` Kay Sievers
2004-10-27  5:59 ` Frank Steiner [this message]

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=417F394C.6010401@bio.ifi.lmu.de \
    --to=fsteiner-mail@bio.ifi.lmu.de \
    --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).