From the dos commandline (assuming you are on an smb mounted directory): # echo 12345678990 > testfile # echo 1234 > testfile # type testfile You now notice that testfile is _not_ containing '1234' as expected. Systems used: - PCclient on PC-DOS 6.2 - Server: Sarge stable with self compiled samba-3.0.20rc2 still running a 2.4.20-686 woody kernel. The patch: Index: source/smbd/reply.c =================================================================== --- source/smbd/reply.c.orig +++ source/smbd/reply.c @@ -1610,7 +1610,7 @@ create_disposition = FILE_CREATE; } else { /* Create if file doesn't exist, truncate if it does. */ - create_disposition = FILE_OPEN_IF; + create_disposition = FILE_OVERWRITE_IF; } /* Open file using ntcreate. */
Completely correct - applied, thanks ! Jeremy.