summaryrefslogtreecommitdiffstats
path: root/source4/smbd/process_single.c
Commit message (Collapse)AuthorAgeFilesLines
* s4-process_single: Use pid,task_id as cluster_id in process_single just like ↵Andrew Bartlett2013-01-261-8/+13
| | | | | | | | | | | | | | | | process_prefork This avoids two different process single task servers (eg the drepl server) sharing the same server id. The task id starts at 2^31 to avoid collision with the fd based scheme for connections. Fix-bug: https://bugzilla.samba.org/show_bug.cgi?id=9598 Reported-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jan 26 16:13:05 CET 2013 on sn-devel-104
* bug9598: s4-process_single: Use pid,fd as cluster_id in process_single just ↵Andrew Bartlett2013-01-251-3/+8
| | | | | | | | | | | | | | | | like process_prefork This avoids two different process single servers (say LDAP and the RPC server) sharing the same server id. Fix-bug: https://bugzilla.samba.org/show_bug.cgi?id=9598 Reported-by: Matthieu Patou <mat@matws.net> Reviewed-by: Matthieu Patou <mat@matws.net> Signed-off-by: Andrew Bartlett <abartlett@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Jan 25 12:00:04 CET 2013 on sn-devel-104
* s4:smbd: fix typosMichael Adam2012-06-121-1/+1
| | | | | Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Jun 12 09:21:15 CEST 2012 on sn-devel-104
* source4/smbd: Fix prototypes for all functions.Jelmer Vernooij2011-03-191-0/+2
|
* s4-smbd: don't initialise process models more than onceAndrew Tridgell2010-10-301-1/+1
| | | | | | | | | this also removes the event_context parameter from process model initialisation. It isn't needed, and is confusing when a process model init can be called from more than one place, possibly with different event contexts. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell2010-07-161-3/+3
| | | | | | | this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* More spelling fixes across source4/Brad Hards2010-02-221-1/+1
| | | | Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
* s4-debug: lower the verbosity of a couple of common log messagesAndrew Tridgell2010-01-091-1/+1
|
* s4-server: kill main daemon if a task fails to initialiseAndrew Tridgell2009-09-181-1/+3
| | | | | | When one of our core tasks fails to initialise it can now ask for the server as a whole to die, rather than limping along in a degraded state.
* s4:smbd: s/private/private_dataStefan Metzmacher2009-02-021-5/+5
| | | | metze
* s4:lib/tevent: rename structsStefan Metzmacher2008-12-291-7/+7
| | | | | | | | | | | | | | | | | | | | 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
* Eliminate another global_loadparm.Jelmer Vernooij2008-09-301-1/+1
|
* Clarify nomaclature of socket names in process_single and process_preforkAndrew Bartlett2008-02-051-5/+6
| | | | | | | | | | | Fix talloc_steal in both cases to steal connected socket (from accept) onto it's private structure, rather than stealing the bound socket. Remove termination code from the prefork modal, we want the process to still stay around, to serve future clients. Andrew Bartlett and David Disseldorp (This used to be commit 07590d893e993919cf6cb7582310777f534e756f)
* Rework process_single.c to take advantage of cluster_id() now taking an ↵Andrew Bartlett2008-02-041-9/+22
| | | | | | | additional argument. Andrew Bartlett and David Disseldorp (This used to be commit c961e7d74e33a0dd61b1053620fb41521322e20d)
* r26672: Janitorial: Remove uses of global_loadparm.Jelmer Vernooij2008-01-051-4/+8
| | | | (This used to be commit 18cd08623eaad7d2cd63b82ea5275d4dfd21cf00)
* r24937: Merge tests spoolss RPC callbacks.Jelmer Vernooij2007-10-101-1/+1
| | | | (This used to be commit 9b256a0ca232ea6e89771bf73a1adf877273a752)
* r23792: convert Samba4 to GPLv3Andrew Tridgell2007-10-101-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)
* r20646: first preparations for cluster enablement. This changes "Andrew Tridgell2007-10-101-4/+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)
* r19610: fix the buildStefan Metzmacher2007-10-101-0/+1
| | | | | metze (This used to be commit 59fe6cfaba2eb39cb5ff33110e830c4c9b21fb95)
* r19604: This is a massive commit, and I appologise in advance for it's size.Andrew Bartlett2007-10-101-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)
* r18805: make error message match function nameAndrew Tridgell2007-10-101-1/+1
| | | | (This used to be commit e46d8ed53f8eb4ba596ab6fc1924eb7f1829a3df)
* r14736: - the ntvfs subsystem should not know about smb_server.hStefan Metzmacher2007-10-101-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)
* r14079: I just found the setproctitle library from alt linux:-)Stefan Metzmacher2007-10-101-0/+6
| | | | | | | | | - 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)
* r12815: try to fix the build on AIXStefan Metzmacher2007-10-101-0/+1
| | | | | metze (This used to be commit 21bc072c7addafc6f692fb8e998bd4dd9ab88b49)
* r12608: Remove some unused #include lines.Jelmer Vernooij2007-10-101-3/+0
| | | | (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
* r12267: Try to avoid segfault in kerberos libs, because we talloc_free()'edAndrew Bartlett2007-10-101-0/+5
| | | | | | | the old event context in the standard process modal child. Andrew Bartlett (This used to be commit 0f52a9ab071c181c7f764adc8be83e162e649931)
* r10920: in case of a accept() failure just failing and trying again is noAndrew Tridgell2007-10-101-0/+8
| | | | | | | | | | | 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)
* r6530: the server ID of a connection in the single process model should beAndrew Tridgell2007-10-101-1/+1
| | | | | | | based on the new socket fd, not the listening socket! this fixes locktest with -M single (This used to be commit 3e1b2742db818629fb79d12d40279db8dd575279)
* r5411: make network interface selection a bit sanerAndrew Tridgell2007-10-101-0/+1
| | | | | | | | | | | | - if we have no configured network interfaces, then don't start nbtd (when I add dynamic interface loading this will change to a delay until a network interface comes up) - choose the best interface by netmask for torture tests that need a specific IP (such as the WINS test). Added iface_best_ip() for that. - if specific interfaces are chosen in smb.conf, then keep that ordering, and default to the first one listed (This used to be commit 4d08c114079ef6d1d10a96195046fe43631aefa2)
* r5197: moved events code to lib/events/ (suggestion from metze)Andrew Tridgell2007-10-101-1/+1
| | | | (This used to be commit 7f54c8a339f36aa43c9340be70ab7f0067593ef2)
* r5104: - added support for task based servers. These are servers that withinAndrew Tridgell2007-10-101-3/+15
| | | | | | | | | | | | 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)
* r5102: This is a major simplification of the logic for controlling top levelAndrew Tridgell2007-10-101-81/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* r4728: split up server_services into:Stefan Metzmacher2007-10-101-24/+47
| | | | | | | | | | | | | | | | | | | - 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)
* r3737: - Get rid of the register_subsystem() and register_backend() functions.Jelmer Vernooij2007-10-101-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)
* r3523: removed a useless level 0 DEBUG()Andrew Tridgell2007-10-101-1/+1
| | | | (This used to be commit b36967466fea6a67cc35ceaedaf82050705b1a88)
* r3507: - added deferred replies on sharing violation in pvfs open. TheAndrew Tridgell2007-10-101-2/+3
| | | | | | | | | | | | | 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)
* r3481: split out client.h and events.hAndrew Tridgell2007-10-101-0/+1
| | | | (This used to be commit c6f486574470a311e0d336c026103f131451e21e)
* r3466: split out request.h, signing.h, and smb_server.hAndrew Tridgell2007-10-101-0/+2
| | | | (This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e)
* r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ↵Andrew Tridgell2007-10-101-0/+1
| | | | | | ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a)
* r3314: added a option "socket:testnonblock" to the generic socket code. IfAndrew Tridgell2007-10-101-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)
* r3012: added initial support for byte range locking in the posix vfs. This isAndrew Tridgell2007-10-101-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)
* r2648: - use a destructor on struct server_connection to simplify theAndrew Tridgell2007-10-101-9/+1
| | | | | | | | | connection termination cleanup, and to ensure that the event contexts are properly removed for every process model - gave auth_context the new talloc treatment, which removes another source of memory leaks. (This used to be commit 230e1cd777b0fba82dffcbd656cfa23c155d0560)
* r2646: - use a talloc destructor to ensure that sockets from the new socketAndrew Tridgell2007-10-101-0/+2
| | | | | | | library are closed on abnormal termination - convert the service.h structures to the new talloc methods (This used to be commit 2dc334a3284858eb1c7190f9687c9b6c879ecc9d)
* r2588: connect/disconnect is common enough that I don't think a level 0 DEBUGAndrew Tridgell2007-10-101-1/+1
| | | | | is warranted to warn that it has happened :) (This used to be commit ee51eefe17576496dfd091ed7e7783caff574090)
* r2447: let the server code use the new lib/socket/ stuffStefan Metzmacher2007-10-101-8/+7
| | | | | metze (This used to be commit 2fd577d2417e117a7e8c1a56feb147eae805df34)
* r1516: remove the server_connection from the list on the server_socketStefan Metzmacher2007-10-101-2/+12
| | | | | | | | | and call talloc_destroy(srv_conn->mem_ctx) also don't follow NULL pointers metze (This used to be commit 786c00c3d4f510c870a45f11af69281298ba176d)
* r1515: move dublicate code to a functionStefan Metzmacher2007-10-101-58/+3
| | | | | metze (This used to be commit a8ec53c81ad939156654c9ad99a53aa2d679f711)
* r1514: close stuff from the server_connection not in theStefan Metzmacher2007-10-101-0/+3
| | | | | | | close_connection fn of a specific service metze (This used to be commit 0e1f5e66d37deb7a77ae9f545e60685428fd9d21)
* r1486: commit the start of the generic server infastructureStefan Metzmacher2007-10-101-42/+77
| | | | | | | | | | | | | | | | | | | the idea is to have services as modules (smb, dcerpc, swat, ...) the process_model don't know about the service it self anymore. TODO: - the smbsrv should use the smbsrv_send function - the service subsystem init should be done like for other modules - we need to have a generic socket subsystem, which handle stream, datagram, and virtuell other sockets( e.g. for the ntvfs_ipc module to connect to the dcerpc server , or for smb or dcerpc or whatever to connect to a server wide auth service) - and other fixes... NOTE: process model pthread seems to be broken( but also before this patch!) metze (This used to be commit bbe5e00715ca4013ff0dbc345aa97adc6b5c2458)
* r1291: rename struct smbsrv_context to smbsrv_connectionStefan Metzmacher2007-10-101-3/+3
| | | | | | | | | | | | because this is the connection state per transport layer (tcp) connection I also moved the substructs directly into smbsrv_connection, because they don't need a struct name and we should allway pass the complete smbsrv_connection struct into functions metze (This used to be commit 60f823f201fcedf5473008e8453a6351e73a92c7)