[PATCH] devfs and symlinks--2.3.48

From: Matthew Vanecek (linuxguy@directlink.net)
Date: Thu Mar 02 2000 - 00:41:56 EST


When you make symlinks, either by hand or with devfsd, in /dev, they
always end up with perms of lr-xr-xr-x. I'm not sure that this is
really important, or what effect it has on programs accessing them (if
any--don't think anyone's using lstat anymore...), but it's not like any
other links in the system. This little patch makes sure that the links
are create 'normally', with perms set to lrwxrwxrwx.

I don't know why this was the way it was, other than not wanting to type
the extra 10 or so characters, but if someone wants to explain a logical
reason why the perms should be lr-xr-xr-x, I'd be happy to listen. :)
Otherwise, maybe we want to exercise a little consistency with the rest
of the system? Just a thought...

-- 
Matthew Vanecek
Visit my Website at http://mysite.directlink.net/linuxguy
For answers type: perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
*****************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me. I'm always getting in the way of something...

--- base.c Sat Feb 26 22:33:42 2000 +++ base.c.new Wed Mar 1 21:13:47 2000 @@ -1370,7 +1370,7 @@ return -EEXIST; } if (handle != NULL) *handle = de; - de->mode = S_IFLNK | S_IRUGO | S_IXUGO; + de->mode = S_IFLNK | S_IRUGO | S_IWUGO | S_IXUGO; de->info = info; de->show_unreg = ( (boot_options & OPTION_SHOW) || (flags & DEVFS_FL_SHOW_UNREG) ) ? TRUE : FALSE;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:11 EST