Subject: Re: /dev/MAKEDEV and mknod -[rR]
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 02/25/2007 10:06:54
On Sun, Feb 25, 2007 at 04:46:24AM -0500, der Mouse wrote:
> >> [...] with root on an NFS server running an OS that doesn't have -r
> >> or -R options to mknod.
> > In which case it is likely to get the mapping from major:minor to a
> > single integer wrong!
>
> As long as its NFS server and its local mknod use the same mapping, I
> don't see the problem. (Unless it uses NFSv2, in which case I think
> the local mknod and the NFS client on the diskless machine would have
> to match;
Which is what I thought has to happen, but maybe the last version of NFS
I looked into that closely was v2 :-(
> the server is documented as doing v3, though I haven't
> actually snooped the wire to be certain that's what it's using.)
>
> Have I missed something? That would certainly be possible.
If NFS carried the major:minor separately, then MAKEDEV wouldn't need to
specify '-F netbsd' when executing mknod. Indeed it would have to not
specify it in order to get the native encoding for NFS to translate twice.
The native encoding, however, can't work because it probably doesn't have
enough bits for one part of the device number.
Not to mention the security implications on the server of having a set
of /dev entries accessible that won't have the correct permissions!
David
Oh, and /bin/sh may not execute the script either :-)
--
David Laight: david@l8s.co.uk