files with /
Michael I. Bushnell
mike at turing.unm.edu
Tue Nov 15 11:15:00 AEST 1988
In article <12589 at steinmetz.ge.com> davidsen at crdos1.UUCP (bill davidsen) writes:
>So how does the server create such a file?
[a file with '/' in the name]
>The server has to ask the kernel (via syscalls, like everyone else)
>to create the file for it. The kernel parses every filename it's
>given through the magic of lookupname(). That's why you can just
>say open("/foo", O_RDWR), instead of open(devnum, inum, O_RDWR).
Except that in the standard NFS implementation, the server IS the
kernel. The server interacts with the filesystem below the pathname
traslation level.
>In the above case, the kernel would get open("//./..///", O_RDWR|O_CREAT),
>or something similar, try to open "/" for write and fail with EISDIR.
Except that the kernel doesn't have to talk to itself through the
syscall interface, and so it can bypass these sort of restrictions.
Look at the code: it actually *is* cleaner the way it is done. It's
just that the clean semantics lead to an ugly bug.
>It's possible that the RPC system calls are stupid (ie. they don't
>use lookupname); I've never seen kernel code for RPCs. If so, then
>this is where the bug is, not in the server code.
Except that, once again, the kernel code IS the server.
>--
> bill davidsen (wedu at ge-crd.arpa)
> {uunet | philabs}!steinmetz!crdos1!davidsen
>"Stupidity, like virtue, is its own reward" -me
Indeed.
N u m q u a m G l o r i a D e o
\ Michael I. Bushnell
\ HASA - "A" division
/\ mike at turing.unm.edu
/ \ {ucbvax,gatech}!unmvax!turing.unm.edu!mike
More information about the Comp.unix.questions
mailing list