summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-22Don't use fname after create_file has been calledVolker Lendecke1-11/+11
create_file calls unix_convert internally, so modifies fname. So we can't use "fname" after create_file has returned. Use fsp->fsp_name instead. Found during a lengthy debugging session with Karolin testing the xattr_tdb module... (This used to be commit 183fe570469963923864b732817a87f8660341ed)
2008-02-08Fix some typos.Karolin Seeger1-1/+1
Karolin (This used to be commit 2bec0a1fb7857e6fb8ec15e5f597b2d4125f105b)
2008-02-06Change the file time before we change the file mode.Alexander Bokovoy1-6/+6
This doesn't matter for most applications, but for offline files it matters as it allows you to set files offline from windows clients even with HSM systems that refuse to offline newly created files. Merge from Tridge's v3-0-ctdb tree. (This used to be commit 7da6c675440b0253ab37ee6097f769a2e45c7b7b)
2008-02-02Convert read_data() to NTSTATUSVolker Lendecke1-4/+5
(This used to be commit af40b71023f8c4a2133d996ea698c72b97624043)
2008-02-02Make get_srv_read_error static to process.cVolker Lendecke1-2/+2
(This used to be commit 9e2947039ef70cab8bbd6027182d9c721eac3194)
2008-02-02Convert read_smb_length to return NTSTATUSVolker Lendecke1-9/+3
(This used to be commit 5750c3a51b4ddac635a98195d1621b24f91bad3f)
2008-01-30Re-enable async I/O for non-TSM systemsVolker Lendecke1-9/+2
The logic was wrong: A "SMB_VFS_AIO_FORCE()==False" disabled async I/O, whereas a "SMB_VFS_AIO_FORCE()==True" should enforce it regardless of other settings. Alexander, please check! (This used to be commit 46882ad9927c95caadeb7fb03c1d7491bbe1fb22)
2008-01-20Fix some "set but never used" warningsVolker Lendecke1-3/+1
(This used to be commit 4a6dadc5178f4861e9c032321939db3b639734b5)
2008-01-20Don't test split_ntfs_stream_nameVolker Lendecke1-3/+0
This is a hot code path, and if it has a :, the name will be split later on anyway. (This used to be commit 9f7f6b812d89decea1456ccdc37978e645d11a63)
2008-01-19Add streams supportVolker Lendecke1-8/+20
This is the core of the streams support. The main change is that in files_struct there is now a base_fsp pointer that holds the main file open while a stream is open. This is necessary to get the rather strange delete semantics right: You can't delete the main file while a stream is open without FILE_SHARE_DELETE, and while a stream is open a successful unlink of the main file leads to DELETE_PENDING for all further access on the main file or any stream. (This used to be commit 6022873cc155bdbbd3fb620689715f07a24d6ed1)
2008-01-16Add support for offline files support, remote storage, and Async I/O force ↵Alexander Bokovoy1-6/+13
operations to VFS Offline files support and remote storage are for allowing communication with backup and archiving tools that mark files moved to a tape library as offline. We translate this info into corresponding CIFS offline file attribute and mark an exported volume as remote storage. Async I/O force is to allow selective redirection of I/O operations to asynchronous processing in case it is viable at VFS module discretion. It is needed for proper handling of offline files as performing regular I/O on offline file will block smbd. Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 875208724e39564fe81385dfe36e6c963e79e101)
2008-01-12Convert OpenDir to talloc, use talloc_tos()Volker Lendecke1-16/+19
This cuts some mallocs on NtCreate&X (This used to be commit 8e64107b7846d8f9cce71aabc95b28b7488d01ce)
2008-01-11Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().Michael Adam1-2/+2
Michael (This used to be commit a52cfb7d777157c93c9dc26c67f457be592dd537)
2008-01-10use talloc_tos in a few more placesVolker Lendecke1-3/+5
(This used to be commit 65dd869bea351010c67f02046ae4134bdada1a4c)
2008-01-08Fix resource leak found by coverity (CID 521).Jeremy Allison1-0/+4
Jeremy. (This used to be commit acfb233acc7324b8d431d5cb777a1933d173b3dc)
2008-01-07Remove redundant parameter fd from SMB_VFS_FSTAT().Michael Adam1-4/+4
Michael (This used to be commit 0b86c420be94d295f6917a220b5d699f65b46711)
2008-01-07Remove redundant parameter fd from SMB_VFS_LSEEK().Michael Adam1-3/+3
Michael (This used to be commit df929796f2698698d2875227bda8500589cca2df)
2008-01-04Now conn is part of smb_request, we don't need it asJeremy Allison1-59/+88
an extra parameter. This cleans up quite a few places we were passing it around without needing it. Jeremy. (This used to be commit 8f36def18e9f980e8db522e1de41e80cfd5f466e)
2008-01-04Refactor the crypto code after a very helpful conversationJeremy Allison1-26/+29
with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy. (This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
2008-01-02Convert reply_mknew to create_fileVolker Lendecke1-38/+16
(This used to be commit 1b1cea9ef04a85a2fdd3c8574f7c4db559b7d9b6)
2008-01-02Convert reply_open_and_X to create_fileVolker Lendecke1-42/+19
(This used to be commit fa09b9ab26657af9bd6dcf3fcc7311d5983a591d)
2008-01-02Convert reply_open to create_fileVolker Lendecke1-40/+19
(This used to be commit 209c696ab8490564ec9e30f6f07b9c72af3ed2e1)
2007-12-26Add SMB encryption. Still fixing client decrypt butJeremy Allison1-12/+23
negotiation works. Jeremy. (This used to be commit d78045601af787731f0737b8627450018902b104)
2007-12-21Some C++ warningsVolker Lendecke1-2/+2
(This used to be commit 5ab82d4f574f2a2e2761e9e414c66a70aeffb05d)
2007-11-07Constrain "min receivefile size" to max of BUFFER_SIZEJeremy Allison1-2/+20
(128k). Add debug error messages so we can see why writeX large is denied. Ensure we don't allow recvfile writes on IPC$. Jeremy. (This used to be commit 6bf053a6a17749a3bc73c8cc5fd490aa5f93b763)
2007-11-05Remove the horror that was the global smb_rw_error.Jeremy Allison1-2/+3
Each cli struct has it's own local copy of this variable, so use that in client code. In the smbd server, add one static to smbd/proccess.c and use that inside smbd. Fix a bunch of places where smb_rw_error could be set by calling read_data() in places where we weren't reading from the SMB client socket (ie. winbindd). Jeremy. (This used to be commit 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db)
2007-11-02Change the client library to write directly out ofJeremy Allison1-5/+10
the incoming buffer in the non-signed case. Speeds up writes by over 10% or so. Complete the server recvfile implementation. Jeremy. (This used to be commit 81ca5853b2475f123faab3b550f0a7b24ae3c208)
2007-11-02Argggh. smblen doesn't include the +4, so my smb_doff calculationsJeremy Allison1-4/+4
shouldn't either :-). Jeremy. (This used to be commit c3de44b6b063e126095b30536fdcb643c70e395e)
2007-11-01Ensure we can't accidently do a pipe write withJeremy Allison1-0/+5
unread bytes in the socket buffer. Jeremy (This used to be commit 84d22f7747126608b9460f9591bb5967d871b82d)
2007-11-01Be careful and take care of the correct lengths in largeJeremy Allison1-9/+7
writeX calls. Jeremy. (This used to be commit 2d3ff9c502105f92720131355b41e48be8d656c2)
2007-11-01Ensure we detect a large writeX when using recvfile.Jeremy Allison1-1/+2
More changes needed to make the UNIX_LARGE_WRITEX_CAP writes work (I'll add these tomorrow). Jeremy. (This used to be commit 1c71546b6152d2930b98f766311bbd161ee0ee4e)
2007-10-31Fix some cases where file_set_dosmode was being passedJeremy Allison1-1/+1
False instead of NULL. Fix more of the notifications to be correct for Samba4 RAW-NOTIFY torture (we had missed one when calling set_ea_dos_attribute(). Jeremy. (This used to be commit 39d265375cf55eedddef2c4faa65398df73d5ed2)
2007-10-30Handle the disk full error case correctly.Jeremy Allison1-1/+1
Jeremy. (This used to be commit b7088bb9c2a00d4717b9a7efa4bddc0c005f4efb)
2007-10-30Add new parameter, "min receivefile size" (by default setJeremy Allison1-14/+81
to zero). If non-zero, writeX calls greater than this value will be left in the socket buffer for later handling with recvfile (or userspace equivalent). Definition of recvfile for your system is left as an exercise for the reader (I'm working on getting splice working :-). Jeremy. (This used to be commit 11c03b75ddbcb6e36b231bb40a1773d1c550621c)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-52/+52
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-15/+13
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25502: Fix bug 5006Volker Lendecke1-1/+1
Thanks to Joerg.Bernau at web.de (This used to be commit 492977016fa66ce0e98a5bdd1c0f00eacdf13f0c)
2007-10-10r25138: More pstring elimination. Add a TALLOC_CTX parameterJeremy Allison1-17/+20
to unix_convert(). Jeremy. (This used to be commit 39c211a702e91c34c1a5a689e1b0c4530ea8a1ac)
2007-10-10r25117: The mega-patch Jerry was waiting for. Remove all pstrings fromJeremy Allison1-181/+288
the main server code paths. We should now be able to cope with paths up to PATH_MAX length now. Final job will be to add the TALLOC_CTX * parameter to unix_convert to make it explicit (for Volker). Jeremy. (This used to be commit 7f0db75fb0f24873577dcb758a2ecee74fdc4297)
2007-10-10r25111: Move to talloced pathnames on most code paths.Jeremy Allison1-103/+146
There are now ony 17 pstrings left in reply.c, and these will be easy to remove (and I'll be doing that shortly). Had to fix an interesting bug in pull_ucs2_base_talloc() when a source string is not null terminated :-). Jeremy. (This used to be commit 0c9a8c4dff10974dbffd2a302ae982896122fcc0)
2007-10-10r25102: Rewrite msdfs code to use talloced filenames. Passes make testJeremy Allison1-90/+123
and make valgrindtest. Final step will be to change srvstr_get_path() to return talloced memory in the major codepaths. Jeremy. (This used to be commit cf6b6f9c3a38b68d2671c753f412772344506742)
2007-10-10r25055: Add file_id_string_tosVolker Lendecke1-2/+2
This removes file_id_string_static and file_id_string_static2 (This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
2007-10-10r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison1-177/+312
interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy. (This used to be commit dee8beba7a92b8a3f68bbcc59fd0a827f68c7736)
2007-10-10r24702: Remove the old API pointersVolker Lendecke1-9/+6
(This used to be commit 17df313db42199e26d7d2044f6a1d845aacd1a90)
2007-10-10r24659: Some formatting changes helping to minimize the 3_2_0 diffVolker Lendecke1-8/+8
(This used to be commit c5caea43af154671448df82881efe09a5c982386)
2007-10-10r24548: Fix the case-changing renamesVolker Lendecke1-14/+9
This was broken when I changed reply_mv to wrap in a open_file_ntcreate call, unix_convert on the destination was called twice (This used to be commit fddc9db91175bdb0b7ac6a636f8bef918bd7c1b4)
2007-10-10r24501: Added bcc test for reply_tcon & removed Vl's comment :-).Jeremy Allison1-6/+5
Jeremy. (This used to be commit 9d9ed41f2139051578c35f80112640cffb5f7608)
2007-10-10r24498: More extra code into a function, reply_openerror.Jeremy Allison1-38/+5
Jeremy. (This used to be commit 43ddfb8c918bd27e2efd3b54077db815da80a53a)
2007-10-10r24476: Fix the mappings in reply_opeXXX calls. Now to test renames.Jeremy Allison1-7/+24
Jeremy. (This used to be commit 74d10b09a68f5c06d6b3ceffe0a40818dc84106e)
2007-10-10r24461: Fix Bug 4852, thank to anto <sistemac@prosoft.ba> for reporting it.Volker Lendecke1-0/+14
(This used to be commit 0fecd8a0c3aaa64e137d2efd3f9cc7705837ea2a)