1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

72 Commits

Author SHA1 Message Date
Richard Sharpe
df0eeca057 Convert uint32/16/8 to 32_t/16_t/8_t in printing.h and all files that include it.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-01 19:15:10 +02:00
Volker Lendecke
de811f14af lib: Remove tdb_compat
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-17 11:30:52 +01:00
David Disseldorp
77b5be1742 printing: add jobid_to_sysjob helper function
Samba needs to deal with two types of print job identifiers, those
allocated by the printing backend (sysjob ids), and those allocated
by Samba's spoolss server (jobids).

This change adds a helper function to map spoolss jobids to sysjob ids,
to go alongside the corresponding sysjob to jobid mapping function.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
David Disseldorp
24d025f85d spoolss: return the spoolss job ID in notifications
Print job notifications currently carry the system print job identifier
from the queue structure. Instead, the spoolss job identifier should be
resolved and returned.

Print clients can use notification job-ids in subsequent spoolss SetJob
requests. Returning an incorrect identifier can result in the failure of
such requests, e.g. spoolss_SetJob(SPOOLSS_JOB_CONTROL_DELETE).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10271

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2013-11-18 16:03:59 +01:00
Andrew Bartlett
f3562424b6 lib/param: Move all enum declarations to lib/param
This is in preperation for the parameter table being made common.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-24 11:01:17 +02:00
David Disseldorp
c29773d890 s3-printing: pass lpq command to job_submit
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-26 16:10:39 +02:00
David Disseldorp
91cd9a4797 s3-printing: remove unused print_job_fname() 2012-06-26 16:10:39 +02:00
David Disseldorp
2f85c1fcf2 s3-printing: return talloced print jobs
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-26 16:10:39 +02:00
David Disseldorp
e1ddf8f0e4 s3-printing: clean up print_job_pause/resume interface
Currently both return a bool and sometimes set a werr pointer argument,
always return werror instead.
2012-06-26 16:10:39 +02:00
David Disseldorp
4e33424581 s3-printing: remove print_parse_jobid()
With all callers fixed, it is now safe to remove.
2012-06-26 16:10:39 +02:00
David Disseldorp
dbca645eec s3-printing: rename queue->job sysjob
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-26 16:10:39 +02:00
David Disseldorp
a2d880ddcd s3-printing: store print jobid as part of struct printjob
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-26 16:10:39 +02:00
Stefan Metzmacher
484cb4e43e s3:printing: let print_spool_open() take a uint64_t vuid
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
d1d7904182 s3:printing: add print_spool_rap_jobid()
metze
2012-06-06 10:18:37 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
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-04-06 01:47:43 +02:00
Simo Sorce
2e8a85ec72 s3:smbd - Move printing queue stuff
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-02 15:28:03 +02:00
Andrew Bartlett
9fcc617ff5 s3-auth Use the common auth_session_info
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-20 09:17:13 +10:00
Andrew Bartlett
f16d8f4eb8 s3-auth Use struct auth3_session_info outside the auth subsystem
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-20 09:17:10 +10:00
Rusty Russell
a4993f647c ldb: replace 'struct TDB_DATA' with 'TDB_DATA'
The typedef is TDB2 compatible, the struct isn't.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Simo Sorce
1d33474dad s3:printing Make print_queue_receive public
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-29 16:03:49 +02:00
Günther Deschner
de8b373329 s3-printing: move more printing defines out of includes.h
Guenther
2011-02-25 01:08:26 +01:00
Günther Deschner
823f8b9030 s3-printing: move more printing structs to printing.h
Guenther
2011-02-22 21:52:18 +01:00
Günther Deschner
8225c0ad6c s3-printing: only include printing where really needed.
Guenther
2011-02-22 21:52:18 +01:00
Volker Lendecke
7a194c6e5e s3: Make "unpack_pjob" static
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 20 16:51:04 UTC 2010 on sn-devel-104
2010-10-20 16:51:04 +00:00
Andreas Schneider
bbf2cd50b0 s3-printing: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
Andreas Schneider
555b175212 s3-printing: Added function to update the queue. 2010-08-18 11:43:18 +02:00
Volker Lendecke
a847f13d7b s3: Use pipe_struct->client_id->name for pjob.clientmachine 2010-08-18 11:18:24 +02:00
Volker Lendecke
3aba8e9b7e s3: Remove unused "pos" arg from print_job_write 2010-08-17 15:31:49 +02:00
Volker Lendecke
d418f9f11a s3-printing: Lift the use of smbd_server_fd from job_submit.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-08-16 14:02:19 +02:00
Volker Lendecke
ef208c5571 s3: Lift the server_messaging_context from print_job_endpage 2010-08-08 18:09:38 +02:00
Volker Lendecke
d1f3a2efb7 s3: Lift the server_messaging_context from print_job_write 2010-08-08 18:09:37 +02:00
Volker Lendecke
de10824872 s3: Lift the server_messaging_context from print_job_set_name 2010-08-08 18:09:37 +02:00
Volker Lendecke
0b423493c3 s3: Lift the server_messaging_context from pjob_delete 2010-08-08 18:09:37 +02:00
Volker Lendecke
c6e6aee0a0 s3: Lift the server_messaging_context from print_queue_status 2010-08-08 18:09:34 +02:00
Volker Lendecke
c50c973036 s3: Lift the server_messaging_context from print_job_end 2010-08-08 18:09:34 +02:00
Volker Lendecke
a4c27786ff s3: Lift the server_messaging_context from print_queue_length 2010-08-08 18:09:33 +02:00
Volker Lendecke
cc280f0cd1 s3: Lift the smbd_messaging_context from print_queue_purge 2010-08-08 16:03:27 +02:00
Volker Lendecke
9723f33ef5 s3: Lift the smbd_messaging_context from print_queue_resume 2010-08-08 16:03:27 +02:00
Volker Lendecke
5f9165a7ea s3: Lift the smbd_messaging_context from print_queue_pause 2010-08-08 16:03:26 +02:00
Volker Lendecke
9441e8c52c s3: Lift the smbd_messaging_context from print_job_start 2010-08-08 16:03:26 +02:00
Volker Lendecke
7df0e672f2 s3: Lift the smbd_messaging_context from print_job_resume 2010-08-08 16:03:26 +02:00
Volker Lendecke
2811c258f6 s3: Lift the smbd_messaging_context from print_job_pause 2010-08-08 16:03:26 +02:00
Volker Lendecke
8dcbeecd6d s3: Lift the smbd_messaging_context from print_job_delete 2010-08-08 16:03:26 +02:00
Simo Sorce
f5a2f8fa2b s3-printing: Removed unused function print_job_fd().
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:14 -04:00
Simo Sorce
bdab6b10d2 s3-printing: Moved printing.c headers to include/printing.h.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:14 -04:00
Simo Sorce
38d6274864 s3-smbd: Added code to print via spoolss. 2010-07-27 10:27:12 -04:00
Simo Sorce
5604a78f09 s3-spoolss: Migrated NT_DEVICEMODE to spoolss_DeviceMode.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:06 -04:00
Karolin Seeger
9cf1a68977 printing: Rename new parameter "cups timeout" to "cups connection timeout".
Karolin
2008-09-24 11:09:04 -07:00
Karolin Seeger
765e5d2282 printing: Add new parameter "cups timeout".
The default timeout for connections to CUPS servers is set
to 5 minutes in the CUPS libraries. The smbd hangs on startup
until the timeout is reached if the CUPS server is unreachable.
This parameter makes the timeout configurable. The default value
is set to 30 seconds.

Karolin
2008-09-23 16:57:58 -07:00