RFC 2055 describes index files for WebNFS exports. The exports(5) manual page has description of the -index option, but this option does not work because of mistakes in mountd and kernel part of the NFS server. The following change: 1. corrects handling of the -index option in usr.sbin/mountd/mountd.c; 2. corrects fetching of the index file in sys/kern/vfs_export.c; 3. corrects locking if a directory does not have the index file in sys/nfsserver/nfs_serv.c This change is for the old NFS server, since new NFS server uses another API for WebNFS settings and its logic of index files does not correspond to RFC 2055. Fix: [patch elided - gavin@] How-To-Repeat: Export some file system with options "-public -index 123", then mount it using NFSv2/3 client and public filehandle. Create a regular file "123" in some directory and try to read that directory on a client. Do the same, but create directory "123" with some content. In both cases the content of a directory with the index file in NFS mounted file system should be altered.
Responsible Changed From-To: freebsd-bugs->freebsd-fs Involves NFS, but also a kernel and binary change. Perhaps the NFS folks can review.
State Changed From-To: open->closed PR closed at submitters request.