summaryrefslogtreecommitdiffstats
path: root/source3/printing
Commit message (Collapse)AuthorAgeFilesLines
...
* s3-printing: rename queue->job sysjobDavid Disseldorp2012-06-264-26/+26
| | | | | | | | | | | | | | | Print jobs maintain two job identifiers, the jobid allocated by the spoolss layer (pj->jobid), and the job identifier defined by the printing backend (pj->sysjob). Printer job queues currently only contain a single job identifier variable (queue->job), the variable is sometimes representative of the spoolss layer job identifier, and more often representative of the printing backend id. This change renames the queue job identifier from queue->job to queue->sysjob, in preparation for a change to only store the printing backend identifier.
* s3-printing: remove print_parse_jobid() from print_cups.cDavid Disseldorp2012-06-261-11/+1
| | | | | | The spoolss print job identifier is now passed to the cups layer via struct printjob, therefore it is no longer necessary to parse the job filename to determine it.
* s3-printing: store print jobid as part of struct printjobDavid Disseldorp2012-06-261-12/+17
| | | | | | | Printing code in some places relies upon the spool-file format to retrieve the print jobid. By storing the jobid as part of struct printjob, and hence in the printing TDB, we can move away from this ugly behaviour.
* s3:printing: fix use of a non-existent word (existant)Michael Adam2012-06-121-1/+1
|
* s3:printing: let print_spool_open() take a uint64_t vuidStefan Metzmacher2012-06-061-1/+1
| | | | metze
* s3:printing: use smbd/smbd.h instead of just smbd/proto.h in queue_process.cStefan Metzmacher2012-06-061-1/+1
| | | | | | This fixes compiler warnings regarding incomplete types. metze
* s3:printing: add print_spool_rap_jobid()Stefan Metzmacher2012-06-061-0/+9
| | | | metze
* s3:printing: make struct print_file_data private to printspoolss.cStefan Metzmacher2012-06-061-0/+9
| | | | metze
* Forward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug ↵Jeremy Allison2012-05-311-1/+6
| | | | #8970 - Possible memory leaks in the samba master process.
* s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'Stefan Metzmacher2012-05-241-3/+12
| | | | metze
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-062-4/+4
| | | | | | | | | Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
* lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij2012-03-245-14/+14
| | | | | | | | | The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
* s3-printing: Make printer a const char *.Andreas Schneider2012-03-141-2/+6
|
* change low FDs are handled in SambaAndrew Bartlett2012-03-041-3/+0
| | | | | | | | | | | We now only close fds 0, 1, 2 when we are a forked daemon, and take care not to close a file descriptor that we might need for foreground stdin monitoring. This should fix stdout logging in the lsa and epmapper deamons (ie in make test). Andrew Bartlett
* Fix a bunch of "unused variable" warnings.Jeremy Allison2012-02-181-5/+0
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
* s3-printing: fix crash in printer_list_set_printer()David Disseldorp2012-02-151-1/+1
| | | | | | | | | | | | | | | | The printer list database format was recently changed to accommodate for the printcap location field. One of the tdb_pack calls is not provided with a location string argument, this causes a crash on some platforms. https://bugzilla.samba.org/show_bug.cgi?id=8762 Signed-off-by: Günther Deschner <gd@samba.org> Signed-off-by: Jim McDonough <jmcd@samba.org> Signed-off-by: Lars Müller <lars@samba.org> Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Wed Feb 15 19:34:38 CET 2012 on sn-devel-104
* s3: files_struct->mode is only written, remove itVolker Lendecke2012-02-141-1/+0
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Feb 14 19:14:29 CET 2012 on sn-devel-104
* s3-printing: Add new printers to registry.Björn Baumbach2012-02-091-2/+17
| | | | | | | | | This fixes bug #8554, #8612 and #8748. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Feb 9 16:39:04 CET 2012 on sn-devel-104
* Finally remove all malloc()'s from the substitute code. Now totallyJeremy Allison2012-01-271-3/+1
| | | | | | | talloc() based. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 27 03:43:21 CET 2012 on sn-devel-104
* WERROR type variable being incorrectly checked with a NT_STATUS_IS_XDavid Disseldorp2012-01-231-1/+1
| | | | type macro.
* s3-spoolss: prefix print$ path on driver file deletionDavid Disseldorp2012-01-201-44/+37
| | | | | | | | | Driver file paths stored in the registry do not include the server path prefix. delete_driver_files() incorrectly assumes such a prefix. https://bugzilla.samba.org/show_bug.cgi?id=8697 Signed-off-by: Andreas Schneider <asn@samba.org>
* s3: Add a "lock_order" argument to db_openVolker Lendecke2012-01-181-1/+1
| | | | | | | This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
* s3:printing: avoid messaging_event_context() in print_queue_housekeeping()Stefan Metzmacher2012-01-171-6/+21
| | | | metze
* s3:printing/spoolssd: avoid using server_messaging_context()Stefan Metzmacher2011-12-161-1/+1
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Dec 16 16:29:41 CET 2011 on sn-devel-104
* s3:printing/spoolssd: pass event and messaging context to check_updater_child()Stefan Metzmacher2011-12-151-5/+4
| | | | metze
* s3: Remove a call to procid_self()Volker Lendecke2011-12-131-1/+1
|
* s3: Remove a bunch of calls to procid_self()Volker Lendecke2011-12-123-4/+4
| | | | All callers to messaging_[re]init only used procid_self()
* s3: Fix typosVolker Lendecke2011-12-081-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 8 12:05:55 CET 2011 on sn-devel-104
* s3-printing: fix typoBjörn Baumbach2011-11-031-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3: Include uid_wrapper where it is missing.Andreas Schneider2011-10-271-0/+1
|
* s3:printing: convert printer_list to use dbwrap wrapper functionsMichael Adam2011-10-111-11/+20
| | | | Avoid direct use of the db_record and db_context structs.
* s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam2011-10-111-6/+4
| | | | dbwrap_fetch_bystring_upper() to NTSTATUS
* s3: Remove the smbd_server_conn ref from create_conn_structVolker Lendecke2011-09-261-3/+7
|
* s3-spoolss: Fix bug #8351 forms migration.Andreas Schneider2011-09-091-0/+4
| | | | | | | | | Don't fail if the form already exists (or is builtin now). Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Sep 9 03:21:42 CEST 2011 on sn-devel-104
* s3-smbd: Rename reload_printers() and add documentation.Andreas Schneider2011-09-052-3/+3
| | | | | Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Sep 5 17:59:47 CEST 2011 on sn-devel-104
* s3-spoolssd: Remove stale printers only on a valid pcap update.Andreas Schneider2011-09-051-2/+2
| | | | | | | | | load_printers() removes stale printers and we should only remove them if we have a CUPS connection and talked to cups. Else we will remove every configured printer if cups is not available. Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Sep 5 11:18:23 CEST 2011 on sn-devel-104
* s3-spoolss: Remove useless checkSimo Sorce2011-08-211-24/+4
| | | | | | | | | | If we *really* are a bout to exit (PF_WORKER_EXITING) then the event will not be called as the loop will exit. Otherwise PF_SRV_MSG_EXIT may not be honoured for a long time if we have cients connected, therefore keep handling SIGHUP properly in those cases. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolssd: Listen on parent messagesSimo Sorce2011-08-211-0/+18
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolssd: Send a message to the parent when we accept a connectionSimo Sorce2011-08-211-0/+25
| | | | | | | | Every time we accept a connection wanr the parent, so it can run management routines and reallocate more resources if necessary. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolssd: User new prefork helpers to simplify code.Simo Sorce2011-08-211-27/+3
| | | | | | | | | Also stop using the listening as now the prefork code properly sets the PF_WORKER_ACCEPTING flag and it can be relied upon without having to keep additional status around. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-prefork: Fix worker flags handling.Simo Sorce2011-08-211-1/+1
| | | | | | | | | | | | | We can't have a clear idea of wether the worker is IDLE or BUSY. The only things we can tell is if it is Alive, whether it is currently Accepting connections or wether it is Exiting soon. Remove PF_WORKER_IDLE, PF_WORKER_BUSY and replace their use with PF_WORKER_ALIVE. Also properly assign PF_WORKER_ACCEPTING so that users of the API can rely on the flag. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-prefork: do not use a lock_fd, just race on accept()Simo Sorce2011-08-211-17/+3
| | | | | | | | | | | | | | | | | | | We used a lock mimicking what apache does for preforked children. But it doesn't work properly in our case because we do not stop once a request has been served. Clients are allowed to perform multiple requests and keep the connection open. This means that if we allow multiple clients per children, then a child could take the lock and then be asked to do a long or even locking operation by a client it already is serving. This woulkd cause the whole server to deadlock, as the child is now busy and also holding on the lock. Using a race on accept() by having a tevent_fd on the listening socket wait for read events we never deadlock. At most we cause a bit of contention among children. But in the generic case connections are much less frequent for us as clients tend to be long lived. So the little contention we may have is not a big deal. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolssd: Use prefrok utils to manage childrenSimo Sorce2011-08-211-122/+26
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolss: Introduce helper function to manage pool.Simo Sorce2011-08-211-52/+64
| | | | | | | | | We were not properly managing allowed clients and pool management was duplicated across a few callers. Concentrate all management heuristics in one single function. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolssd: Fix spoolss logging.Simo Sorce2011-08-211-13/+11
| | | | | | | Use the same code as in lsasd. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-rpc_server: Replace RPC_SERVICE_MODE_DAEMON checksSimo Sorce2011-08-211-3/+2
| | | | | | | Use rpc_daemon_type() macros where appropriate instead. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-spoolssd: Check if we were able to create the prefork pool.Andreas Schneider2011-08-211-0/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
* s3-messaging: Do not register to classes we are not going to use.Simo Sorce2011-08-112-3/+2
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Aug 11 17:09:30 CEST 2011 on sn-devel-104
* s3-messaging: Remove obsolete class.Simo Sorce2011-08-111-2/+0
| | | | | | | The FLAG_MSG_PRINT_NOTIFY class is actually obsolete and never used, as the only message belonging to it is not used either. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: Fix prototypes warnings.Andreas Schneider2011-08-101-1/+4
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>