summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-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
2010-04-27Fix the "allow_smb2" bug being set to false that was driving me mad :-).Jeremy Allison1-1/+5
The first packet from a rebooted Win7 on an SMB2 connection is an SMB1 negprot... Jeremy.
2010-04-27s3:smbd: keep local and remote tsocket_address per connectionStefan Metzmacher1-9/+63
metze
2010-04-23Allow smb2 create requests to be cancelled.Jeremy Allison1-0/+2
Jeremy.
2010-04-22Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison1-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.
2010-04-12Move to using 64-bit mid values in our internal open file database.Jeremy Allison1-33/+40
This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
2010-04-09Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison1-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.
2010-04-08Stop smb2 from calling into smb1 blocking lock request code.Jeremy Allison1-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.
2010-04-07Start to plumb smb2 into the oplock system. Calls dummy functions for now.Jeremy Allison1-0/+6
Jeremy.
2010-04-01Move initialize_async_io_handler() inside of smbd/aio.c.Jeremy Allison1-3/+0
Call from actual aio read or write. No reason to call this globally on startup. Jeremy.
2010-03-31Make smbd_lock_socket/smbd_unlock_socket recursive with a ref_count.Jeremy Allison1-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.
2010-03-31s3:smbd: handle SMB2 in deadtime_fn() and avoid disconnecting non idle clientsStefan Metzmacher1-1/+13
metze
2010-03-22s3: Implement an asynchronous echo responder processVolker Lendecke1-19/+478
This replies to echo requests when the main smbd is stuck somewhere Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-22s3:smbd: don't allow SMB2 if the async echo handler is activeStefan Metzmacher1-1/+2
metze
2010-03-22s3:smbd: don't use recvfile if the echo handler is activeStefan Metzmacher1-1/+2
metze
2010-03-22s3:smbd: pass down trusted_channel via receive_smb_talloc()Stefan Metzmacher1-3/+5
metze
2010-03-22s3:smbd: send keepalive packets under the socket lockStefan Metzmacher1-1/+16
metze
2010-03-22s3:smbd: smbd_[un]lock_socket() while accessing the socket to the clientStefan Metzmacher1-1/+24
metze
2010-03-22s3:smbd: add smbd_[un]lock_socket() dummiesStefan Metzmacher1-0/+10
metze
2010-03-22s3:smbd: add an option to skip signings checks srv_check_sign_mac for ↵Stefan Metzmacher1-1/+1
trusted channels metze
2010-03-11s3: Make init_smb_request return boolVolker Lendecke1-5/+10
Centralize the exit_server_cleanly()
2010-03-09s3: Fix a NULL pointer dereferenceVolker Lendecke1-1/+10
Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
2010-01-23s3: Fix some nonempty blank linesVolker Lendecke1-3/+3
2010-01-21s3: Initialize the seqnum in "init_smb_request"Volker Lendecke1-4/+4
This makes it a bit more obvious for me that the signing sequence number is tied to the SMB request.
2010-01-21s3: Make "init_smb_request" static to process.cVolker Lendecke1-4/+2
2009-12-22s3: Move smb_splice_chain to smbd/process.c, its only userVolker Lendecke1-0/+174
2009-12-21Rename reply_doserror() -> reply_force_doserror().Jeremy Allison1-2/+2
Rewrite all calls to reply_nterror(NT_STATUS_DOS()) to reply_force_doserror() and update the comment in smbd/error.c Jeremy.
2009-12-21Remove all calls to reply_doserror - turn them intoJeremy Allison1-4/+4
correct reply_nterror calls. Next rename reply_doserror -> reply_force_doserror and plumb in when NT_STATUS_DOS is used. Jeremy.
2009-11-26s3-smbd: no drsuapi server stubs yet in s3. Fixes the build, sorry.Günther Deschner1-1/+0
Guenther
2009-11-26s3-rpc: Avoid including every pipe's client and server stubs everywhere in ↵Günther Deschner1-0/+15
samba. Guenther
2009-11-23Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke1-1/+0
This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
2009-11-21s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke1-0/+1
2009-10-01Fix for CVE-2009-2906.Jeremy Allison1-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.
2009-09-24s3 onefs: Add some debugging/asserts to give more info when there is bad ↵Zack Kirsch1-0/+2
deferred open state. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-06Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".Jeremy Allison1-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.
2009-08-07s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher1-0/+3
metze
2009-07-27Fix a valgrind error in chain_replyVolker Lendecke1-3/+10
construct_reply() references the request after chain_reply has freed it.
2009-07-24In chain_reply, copy the subrequests' error to the main requestVolker Lendecke1-0/+15
2009-07-17Move the initialization of smbd_server_conn from smbd/process,Jeremy Allison1-5/+0
after the accept and fork, to smbd_init_globals(), so it's done immediately on server startup. This is needed as some messages are sent to all active smbd processes (including the master listening daemon). If it gets a message that forces it to scan it's current connections (ie. conn_find()) then it discovers that sconn->smb1.tcons.Connections dereferences null (as sconn == NULL in the parent) and crashes. Yes, I could fix all cases where sconn is used and explicitly check for NULL but this fix is easier. It means that the smbd_event_context() is initialized in the master daemon and then re-initialized after fork, but that should be being done correctly in every fork call anyway. Without this change the previous fix 6a9e0039100b57f9626e87defec6720c476b9789 still panics in the reproducible test case for bug 6564, as this is one case where such a message (MSG_SMB_CONF_UPDATED) is sent to the parent. Metze please check. This change passes valgrind. Jeremy.
2009-07-14Revert this commit :Jeremy Allison1-56/+2
s3: Make smbd aware of permission change of usershare. Since usershare are relatively volatile and non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect. For now. This is a feature request and I think we need to design it a little differently so as not to touch core change_to_user() code. Jeremy.
2009-07-15s3: Make smbd aware of permission change of usershare. Since usershare are ↵Bo Yang1-2/+56
relatively volatile and non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect.
2009-06-22s3: forward MSG_DEBUG from smbd parent to all childrenAravind Srinivasan1-0/+9
Before 3.3, an smbcontrol debug message sent to the target "smbd" would actually be sent to all running processes including nmbd and winbindd. This behavior was changed in 3.3 so that the "smbd" target would only send a message to the process found in smbd.pid, while the "all" target would send a message to all processes. The ability to set the debug level of all processes within a single daemon, without specifying each pid is quite useful. This was implemented in winbindd in 065760ed. This patch does the same thing for smbd. Upon receiving a MSG_DEBUG the parent smbd will rebroadcast it to all of its children. The printing process has been added to the list of smbd child processes, and we now always track the number of smbd children regardless of the "max smbd processes" setting.
2009-06-03s3:smbd: move tcon specific globals to struct smbd_server_connectionStefan Metzmacher1-3/+7
metze
2009-06-03s3:smbd: move more session specific globals to struct smbd_server_connectionStefan Metzmacher1-1/+12
metze
2009-06-03s3:smbd: move some session specific globals to struct smbd_server_connectionStefan Metzmacher1-2/+7
metze
2009-06-03s3:smbd: move already_got_session to struct smbd_server_connectionStefan Metzmacher1-0/+2
metze
2009-06-03s3:smbd: move max_recv to struct smbd_server_connectionStefan Metzmacher1-1/+1
metze
2009-06-03s3:smbd: allow SMB2 only if we don't use security = shareStefan Metzmacher1-1/+2
metze
2009-05-26s3:smbd: move SMB1 specific stuff into a substructure of smbd_server_connectionStefan Metzmacher1-9/+9
metze
2009-05-20s3:smbd: add infrastructure for SMB2 supportStefan Metzmacher1-0/+12
This is disabled by default and activated by "max protocol = SMB2". metze