linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* match order in udev.permissions
@ 2004-01-29 13:04 Olaf Hering
  2004-02-12 22:03 ` Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Olaf Hering @ 2004-01-29 13:04 UTC (permalink / raw)
  To: linux-hotplug


I have this stuff in udev.permissions, /dev/tty does not get 0666, but
0620 for some reason. Anyone else seeing this? version is 015.

tty:root:tty:666
tty[0-9][0-9]*:root:tty:666
tty*:root:tty:620
ttyH*:root:root:666
ttyC*:root:root:666
ttyD*:root:root:666
ttyE*:root:root:666
ttyX*:root:root:666
ttyI*:root:uucp:660
ttyR*:root:root:666
ttyL*:root:root:666
ttyW*:root:uucp:660
ttyACM*:root:uucp:660
ttyUSB*:root:uucp:660
ttySL0*:root:uucp:660
ttyUB*:root:uucp:660

it seems tty[0-9][0-9]* does not match tty1. Should it?


crw--w----    1 root     tty        5,   0 2004-01-29 12:47 /dev/tty
crw--w--w-    1 olaf     tty        4,   0 2004-01-29 12:47 /dev/tty0
crw-rw----    1 root     tty        4,   1 2004-01-29 13:48 /dev/tty1
crw-rw-rw-    1 root     tty        4,  10 2004-01-29 13:51 /dev/tty10
crw-rw-rw-    1 root     tty        4,  11 2004-01-29 12:47 /dev/tty11
crw-rw-rw-    1 root     tty        4,  12 2004-01-29 13:48 /dev/tty12
crw-rw-rw-    1 root     tty        4,  13 2004-01-29 12:47 /dev/tty13
crw-rw-rw-    1 root     tty        4,  14 2004-01-29 12:47 /dev/tty14
crw-rw-rw-    1 root     tty        4,  15 2004-01-29 12:47 /dev/tty15
crw-rw-rw-    1 root     tty        4,  16 2004-01-29 12:47 /dev/tty16
crw-rw-rw-    1 root     tty        4,  17 2004-01-29 12:47 /dev/tty17
crw-rw-rw-    1 root     tty        4,  18 2004-01-29 12:47 /dev/tty18
crw-rw-rw-    1 root     tty        4,  19 2004-01-29 12:47 /dev/tty19
crw-rw----    1 root     tty        4,   2 2004-01-29 13:48 /dev/tty2
crw-rw-rw-    1 root     tty        4,  20 2004-01-29 12:47 /dev/tty20
crw-rw-rw-    1 root     tty        4,  21 2004-01-29 12:47 /dev/tty21
crw-rw-rw-    1 root     tty        4,  22 2004-01-29 12:47 /dev/tty22
crw-rw-rw-    1 root     tty        4,  23 2004-01-29 12:47 /dev/tty23
crw-rw-rw-    1 root     tty        4,  24 2004-01-29 12:47 /dev/tty24
crw-rw-rw-    1 root     tty        4,  25 2004-01-29 12:47 /dev/tty25
crw-rw-rw-    1 root     tty        4,  26 2004-01-29 12:47 /dev/tty26
crw-rw-rw-    1 root     tty        4,  27 2004-01-29 12:47 /dev/tty27
crw-rw-rw-    1 root     tty        4,  28 2004-01-29 12:47 /dev/tty28
crw-rw-rw-    1 root     tty        4,  29 2004-01-29 12:47 /dev/tty29
crw-rw----    1 root     tty        4,   3 2004-01-29 13:48 /dev/tty3
crw-rw-rw-    1 root     tty        4,  30 2004-01-29 12:47 /dev/tty30
crw-rw-rw-    1 root     tty        4,  31 2004-01-29 12:46 /dev/tty31
crw-rw-rw-    1 root     tty        4,  32 2004-01-29 12:46 /dev/tty32
crw-rw-rw-    1 root     tty        4,  33 2004-01-29 12:46 /dev/tty33
crw-rw-rw-    1 root     tty        4,  34 2004-01-29 12:46 /dev/tty34
crw-rw-rw-    1 root     tty        4,  35 2004-01-29 12:46 /dev/tty35
crw-rw-rw-    1 root     tty        4,  36 2004-01-29 12:46 /dev/tty36
crw-rw-rw-    1 root     tty        4,  37 2004-01-29 12:46 /dev/tty37
crw-rw-rw-    1 root     tty        4,  38 2004-01-29 12:46 /dev/tty38
crw-rw-rw-    1 root     tty        4,  39 2004-01-29 12:46 /dev/tty39
crw-rw----    1 root     tty        4,   4 2004-01-29 13:48 /dev/tty4
crw-rw-rw-    1 root     tty        4,  40 2004-01-29 12:46 /dev/tty40
crw-rw-rw-    1 root     tty        4,  41 2004-01-29 12:46 /dev/tty41
crw-rw-rw-    1 root     tty        4,  42 2004-01-29 12:46 /dev/tty42
crw-rw-rw-    1 root     tty        4,  43 2004-01-29 12:46 /dev/tty43
crw-rw-rw-    1 root     tty        4,  44 2004-01-29 12:46 /dev/tty44
crw-rw-rw-    1 root     tty        4,  45 2004-01-29 12:46 /dev/tty45
crw-rw-rw-    1 root     tty        4,  46 2004-01-29 12:46 /dev/tty46
crw-rw-rw-    1 root     tty        4,  47 2004-01-29 12:46 /dev/tty47
crw-rw-rw-    1 root     tty        4,  48 2004-01-29 12:46 /dev/tty48
crw-rw-rw-    1 root     tty        4,  49 2004-01-29 12:46 /dev/tty49
crw-rw----    1 root     tty        4,   5 2004-01-29 13:48 /dev/tty5
crw-rw-rw-    1 root     tty        4,  50 2004-01-29 12:46 /dev/tty50
crw-rw-rw-    1 root     tty        4,  51 2004-01-29 12:46 /dev/tty51
crw-rw-rw-    1 root     tty        4,  52 2004-01-29 12:46 /dev/tty52
crw-rw-rw-    1 root     tty        4,  53 2004-01-29 12:46 /dev/tty53
crw-rw-rw-    1 root     tty        4,  54 2004-01-29 12:46 /dev/tty54
crw-rw-rw-    1 root     tty        4,  55 2004-01-29 12:46 /dev/tty55
crw-rw-rw-    1 root     tty        4,  56 2004-01-29 12:46 /dev/tty56
crw-rw-rw-    1 root     tty        4,  57 2004-01-29 12:46 /dev/tty57
crw-rw-rw-    1 root     tty        4,  58 2004-01-29 12:46 /dev/tty58
crw-rw-rw-    1 root     tty        4,  59 2004-01-29 12:46 /dev/tty59
crw-rw----    1 root     tty        4,   6 2004-01-29 13:48 /dev/tty6
crw-rw-rw-    1 root     tty        4,  60 2004-01-29 12:46 /dev/tty60
crw-rw-rw-    1 root     tty        4,  61 2004-01-29 12:46 /dev/tty61
crw-rw-rw-    1 root     tty        4,  62 2004-01-29 12:46 /dev/tty62
crw-rw-rw-    1 root     tty        4,  63 2004-01-29 12:46 /dev/tty63
crw-------    1 root     root       4,   7 2004-01-29 12:47 /dev/tty7
crw-------    1 root     root       4,   8 2004-01-29 12:47 /dev/tty8
crw-------    1 root     root       4,   9 2004-01-29 14:02 /dev/tty9
crw-------    1 root     root       4,  64 2004-01-29 12:46 /dev/ttyS0
crw-------    1 root     root       4,  65 2004-01-29 12:46 /dev/ttyS1
-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, n√úRNBERG


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: match order in udev.permissions
  2004-01-29 13:04 match order in udev.permissions Olaf Hering
@ 2004-02-12 22:03 ` Greg KH
  2004-02-12 22:19 ` Kay Sievers
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-02-12 22:03 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jan 29, 2004 at 02:04:05PM +0100, Olaf Hering wrote:
> 
> I have this stuff in udev.permissions, /dev/tty does not get 0666, but
> 0620 for some reason. Anyone else seeing this? version is 015.
> 
> tty:root:tty:666
> tty[0-9][0-9]*:root:tty:666
> tty*:root:tty:620
> ttyH*:root:root:666
> ttyC*:root:root:666
> ttyD*:root:root:666
> ttyE*:root:root:666
> ttyX*:root:root:666
> ttyI*:root:uucp:660
> ttyR*:root:root:666
> ttyL*:root:root:666
> ttyW*:root:uucp:660
> ttyACM*:root:uucp:660
> ttyUSB*:root:uucp:660
> ttySL0*:root:uucp:660
> ttyUB*:root:uucp:660
> 
> it seems tty[0-9][0-9]* does not match tty1. Should it?

Hm, I think the following patch should fix this.  Can you verify it?

thanks,

greg k-h


=== namedev.c 1.103 vs edited ==--- 1.103/namedev.c	Thu Feb 12 11:48:07 2004
+++ edited/namedev.c	Thu Feb 12 13:45:25 2004
@@ -112,7 +112,7 @@
 
 	/* update the values if we already have the device */
 	list_for_each_entry(dev, &perm_device_list, node) {
-		if (strcmp_pattern(new_dev->name, dev->name))
+		if (strcmp(new_dev->name, dev->name))
 			continue;
 		copy_var(dev, new_dev, mode);
 		copy_string(dev, new_dev, owner);


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: match order in udev.permissions
  2004-01-29 13:04 match order in udev.permissions Olaf Hering
  2004-02-12 22:03 ` Greg KH
@ 2004-02-12 22:19 ` Kay Sievers
  2004-02-12 22:26 ` Olaf Hering
  2004-02-12 22:30 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-02-12 22:19 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Feb 12, 2004 at 02:03:46PM -0800, Greg KH wrote:
> On Thu, Jan 29, 2004 at 02:04:05PM +0100, Olaf Hering wrote:
> > 
> > I have this stuff in udev.permissions, /dev/tty does not get 0666, but
> > 0620 for some reason. Anyone else seeing this? version is 015.
> > 
> > tty:root:tty:666
> > tty[0-9][0-9]*:root:tty:666
> > tty*:root:tty:620
> > ttyH*:root:root:666
> > ttyC*:root:root:666
> > ttyD*:root:root:666
> > ttyE*:root:root:666
> > ttyX*:root:root:666
> > ttyI*:root:uucp:660
> > ttyR*:root:root:666
> > ttyL*:root:root:666
> > ttyW*:root:uucp:660
> > ttyACM*:root:uucp:660
> > ttyUSB*:root:uucp:660
> > ttySL0*:root:uucp:660
> > ttyUB*:root:uucp:660
> > 
> > it seems tty[0-9][0-9]* does not match tty1. Should it?
> 
> Hm, I think the following patch should fix this.  Can you verify it?

We are using shell style pattern matching, which isn't regex related.
So tty[0-9][0-9]* will expect (tty)+(2 digits)+(anything or nothing).

I did not test it, but I think only tty[0-9]* will match.

thanks,
Kay


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: match order in udev.permissions
  2004-01-29 13:04 match order in udev.permissions Olaf Hering
  2004-02-12 22:03 ` Greg KH
  2004-02-12 22:19 ` Kay Sievers
@ 2004-02-12 22:26 ` Olaf Hering
  2004-02-12 22:30 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2004-02-12 22:26 UTC (permalink / raw)
  To: linux-hotplug

 On Thu, Feb 12, Kay Sievers wrote:

> On Thu, Feb 12, 2004 at 02:03:46PM -0800, Greg KH wrote:
> > On Thu, Jan 29, 2004 at 02:04:05PM +0100, Olaf Hering wrote:
> > > 
> > > I have this stuff in udev.permissions, /dev/tty does not get 0666, but
> > > 0620 for some reason. Anyone else seeing this? version is 015.
> > > 
> > > tty:root:tty:666
> > > tty[0-9][0-9]*:root:tty:666
> > > tty*:root:tty:620
> > > it seems tty[0-9][0-9]* does not match tty1. Should it?
> > 
> > Hm, I think the following patch should fix this.  Can you verify it?
> 
> We are using shell style pattern matching, which isn't regex related.
> So tty[0-9][0-9]* will expect (tty)+(2 digits)+(anything or nothing).
> 
> I did not test it, but I think only tty[0-9]* will match.

tty should match 666, right? first come first serve. I will try it this
weekend.

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, n√úRNBERG


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: match order in udev.permissions
  2004-01-29 13:04 match order in udev.permissions Olaf Hering
                   ` (2 preceding siblings ...)
  2004-02-12 22:26 ` Olaf Hering
@ 2004-02-12 22:30 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-02-12 22:30 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Feb 12, 2004 at 11:19:15PM +0100, Kay Sievers wrote:
> On Thu, Feb 12, 2004 at 02:03:46PM -0800, Greg KH wrote:
> > On Thu, Jan 29, 2004 at 02:04:05PM +0100, Olaf Hering wrote:
> > > 
> > > I have this stuff in udev.permissions, /dev/tty does not get 0666, but
> > > 0620 for some reason. Anyone else seeing this? version is 015.
> > > 
> > > tty:root:tty:666
> > > tty[0-9][0-9]*:root:tty:666
> > > tty*:root:tty:620
> > > ttyH*:root:root:666
> > > ttyC*:root:root:666
> > > ttyD*:root:root:666
> > > ttyE*:root:root:666
> > > ttyX*:root:root:666
> > > ttyI*:root:uucp:660
> > > ttyR*:root:root:666
> > > ttyL*:root:root:666
> > > ttyW*:root:uucp:660
> > > ttyACM*:root:uucp:660
> > > ttyUSB*:root:uucp:660
> > > ttySL0*:root:uucp:660
> > > ttyUB*:root:uucp:660
> > > 
> > > it seems tty[0-9][0-9]* does not match tty1. Should it?
> > 
> > Hm, I think the following patch should fix this.  Can you verify it?
> 
> We are using shell style pattern matching, which isn't regex related.
> So tty[0-9][0-9]* will expect (tty)+(2 digits)+(anything or nothing).
> 
> I did not test it, but I think only tty[0-9]* will match.

The bug is that we are doing matching when we put the permission rule in
our list of permissions.  We shouldn't do that at all, but only check to
see if the rule is identical.

We do the pattern matching later when we evaluate the rules in the
find_perm() function.

thanks,

greg k-h


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-12 22:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-29 13:04 match order in udev.permissions Olaf Hering
2004-02-12 22:03 ` Greg KH
2004-02-12 22:19 ` Kay Sievers
2004-02-12 22:26 ` Olaf Hering
2004-02-12 22:30 ` Greg KH

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).