summaryrefslogtreecommitdiffstats
path: root/source3/smbd/process.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher2009-08-071-0/+3
| | | | metze
* Fix a valgrind error in chain_replyVolker Lendecke2009-07-271-3/+10
| | | | construct_reply() references the request after chain_reply has freed it.
* In chain_reply, copy the subrequests' error to the main requestVolker Lendecke2009-07-241-0/+15
|
* Move the initialization of smbd_server_conn from smbd/process,Jeremy Allison2009-07-171-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.
* Revert this commit :Jeremy Allison2009-07-141-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.
* s3: Make smbd aware of permission change of usershare. Since usershare are ↵Bo Yang2009-07-151-2/+56
| | | | relatively volatile and non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect.
* s3: forward MSG_DEBUG from smbd parent to all childrenAravind Srinivasan2009-06-221-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.
* s3:smbd: move tcon specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-3/+7
| | | | metze
* s3:smbd: move more session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-1/+12
| | | | metze
* s3:smbd: move some session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-2/+7
| | | | metze
* s3:smbd: move already_got_session to struct smbd_server_connectionStefan Metzmacher2009-06-031-0/+2
| | | | metze
* s3:smbd: move max_recv to struct smbd_server_connectionStefan Metzmacher2009-06-031-1/+1
| | | | metze
* s3:smbd: allow SMB2 only if we don't use security = shareStefan Metzmacher2009-06-031-1/+2
| | | | metze
* s3:smbd: move SMB1 specific stuff into a substructure of smbd_server_connectionStefan Metzmacher2009-05-261-9/+9
| | | | metze
* s3:smbd: add infrastructure for SMB2 supportStefan Metzmacher2009-05-201-0/+12
| | | | | | | This is disabled by default and activated by "max protocol = SMB2". metze
* s3: Fix chained sesssetupAndX/tconn messagesTim Prouty2009-05-081-0/+7
| | | | | | | | A sesssetupAndX chained with a tconn will not correctly set the TID in the response header. I'm seeing an XP client send this chained sesssetup/tconn when samba has security = share. Samba's current behavior is to return a TID of 0 in the smb header rather than the actual TID. This patch also updates the UID in the header as well.
* s3:smbd: fix the fix for mapped IPv4 address handling in release_ip().Michael Adam2009-05-081-2/+2
| | | | | | It was too late... Thanks Metze for noticing. Michael
* s3: make release_ip() call (ctdb) cope with IPv4 mapped addressesMichael Adam2009-05-081-1/+8
| | | | Michael
* write_data already guarantees everything was writtenVolker Lendecke2009-04-121-9/+6
|
* s3:smbd: use new simplified snb_signing code in the serverStefan Metzmacher2009-03-231-15/+35
| | | | | | | | | We keep the seqnum/mid mapping in the smb_request structure. This also moves one global variable into the smbd_server_connection struct. metze
* s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 ↵Stefan Metzmacher2009-03-231-1/+1
| | | | | | | | too. Otherwise we'll confuse the client signing engine, when we reply an error to each transs2. metze
* make receive_smb_raw_talloc more readableTim Prouty2009-02-161-4/+4
|
* Noted by Vericode analysis. Correctly use chroot().Jeremy Allison2009-02-131-1/+5
| | | | Jeremy.
* S3: New module interface for SMB message statistics gatheringtodd stecher2009-02-091-16/+45
| | | | | | | This changelist allows for the addition of custom performance monitoring modules through smb.conf. Entrypoints in the main message processing code have been added to capture the command, subop, ioctl, identity and message size statistics.
* Fix memleaks in chain_reply for async requestsVolker Lendecke2009-02-071-0/+2
|
* Remove the global variable "chain_size"Volker Lendecke2009-01-311-2/+24
|
* s3:smbd: make kernel oplocks event drivenStefan Metzmacher2009-01-271-74/+0
| | | | | | And use signal events for Linux oplocks. metze
* s3:smbd: remove pointless respond_to_all_remaining_local_messages() functionStefan Metzmacher2009-01-271-25/+0
| | | | | | | This the process_kernel_oplock() function never response to messages, it only generates messages to ourself. metze
* s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLDStefan Metzmacher2009-01-271-14/+51
| | | | metze
* s3:smbd: move all code that handles a client connection into smbd_process()Stefan Metzmacher2009-01-271-6/+218
| | | | metze
* Fix chain_reply for pipe readsVolker Lendecke2009-01-251-1/+11
| | | | | | | | The caller might have over-allocated reply->outbuf. Deal with that. Sorry, Günther, for giving you so much pain ... Volker
* s3:smbd: we don't need to call message_dispatch() anymore it's event ↵Stefan Metzmacher2009-01-221-23/+2
| | | | | | triggered now metze
* s3:smbd: restructure kernel oplocks codeStefan Metzmacher2009-01-221-38/+6
| | | | | | | | This converts the irix oplocks code to use a fd event and removes the last special case for file descriptors for the main sys_select(). metze
* s3: always call run_events() before and after sys_select()Stefan Metzmacher2009-01-221-6/+4
| | | | | | And always setup the fd events. metze
* "userdom_struct" does not need "full_name" anymore -- unusedVolker Lendecke2009-01-201-2/+0
|
* s3:smbd: call message_dispatch() before processing incoming PDUsStefan Metzmacher2009-01-201-0/+6
| | | | | | | This is a hack to fix races which happen with the RAW-RENAME and RAW-OPLOCK tests. We should try to remove it later. metze
* remove the old chain_reply codeVolker Lendecke2009-01-161-214/+4
|
* Correctly calculate the offset for read&xVolker Lendecke2009-01-161-0/+19
|
* Add a new implementation of chain_replyVolker Lendecke2009-01-161-0/+217
| | | | | | This the global variable "orig_inbuf" in the old chain_reply code. This global variable was one of the reasons why we had the silly restriction to not allow async requests within a request chain.
* Fix a type-punned errorVolker Lendecke2009-01-101-1/+1
|
* Fix a C++ warningVolker Lendecke2009-01-101-2/+2
|
* s3:smbd: handle incoming smb requests via event handlersStefan Metzmacher2009-01-091-108/+155
| | | | | | | | | | We use a fd event and receive incoming smb requests when the fd becomes readable. It's not completely nonblocking yet, but it should behave like the old code. We use timed events to trigger retries for deferred open calls. metze
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-31/+1
| | | | | | The goal is to move all this variables into a big context structure. metze
* s3:events: change event_add_timed() prototype to match samba4Stefan Metzmacher2009-01-051-10/+17
| | | | metze
* Fix bug #6009 - Setting "min receivefile size = 1" breaks writes.Jeremy Allison2009-01-041-1/+1
| | | | Jeremy.
* Replace "goto again" by "return NT_STATUS_RETRY" in receive_message_or_smbVolker Lendecke2008-12-311-11/+13
| | | | This gives lower-level routines the chance to indicate a retry condition
* Remove the direct inbuf reference from construct_reply_common()Volker Lendecke2008-12-191-8/+11
|
* Make "construct_reply_common" staticVolker Lendecke2008-11-081-1/+3
|
* Fix the buildVolker Lendecke2008-11-051-1/+1
|
* Make "inbuf" a talloc child of "smb_request" for normal smb requestsVolker Lendecke2008-11-041-3/+2
| | | | | | This is necessary if we want to keep the whole smb_request for deferred ops. The explicit settings of req->inbuf will be removed once all those deferring operations are converted to store the whole request and not just the inbuf.