diff options
author | Jeremy Allison <jra@samba.org> | 2002-08-28 19:47:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-08-28 19:47:48 +0000 |
commit | 790b85f5e21b3dafe5dc3e7835e8f14dfd498462 (patch) | |
tree | 40e81e3db9dd04d4e7650b9906f96387d3979bdb | |
parent | 0a771a4f0be14070613d252717c1b4707270f5dc (diff) | |
download | samba-790b85f5e21b3dafe5dc3e7835e8f14dfd498462.tar.gz samba-790b85f5e21b3dafe5dc3e7835e8f14dfd498462.tar.bz2 samba-790b85f5e21b3dafe5dc3e7835e8f14dfd498462.zip |
Return correct FILE_SUPERSEDED response - IFSTEST strikes again...
Jeremy.
(This used to be commit df3e467eb7cce059782870bfec222293577c4f69)
-rw-r--r-- | source3/include/smb.h | 1 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 958a563642..f2eb37096c 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1190,6 +1190,7 @@ struct bitmap { #define FILE_OPEN_BY_FILE_ID 0x2000 /* Responses when opening a file. */ +#define FILE_WAS_SUPERSEDED 0 #define FILE_WAS_OPENED 1 #define FILE_WAS_CREATED 2 #define FILE_WAS_OVERWRITTEN 3 diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index ff35771644..1f3bbd488e 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -863,7 +863,10 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib p++; SSVAL(p,0,fsp->fnum); p += 2; - SIVAL(p,0,smb_action); + if ((create_disposition == FILE_SUPERSEDE) && (smb_action == FILE_WAS_OVERWRITTEN)) + SIVAL(p,0,FILE_WAS_SUPERSEDED); + else + SIVAL(p,0,smb_action); p += 4; /* Create time. */ @@ -1336,7 +1339,10 @@ static int call_nt_transact_create(connection_struct *conn, p += 2; SSVAL(p,0,fsp->fnum); p += 2; - SIVAL(p,0,smb_action); + if ((create_disposition == FILE_SUPERSEDE) && (smb_action == FILE_WAS_OVERWRITTEN)) + SIVAL(p,0,FILE_WAS_SUPERSEDED); + else + SIVAL(p,0,smb_action); p += 8; /* Create time. */ |