summaryrefslogtreecommitdiffstats
path: root/source3/smbd/process.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: Explicitly pass sconn to [remove|schedule]_deferred_open_message_smb2Volker Lendecke2010-06-121-2/+2
|
* s3: Explicitly pass sconn to open_was_deferred_smb2Volker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from switch_messageVolker Lendecke2010-06-121-1/+1
|
* s3: Explicitly pass sconn to is_valid_writeX_bufferVolker Lendecke2010-06-121-1/+2
|
* s3: Pass sconn explicitly to reply_specialVolker Lendecke2010-06-121-1/+1
|
* s3: Use "sconn" argument in smbd_[un]lock_socket_internalVolker Lendecke2010-06-121-8/+8
| | | | Metze, please check!
* s3: Pass sconn to init_smb_request()Volker Lendecke2010-06-121-5/+7
|
* s3: Add "smbd_server_connection" to smb_requestVolker Lendecke2010-06-121-0/+1
|
* s3: Fix starving the echo responderVolker Lendecke2010-06-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | When both the echo responder and the 445 socket want to send stuff to the worker smbd, the select loop is not fair. It always chooses the smaller file descriptor to work on. This can mean that on a busy system the echo responder never gets around to feed its stuff to the parent. This fix chooses the async echo responder socket when both the 445 and the echo responder socket are readable. Yes, it is a very hackish fix which is required *now* I think. The proper fix would be to either assign priorities to fd's in tevent, or the from my point of view better fix would be to make tevent kindof round-robin. Round-robin would mean that whenever a fd has been dealt with, it is taken off the list of interested sockets, and only if no other socket is active, all of the ones waiting are put back. This is a bit like EPOLL_ONESHOT, which I would like to use for this in the epoll case. Although, I need to do some research if maybe epoll already guarantees round-robin, I did not find anything in the docs yet. Volker
* Rename "allow_smb2" -> "using_smb2" and make the usage clearer.Jeremy Allison2010-06-091-9/+18
|
* Ensure we don't send SMB1 keepalives on an SMB2 connection.Jeremy Allison2010-06-091-0/+6
| | | | Jeremy.
* s3:smbd make yp cache local.Simo Sorce2010-05-311-3/+0
| | | | | | | | | | | | | | | | | The my_yp_domain variable is just a static cache needed to avoid making over and over expensive and potentially blocking calls to yp_get_default_domain(). Instead of keeping this onto the smbd_server_connection struct, just keep it local to the only function ever using this variable. This disentagle this function (and a number of calling functions) from having to pass around smbd_server_connection and thus having to link against smbd. It also removes a few ifdefs. Nothing changes from a global/local pov, as the smbd_server_connection variable passed around is also a global one. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:auth use info3 in auth_serversupplied_infoSimo Sorce2010-05-281-2/+1
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3: Fix a bad memleak in the async echo responderVolker Lendecke2010-05-271-1/+1
|
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-0/+1
| | | | | | | | | | | | | | | | | This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
* Fix the "allow_smb2" bug being set to false that was driving me mad :-).Jeremy Allison2010-04-271-1/+5
| | | | | | | The first packet from a rebooted Win7 on an SMB2 connection is an SMB1 negprot... Jeremy.
* s3:smbd: keep local and remote tsocket_address per connectionStefan Metzmacher2010-04-271-9/+63
| | | | metze
* Allow smb2 create requests to be cancelled.Jeremy Allison2010-04-231-0/+2
| | | | Jeremy.
* Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison2010-04-221-4/+4
| | | | | | | | Makes SMB2Create call re-entrant internally. Now this infrastructure is in place, oplocks will follow shortly. Tested with Win7 client and with W2K8R2. Jeremy.
* Move to using 64-bit mid values in our internal open file database.Jeremy Allison2010-04-121-33/+40
| | | | | | | This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
* Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison2010-04-091-19/+65
| | | | | | | | Rename functions to be internally consistent. Next step is to cope queueing single (non-compounded) SMB2 requests to put some code inside the stubs. Jeremy.
* Stop smb2 from calling into smb1 blocking lock request code.Jeremy Allison2010-04-081-0/+1
| | | | | | | | | | | Allocate a uint16_t internal SMB1 mid for an SMB2 request. Add a back pointer from the faked up smb_request struct to the smb2 request. Getting ready to add restart code for blocking locks, share mode violations and oplocks in SMB2. Jeremy.
* Start to plumb smb2 into the oplock system. Calls dummy functions for now.Jeremy Allison2010-04-071-0/+6
| | | | Jeremy.
* Move initialize_async_io_handler() inside of smbd/aio.c.Jeremy Allison2010-04-011-3/+0
| | | | | | Call from actual aio read or write. No reason to call this globally on startup. Jeremy.
* Make smbd_lock_socket/smbd_unlock_socket recursive with a ref_count.Jeremy Allison2010-03-311-40/+38
| | | | | | | | | As these always call exit_server, make that part of the function. Use _internal functions for the echo client. Metze please check ! Jeremy.
* s3:smbd: handle SMB2 in deadtime_fn() and avoid disconnecting non idle clientsStefan Metzmacher2010-03-311-1/+13
| | | | metze
* s3: Implement an asynchronous echo responder processVolker Lendecke2010-03-221-19/+478
| | | | | | This replies to echo requests when the main smbd is stuck somewhere Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: don't allow SMB2 if the async echo handler is activeStefan Metzmacher2010-03-221-1/+2
| | | | metze
* s3:smbd: don't use recvfile if the echo handler is activeStefan Metzmacher2010-03-221-1/+2
| | | | metze
* s3:smbd: pass down trusted_channel via receive_smb_talloc()Stefan Metzmacher2010-03-221-3/+5
| | | | metze
* s3:smbd: send keepalive packets under the socket lockStefan Metzmacher2010-03-221-1/+16
| | | | metze
* s3:smbd: smbd_[un]lock_socket() while accessing the socket to the clientStefan Metzmacher2010-03-221-1/+24
| | | | metze
* s3:smbd: add smbd_[un]lock_socket() dummiesStefan Metzmacher2010-03-221-0/+10
| | | | metze
* s3:smbd: add an option to skip signings checks srv_check_sign_mac for ↵Stefan Metzmacher2010-03-221-1/+1
| | | | | | trusted channels metze
* s3: Make init_smb_request return boolVolker Lendecke2010-03-111-5/+10
| | | | Centralize the exit_server_cleanly()
* s3: Fix a NULL pointer dereferenceVolker Lendecke2010-03-091-1/+10
| | | | | | | | Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
* s3: Fix some nonempty blank linesVolker Lendecke2010-01-231-3/+3
|
* s3: Initialize the seqnum in "init_smb_request"Volker Lendecke2010-01-211-4/+4
| | | | | This makes it a bit more obvious for me that the signing sequence number is tied to the SMB request.
* s3: Make "init_smb_request" static to process.cVolker Lendecke2010-01-211-4/+2
|
* s3: Move smb_splice_chain to smbd/process.c, its only userVolker Lendecke2009-12-221-0/+174
|
* Rename reply_doserror() -> reply_force_doserror().Jeremy Allison2009-12-211-2/+2
| | | | | | | Rewrite all calls to reply_nterror(NT_STATUS_DOS()) to reply_force_doserror() and update the comment in smbd/error.c Jeremy.
* Remove all calls to reply_doserror - turn them intoJeremy Allison2009-12-211-4/+4
| | | | | | | correct reply_nterror calls. Next rename reply_doserror -> reply_force_doserror and plumb in when NT_STATUS_DOS is used. Jeremy.
* s3-smbd: no drsuapi server stubs yet in s3. Fixes the build, sorry.Günther Deschner2009-11-261-1/+0
| | | | Guenther
* s3-rpc: Avoid including every pipe's client and server stubs everywhere in ↵Günther Deschner2009-11-261-0/+15
| | | | | | samba. Guenther
* Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke2009-11-231-1/+0
| | | | This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
* s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke2009-11-211-0/+1
|
* Fix for CVE-2009-2906.Jeremy Allison2009-10-011-5/+25
| | | | | | | | Summary: Specially crafted SMB requests on authenticated SMB connections can send smbd into a 100% CPU loop, causing a DoS on the Samba server.
* s3 onefs: Add some debugging/asserts to give more info when there is bad ↵Zack Kirsch2009-09-241-0/+2
| | | | | | deferred open state. Signed-off-by: Tim Prouty <tprouty@samba.org>
* Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".Jeremy Allison2009-09-061-2/+2
| | | | | | | | | | Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed from sys_read() to sys_recv(). read_socket_with_timeout() is called with non-fd's (with a pty in chgpasswd.c and with a disk file in lib/dbwrap_file.c via read_data()). recv works for the disk file, but not the pty. Change the name of read_socket_with_timeout() to read_fd_with_timeout() to make this clear (and add comments). Jeremy.
* s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher2009-08-071-0/+3
| | | | metze