]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r21603: Horrible backwards compatibility hack as an old server bug
authorJeremy Allison <jra@samba.org>
Wed, 28 Feb 2007 21:59:39 +0000 (21:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:15 +0000 (12:18 -0500)
allowed a CIFS client bug to remain unnoticed :-(.
I suck.
Jeremy.

source/smbd/trans2.c

index 584345a906a973f336815dc3bbf65ac11c458a98..5bbd618231b5336d529fad09dcbeafe2f4ba0a4a 100644 (file)
@@ -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.
         */