summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
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
2011-12-13s3: Remove a call to procid_self()Volker Lendecke1-1/+1
2011-12-12s3: Remove a bunch of calls to procid_self()Volker Lendecke3-4/+4
All callers to messaging_[re]init only used procid_self()
2011-12-08s3: Fix typosVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 8 12:05:55 CET 2011 on sn-devel-104
2011-11-03s3-printing: fix typoBjörn Baumbach1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-27s3: Include uid_wrapper where it is missing.Andreas Schneider1-0/+1
2011-10-11s3:printing: convert printer_list to use dbwrap wrapper functionsMichael Adam1-11/+20
Avoid direct use of the db_record and db_context structs.
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-6/+4
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-09-26s3: Remove the smbd_server_conn ref from create_conn_structVolker Lendecke1-3/+7
2011-09-09s3-spoolss: Fix bug #8351 forms migration.Andreas Schneider1-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