Assume there is a server on the network and the local machine is trying to open a file. Is open("A/B/C/D/E/filename") implemented on the local system by something similar to this:
Local system first retrieves the directory contents of A from the server, which could fail for security reasons.
Local system scans the dir for the inode of B.
Repeat 1 & 2 recursively until reaching inode of filename.
Local system finally calls the server to open the inode of the filename.
Or is open() handled entirely on the remote host.
I am trying to decide if opendir(dir), readdir() for a certain filename pattern, closedir(), 开发者_如何学JAVAand finally doing open(filename) is going to take the same amount of time as just open(filename).
Authentication checks in NFS run on the remote server. Proof? User "root" on the local system typically is mapped to user "nobody" on the remote system and has no privs. However, I cannot guarantee offhand that security checks do not ALSO happen on the local system.
精彩评论