patch-2.4.25 linux-2.4.25/fs/nfsd/nfsxdr.c
Next file: linux-2.4.25/fs/ntfs/fs.c
Previous file: linux-2.4.25/fs/nfs/direct.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/fs/nfsd/nfsxdr.c
- Orig date:
2003-06-13 07:51:37.000000000 -0700
diff -urN linux-2.4.24/fs/nfsd/nfsxdr.c linux-2.4.25/fs/nfsd/nfsxdr.c
@@ -127,6 +127,17 @@
if (tmp != (u32)-1 && tmp1 != (u32)-1) {
iap->ia_valid |= ATTR_MTIME | ATTR_MTIME_SET;
iap->ia_mtime = tmp;
+ /*
+ * Passing the invalid value useconds=1000000 for mtime
+ * is a Sun convention for "set both mtime and atime to
+ * current server time". It's needed to make permissions
+ * checks for the "touch" program across v2 mounts to
+ * Solaris and Irix boxes work correctly. See description of
+ * sattr in section 6.1 of "NFS Illustrated" by
+ * Brent Callaghan, Addison-Wesley, ISBN 0-201-32750-5
+ */
+ if (tmp1 == 1000000)
+ iap->ia_valid &= ~(ATTR_ATIME_SET|ATTR_MTIME_SET);
}
return p;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)