summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2011-08-10s3-spoolss: Fix printers related messagingSimo Sorce1-4/+34
Children were not properly receiving messages to reload printers when the background queue process was dispatching them. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Fix use of child id.Simo Sorce2-12/+11
Children Ids must start at 1 as 0 represent the father. Also fix callbacks that restart logs to use a procedd global variable that holds the Id so that they work correctly both fot the parent process and the children. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: make sure to block SIGHUP ...Simo Sorce2-4/+39
... until we are ready to handle it. Also make us ready as early as possible in spoolssd. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolss: Use a global variable for the poolSimo Sorce1-60/+31
This allows for setting up signal handlers earlier which is needed for the following patch. It also simplify the code in a few places. After all we never have more than pool active at any time during spoolssd life span. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Allow bq process to have own logfileSimo Sorce3-26/+55
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolssd: Use the child_id to open log filesSimo Sorce1-15/+43
This way each child has its own log file and avoid mixing all logs form all children in the same parent log file. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Pass the child a child_idSimo Sorce3-2/+4
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Force pcap reload when all readySimo Sorce4-5/+18
This way we are sure the cache is primed properly and messages can be sent to processes if necessary as all messaging has been set up. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Return tsocket_address for client and serverSimo Sorce3-32/+68
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Pass messaging context around tooSimo Sorce3-20/+59
Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Set up a SIGCHLD handler by defaultSimo Sorce3-52/+94
We need to properly handle preforked children so it is better to just do that automatically. If the parent needs/wants to intercept SIGCHLD events it can set a callback that will be called by the prefork code once the internal cleanup function that checks all prefork children has been executed. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3:spoolssd Start spoolssd from printing_subsystem_initSimo Sorce4-41/+70
Use a child for the background updater process Forward printer update messages from spoolss to background update process. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Rework how the background process is startedSimo Sorce6-21/+42
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Provide a cleanup functionSimo Sorce3-28/+25
This way the parent doesn't need to know how to handle dead children and keeps all of that within the prefork abstraction. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Inline Doxygen DocumentationSimo Sorce1-0/+160
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: better timing out semanticsSimo Sorce1-4/+14
If this child has no clients, let the lock functions block for 1 second, and then immediately reschedule the operation. This means we catch the lock as soon as possible on a free child. If, instead, we are already serving a client, we want to be non blocking, so we timeout immediately on getting the lock, and then we sleep a 1/10th of a second. This means that a busy child will be slightly slower on picking up the lock, but we won't block the existing client from communicating with us as we immediately react to activity on the already opened file handler. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: add support for multiple listning file descriptorsSimo Sorce3-95/+84
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolssd: propagate SIGHUP to childrenSimo Sorce1-11/+34
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: provide way to send a signal to all childrenSimo Sorce2-0/+15
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolssd: expand children pool when necessarySimo Sorce1-7/+34
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: provide means to expand the pool sizeSimo Sorce2-0/+33
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolssd: Use parametric option for prefork parametersSimo Sorce1-12/+48
example: spoolssd:prefork = 10:100:5 will configure spoolssd to start with a minimum of 10 preforked children, a max set to 100 children and spawns/retires 5 children at a time when ramping up/scaling down. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolss: make listening asynchronousSimo Sorce1-26/+60
This also allows to make each children serve more than one client at the same time if necessary. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolssd: Use the prefork framework in spoolssdSimo Sorce1-3/+425
This should make it more scalable and able to handle easily multiple clients at the same time. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-rpc_server: add termination functionSimo Sorce2-3/+23
This way we can act when a client disconnects. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-rpc: Expose some internal functionsSimo Sorce2-33/+44
This will allow to hook the prefork socket handlers to the rpc service. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: add way to manage number of clients per childSimo Sorce2-3/+38
The allowed_clients var is a parent managed variable that tell children how many clients they are allowed to handle at the same time. This way children can overcommit but within parent controlled limits. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: add asynchronous functionsSimo Sorce2-1/+267
To get a client connection it is now possible to use asynchronous functions. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: implement prefork frameworkSimo Sorce4-0/+580
Primarily built for forked off rpc service daemons, but not tied to rpc services and generic enough to be used elsewhere easily. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: No need to register to smbd's children listSimo Sorce1-19/+0
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10lib-util: Make useful function a common utility.Simo Sorce1-26/+0
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3: Remove an unnecessary includeVolker Lendecke1-1/+0
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Aug 10 18:10:39 CEST 2011 on sn-devel-104
2011-08-10s3:idmap_tdb2: fix bug 8368 : correctly initialize "idmap config * : script" ↵Michael Adam1-1/+1
with NULL this fixes the fallback to the deprecated spelling idmap:script Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Aug 10 14:59:32 CEST 2011 on sn-devel-104
2011-08-10s3:libsmb: make cli_session_setup_spnego() staticStefan Metzmacher2-6/+4
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Aug 10 12:31:55 CEST 2011 on sn-devel-104
2011-08-10s3:winbindd_cm: use cli_session_setup() instead of cli_session_setup_spnego()Stefan Metzmacher1-15/+18
metze
2011-08-10s3:libsmb: pass remote_realm to cli_session_setup_spnego() in ↵Stefan Metzmacher1-1/+3
cli_session_setup() metze
2011-08-10s3:libsmb: store the remote_realm on the cli_stateStefan Metzmacher5-2/+20
metze
2011-08-10s3:smb_macros.h: simplify _smb_setlen() and _smb_setlen_large()Stefan Metzmacher1-6/+4
This also takes care of the correct casting. metze
2011-08-10s3:include: smb.h base old smb header offsets on new definesStefan Metzmacher1-32/+32
metze
2011-08-10s3:include: smb.h merge some stuff from source4Stefan Metzmacher1-0/+35
metze
2011-08-10Revert "s3:test_async_echo: unsure the desired smb message sequence"Stefan Metzmacher1-10/+0
This reverts commit 34faeb8bba86fff57466c06682b7dcbffc48a52a. This is not needed anymore. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Aug 10 09:54:24 CEST 2011 on sn-devel-104
2011-08-09s3:vfs_prealloc: fix build on SLES8Björn Jacke1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Tue Aug 9 19:29:08 CEST 2011 on sn-devel-104
2011-08-09s3:libsmb/cli*: use CLI_BUFFER_SIZE instead of cli->max_xmitStefan Metzmacher4-14/+14
The max_data parameter of trans2/nttrans calls are not bound to cli->max_xmit. Even with cli->max_xmit, which means the max size of the whole SMB pdu, we would get fragmented trans2/nttrans replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Aug 9 18:14:38 CEST 2011 on sn-devel-104
2011-08-09s3:torture/*: use CLI_BUFFER_SIZE instead of cli->max_xmitStefan Metzmacher2-3/+3
The max_data parameter of trans2/nttrans calls are not bound to cli->max_xmit. Even with cli->max_xmit, which means the max size of the whole SMB pdu, we would get fragmented trans2/nttrans replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE. metze
2011-08-09s3-rpc_server: Fix sending of packets over named pipe proxy.Andreas Schneider1-22/+27
We need for named pipes we need to send each fragment on its own to be a message. Signed-off-by: Simo Sorce <idra@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Tue Aug 9 11:55:18 CEST 2011 on sn-devel-104
2011-08-09s3-smbd: Pass tevent context to smbd_server_connection_loop_once().Andreas Schneider3-16/+17
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-09s3-rpc_server: Free the children of p->mem_ctx.Andreas Schneider1-1/+5
Free the children of p->mem_ctx after processing a complete incoming and outgoing request. Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-09s3:lib/events: Fix a bug in run_poll_events().Stefan Metzmacher1-0/+4
Ignore fd events without EVENT_FD_READ or EVENT_FD_WRITE also in run_events_poll(). They are ignore when building the array for the syscall in event_add_to_poll_args(), so we need to ignore them run_events_poll() too. metze Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Aug 9 10:11:54 CEST 2011 on sn-devel-104
2011-08-08s3:selftest: run the net rpc registry test under "s3dc" instead "s3dc:local".Michael Adam1-1/+1
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon Aug 8 19:18:41 CEST 2011 on sn-devel-104
2011-08-08s3-net: Fixed a small typo in net conf function tableVicentiu Ciorbaru1-1/+1
The description of the function net conf delincludes had a wrong usage message: "net conf setincludes" instead of "net conf delincludes". Signed-off-by: Michael Adam <obnox@samba.org>