diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-07 06:38:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:14 -0500 |
commit | bd472a542acab7b16c0dd8e0b017b9dd6fc96ad2 (patch) | |
tree | 4b6f72565ca05e84fd31b86fee75eb3047c7446e /source3/smbd | |
parent | bca29ddbba62320204ac9eb098cdaac9a6b03d80 (diff) | |
download | samba-bd472a542acab7b16c0dd8e0b017b9dd6fc96ad2.tar.gz samba-bd472a542acab7b16c0dd8e0b017b9dd6fc96ad2.tar.bz2 samba-bd472a542acab7b16c0dd8e0b017b9dd6fc96ad2.zip |
r22123: Try and fix the csc (#4404) bug by supporting the extended
response to NTCreateX - need to fix this also for
pipe open and NTTransCreate as well so this isn't
finished.
Jeremy.
(This used to be commit be742f248178ae606dfa3a90c6148a18b42128e3)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/nttrans.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 51ed081edb..9094519b3e 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -847,13 +847,12 @@ int reply_ntcreate_and_X(connection_struct *conn, extended_oplock_granted = True; } -#if 0 - /* W2K sends back 42 words here ! If we do the same it breaks offline sync. Go figure... ? JRA. */ - set_message(outbuf,42,0,True); -#else - set_message(outbuf,34,0,True); -#endif - + if (flags & EXTENDED_RESPONSE_REQUIRED) { + set_message(outbuf,42,0,True); + } else { + set_message(outbuf,34,0,True); + } + p = outbuf + smb_vwv2; /* @@ -914,6 +913,18 @@ int reply_ntcreate_and_X(connection_struct *conn, p += 4; SCVAL(p,0,fsp->is_directory ? 1 : 0); + /* Fixme - we must do the same for NTTransCreate and pipe open. */ + if (flags & EXTENDED_RESPONSE_REQUIRED) { + uint32 perms = 0; + p += 26; + if (fsp->is_directory || can_write_to_file(conn, fname, &sbuf)) { + perms = FILE_GENERIC_ALL; + } else { + perms = FILE_GENERIC_READ|FILE_EXECUTE; + } + SIVAL(p,0,perms); + } + DEBUG(5,("reply_ntcreate_and_X: fnum = %d, open name = %s\n", fsp->fnum, fsp->fsp_name)); result = chain_reply(inbuf,outbuf,length,bufsize); |