summaryrefslogtreecommitdiffstats
path: root/source3/smbd/globals.h
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd: Implementation of SMB2.1 and SMB3.0 leases.Volker Lendecke2014-12-041-1/+3
| | | | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: add smbd_smb2_send_lease_break() helper functionVolker Lendecke2014-12-041-0/+6
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: use async smbprofile macrosStefan Metzmacher2014-11-191-0/+3
| | | | | | | | This improves profiling and corrently counts the total and idle time for async requests. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_negprot: remember xconn->smb2.server.cipherStefan Metzmacher2014-10-161-0/+1
| | | | | | | | For now we always use SMB2_ENCRYPTION_AES128_CCM or 0. 0 is the indication that we don't support encryption on the connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbXsrv_session: add smbXsrv_session_find_channel()Stefan Metzmacher2014-09-191-0/+4
| | | | | | | | This function can check if a smbXsrv_connection is already bound to a smbXsrv_session. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: split out a smbd_add_connection() helper function.Stefan Metzmacher2014-09-191-0/+3
| | | | | | | This attaches a smbXsrv_connection to a smbXsrv_client structure. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: remove now unused smbd_server_connection->connStefan Metzmacher2014-09-191-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_break: pass smbXsrv_connection to smbd_smb2_send_oplock_break()Stefan Metzmacher2014-09-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_create: pass smbXsrv_connection to *deferred*_smb2Stefan Metzmacher2014-09-191-4/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move smbXsrv_{session,tcon,open} tables to smbXsrv_clientStefan Metzmacher2014-09-191-16/+0
| | | | | | | | These should be per client (based on the SMB >= 2.1 client_guid), this is a preparation for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: use tevent_loop_wait() in the child process event loopMichael Adam2014-09-191-2/+0
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: remove now unused smbXsrv_connection->sconnStefan Metzmacher2014-09-191-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: introduce 'struct smbXsrv_client' in order to prepare multi-channel ↵Stefan Metzmacher2014-09-191-1/+8
| | | | | | | | | | support This structure is supposed to hold the global state shared between multiple connections from the same client. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbd: Remove unneeded 'out_of_space' parameter from ↵Jeremy Allison2014-09-161-1/+0
| | | | | | | | | | | | | smbd_dirptr_lanman2_entry(). This can now be handled by checking for the STATUS_MORE_ENTRIES error return. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: SMB2 - change smbd_dirptr_lanman2_entry() to return an NTSTATUS.Jeremy Allison2014-09-161-1/+1
| | | | | | | | | | | Handle the errors correctly at the top level inside the SMB2 server. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3:smbd: pass smbXsrv_connection to smbd_[un]lock_socket()Stefan Metzmacher2014-08-061-2/+2
| | | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Aug 6 12:15:57 CEST 2014 on sn-devel-104
* s3:smb2_server: propagate NTSTATUS from smb2_sendfile_send_data() to ↵Stefan Metzmacher2014-08-061-0/+1
| | | | | | | | | | | | | | smbd_smb2_flush_send_queue() Calling exit_server() from within a destructor is a bit ugly... This will result in smbd_server_connection_terminate() instead of directly calling exit_server(), which will be useful for multi-channel in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: pass smbXsrv_connection to smbd_do_qfsinfo()Stefan Metzmacher2014-08-061-1/+2
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: pass smbXsrv_connection to negprot_spnego()Stefan Metzmacher2014-08-061-1/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_negprot: remove NBT_HDR_SIZE from smbd_smb2_first_negprot()Stefan Metzmacher2014-08-061-1/+1
| | | | | | | | This will simplify future features like multi-channel and rdma. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: pass smbXsrv_connection to smbd_server_connection_terminate*()Stefan Metzmacher2014-08-061-3/+3
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: pass smbXsrv_connection to smbd_smb2_first_negprot()Stefan Metzmacher2014-08-061-1/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: remember smbXsrv_connection for each smbd_smb2_requestStefan Metzmacher2014-08-061-0/+1
| | | | | | | | | | This prepares the structures for multi-channel support. Each request needs to respond on the same connection, where it arrived. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: move sconn->smb2.requests to xconn->smb2.requestsStefan Metzmacher2014-08-061-1/+2
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: move sconn->smb2.*credits* to xconn->smb2.credits.*Stefan Metzmacher2014-08-061-43/+46
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: use xconn->smb2.server.max_* instead of sconn->smb2.max_*Stefan Metzmacher2014-08-061-3/+0
| | | | | | | | We don't need this twice... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: move sconn->smb2.negprot_2ff to xconn->smb2.allow_2ffStefan Metzmacher2014-08-061-1/+1
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: move sconn->smb2.send_queue* to xconn->smb2.send_queue*Stefan Metzmacher2014-08-061-2/+2
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: move sconn->smb2.request_read_state to ↵Stefan Metzmacher2014-08-061-13/+14
| | | | | | | | | | xconn->smb2.request_read_state This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: use xconn->transport.fde also for smb2Stefan Metzmacher2014-08-061-1/+0
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move libasys state from smbXsrv_connection to smbd_server_connectionStefan Metzmacher2014-08-061-6/+6
| | | | | | | | | | This doesn't belong to a connection, it's state used within the VFS stack. And smbd_server_connection is the legacy structure we're using for global VFS state. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move xconn->msg_state to xconn->smb1.msg_stateStefan Metzmacher2014-08-061-2/+2
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->smb1.unix_info.* to xconn->smb1.unix_info.*Stefan Metzmacher2014-08-061-7/+7
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->smb1.echo_handler.* to xconn->smb1.echo_handler.*Stefan Metzmacher2014-08-061-34/+32
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->smb1.signing_state to xconn->smb1.signing_stateStefan Metzmacher2014-08-061-2/+1
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->smb1.sessions.* to xconn->smb1.sessions.*Stefan Metzmacher2014-08-061-9/+10
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->smb1.negprot.* to xconn->smb1.negprot.*Stefan Metzmacher2014-08-061-12/+13
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->status to xconn->transport.statusStefan Metzmacher2014-08-061-1/+1
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->smb1.fde to xconn->transport.fdeStefan Metzmacher2014-08-061-2/+1
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->sock to xconn->transport.sockStefan Metzmacher2014-08-061-1/+2
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move sconn->nbt.* to xconn->transport.nbt.*Stefan Metzmacher2014-08-061-3/+6
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: add smbXsrv_connection_dbg()Stefan Metzmacher2014-08-061-0/+2
| | | | | | | | This is similar to fsp_fnum_dbg() and fsp_str_dbg(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Use mutex instead of fcntl lock for echohandler coordinationChristof Schmitt2014-07-091-1/+11
| | | | | | | | | | | | | | This is based on a patch from Volker. When the system supports roboust mutexes, they will be used for the coordiations between worker and echohandler process. This avoids another aspect of the fcntl scalibility issue when handling many client connections. When mutexes are not available, the code falls back to the fcntl lock. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 9 00:56:50 CEST 2014 on sn-devel-104
* smbd: Factor out unlocking from smbd_do_lockingVolker Lendecke2014-07-041-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Refactor smbd_smb2_request_process_negprotIra Cooper2014-06-231-0/+3
| | | | | | | | Breakout smb2_protocol_dialect_match to support future work in fsctl_validate_neg_info. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Store "struct deferred_open_record" instead of anonymous data on pmlVolker Lendecke2014-06-211-6/+7
| | | | | | | | The main point is to get a talloc parent that will go away when the request is cancelled Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: only allocate the required buffer in the smb2 recvfile() ↵Stefan Metzmacher2014-04-111-0/+1
| | | | | | | | | | code path This way the buffer will likely be allocated within the existing talloc_pool, which avoids one malloc() per request. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: avoid talloc_zero_array() in smbd_smb2_request_setup_out()Stefan Metzmacher2014-03-061-0/+1
| | | | | | | | | | | In the common case with just one request, we can use a preallocated req->out.vector. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Mar 6 00:59:29 CET 2014 on sn-devel-104
* s3:smb2_server: optimize smbd_smb2_generate_outbody() for the common caseStefan Metzmacher2014-03-051-0/+1
| | | | | | | Use a preallocated buffer for the first response in the compound chain. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: add smbd_smb2_generate_outbody() helperStefan Metzmacher2014-03-051-0/+2
| | | | | | | We can add optimization there later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>