summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
2011-08-10s3-printing: Do not try to force reload.Simo Sorce1-1/+5
Be more correct in load printers at startup. If async process have already started we do not need to force a reload, but we just need to load the printers. If other process have not finished initializing it makes no sense to try to force them as they are masking SIGHUP unitl init is done anyway. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolss: do not call pcap_cache_reload() directlySimo Sorce1-5/+17
The background queue process is repsonsible for that. Just reload printers if necessary or wait for a message from bq to do that. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Add child handler to bq processSimo Sorce1-4/+32
The cups backend forks a child to do asynchronous work. We need a sigchld handler in bq to properly wait for the chilod to finish and reap it, otherwise it hangs the forever as a zombie process. Signed-off-by: Andreas Schneider <asn@samba.org>
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 Sorce1-10/+9
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 Sorce1-0/+1
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Force pcap reload when all readySimo Sorce2-3/+12
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 Sorce1-7/+5
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Pass messaging context around tooSimo Sorce1-15/+42
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 Sorce1-39/+14
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 Sorce3-19/+62
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 Sorce4-21/+39
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-prefork: Provide a cleanup functionSimo Sorce1-11/+4
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: add support for multiple listning file descriptorsSimo Sorce1-5/+11
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-spoolssd: expand children pool when necessarySimo Sorce1-7/+34
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-printing: No need to register to smbd's children listSimo Sorce1-19/+0
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-03s3-printing: fix some build warnings in queue_process.cGünther Deschner1-1/+2
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Aug 3 17:48:33 CEST 2011 on sn-devel-104
2011-08-02s3:server Consolidate printing related initializationSimo Sorce2-0/+9
Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Aug 2 17:37:44 CEST 2011 on sn-devel-104
2011-08-02s3:smbd - Move printing queue stuffSimo Sorce3-113/+324
This way we can properly deal with pcap updates in the background queue process if it is enabled (on by default) and not perform these actions in the main smbd process. Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-01s3-rpc_server: Use binding vector in rpc_ep_try_register().Andreas Schneider1-2/+22
2011-08-01s3-rpc_server: Move the endpoint registration to own file.Andreas Schneider1-2/+2
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-1/+1
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam1-0/+1
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
2011-07-28s3-spoolss: Use existing handle in printer_driver_files_in_use().Andreas Schneider1-11/+1
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Jul 28 16:20:11 CEST 2011 on sn-devel-104
2011-07-28s3-spoolss: Use existing handle in printer_driver_in_use().Andreas Schneider1-14/+2
2011-07-20s3-auth Use the common auth_session_infoAndrew Bartlett4-26/+26
This patch finally has the same structure being used to describe the authorization data of a user across the whole codebase. This will allow of our session handling to be accomplished with common code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_infoAndrew Bartlett2-2/+2
This makes auth3_session_info identical to auth_session_info The logic to convert the info3 to a struct auth_user_info is essentially moved up the stack from the named pipe proxy in source3/rpc_server to create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett1-3/+3
This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett2-6/+6
This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use struct auth3_session_info outside the auth subsystemAndrew Bartlett4-26/+26
This seperation between the structure used inside the auth modules and in the wider codebase allows for a gradual migration from struct auth_serversupplied_info -> struct auth_session_info (from auth.idl) The idea here is that we keep a clear seperation between the structure before and after the local groups, local user lookup and the session key modifications have been processed, as the lack of this seperation has caused issues in the past. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-18s3-rpc_server: Fixed segfaults in rpc daemons.Andreas Schneider1-1/+1
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Jul 18 14:01:02 CEST 2011 on sn-devel-104
2011-07-07s3-printing: remove tdb migration invalid printer name checksDavid Disseldorp1-9/+2
WERR_INVALID_PRINTER_NAME only needed to be handled when printing tdb migration used spoolss, with winreg such errors are no longer possible. Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Jul 7 19:15:34 CEST 2011 on sn-devel-104
2011-07-07s3-printing: make sure to first migrate the printers then the security ↵Günther Deschner1-4/+16
descriptor. Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: fill info2_mask in printer migrationDavid Disseldorp1-4/+7
Also fix possibly uninitialised status return from printing_tdb_migrate_printer().
2011-07-07s3-printing: remove spoolss pipe from migration library, only using winreg ↵Günther Deschner3-30/+3
finally. Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: use winreg interface for migration, instead of spoolss.Günther Deschner1-181/+38
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: safe a ton of roundtrips by reusing existing winreg ↵Günther Deschner2-8/+38
binding_handles. Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: use winreg_internal functions.Günther Deschner2-14/+14
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: add winreg_internal functions.Günther Deschner1-0/+1
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: move spoolss_create_default_devmode/secdesc to init_spoolss.hGünther Deschner1-172/+0
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: move driver_info_ctr_to_info8 to init_spoolss.hGünther Deschner1-90/+0
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: move os2 related functions to printing/nt_printing_os2.c.Günther Deschner3-142/+187
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>