summaryrefslogtreecommitdiffstats
path: root/source3/smbd/trans2.c
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:smbd: return DELETE_PENDING on path based operations on streams, when the ↵Stefan Metzmacher2008-12-011-0/+40
| | | | | | main file was deleted. metze
* s3:smbd: construct the correct newname for stream renamesStefan Metzmacher2008-12-011-16/+32
| | | | | | | | The Windows Explorer creates temporary streams and renames them later via SFILEINFO_RENAME_INFO. The newname comes in as ":Stream:$DATA". metze
* Fix a debug message, append the correct \nVolker Lendecke2008-12-011-1/+1
|
* Remove inbuf references from the trans2ioctl codeVolker Lendecke2008-11-281-4/+4
|
* Consolidate the buffer checks for the reply_trans style functionsVolker Lendecke2008-11-281-57/+18
| | | | | | | | This is the one where I found the problem that led to 3.2.5. So if there is one checkin in the last year that I would like others to review and *understand*, it is this one :-) Volker
* Remove an unused variableVolker Lendecke2008-11-281-2/+0
|
* Fix the offset checks in the trans routinesVolker Lendecke2008-11-271-3/+3
| | | | | | | | | This fixes a potential crash bug, a client can make us read memory we should not read. Luckily I got the disp checks right... Volker (cherry picked from commit 64a1d80851da5b05e70ec6c96f6e9bd473748369) (cherry picked from commit f04c5650a3aeca23591ddc781c4b297caaf9bb3f)
* Do not write into inbuf for the transs requestVolker Lendecke2008-11-081-6/+6
| | | | | Instead, fix up the outbuf in send_xx_reply. In those routines, we know what we are returning.
* Fix a const warningVolker Lendecke2008-11-041-1/+1
|
* Remove some inbuf references by adding "cmd" to smb_requestVolker Lendecke2008-11-021-3/+3
|
* Use "vwv" in trans parsingVolker Lendecke2008-11-021-21/+21
|
* Remove a bunch of direct inbuf references by adding "vwv" to smb_requestVolker Lendecke2008-11-021-5/+5
|
* Get closer to passing S4 RAW-ACLs.Jeremy Allison2008-10-311-3/+6
| | | | Jeremy.
* Cope with bad trans2mkdir requests from System i QNTC IBM SMB client.Jeremy Allison2008-10-161-3/+4
| | | | | | | | If total_data == 4 Windows doesn't care what values are placed in that field, it just ignores them. The System i QNTC IBM SMB client puts bad values here, so ignore them. Jeremy.
* Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij2008-10-141-57/+57
|
* Use "struct files_struct" for pipes instead of smb_np_structVolker Lendecke2008-10-131-3/+3
|
* Pass struct smb_request to file_freeVolker Lendecke2008-10-131-11/+11
| | | | on the way to get rid of chain_fsp
* Pass struct smb_request to file_fspVolker Lendecke2008-10-131-4/+4
| | | | The goal is to get rid of the chain_fsp global variable
* Fix bug #5783 FindFirst fails where search pattern == mangled filename.Jeremy Allison2008-09-231-6/+7
| | | | | That was an old and subtle bug. Jeremy.
* When requesting UNIX info levels on findfirst/findnext, don't play games ↵Jeremy Allison2008-09-101-1/+5
| | | | | | | | with write time, just return what the underlying filesystem says. Trying not to confuse UNIX apps any more than necessary. Jeremy. (This used to be commit b81a4dd003957a611ea190979d828b75d07a1f80)
* Fix calculation of useable_space for trans2 and nttrans repliesVolker Lendecke2008-09-081-6/+9
| | | | | | | When alignment was in place, we pretended to send more data/params according to the param_offset/param_length and data_offset/data_length parameters than would actually fit into the SMB according to the NBSS length field. (This used to be commit ef3c132b8455c6fe4d0bb9f0be881040a806a4ed)
* Write times code update.Jeremy Allison2008-09-051-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, here's the fix for the write times breakage with the new tests in S4 smbtorture. The key is keeping in the share mode struct the "old_file_time" as the real write time, set by all the write and allocation calls, and the "changed_write_time" as the "sticky" write time - set by the SET_FILE_TIME calls. We can set them independently (although I kept the optimization of not setting the "old_file_time" is a "changed_write_time" was already set, as we'll never see it. This allows us to update the write time immediately on the SMBwrite truncate case, SET_END_OF_FILE and SET_ALLOCATION_SIZE calls, whilst still have the 2 second delay on the "normal" SMBwrite, SMBwriteX calls. I think in a subsequent patch I'd like to change the name of these from "old_file_time" to "write_time" and "changed_write_time" to "sticky_write_time" to make this clearer. I think I also fixed a bug in Metze's original code in that once a write timestamp had been set from a "normal" SMBwriteX call the fsp->update_write_time_triggered variable was set and then never reset - thus meaning the write timestamp would never get updated again on subsequent SMBwriteX's. The new code checks the update_write_time_event event instead, and doesn't update is there's an event already scheduled. Metze especially, please check this over for your understanding. Jeremy. (This used to be commit 6f20585419046c4aca1f7d6c863cf79eb6ae53b0)
* Remove current_user references from trans2.cVolker Lendecke2008-06-191-2/+2
| | | | | This involved replacing the CHECK_NTQUOTA_HANDLE_OK macro by a function. (This used to be commit 5595cdf837edb82db69a3e57bcf3108be7feeeb8)
* Remove some current_user references from trans2.cVolker Lendecke2008-06-191-19/+25
| | | | (This used to be commit 4c31cc0b62f532eafdc44398b29b773ad8cb0646)
* Remove the "current_user" arg from check_fspVolker Lendecke2008-06-191-4/+4
| | | | | | check_fsp only used the vuid struct member anyway, and this is available in the smb_request structure as well. (This used to be commit 8d364c4c3311b406847158fc37e9208d298cf8ba)
* Cleanup size_t return values in callers of convert_string_allocateTim Prouty2008-05-201-8/+16
| | | | | | This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure. (This used to be commit 6b189dabc562d86dcaa685419d0cb6ea276f100d)
* Remove "user" from connection_structVolker Lendecke2008-05-101-3/+6
| | | | (This used to be commit 368454a27cb53a408ec416cbf37235b304592fb5)
* Remove connection_struct->mem_ctx, connection_struct is its own parentVolker Lendecke2008-05-051-1/+1
| | | | (This used to be commit 559180f7d30606d1999399d954ceedc798c669a4)
* Rename inherit_access_acl() -> inherit_access_posix_acl() to make use clear.Jeremy Allison2008-05-021-1/+1
| | | | | Jeremy. (This used to be commit b739c7f1cdb2b19a380b06681b00dcf490d788a9)
* Fix bug found by Igor Mammedov <niallain@gmail.com> where we areJeremy Allison2008-04-281-14/+42
| | | | | | | not returning a directory value for a QPATHINFO on a msdfs link with a non-dfs path. Windows does this. Jeremy. (This used to be commit fbd99071f99cadd21aa2b8971f745a323a9cda13)
* Rewrite the wrap checks to deal with gcc 4.x optimisations.Jeremy Allison2008-04-071-30/+46
| | | | | | Karolin, please pull once Volker has reviewed. Thanks. Jeremy. (This used to be commit 09852899cadc48abe2f2651ecbceaf881198e648)
* smbd: make it possible to disable get_file_infos() on searchesStefan Metzmacher2008-04-071-5/+14
| | | | | metze (This used to be commit 404a865a34c3a7c67131b3f99e92c11b2abe3e39)
* locking: combine get_delete_on_close_flag() and get_write_time() into ↵Stefan Metzmacher2008-04-071-8/+5
| | | | | | | | | get_file_infos() This means we need to fetch the record only once. metze (This used to be commit 4130b873291d39e363184fe4e38dc1f24ebe5056)
* smbd: implement the strange write time update logicStefan Metzmacher2008-04-071-40/+45
| | | | | | | | | | | | | | | | | | | | | We now never call file_ntimes() directly, every update is done via smb_set_file_time(). This let samba3 pass the BASE-DELAYWRITE test. The write time is only updated 2 seconds after the first write() on any open handle to the current time (not the time of the first write). Each handle which had write requests updates the write time to the current time on close(). If the write time is set explicit via setfileinfo or setpathinfo the write time is visible directly and a following close on the same handle doesn't update the write time. metze (This used to be commit 2eab212ea2e1bfd8fa716c2c89b2c042f7ba12ea)
* locking: store the write time in the locking.tdbStefan Metzmacher2008-04-071-1/+2
| | | | | | | | | | This is needed to implement the strange write time update logic later. We need to store 2 time timestamps to distinguish between the time the file system had before the first client opened the file and a forced timestamp update. metze (This used to be commit 6aaa2ce0eeb46f6735ec984a2e7aadde7a7f456d)
* Metze pointed out this we don't need FILE_ATTRIBUTE_READ here.Jeremy Allison2008-03-111-1/+1
| | | | | Jeremy. (This used to be commit 923aa9f330cb370221af6b66cf0f237a9bd06f8e)
* Try and fix bug #5315, as well as S4 torture tests RAW-OPLOCK BATCH19,Jeremy Allison2008-03-111-1/+2
| | | | | | BATCH20 and RAW-RENAME. Jeremy. (This used to be commit 9065792d4bc42522f12f9732de3c0ad82c72a2d3)
* Fix S3 to pass the test_raw_oplock_exclusive3 test.Jeremy Allison2008-03-111-1/+1
| | | | | Jeremy. (This used to be commit 028302fac53083d66c969b876db1d831e53b8e35)
* Fix some typosVolker Lendecke2008-03-081-1/+1
| | | | (This used to be commit cfa1b838144800c0758969921b8904fd62e46c07)
* Don't use fname after create_file has been calledVolker Lendecke2008-02-221-2/+2
| | | | | | | | | 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)
* Fix uninitialized variablesVolker Lendecke2008-01-261-1/+2
| | | | | Thanks to Corinna Vinschen (This used to be commit aba8c17599f0be82cff33229bb107814d88faafe)
* Get Samba version or capability information from WindowsCorinna Vinschen2008-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | On Jan 22 13:31, Volker Lendecke wrote: > On Tue, Jan 22, 2008 at 11:33:17AM +0100, Corinna Vinschen wrote: > > Right. I changed samba_gitcommitdate from time_t to NTTIME and shortened > > samba_version_string to 28 bytes. New patch below. > > Ok, pushed with some modifications. You might want to review > that. Reviewed and tested. Looks good, thank you! Below you'll find a tiny patch to add the git commit date. It seems I simply missed its existence in version.h :( Tested on Windows XP. Thanks, Corinna * source/smbd/trans2.c (samba_extended_info_version): Fill out samba_gitcommitdate member with GIT commit timestamp. (This used to be commit a33d0797585b5cdd304ac1eb6966b9c7c799bab6)
* Move samba_extended_info_version to smbd/trans2.cVolker Lendecke2008-01-221-0/+32
| | | | | | This is right now only used there, and in version.c it gave linker errors because some binaries (e.g. smbmnt) don't link in time.o (This used to be commit 1f0eaaa5911f893c822465a26fe49ab65afb0730)
* Get Samba version or capability information from WindowsCorinna Vinschen2008-01-221-0/+7
| | | | | | | | | | | | | | | | | | | | | On Jan 21 16:18, Danilo Almeida wrote: > Corina wrote: > > > + time_t samba_gitcommitdate; > > And: > > > + SIVAL(pdata,28,extended_info.samba_gitcommitdate); > > + memcpy(pdata+32,extended_info.samba_version_string,32); > > Note that you are dropping bits on a system w/64-bit time_t, and that this has the 2038 problem. Right. I changed samba_gitcommitdate from time_t to NTTIME and shortened samba_version_string to 28 bytes. New patch below. Thanks, Corinna (This used to be commit 28aa1c199d3a22cda34afcaab49c0561eeb0abcb)
* Hide streams from the EA APIVolker Lendecke2008-01-221-2/+6
| | | | (This used to be commit e9bb3d5067b74a29beb778f85687829778e42b5b)
* Fix get_ea_names_from_file for many EAsVolker Lendecke2008-01-221-1/+1
| | | | | Found by the IBM checker (This used to be commit 8741a9b37496e78b28d59d844aaba12f269171e0)
* Activate SMB_QUERY_FILE_STREAM_INFOVolker Lendecke2008-01-201-5/+6
| | | | | gcolley was right, my nt4 does not blue screen with it (This used to be commit 9f2b5dc1865ca109e1e34c91548479ad9b26f450)
* Add the STREAMINFO vfs callVolker Lendecke2008-01-191-13/+99
| | | | | | | Based on jpeach's work, modified the streaminfo prototype Make use of it in trans2.c together with marshall_stream_info() (This used to be commit c34d729c7c0600a8f11bf7e489a634a4e37fe88e)
* Add get_ea_names_from_file to sanely list posix xattrsVolker Lendecke2008-01-191-49/+142
| | | | | Refactor get_ea_list_from_file to use that. (This used to be commit aec357a456798050abe565d2a744ed5f17ad5901)
* Make get_ea_value publicVolker Lendecke2008-01-191-8/+15
| | | | (This used to be commit 0aa406bbba8699063ea3758b19dca24cf42ff15a)