summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-08-28 19:47:48 +0000
committerJeremy Allison <jra@samba.org>2002-08-28 19:47:48 +0000
commit790b85f5e21b3dafe5dc3e7835e8f14dfd498462 (patch)
tree40e81e3db9dd04d4e7650b9906f96387d3979bdb /source3/smbd/nttrans.c
parent0a771a4f0be14070613d252717c1b4707270f5dc (diff)
downloadsamba-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)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c10
1 files changed, 8 insertions, 2 deletions
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. */