summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clitrans.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:libsmb/clitrans: correctly transfer the seqnum between secondary and ↵Stefan Metzmacher2011-06-101-3/+8
| | | | | | | | primary requests This is needed to implement SMB signing correct. metze
* s3:libsmb/clitrans: fix handling of multi pdu [nt]trans[s][2] callsStefan Metzmacher2011-06-101-8/+80
| | | | | | | | We now keep the primary request open for the whole logical request. The primary request is the one that gets all incoming replies. While secondary requests are handled as separate one-way requests. metze
* s3:libsmb/clitrans: use subreq2 as variable for the secondary requestsStefan Metzmacher2011-06-101-7/+9
| | | | metze
* s3:libsmb/clitrans: move MID handling to the end of cli_trans_send() and add ↵Stefan Metzmacher2011-06-101-2/+11
| | | | | | a comment metze
* s3:libsmb/clitrans: correctly marshall [nt]trans[s][2] requestsStefan Metzmacher2011-06-101-12/+41
| | | | | | | | We need to align params and data to 4 byte offsets. This also correctly recalculates the useable space after each step. metze
* s3:libsmb/clitrans: marshall SMBnttrans[2] as the othersStefan Metzmacher2011-06-101-23/+23
| | | | | | | This is just to make the code more readable and easier to notice how many words we're using in vwv. metze
* s3:libsmb/clitrans: use uint32_t for param and data variablesStefan Metzmacher2011-06-101-3/+3
| | | | | | SMBnttrans uses 32-bit values there. metze
* s3:libsmb/clitrans: remove unused secondary_request_ctxStefan Metzmacher2011-06-101-2/+0
| | | | metze
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3: Do central cli_set_errorVolker Lendecke2011-05-191-3/+0
|
* s3-libsmb: move protos to libsmb/proto.hGünther Deschner2011-05-061-0/+1
| | | | Guenther
* s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner2011-04-291-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
* charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell2011-03-241-1/+1
| | | | | | | | | convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
* s3: Remove unused cli_send/receive_transVolker Lendecke2011-01-171-331/+0
|
* s3: Remove unused cli_send/receive_nt_transVolker Lendecke2011-01-171-341/+0
|
* s3-build: only include async headers where needed.Günther Deschner2010-09-201-1/+1
| | | | Guenther
* s3: Save the received trans2 from the inbuf in cli_transVolker Lendecke2010-08-051-1/+10
|
* s3: Explicitly handle inbuf in cli_trans_doneVolker Lendecke2010-02-221-2/+9
|
* s3: Add a talloc_move for the inbuf to cli_smb_recvVolker Lendecke2010-02-221-1/+2
|
* s3: Add min_setup, min_param and min_data to cli_trans_recvVolker Lendecke2009-11-141-8/+18
| | | | | | | | | | Every caller that expects to receive something needs to check if enough was sent. Make this check mandatory for everyone. Yes, this makes the parameter list for cli_trans a bit silly, but that's just the way it is: A silly protocol request :-) While there, convert some _done functions to tevent_req_simple_finish_ntstatus.
* s3: return proper error code in cli_smb_req_sendBo Yang2009-05-131-4/+7
| | | | Signed-off-by: Bo Yang <boyang@samba.org>
* Clean up assignments to iov_base, ensure it's always cast to void *. This ↵Jeremy Allison2009-05-121-5/+5
| | | | | | should quieten some warnings with picky compilers on the buildfarm. Jeremy.
* Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett2009-04-141-5/+5
| | | | | | | | | | | | This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
* Convert cli_trans to tevent_reqVolker Lendecke2009-04-061-382/+272
|
* Remove async_req dependency from cli_pull_transVolker Lendecke2009-04-051-23/+25
|
* Fix an uninitialized variable valgrind errorVolker Lendecke2009-03-311-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: use new simplified smb_signing code for the client sideStefan Metzmacher2009-03-231-21/+33
| | | | | | | | | | We store the seqnum/mid mapping in the cli_request structure for async requests and in the cli_state structure for sync calls. We skip the signing check for oplock requests while waiting for async requests coming in. metze
* s3:libsmb: always create bytes array in cli_trans codeStefan Metzmacher2009-03-191-5/+14
| | | | | | | | | Otherwise we return NO_MEMORY without a reason for fragmented trans requests, as talloc_append_blob() returns buf if we append a 0 length blob. When we pass buf = NULL we'll get back NULL and then assume NO_MEMORY... metze
* s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requestsStefan Metzmacher2009-03-191-23/+7
| | | | | | | | | | | | | | | | | | | | | | Before we send the secondary requests we need to remove the old mid=>seqnum mapping and reset cli->mid and make the new mid=>seqnum mapping "persistent". The bug we had in cli_send_trans was this: The first cli_send_smb() incremented cli->mid and the secondary requests used the incremented mid, but as cli->outbuf still had the correct mid, we send the correct mid to the server. The real problem was that the cli_send_smb() function stored the seqnum under the wrong mid. cli_send_nttrans() was totally broken and now follows the same logic as cli_send_trans(). The good thing is that in practice the problem is unlikely to happen, because max_xmit is large enough to avoid secondary requests. metze
* Split up async_req into a generic and a NTSTATUS specific partVolker Lendecke2009-02-011-7/+7
|
* Add the strlen to push to smb_bytes_push_str, return the converted sizeVolker Lendecke2009-01-291-3/+3
| | | | | The pushed strlen replaces the STR_TERMINATE flag which I personally always find very confusing.
* Pass "bytes_alignment" up through cli_request_sendVolker Lendecke2008-12-191-3/+3
| | | | This parameter makes smb_spice_chain add padding before the bytes field
* Simplify async programming a bit with helper routinesVolker Lendecke2008-12-081-3/+3
| | | | Introduce async_req_is_error() and async_req_simple_recv()
* Move cli_trans_oob to lib/util.cVolker Lendecke2008-11-281-17/+4
| | | | Rename it to trans_oob, it will be used in the server routines.
* Fix some bogus compiler warningsVolker Lendecke2008-09-101-5/+10
| | | | (This used to be commit 84ed752d9f17b2279bd60f534ce7c02b267a40b2)
* Add async trans/trans2/nttrans calls to libsmbVolker Lendecke2008-09-091-0/+701
| | | | | Logic stolen from Samba4, naturally the specific implementation differs a bit. (This used to be commit 4b8bc5b03d35d563104791c0d8317d9886e4f032)
* Fix signing problem in the client with transs requestsVolker Lendecke2008-05-131-0/+3
| | | | | | | | | | | | This is a different fix than Jeremy put into 3-0-test with 040db1ce85 and other branches with different hashes. Jeremy, I think your fix led to bug 5436, so I reverted your fix. This fixes the original problem I found with the transs requests for large rpc queries in a different way. Please check! Thanks, Volker (This used to be commit c572d537e088a3fffb057181cad9a3692e40b815)
* Revert "Fix signing bug found by Volker. That one was *subtle*."Volker Lendecke2008-05-131-0/+14
| | | | | This reverts commit 816aea6c1a426eb2450061b847729e22bdac33a0. (This used to be commit e402e6508ca0806deef4c4044cfa6461b682850a)
* Add SMB encryption. Still fixing client decrypt butJeremy Allison2007-12-261-4/+4
| | | | | | negotiation works. Jeremy. (This used to be commit d78045601af787731f0737b8627450018902b104)
* Fix signing bug found by Volker. That one was *subtle*.Jeremy Allison2007-12-041-14/+0
| | | | | Jeremy (This used to be commit 816aea6c1a426eb2450061b847729e22bdac33a0)
* Ensure we have 2 bytes of zeros as a pad-buffer at theJeremy Allison2007-11-301-40/+85
| | | | | | | end of all returned trans/trans2/nttrans client replies. Not included in a count - for safety purposes. Jeremy. (This used to be commit 3e65fa5bcf5d1af3983f2e576698eccaad79fcda)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-6/+6
| | | | | | | | 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)
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter2007-10-101-4/+4
| | | | (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r22732: - Testing of libsmbclient against Vista revealed what is likely a bug inDerrell Lipman2007-10-101-1/+8
| | | | | | | | | | | | | | | | Vista. Vista provides a plethora of kludges to simulate older versions of Windows. The kludges are in the form of shortcuts (or more likely symbolic links, but I don't know enough about Vista to determine that definitively) and in most cases, attempts to access them get back an "access denied" error. On one particular folder, however, "<share>/Users/All Users", it returns an unknown (to ethereal and the Samba3 code) NT status code: 0x8000002d. Although this code does not have a high byte of 0xc0 indicating that it is an error, it appears to be an alternate form of "access denied". Without this patch, libsmbclient times out on an attempt to enumerate that folder rather than returning an error to the caller. This patch corrects that problem. (This used to be commit cc0cd3a12f76b8cd711e3165d4cfe920552f256d)
* r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison2007-10-101-4/+4
| | | | | | | | to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy. (This used to be commit 2d80a96120a5fe2fe726f00746d36d85044c4bdb)
* r21899: At least we're getting to stage 2 of the blobJeremy Allison2007-10-101-4/+10
| | | | | | exchange. Still not working but closer. Jeremy. (This used to be commit 2fde5c703d2390bc6685f34713dc996e69732f1a)
* r17333: Some C++ warningsVolker Lendecke2007-10-101-4/+4
| | | | (This used to be commit be9aaffdaccae06c8c035eaf31862e34b7cfbe38)
* r17292: Try and fix bug #3967 - signing problems on transJeremy Allison2007-10-101-40/+61
| | | | | | | | calls introduced by signing code simplification. Please test if you've seen signing problems with 3.0.23a. Jeremy. (This used to be commit f462daf02c12cfba634f92e681eb23a09e7d0acf)