summaryrefslogtreecommitdiffstats
path: root/source/smbd/process.c
Commit message (Collapse)AuthorAgeFilesLines
* r24957: Merge 21867, 21869, 21870 and 21871:Volker Lendecke2007-09-041-59/+23
| | | | | | | | | | | | | Simplify calling convention of timeout_processing. lp_deadtime is only referenced in conn_idle_all(). Move sending keepalives out of the main processing loop into idle event. On the way, make lp_keepalive() a proper parameter. Move sending auth_server keepalives out of the main loop into an idle event. Move deadtime processing into an idle event. While there, simplify conn_idle_all() a bit.
* r24956: Merge r21879:Volker Lendecke2007-09-041-7/+1
| | | | | | | | | | | | | | | | | | Move process_blocking_lock_queue to a timed event. The idea is that we have blocking.c:brl_timeout as a timed event that is present whenever we do have a blocking lock pending. It fires brl_timeout_fn() which calls process_blocking_lock_queue(). Whenever we make changes to blocking_lock_queue, we trigger a recalc_brl_timeout() which sets a new brl_timout event if necessary. This makes the call to blocking_locks_timeout_ms() in setup_select_timeout() unnecessary, this is implicitly done in event_add_to_select_args() from the timed events. Volker
* r24950: Merge r21784Volker Lendecke2007-09-041-3/+0
| | | | | | | Replace smb_register_idle_event() with event_add_timed(). This fixes winbind which did not run the idle events to drop ldap connections. Volker
* r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke2007-08-301-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-08-271-495/+308
|
* r24660: Merge the inbuf/outbuf changesVolker Lendecke2007-08-251-382/+691
|
* r23990: Reformatting for 80 cols and trailing whitespaceVolker Lendecke2007-07-221-11/+18
|
* r23988: Looks a lot more scary than it is: This just unwraps the else-branch of Volker Lendecke2007-07-211-67/+74
| | | | | | | if (smb_messages[type].fn == NULL) { into the function top-level. Makes this function a bit easier to understand IMO. Volker
* r23987: Remove static pid in switch_message()Volker Lendecke2007-07-211-5/+3
| | | | | There's no point in duplicating functionality that exists in sys_getpid() that also only used in a debug statement
* r23813: Remove unused global variableVolker Lendecke2007-07-101-5/+0
|
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-07-101-2/+1
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-091-1/+1
| | | | Jeremy.
* r23740: Merge r23725 from 3_0:Volker Lendecke2007-07-071-9/+0
| | | | Remove get_current_mid()
* r23739: Merge r23724 from 3_0 without the accidential checkin:Volker Lendecke2007-07-071-0/+12
| | | | | | | | Reduce access to the global inbuf a tiny bit. Add a struct smb_request that contains some of the fields from the SMB header, removing the need to access inbuf directly. This right now is used only in the open file code & friends, and creating that header is only done when needed. This needs more work, but it is a start.
* r23537: Revert the inbuf/outbuf part of r23528: This caused the Solaris CC ↵Volker Lendecke2007-06-181-10/+54
| | | | | | | | | | | | | make test to break. The Solaris CC put the static char InBuffer[TOTAL_BUFFER_SIZE] on an odd address, the malloc'ed one is always aligned. The problem showed up in pull_ucs2, ucs2_align uses the address of InBuffer as an indication whether to bump up the src of the string by one. Unfortunately in the trans calls the data portion is malloced and thus has different alignment guarantees than a static variable. This one is bigger.... Volker
* r23528: Two changes to make the valgrind massif (heap profiler) output readable:Volker Lendecke2007-06-171-54/+10
| | | | | | | | | | | | | Remove the allocated inbuf/output. In async I/O we copy the buffers explicitly now, so NewInBuffer is called exactly once. This does not reduce memory footprint, but removes one of the larger chunks that clobber the rest of the massif output In getgroups_unix_user on Linux 2.6 we allocated 64k groups x 4 bytes per group x 2 (once in the routine itself and once in libc) = 512k just to throw it away directly again. This reduces it do a more typical limit of 32 groups per user. We certainly cope with overflow fine if 32 is not enough. Not 100% sure about this one, a DEVELOPER only thing?
* r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'mVolker Lendecke2007-05-211-1/+1
| | | | | | | | | | | doing this because for the clustering the marshalling is needed in more than one place, so I wanted a decent routine to marshall a message_rec struct which was not there before. Tridge, this seems about the same speed as it used to be before, the librpc/ndr overhead in my tests was under the noise. Volker
* r22868: Replace some message_send_pid calls with messaging_send_pid calls. MoreVolker Lendecke2007-05-141-3/+3
| | | | tomorrow.
* r22691: Fix a 64-bit warning and a const const discard warningVolker Lendecke2007-05-051-4/+3
|
* r22145: Fix bug #4494 - reported by Kevin Jamieson <bugzilla@kevinjamieson.com>.Jeremy Allison2007-04-091-2/+2
| | | | | If returning a mapped UNIX error from sendfile, don't call chain_reply. Jeremy.
* r21731: Fix long-standing bug in our chain processing code.Jeremy Allison2007-03-071-3/+20
| | | | | | Should fix a bug with WinPE. Probably a candidate for the Vista patchset. Jeremy.
* r21479: Merge Volker's code simplification for the AIOJeremy Allison2007-02-211-38/+2
| | | | | paths. Jeremy.
* r21322: No feedback means consent :-)Volker Lendecke2007-02-131-55/+35
| | | | | | | | | | | It does not matter if I screw up 3.0.25 or 3.0.26 with this, so do it rather sooner than later. Add the notify support that already exists in 3_0 to 3_0_25. If you want to see this patch dissected into digestable parts, look at 3_0, revisions at about 20800 and following. Volker
* r21166: Ensure we return the correct "EROFS" error on a non-writableJeremy Allison2007-02-051-1/+1
| | | | | filesystem. Jeremy.
* r20742: Rename chkpth -> checkpath for sanity's sake :-).Jeremy Allison2007-01-131-1/+1
| | | | | | Start removing unneeded "BOOL ok" from this reply.c (this logic is old, old, old..... :-). Jeremy.
* r20719: Sync up the changes in the fileserver code between SAMBA_3_0.Jeremy Allison2007-01-121-1/+14
| | | | | copy now returns NTSTATUS, part of close does the same. Jeremy.
* r19810: more merge work....does not compile currently. Working on smbd mergeGerald Carter2006-11-211-70/+15
|
* r19801: grabbing minor changes (some missing pieces from jmcd's SAMR work as ↵Gerald Carter2006-11-201-0/+9
| | | | well)
* r19782: more compile fixes for mergeGerald Carter2006-11-191-2/+1
|
* r16418: Pull in more Klocwork fixes (up to r16415)Gerald Carter2006-06-201-38/+36
|
* r15837: starting sync up for 3.0.23rc1 (in sync with SAMBA_3_0 r15822)Gerald Carter2006-05-231-1/+0
|
* r15088: Remove all time() and gettimeofday() calls out of the mainlineJeremy Allison2006-04-151-4/+0
| | | | | | packet processing code. Only do these when needed (ie. in the idle timeout code). We drop an unneccessary global here too. Jeremy.
* r15084: Try and squeeze more out of the non-read/write code path.Jeremy Allison2006-04-141-3/+12
| | | | Jeremy.
* r15030: On a performace hunt... Remove as many extraneousJeremy Allison2006-04-111-8/+4
| | | | | memset's as possible. Jeremy.
* r15022: Fix core dumps on normal server exit.Jeremy Allison2006-04-101-4/+4
| | | | Jeremy.
* r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison2006-04-101-13/+18
| | | | | | | | into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy.
* r14898: This change is an attempt to improve the quality of the information thatJames Peach2006-04-041-1/+1
| | | | | | | | | | | | | | | | | is produced when a process exits abnormally. First, we coalesce the core dumping code so that we greatly improve our odds of being able to produce a core file, even in the case of a memory fault. I've removed duplicates of dump_core() and split it in two to reduce the amount of work needed to actually do the dump. Second, we refactor the exit_server code path to always log an explanation and a stack trace. My goal is to always produce enough log information for us to be able to explain any server exit, though there is a risk that this could produce too much log information on a flaky network. Finally, smbcontrol has gained a smbd fault injection operation to test the changes above. This is only enabled for developer builds.
* r14559: Oplocks have changed, process_smb can be static againVolker Lendecke2006-03-191-3/+2
|
* r14229: Something Coverity hasn't caught (yet) but I've gottenJeremy Allison2006-03-121-3/+5
| | | | | | sensitive to null derefs. get_timed_events_timeout() can potentially return NULL. Cope with this. Jeremy.
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2006-02-201-8/+8
| | | | macro which sets the freed pointer to NULL.
* r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.Jeremy Allison2006-02-141-6/+6
| | | | Jeremy.
* r13482: Push the FAM notification file descriptor into the selectJames Peach2006-02-131-5/+20
| | | | set to avoid unnecessary polling.
* r13316: Let the carnage begin....Gerald Carter2006-02-031-111/+4
| | | | Sync with trunk as off r13315
* r10656: BIG merge from trunk. Features not copied overGerald Carter2005-09-301-187/+270
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r10188: 64-bit warning fix.Jeremy Allison2005-09-121-1/+1
| | | | Jeremy.
* r9126: Fix valgrind bug Volker found in interaction with new aio bufferJeremy Allison2005-08-051-0/+4
| | | | | flipping and oplocks. Jeremy.
* r8798: Save one system call per SMB. smb_run_idle_events right now is only ↵Volker Lendecke2005-07-271-4/+0
| | | | | | | | | used to close idle pdb_ldap connections, and from my point of view this can wait until normal timeout handling, this does not need to be done per client request. Volker
* r8782: Fix bug #2918. The problem was using Inbuffer to push a deferred open ↵Jeremy Allison2005-07-261-5/+7
| | | | | | | | | message onto the queue when we're in a chained message set - we're actually processing a different buffer then. Added current_inbuf as a static inside smbd/process.c to ensure the correct message gets pushed and processed. Jeremy.
* r7963: Add aio support to 3.0.Jeremy Allison2005-06-271-13/+98
| | | | Jeremy.
* r7961: randomize reloading so that smbds do not pverload cupsdSimo Sorce2005-06-271-0/+10
| | | | | by reloading printers all at the same time. sss