summaryrefslogtreecommitdiff
path: root/source4/smbd/process_standard.c
AgeCommit message (Collapse)AuthorFilesLines
2009-10-23s4-ldb: move the tdb_reopen_all() calls to ldb_wrap.cAndrew Tridgell1-8/+1
2009-10-23s4-server: call the ldb_wrap_fork_hook() after a fork()Andrew Tridgell1-0/+3
This will be used to allow us to cancel any pending transactions after a fork.
2009-09-19s4-smbd: minimise includes in smbd/ and smb_serverAndrew Tridgell1-2/+0
2009-08-07ensure that child tasks die when the parent diesAndrew Tridgell1-0/+24
Previously we relied on process groups and SIGTERM to ensure that child tasks died in the standard process model when the parent task died. This doesn't work when the server is run in interactive mode, as in that case we don't call become_daemon() and don't get a separate process group. The fix is to have a pipe held open by the parent server process, and inherited by child tasks. If the parent exits then the write side of the pipe is implicitly closed, which causes an event in the child tasks that causes them to exit
2009-02-02s4:smbd: s/private/private_dataStefan Metzmacher1-7/+7
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-9/+9
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-09-30Eliminate another global_loadparm.Jelmer Vernooij1-2/+3
2008-09-16Use single copy of tdb in both samba3 and samba4.Jelmer Vernooij1-1/+1
2008-06-14Use a custom init function for samba4 that sets a samba4Simo Sorce1-2/+2
specific debug function. By default do not debug, this is the most appropriate action for a library as we cannot assume what stderr is use for in the main app. The main app is responsible to set ev_debug_stderr if they so desire. (This used to be commit e566a2f308ac6fb4b526a744f7059b565670aea5)
2008-04-01Add context pointer to secrets functions.Jelmer Vernooij1-3/+0
(This used to be commit 873941d8a8dca8e7ace83f9af9939e4264f78c96)
2008-02-04Remaining changes to implement the prefork process modelAndrew Bartlett1-5/+6
To use, run 'smbd -M prefork' By default, only the smb service is preforked. 4 children are created, and all listen for new connections. The Linux Kernel 'wake one' behaviour should ensure that only one is given the oportunity to accept. We need to look into the ideal number of worker children, as well as load balancing behaviours. To change, set: prefork children : smb = 6 valid service names (smb in this example) match those in 'server services'. Andrew Bartlett and David Disseldorp (This used to be commit 35313c0aa3fbfdd943edfb7bafd7645b1a0c54e9)
2008-01-05r26672: Janitorial: Remove uses of global_loadparm.Jelmer Vernooij1-4/+7
(This used to be commit 18cd08623eaad7d2cd63b82ea5275d4dfd21cf00)
2007-12-21r26429: Avoid use of global_smb_iconv_convenience.Jelmer Vernooij1-1/+1
(This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c)
2007-12-21r26322: Fix includeJelmer Vernooij1-0/+1
(This used to be commit 97443169378c18f9a7c522749a37f4f850a1305f)
2007-12-21r26278: Tallocify convenience table for iconv handles.Jelmer Vernooij1-2/+2
(This used to be commit ad64b3baa4a5383c603d17ae75c33083af4690bb)
2007-12-21r26260: Store loadparm context in gensec context.Jelmer Vernooij1-2/+2
(This used to be commit b9e3a4862e267be39d603fed8207a237c3d72081)
2007-10-10r24994: Fix some C++ warnings.Jelmer Vernooij1-1/+1
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r20646: first preparations for cluster enablement. This changes "Andrew Tridgell1-5/+5
uint32_t server_id to struct server_id server_id; which allows a server ID to have an node number. The node number will be zero in non-clustered case. This is the most basic hook needed for clustering, and ctdb. (This used to be commit 2365abaa991d57d68c6ebe9be608e01c907102eb)
2007-10-10r19610: fix the buildStefan Metzmacher1-1/+2
metze (This used to be commit 59fe6cfaba2eb39cb5ff33110e830c4c9b21fb95)
2007-10-10r19604: This is a massive commit, and I appologise in advance for it's size.Andrew Bartlett1-7/+0
This merges Samba4 with lorikeet-heimdal, which itself has been tracking Heimdal CVS for the past couple of weeks. This is such a big change because Heimdal reorganised it's internal structures, with the mechglue merge, and because many of our 'wishes' have been granted: we now have DCE_STYLE GSSAPI, send_to_kdc hooks and many other features merged into the mainline code. We have adapted to upstream's choice of API in these cases. In gensec_gssapi and gensec_krb5, we either expect a valid PAC, or NO PAC. This matches windows behavour. We also have an option to require the PAC to be present (which allows us to automate the testing of this code). This also includes a restructure of how the kerberos dependencies are handled, due to the fallout of the merge. Andrew Bartlett (This used to be commit 4826f1735197c2a471d771495e6d4c1051b4c471)
2007-10-10r19573: Move secrets.o into param/ (subsystems haven't been integrated yet).Jelmer Vernooij1-1/+1
(This used to be commit 8143de855c0b65346b2d8e59ecdb78952927de4a)
2007-10-10r15277: - fix the build on netbsd, where stdlib.h has the setproctitle() ↵Stefan Metzmacher1-2/+3
prototype but --with-setproctitle wasn't used metze (This used to be commit 0754154f5154e8285608c7f17e15aa223f04adea)
2007-10-10r15273: fix setproctitle supportStefan Metzmacher1-6/+10
metze (This used to be commit 35936fd4743554bb4ba9b2f61ec3651762189bee)
2007-10-10r15212: Simplify setproctitle codeJelmer Vernooij1-6/+7
(This used to be commit 555ca1df1c57e5798e75b19f66b62b253a066e21)
2007-10-10r15100: Port the bugfix for #3569 to Samba4Volker Lendecke1-2/+2
(This used to be commit 5f1d52f232051324082b840f29dd7719a9328bd5)
2007-10-10r14736: - the ntvfs subsystem should not know about smb_server.hStefan Metzmacher1-1/+1
- the process module subsystem should not know about smb_server.h - the smb_server module should not know about process models metze (This used to be commit bac95bb8f4ad35a31ee666f5916ff9b2f292d964)
2007-10-10r14079: I just found the setproctitle library from alt linux:-)Stefan Metzmacher1-2/+37
- add set_title hook to the process models - use setproctitle library in process_model standard if available - the the title for the task servers and on connections metze (This used to be commit 526f20bbecc9bbd607595637c15fc4001d3f0c70)
2007-10-10r13938: Around round of splitupsJelmer Vernooij1-1/+3
(This used to be commit 2d655f05285a86bb1bbb882e4dd843def15c9dfa)
2007-10-10r12815: try to fix the build on AIXStefan Metzmacher1-0/+1
metze (This used to be commit 21bc072c7addafc6f692fb8e998bd4dd9ab88b49)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-2/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r12267: Try to avoid segfault in kerberos libs, because we talloc_free()'edAndrew Bartlett1-0/+6
the old event context in the standard process modal child. Andrew Bartlett (This used to be commit 0f52a9ab071c181c7f764adc8be83e162e649931)
2007-10-10r10920: in case of a accept() failure just failing and trying again is noAndrew Tridgell1-0/+3
good, as it is probably a resource constraint, so if we just try again we will spin (as the incoming socket will still be readable). Using a sleep(1) solves this by throtting smbd until the resource constraint goes away. if the resource constraint doesn't go away, then at least smbd won't be spinning chewing cpu (This used to be commit 7a5a9da477186b5e4fdb34ec64cc97915de4fd8e)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell1-0/+1
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell1-0/+1
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r5197: moved events code to lib/events/ (suggestion from metze)Andrew Tridgell1-1/+1
(This used to be commit 7f54c8a339f36aa43c9340be70ab7f0067593ef2)
2007-10-10r5104: - added support for task based servers. These are servers that withinAndrew Tridgell1-4/+54
themselves are run as a single process, but run as a child of the main process when smbd is run in the standard model, and run as part of the main process when in the single mode. - rewrote the winbind template code to use the new task services. Also fixed the packet queueing - got rid of event_context_merge() as it is no longer needed (This used to be commit 339964a596689278d2138cff05d7d444798a3504)
2007-10-10r5102: This is a major simplification of the logic for controlling top levelAndrew Tridgell1-119/+40
servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e)
2007-10-10r4728: split up server_services into:Stefan Metzmacher1-27/+88
- stream_socket services the smb, ldap and rpc service which sets up a srtam socket end then waits for connections and - task services which this you can create a seperate task that do something (this is also going through the process_model subsystem so with -M standard a new process for this created with -M thread a new thread ... I'll add datagram services later when we whave support for datagram sockets in lib/socket/ see the next commit as an example for service_task's metze (This used to be commit d5fa02746c6569b09b6e05785642da2fad3ba3e0)
2007-10-10r3737: - Get rid of the register_subsystem() and register_backend() functions.Jelmer Vernooij1-1/+1
- Re-disable tdbtool (it was building fine on my Debian box but other machines were having problems) (This used to be commit 0d7bb2c40b7a9ed59df3f8944133ea562697e814)
2007-10-10r3507: - added deferred replies on sharing violation in pvfs open. TheAndrew Tridgell1-1/+1
deferred reply is short-circuited immediately when the file is closed by another user, allowing it to be opened by the waiting user. - added a sane set of timeval manipulation routines - converted all the events code and code that uses it to use struct timeval instead of time_t, which allows for microsecond resolution instead of 1 second resolution. This was needed for doing the pvfs deferred open code, and is why the patch is so big. (This used to be commit 0d51511d408d91eb5f68a35e980e0875299b1831)
2007-10-10r3481: split out client.h and events.hAndrew Tridgell1-0/+1
(This used to be commit c6f486574470a311e0d336c026103f131451e21e)
2007-10-10r3466: split out request.h, signing.h, and smb_server.hAndrew Tridgell1-0/+2
(This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e)
2007-10-10r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ↵Andrew Tridgell1-0/+1
ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a)
2007-10-10r3356: in the standard process model we need to make sure we close allAndrew Tridgell1-2/+7
listening sockets after the fork to prevent the child still listening on incoming requests. I have also added an optimisation where we use dup()/close() to lower the file descriptor number of the new socket to the lowest possible after closing our listening sockets. This keeps the max fd num passed to select() low, which makes a difference to the speed of select(). (This used to be commit f2a9bbc317ba86ebe87c3ca27a3a0192de91014d)
2007-10-10r3314: added a option "socket:testnonblock" to the generic socket code. IfAndrew Tridgell1-1/+1
you set this option (either on the command line using --option or in smb.conf) then every socket recv or send will return short by random amounts. This allows you to test that the non-blocking socket logic in your code works correctly. I also removed the flags argument to socket_accept(), and instead made the new socket inherit the flags of the old socket, which makes more sense to me. (This used to be commit 406d356e698da01c84e8aa5b7894752b4403f63c)
2007-10-10r3181: shutdown the secrets db on exit so we don't constantly get talloc ↵Andrew Tridgell1-0/+3
leak warnings (This used to be commit 11713da2efc6d45c5594289efa0b6c0e594e6d2e)
2007-10-10r3012: added initial support for byte range locking in the posix vfs. This isAndrew Tridgell1-1/+1
enough for us to pass locktest, but does not yet support lock timeouts and some of the other esoteric features. (This used to be commit 58a92abd88f190bc60894a68e0528e95ae33fe39)
2007-10-10r2723: fix some debug messagesStefan Metzmacher1-2/+2
metze (This used to be commit 9600c1a2c7789ebfb0a06cf21772cdacab0fb356)
2007-10-10r2654: fixed some more server memory leaks. We are now down to a single leakAndrew Tridgell1-0/+4
of 16 bytes, caused by the 16 byte data_blob in the smb_signing code. (This used to be commit 2f1b788e09686e065d22f621f5c0c585192c6740)