Revision 65e4308d2500e7daf60c3dccc202c61ffb066c63 authored by Trond Myklebust on 16 August 2005, 15:49:44 UTC, committed by Linus Torvalds on 16 August 2005, 16:30:58 UTC
When the client performs an exclusive create and opens the file for writing, a Netapp filer will first create the file using the mode 01777. It does this since an NFSv3/v4 exclusive create cannot immediately set the mode bits. The 01777 mode then gets put into the inode->i_mode. After the file creation is successful, we then do a setattr to change the mode to the correct value (as per the NFS spec). The problem is that nfs_refresh_inode() no longer updates inode->i_mode, so the latter retains the 01777 mode. A bit later, the VFS notices this, and calls remove_suid(). This of course now resets the file mode to inode->i_mode & 0777. Hey presto, the file mode on the server is now magically changed to 0777. Duh... Fixes http://bugzilla.linux-nfs.org/show_bug.cgi?id=32 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 367ae3c
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 17.4 KB |
Makefile | -rw-r--r-- | 895 bytes |
calibrate.c | -rw-r--r-- | 4.7 KB |
do_mounts.c | -rw-r--r-- | 9.1 KB |
do_mounts.h | -rw-r--r-- | 1.7 KB |
do_mounts_devfs.c | -rw-r--r-- | 2.8 KB |
do_mounts_initrd.c | -rw-r--r-- | 3.0 KB |
do_mounts_md.c | -rw-r--r-- | 7.6 KB |
do_mounts_rd.c | -rw-r--r-- | 10.0 KB |
initramfs.c | -rw-r--r-- | 9.9 KB |
main.c | -rw-r--r-- | 16.4 KB |
version.c | -rw-r--r-- | 748 bytes |
Computing file changes ...