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

93 Commits

Author SHA1 Message Date
Günther Deschner
90deb9f04c s3-spoolss: Create a sperate header file for 'struct printer_handle'
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-06 12:28:18 +01:00
Andreas Schneider
4d9f4bfc69 s3:spoolss: Add support for COPY_FROM_DIRECTORY in AddPrinterDriverEx
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-20 17:29:07 +01:00
Richard Sharpe
e049943eba Convert three include files from uint32/16/8 to _t types as well as the source that includes them.
The files that include them already seem clean.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-01 19:15:10 +02:00
Andreas Schneider
6595ced146 printing: rework nt_printer_guid_store to return errors
Callers can now choose whether or not to ignore errors.

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

Pair-programmed-with: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-02-18 10:14:09 +01:00
David Disseldorp
38dbd054dc printing: add nt_printer_guid_retrieve() helper
This function connects to the domain controller and retrieves the
GUID for the corresponding printer DN.

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

Pair-programmed-with: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-02-18 10:14:09 +01:00
David Disseldorp
956a4552f2 printing: return WERROR from print_access_check
print_access_check() currently returns a bool based on whether access is
granted or denied. Errno is set on failure, but none of the callers use
it.
This change converts print_access_check() to return a WERROR.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2013-11-20 08:16:25 +01:00
David Disseldorp
002d1a4467 Fix bug 9900: is_printer_published GUID retrieval
Samba currently always responds to GetPrinter(level = 7) requests with
DSPRINT_UNPUBLISH, regardless of the AD publish status tracked via the
PRINTER_ATTRIBUTE_PUBLISHED flag. This is due to erroneous "objectGUID"
unmarshalling in is_printer_published().

This change splits "objectGUID" retrieval into a separate function, and
adds a pull_reg_sz() call to correctly unmarshall the GUID.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-06-03 14:10:07 +02:00
Andreas Schneider
1a65f90a34 s3-printing: Make printer a const char *. 2012-03-14 17:56:14 +01:00
Björn Baumbach
5ec12732c3 s3-printing: Add new printers to registry.
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-02-09 16:39:04 +01:00
Andreas Schneider
fcb90f4761 s3-printing: Add forward declaration for dcerpc_binding_handle.
This fixes a build warning.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 28 20:07:37 CEST 2011 on sn-devel-104
2011-07-28 20:07:37 +02:00
Andreas Schneider
a97fef36bc s3-spoolss: Use existing handle in printer_driver_files_in_use().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 28 16:20:11 CEST 2011 on sn-devel-104
2011-07-28 16:20:11 +02:00
Andreas Schneider
5fa9fe39ea s3-spoolss: Use existing handle in printer_driver_in_use(). 2011-07-28 15:08:42 +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
Günther Deschner
43cf3a28dc s3-printing: move spoolss_create_default_devmode/secdesc to init_spoolss.h
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Günther Deschner
74e416031b s3-printing: move driver_info_ctr_to_info8 to init_spoolss.h
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Günther Deschner
dd5375b4a1 s3-printing: move os2 related functions to printing/nt_printing_os2.c.
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Günther Deschner
cd5b2b242b s3-printing: avoid using pipes_struct when only session_info is needed.
Guenther
2011-05-02 15:03:43 +02:00
David Disseldorp
14446b5280 s3-printing: fix move_driver_to_download_area() error paths
WERR_ACCESS_DENIED errors are mapped to WERR_UNKNOWN_PRINTER_DRIVER,
resulting in incorrect error messages on Windows clients.

move_driver_to_download_area() returns the same error status values
to the caller via the *perr argument as well as the return value.

The create_directory() call is not checked for error.
2011-03-02 00:31:22 +01:00
Günther Deschner
3797d48b76 s3-spoolss: Fix servername/printername handling which turns out to be very important to get right.
Guenther
2010-09-30 02:59:35 +02:00
Günther Deschner
314d738f90 s3-printing: remove unused old structs.
Guenther
2010-09-28 09:40:57 +02:00
Simo Sorce
4a8d042afa s3-spoolss: Move Printer_entry to srv_spoolss_nt.c
It is used only there, and it is a good idea to make this one private and
opaque to the rest of the code.

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:03 +02:00
Andreas Schneider
bbf2cd50b0 s3-printing: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
Volker Lendecke
99b2da4504 s3: Lift the smbd_messaging_context from is_printer_published 2010-08-08 16:03:26 +02:00
Volker Lendecke
bccb7c87cc s3: Lift the smbd_messaging_context from check_published_printers 2010-08-08 16:03:25 +02:00
Volker Lendecke
7d08c25f98 s3: Lift the smbd_messaging_context from nt_printer_publish 2010-08-08 16:03:25 +02:00
Volker Lendecke
e43ffde91f s3: Lift the smbd_messaging_context from nt_printer_remove 2010-08-08 16:03:25 +02:00
Volker Lendecke
39ce462043 s3: Lift the smbd_messaging_context from print_time_access_check 2010-08-08 16:03:25 +02:00
Volker Lendecke
be7fd4ae50 s3: Lift the smbd_messaging_context from print_access_check 2010-08-08 16:03:25 +02:00
Volker Lendecke
d79895e826 s3: Lift the smbd_messaging_context from printer_driver_files_in_use 2010-08-08 16:03:24 +02:00
Volker Lendecke
862e888f71 s3: Lift the smbd_messaging_context from printer_driver_in_use 2010-08-08 16:03:24 +02:00
Volker Lendecke
5acb5b09ee s3: Remove references to smbd_messaging_context() 2010-08-08 16:03:15 +02:00
Volker Lendecke
92282a815d s3: Remove references to smbd_messaging_context() from the spoolss server 2010-08-07 13:16:49 +02:00
Andreas Schneider
b95d5563dd s3-printing: Added automatic migration of printing tdbs.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:15 -04:00
Andreas Schneider
1be454538b s3-spoolss: Remove the program global current_user_info.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:15 -04:00
Andreas Schneider
4761498c9e s3-printing: Moved remaining prototypes to nt_printing.h.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:13 -04:00
Andreas Schneider
f6db3694ed s3-spoolss: Moved shared printing functions to nt_printing.h
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -04:00
Andreas Schneider
395dcbd111 s3-spoolss: Removed the last free_a_printer() call in spoolss_nt.c.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:11 -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
Günther Deschner
8bc9c343c4 s3-secdesc: remove "typedef struct sec_desc_buf SEC_DESC_BUF".
Guenther
2010-05-18 12:30:11 +02:00
Günther Deschner
91bb065977 s3-spoolss: move MAXDEVICENAME to spoolss idl.
Guenther
2009-12-02 14:36:36 +01:00
Günther Deschner
800d6b7820 s3-spoolss: move more defines out of nt_printing.h to spoolss.idl where they belong.
Guenther
2009-11-23 12:20:24 +01:00
Günther Deschner
6364c271c4 s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL structs.
Guenther
2009-11-23 12:19:19 +01:00
Günther Deschner
8e5beb738c s3-spoolss: remove device mode defines from nt_printing.h.
Guenther
2009-08-10 11:32:26 +02:00
Günther Deschner
652251701d s3-printing: no need to define struct table_node 4 times.
Guenther
2009-05-13 15:27:06 +02:00
Michael Adam
221151a2a2 s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.
This paves the way for hiding the typedef and the implementation
from the surface.

Michael
2009-04-27 11:21:02 +02:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Günther Deschner
4cb3cbea84 s3-spoolss: move DRIVER_X_VERSION flags into the backend, where they belong to.
Guenther
2009-03-17 19:07:34 +01:00
Günther Deschner
28d16866ee s3-spoolss: move PRINTER_ATTRIBUTE_SAMBA to printing backend, where they belong.
Guenther
2009-03-17 18:39:10 +01:00
Günther Deschner
b3f6d69108 s3-spoolss: use spoolss_NotifyOption and spoolss_NotifyType instead of SPOOL_NOTIFY_OPTION and SPOOL_NOTIFY_OPTION_TYPE.
Guenther
2009-02-23 16:17:37 +01:00