Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!think.com!snorkelwacker.mit.edu!ira.uka.de!!krey From: krey@ira.uka.de (Andreas Krey) Newsgroups: comp.protocols.nfs Subject: Re: Lookup of "." and ".." Message-ID: <1991Jun27.132504.12605@ira.uka.de> Date: 27 Jun 91 13:25:04 GMT References: <1991Jun26.204047.28889@elroy.jpl.nasa.gov> Sender: krey@i30fs1 (Andreas Krey) Organization: University of Karlsruhe, FRG Lines: 41 In article <1991Jun26.204047.28889@elroy.jpl.nasa.gov>, david@elroy.jpl.nasa.gov (David Robinson) writes: |> A question for implementors of NFS clients. How many would break if |> the NFS server stopped handling Lookup's of "." and ".."? By handling |> it would no longer return "." and ".." on readdir requests and send |> back no file errors on lookups? |> |> This would solve the security issues in exporting filesystems. Any reasonable |> NFS client already knows the handle of both the current directory and its |> parent. |> Of all the parents down to the root? Otherwise a 'cd ..' would get me to the parent dir, but the client has no way to get at the new parent. Also the parent directory may change when the current dir is moved elsewhere. |> I do recall having to kludge in both "." and ".." for a non-Unix filesystem |> in order to make Unix clients happy. In fact early connectathon testsuites |> seemed to imply that the server should return "." and ".." entries. Why |> force Unix files on the world when unneccesary? I suspect too many things |> would break. Something to explicitly specify the the V3 protocol? |> For my opinion it is unnecessary to explicitly return . and .. entries in READDIR, and the parent directory should be accessed by another operation "handle=getparent(handle)" instead of using LOOKUP with ".." For security/access restriction the server should really look WHO is doing the LOOKUP("..") and return error if the export point is crossed. Some NFS servers don't look on the 'who' field at all except for getting the return address. |> -David |> -- |> David Robinson david@elroy.jpl.nasa.gov {decwrl,usc,ames}!elroy!david |> Disclaimer: No one listens to me anyway! |> "To Protect and Serve and Treat You Like a King" - New LAPD motto -- Andy ...signature: No such object