summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/rawrequest.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r2552: Character set conversion and string handling updates.Andrew Bartlett1-6/+11
The intial motivation for this commit was to merge in some of the bugfixes present in Samba3's chrcnv and string handling code into Samba4. However, along the way I found a lot of unused functions, and decided to do a bit more... The strlen_m code now does not use a fixed buffer, but more work is needed to finish off other functions in str_util.c. These fixed length buffers hav caused very nasty, hard to chase down bugs at some sites. The strupper_m() function has a strupper_talloc() to replace it (we need to go around and fix more uses, but it's a start). Use of these new functions will avoid bugs where the upper or lowercase version of a string is a different length. I have removed the push_*_allocate functions, which are replaced by calls to push_*_talloc. Likewise, pstring and other 'fixed length' wrappers are removed, where possible. I have removed the first ('base pointer') argument, used by push_ucs2, as the Samba4 way of doing things ensures that this is always on an even boundary anyway. (It was used in only one place, in any case). (This used to be commit dfecb0150627b500cb026b8a4932fe87902ca392)
2007-10-10r2443: check return code of event_loop_once() to catch thet cases where the ↵Stefan Metzmacher1-1/+3
server closes the connetion and we got EBADF from select() and event_loop_once() fails metze (This used to be commit 9c0e50a6f3d628156b4543d5ded89e06be696f64)
2007-10-10r2159: converted samba4 over to UTF-16.Andrew Tridgell1-2/+2
I had previously thought this was unnecessary, as windows doesn't use standards compliant UTF-16, and for filesystem operations treats bytes as UCS-2, but Bjoern Jacke has pointed out to me that this means we don't correctly store extended UTF-16 characters as UTF-8 on disk. This can be seen with (for example) the gothic characters with codepoints above 64k. This commit also adds a LOCAL-ICONV torture test that tests the first 1 million codepoints against the system iconv library, and tests 5 million random UTF-16LE buffers for identical error handling to the system iconv library. the lib/iconv.c changes need backporting to samba3 (This used to be commit 756f28ac95feaa84b42402723d5f7286865c78db)
2007-10-10r1984: this change is what you should read to understand the new talloc()Andrew Tridgell1-14/+3
It simplifies our structure handling a lot, making the code shorter and easier to understand. Look at the diff carefully and see if you can understand it. If you're still confused then please ask. (This used to be commit 03c341aca7f09cb1f0d33ec65e074e6a00caa30f)
2007-10-10r1983: a completely new implementation of tallocAndrew Tridgell1-2/+2
This version does the following: 1) talloc_free(), talloc_realloc() and talloc_steal() lose their (redundent) first arguments 2) you can use _any_ talloc pointer as a talloc context to allocate more memory. This allows you to create complex data structures where the top level structure is the logical parent of the next level down, and those are the parents of the level below that. Then destroy either the lot with a single talloc_free() or destroy any sub-part with a talloc_free() of that part 3) you can name any pointer. Use talloc_named() which is just like talloc() but takes the printf style name argument as well as the parent context and the size. The whole thing ends up being a very simple piece of code, although some of the pointer walking gets hairy. So far, I'm just using the new talloc() like the old one. The next step is to actually take advantage of the new interface properly. Expect some new commits soon that simplify some common coding styles in samba4 by using the new talloc(). (This used to be commit e35bb094c52e550b3105dd1638d8d90de71d854f)
2007-10-10r1824: nicer handling of NBT session replies, and handling of bad packetsAndrew Tridgell1-2/+2
with the async SMB code (This used to be commit cef94978f43a8326b6cf1888c15ca8c568ebe9f8)
2007-10-10r1674: fixed a bug in the handling of STR_LEN8BIT flagged stringsAndrew Tridgell1-3/+6
(This used to be commit 17a331529706266bd53b2d1c7b873cf4bbd7aaa7)
2007-10-10r1654: rename cli_ -> smbcli_Stefan Metzmacher1-72/+72
rename CLI_ -> SMBCLI_ metze (This used to be commit 8441750fd9427dd6fe477f27e603821b4026f038)
2007-10-10r1633: fixed a couple of async oplock handling errorsAndrew Tridgell1-1/+1
(This used to be commit d7e2f39b90122088e94d4a8e8c7ffa7c91d7d664)
2007-10-10r1618: fixed the receipt of multi-part replies to SMBtrans2Andrew Tridgell1-0/+13
(This used to be commit bd4106a8e57fc98d1feddc01b58f87f68164247a)
2007-10-10r1578: the first stage of the async client rewrite.Andrew Tridgell1-179/+7
Up to now the client code has had an async API, and operated asynchronously at the packet level, but was not truly async in that it assumed that it could always write to the socket and when a partial packet came in that it could block waiting for the rest of the packet. This change makes the SMB client library full async, by adding a separate outgoing packet queue, using non-blocking socket IO and having a input buffer that can fill asynchonously until the full packet has arrived. The main complexity was in dealing with the events structure when using the CIFS proxy backend. In that case the same events structure needs to be used in both the client library and the main smbd server, so that when the client library is waiting for a reply that the main server keeps processing packets. This required some changes in the events library code. Next step is to make the generated rpc client code use these new capabilities. (This used to be commit 96bf4da3edc4d64b0f58ef520269f3b385b8da02)
2007-10-10r962: convert 'unsigned' and 'unsigned int' to uint_tStefan Metzmacher1-16/+16
metze (This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
2007-10-10r890: convert samba4 to use [u]int8_t instead of [u]int8Stefan Metzmacher1-7/+7
metze (This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f)
2007-10-10r889: convert samba4 to use [u]int16_t instead of [u]int16Stefan Metzmacher1-9/+9
metze (This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)
2007-10-10r884: convert samba4 to use [u]int32_t instead of [u]int32Stefan Metzmacher1-2/+2
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
2007-10-10r873: converted samba4 to use real 64 bit integers instead ofAndrew Tridgell1-7/+3
structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
2007-10-10r335: added much better handling of servers that die unexpectedly during aAndrew Tridgell1-4/+7
request (a dead socket). I discovered this when testing against Sun's PC-NetLink. cleaned up the naming of some of the samr requests add IDL and test code for samr_QueryGroupMember(), samr_SetMemberAttributesOfGroup() and samr_Shutdown(). (actually, I didn't leave the samr_Shutdown() test in, as its fatal to windows servers due to doing exactly what it says it does). (This used to be commit 925bc2622c105dee4ffff809c6c35cd209a839f8)
2007-10-10r204: Turns out that the string in the SEARCH unix_info level is thatJeremy Allison1-0/+46
rare thing, a non-length string (ie. not a WIRE_STRING) but a null terminated char string. There wasn't a good interface to pull that out of a blob (all the string interfaces assumed WIRE_STRINGS). Added a new one, only used for this call. Sucks, I know - but the alternatives suck more. Added tests for some of the unix info returned. Jeremy. (This used to be commit 4d0ed04c54b105789ffd32334c3b0e544f02418c)
2004-03-25fixed the handling of level II oplocks in samba4, especially whenAndrew Tridgell1-1/+1
acting as a cifs redirectory (using the cifs backend) (This used to be commit 06a8100e6a2f3f079af5b6ec32d87d1d25f56c3c)
2004-02-21fixed a problem with the smb client code spinning when the connectionAndrew Tridgell1-1/+5
is lost. We now close the cli_transport when there is a socket io error (This used to be commit 138cb5f2f5f8ce1479ac687d18e6a0e355e55b7f)
2003-11-20make the socket send code a little clearerAndrew Tridgell1-1/+5
(This used to be commit 48028fbb856ea7ee642f36ba9ed0d5815763f52b)
2003-08-31I think I've finally got the ascii/unicode issues right in trans2 findAndrew Tridgell1-6/+17
first Also expanded the rename test a little (This used to be commit 723af7f097a8c7f23dac23039e479811559ac3cb)
2003-08-15fixed some places where we don't brace (flags & STR_UNICODE)Andrew Tridgell1-1/+1
this fixes the samba4 server with ascii clients (This used to be commit c770603ac6c3331a4ac79a650cbbbeb21c778137)
2003-08-13add support for 32 bit pid using the PIDHIGH field. This allows theAndrew Tridgell1-1/+2
test suite to see if it is supported. w2k3 doesn't seem to support it. (This used to be commit c946be06a49e9a187045f2372ef7c1b987eaf6e5)
2003-08-13first public release of samba4 codeAndrew Tridgell1-0/+1019
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)