Author: jra Date: 2007-02-28 21:59:39 +0000 (Wed, 28 Feb 2007) New Revision: 21603
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21603 Log: Horrible backwards compatibility hack as an old server bug allowed a CIFS client bug to remain unnoticed :-(. I suck. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/trans2.c branches/SAMBA_3_0_25/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/trans2.c =================================================================== --- branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-28 20:31:33 UTC (rev 21602) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-28 21:59:39 UTC (rev 21603) @@ -2882,7 +2882,7 @@ 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 @@ 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. */ Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c =================================================================== --- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-28 20:31:33 UTC (rev 21602) +++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-28 21:59:39 UTC (rev 21603) @@ -2882,7 +2882,7 @@ 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 @@ 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. */
