summaryrefslogtreecommitdiffstats
path: root/source/smbd/process.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix Coverity ID 587Volker Lendecke2008-09-011-1/+1
| | | | | | | | | | | | | | | | | | | The following test program prints "8" on 64-bit :-) static void print_size(const char lenbuf[4]) { printf("sizeof(lenbuf) = %d\n", (int)sizeof(lenbuf)); } int main(void) { const char lenbuf[4]; print_size(lenbuf); return 0; } Jeremy, please check :-) Volker
* fix smb_len calculation for chained requestsVolker Lendecke2008-08-101-3/+5
| | | | | I think chain_reply() is one of the most tricky parts of Samba. This recursion needs to go away, we need to sequentially walk the chain list.
* Fix andx offset calculation for more than 2 chained requestsVolker Lendecke2008-08-101-1/+7
| | | | | Untested code is broken code.... Test follows later, it's quite an intrusive change to libsmb/
* Factor out create_outbuf, creating an outbuf just given an inbufVolker Lendecke2008-06-281-9/+20
|
* Security fix for CVE-2008-1105: Boundary failure when parsing SMB responsesJeremy Allison2008-05-281-3/+1
| | | | | can result in a buffer overrun. Jeremy.
* Fix bug #5477 - recvfile code was broken.Jeremy Allison2008-05-201-8/+4
| | | | Jeremy.
* Remove "userdom_struct user" from "struct user_struct"Volker Lendecke2008-05-051-1/+7
|
* Fix some "ignoring asprintf result" warningsVolker Lendecke2008-04-141-5/+6
|
* Ok, final move of this code :-). I think I've found the correctJeremy Allison2008-03-311-9/+9
| | | | | | | place for it now where it will cause minimal disruption (only call the extra message_dispatch just before reading the next smb off the wire). Jeremy.
* Move the message_dispatch() call after the check for errno onJeremy Allison2008-03-311-11/+11
| | | | | | the select return. We don't want the call to message_dispatch to mess up the errno value. Jeremy.
* Reduce the race condition in Samba4 in RAW-RENAME test. We rename a fileJeremy Allison2008-03-311-0/+9
| | | | | | | | | | using trans2 setfileinfo on one connection, and then check the file name has changed on the other. In Samba we achieve this by sending a local message to the other process. This change causes us to re-scan for incoming messages after we've woken up from the select (which is cheap if there are no pending messages). This reduces the race significantly. Volker please review. Jeremy.
* Convert secrets_lock_trust_account_password to tallocVolker Lendecke2008-03-101-4/+7
| | | | This is preparing the conversion of secrets.c to ctdb
* Fix a couple of "might be used uninitialized" warnings.Jeremy Allison2008-02-051-2/+2
| | | | Jeremy.
* Remove smb_read_error globalVolker Lendecke2008-02-021-7/+0
| | | | YESS :-)
* Remove dependency on get_srv_read_error() from main loopVolker Lendecke2008-02-021-49/+20
|
* Convert receive_message_or_smb to NTSTATUSVolker Lendecke2008-02-021-36/+43
|
* Make get_srv_read_error static to process.cVolker Lendecke2008-02-021-1/+1
|
* read_socket_with_timeout_ntstatus->read_socket_with_timeoutVolker Lendecke2008-02-021-3/+2
|
* Convert receive_smb_talloc to NTSTATUSVolker Lendecke2008-02-021-33/+28
|
* Convert receive_smb_raw_talloc to NTSTATUSVolker Lendecke2008-02-021-61/+29
|
* Convert receive_smb_raw_talloc_partial_read to NTSTATUSVolker Lendecke2008-02-021-59/+47
|
* Convert read_packet_remainder to return NTSTATUSVolker Lendecke2008-02-021-37/+44
|
* Convert read_packet_remainder to use read_socket_with_timeout_ntstatusVolker Lendecke2008-02-021-8/+20
|
* Convert read_smb_length_return_keepalive to return NTSTATUSVolker Lendecke2008-02-021-11/+17
|
* Remove an unused external referenceVolker Lendecke2008-01-271-1/+0
|
* read_socket_with_timeout has timeout=0 handlingVolker Lendecke2008-01-231-23/+6
|
* Remove two unused variablesVolker Lendecke2008-01-231-1/+0
|
* Get the inbuf on talloc_tos()Volker Lendecke2008-01-121-1/+1
|
* Make use of talloc_pool in the main codepaths. Remove the sub-contexts.Jeremy Allison2008-01-091-1/+1
| | | | Jeremy.
* Now conn is part of smb_request, we don't need it asJeremy Allison2008-01-041-2/+2
| | | | | | an extra parameter. This cleans up quite a few places we were passing it around without needing it. Jeremy.
* Refactor the crypto code after a very helpful conversationJeremy Allison2008-01-041-60/+113
| | | | | | with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy.
* Add the capability to set "smb encrypt = required"Jeremy Allison2007-12-271-0/+10
| | | | | | | | on a share (or global) and have the server reply with ACCESS_DENIED for all non-encrypted traffic (except that used to query encryption requirements and set encryption state). Jeremy.
* Add SMB encryption. Still fixing client decrypt butJeremy Allison2007-12-261-3/+53
| | | | | negotiation works. Jeremy.
* Remove last_message completely as it's no longer used.Jeremy Allison2007-12-181-3/+0
| | | | Jeremy.
* Three more pstring removals.Jeremy Allison2007-11-111-3/+9
| | | | Jeremy.
* Fix some warningsVolker Lendecke2007-11-091-1/+1
|
* Remove the horror that was the global smb_rw_error.Jeremy Allison2007-11-051-21/+38
| | | | | | | | | | 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.
* Forgot arg type.Jeremy Allison2007-11-041-1/+1
| | | | Jeremy.
* Don't believe len returned from read_smb_length_return_keepalive(),Jeremy Allison2007-11-041-1/+1
| | | | | | it may be a UNIX large writeX (which wraps len in that case). Stevef this should fix your 128k write bug. Jeremy.
* Remove most of the remaining globals out of lib/util_sock.c.Jeremy Allison2007-11-031-1/+1
| | | | | | I have a plan for dealing with the remaining..... Watch this space. Jeremy.
* I can't get away without a 'length' arg. :-).Jeremy Allison2007-11-031-1/+2
| | | | Jeremy.
* Stop get_peer_addr() and client_addr() from using globalJeremy Allison2007-11-031-1/+4
| | | | | statics. Part of my library cleanups. Jeremy.
* Remove the smb_read_error global variable and replaceJeremy Allison2007-11-031-32/+19
| | | | | it with accessor functions. "One global or pstring a day...." :-). Jeremy.
* Fix vfstest link - move socket calls into smbd/process.cJeremy Allison2007-10-311-0/+288
| | | | | not smbd/server.c Jeremy
* Add new parameter, "min receivefile size" (by default setJeremy Allison2007-10-301-17/+45
| | | | | | | | | 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.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-9/+9
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.samba-misc-tags/initial-v3-2-testGerald (Jerry) Carter2007-10-101-15/+14
|
* r25117: The mega-patch Jerry was waiting for. Remove all pstrings fromJeremy Allison2007-10-101-1/+1
| | | | | | | | 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.
* r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke2007-10-101-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker
* r24702: Remove the old API pointersVolker Lendecke2007-10-101-496/+308
|