summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
2012-10-19s3: Remove some calls to procid_selfVolker Lendecke1-3/+3
The goal is to have procid_self handling completely in the messaging_context. Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Oct 19 20:39:56 CEST 2012 on sn-devel-104
2012-10-11s3fs-printing: Simplify the comment and location handling.Andreas Schneider1-13/+17
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Oct 11 18:49:15 CEST 2012 on sn-devel-104
2012-10-08s3fs-printing: Fix RAW printing for normal users.Andreas Schneider1-1/+1
This fixes bug #8769. Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 8 16:11:51 CEST 2012 on sn-devel-104
2012-10-01s3fs-smbd: Move housekeeping to the background process.Andreas Schneider1-0/+9
If you add 200 printers using lpadmin. Then you wait for the printcap cache to expire. As soon as this expires we notify all deamons that they should reload the printers. This mean we need to create the default registry keys for each printer. If you do e.g. a 'smbclient -L' during that time you will get a lot of timeouts. This lets the housekeeping function of the printcap cache do the task of creating the default registry keys in background queue process. When it is done with the task it will tell all smbd childs to reload the printers and the 200 printers appear. Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 1 20:28:23 CEST 2012 on sn-devel-104
2012-09-20s3-printing: Increase debug level for info that the db is empty.Andreas Schneider1-1/+2
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Sep 20 12:01:48 CEST 2012 on sn-devel-104
2012-08-29s3-printing: fix bug 9123 lprng job tracking errorsDavid Disseldorp2-3/+3
The lprng printing back-end is truncating the print job filename in the lpq output, which means that Samba is not able to determine the back-end job ID for a newly submitted print job. Remove the unneeded spoolss job ID from the print job file name to ensure the job filename is not truncated. Also log these warnings at a higher log level. Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Aug 29 14:25:13 CEST 2012 on sn-devel-104
2012-08-09Correctly check for errors in strlower_m() returns.Jeremy Allison2-3/+5
2012-07-24Fix incorrect use of server as a talloc context.Jeremy Allison1-1/+1
2012-07-20Use ippGet/ippSet (accessors) for IPP API.Jiri Popelka2-176/+259
CUPS 1.6 makes various structures private and introduces these ippGet and ippSet functions for all of the fields in these structures. http://www.cups.org/str.php?L3928 We define our own accessors when CUPS < 1.6. Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jul 20 22:35:55 CEST 2012 on sn-devel-104
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell11-79/+86
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18nt_printing_tdb_migrate(): fix stackframe leak.Rusty Russell1-0/+1
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-03s3-printing: Remove deprecated lp_printer_admin().Andreas Schneider1-11/+0
2012-06-27s3-printing: fix broken print_job_get_name() returnDavid Disseldorp1-1/+2
Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Jun 27 04:04:56 CEST 2012 on sn-devel-104
2012-06-26s3-printing: use euid for vlp job trackingDavid Disseldorp1-1/+2
vlp can be called by print_run_command as root with euids set appropriately, vlp should use this to track the job owner.
2012-06-26s3-printing: fill print_generic sysjob id on job submissionDavid Disseldorp1-57/+88
Change the generic print backend to fill the printing backend job identifier (sysjob) on submission of a new job. This is needed to ensure correct mapping of spoolss jobs and entries in the backend print queue. This and the last 13 commits attempt to address bug 8719.
2012-06-26s3-printing: pass lpq command to job_submitDavid Disseldorp4-4/+34
Currently the generic print backend does not fill the printing backend job identifier (sysjob) on submission of a new job. The sysjob identifier is required to correctly map jobs in the printer queue to corresponding spoolss print jobs. Passing the lpq command to job_submit allows the generic print backend to check the printer queue for the new job following submission. This behaviour will come in a later commit.
2012-06-26s3-printing: remove unused print_job_fname()David Disseldorp1-16/+1
2012-06-26s3-printing: pass a talloc ctx to unpack_pjobDavid Disseldorp1-17/+21
Rather than allocating the devicemode on a null context.
2012-06-26s3-printing: return talloced print jobsDavid Disseldorp1-95/+196
print_job_find() currently returns print jobs to callers via a statically allocated variable, this is particularly messy as the device mode is talloced under the static variable. This change adds or passes a talloc context to all callers, giving them ownership of the returned print job.
2012-06-26s3-printing: clean up print_job_pause/resume interfaceDavid Disseldorp1-19/+28
Currently both return a bool and sometimes set a werr pointer argument, always return werror instead.
2012-06-26s3-printing: fix potential print db refcount leakDavid Disseldorp1-1/+1
2012-06-26s3-spoolss: remove duplicate "." in smbd spooler pathDavid Disseldorp1-3/+8
2012-06-26s3-printing: remove print_parse_jobid()David Disseldorp1-19/+0
With all callers fixed, it is now safe to remove.
2012-06-26s3-printing: remove redundant variable setDavid Disseldorp1-3/+0
2012-06-26s3-printing: remove print_parse_jobid() calls from printing.cDavid Disseldorp1-21/+27
In all cases the spoolss layer job id can be determinded from the printing subsystem allocated job identifier (sysjob).
2012-06-26s3-printing: rename queue->job sysjobDavid Disseldorp4-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.
2012-06-26s3-printing: remove print_parse_jobid() from print_cups.cDavid Disseldorp1-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.
2012-06-26s3-printing: store print jobid as part of struct printjobDavid Disseldorp1-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.
2012-06-12s3:printing: fix use of a non-existent word (existant)Michael Adam1-1/+1
2012-06-06s3:printing: let print_spool_open() take a uint64_t vuidStefan Metzmacher1-1/+1
metze
2012-06-06s3:printing: use smbd/smbd.h instead of just smbd/proto.h in queue_process.cStefan Metzmacher1-1/+1
This fixes compiler warnings regarding incomplete types. metze
2012-06-06s3:printing: add print_spool_rap_jobid()Stefan Metzmacher1-0/+9
metze
2012-06-06s3:printing: make struct print_file_data private to printspoolss.cStefan Metzmacher1-0/+9
metze
2012-05-31Forward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug ↵Jeremy Allison1-1/+6
#8970 - Possible memory leaks in the samba master process.
2012-05-24s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'Stefan Metzmacher1-3/+12
metze
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2-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
2012-03-24lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij5-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
2012-03-14s3-printing: Make printer a const char *.Andreas Schneider1-2/+6
2012-03-04change low FDs are handled in SambaAndrew Bartlett1-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
2012-02-18Fix a bunch of "unused variable" warnings.Jeremy Allison1-5/+0
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
2012-02-15s3-printing: fix crash in printer_list_set_printer()David Disseldorp1-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
2012-02-14s3: files_struct->mode is only written, remove itVolker Lendecke1-1/+0
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Feb 14 19:14:29 CET 2012 on sn-devel-104
2012-02-09s3-printing: Add new printers to registry.Björn Baumbach1-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
2012-01-27Finally remove all malloc()'s from the substitute code. Now totallyJeremy Allison1-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
2012-01-23WERROR type variable being incorrectly checked with a NT_STATUS_IS_XDavid Disseldorp1-1/+1
type macro.
2012-01-20s3-spoolss: prefix print$ path on driver file deletionDavid Disseldorp1-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>
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-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.
2012-01-17s3:printing: avoid messaging_event_context() in print_queue_housekeeping()Stefan Metzmacher1-6/+21
metze
2011-12-16s3:printing/spoolssd: avoid using server_messaging_context()Stefan Metzmacher1-1/+1
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Dec 16 16:29:41 CET 2011 on sn-devel-104
2011-12-15s3:printing/spoolssd: pass event and messaging context to check_updater_child()Stefan Metzmacher1-5/+4
metze