summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-02-28 21:59:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:15 -0500
commit62a6f8940dce741037c12404e9f14543a0a62ab0 (patch)
tree5698c053dd8b6651bfe2b0119ca584c161555914
parent84d2ceb1df5bfeb179f9eede602496aea353e5ec (diff)
downloadsamba-62a6f8940dce741037c12404e9f14543a0a62ab0.tar.gz
samba-62a6f8940dce741037c12404e9f14543a0a62ab0.tar.bz2
samba-62a6f8940dce741037c12404e9f14543a0a62ab0.zip
r21603: Horrible backwards compatibility hack as an old server bug
allowed a CIFS client bug to remain unnoticed :-(. I suck. Jeremy. (This used to be commit 29761173ee26b4713c9a12166a935c066fc3321b)
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 584345a906..5bbd618231 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2882,7 +2882,7 @@ static char *store_file_unix_basic(connection_struct *conn,
SOFF_T(pdata,0,get_allocation_size(conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */
pdata += 8;
- put_long_date_timespec(pdata,get_ctimespec(psbuf)); /* Creation Time 64 Bit */
+ put_long_date_timespec(pdata,get_ctimespec(psbuf)); /* Change Time 64 Bit */
put_long_date_timespec(pdata+8,get_atimespec(psbuf)); /* Last access time 64 Bit */
put_long_date_timespec(pdata+16,get_mtimespec(psbuf)); /* Last modification time 64 Bit */
pdata += 24;
@@ -4805,6 +4805,16 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
delete_on_fail = True;
}
+#if 1
+ /* Horrible backwards compatibility hack as an old server bug
+ * allowed a CIFS client bug to remain unnoticed :-(. JRA.
+ * */
+
+ if (!size) {
+ size = get_file_size(*psbuf);
+ }
+#endif
+
/*
* Deal with the UNIX specific mode set.
*/