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

41 Commits

Author SHA1 Message Date
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
7cabd89789 printing: split out printer DN and GUID retrieval
This functions are used for printer publishing.

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
Michael Adam
4286e147a6 loadparm: rename lp[cfg]_print_ok to lp[cfg]_printable for consistency with docs
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-02-03 13:27:15 +13:00
Günther Deschner
44429f948b s3-printing: avoid KRB5CCNAME overwrite in printer publishing (Bug #7444).
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jul 19 17:53:08 CEST 2013 on sn-devel-104
2013-07-19 17:53:08 +02: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
David Disseldorp
f9b6b09e4e printing: explicitly clear PUBLISHED attribute
Currently nt_printer_publish(DSPRINT_UNPUBLISH) flips (via xor) the
info2->attributes PRINTER_ATTRIBUTE_PUBLISHED flag, rather than
explicitly clearing it.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-06-03 14:10:07 +02:00
David Disseldorp
b1574ebb0b bug 9830: fix panic in nt_printer_publish_ads
Check for ads_find_machine_acct() errors, to ensure a NULL LDAPMessage
pointer doesn't get passed to ldap_get_dn().

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-By: Günther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Apr 25 19:01:55 CEST 2013 on sn-devel-104
2013-04-25 19:01:55 +02:00
David Disseldorp
4f9cffbae6 BUG 9378: Add extra attributes for AD printer publishing.
Currently attempting to publish a printer in AD fails with "Object class
violation", due to a number of missing attributes in the LDAP request.

Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 18 17:27:35 CET 2013 on sn-devel-104
2013-01-18 17:27:35 +01:00
David Disseldorp
12a08d8ae2 printing: Remove invalid free from error path.
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-18 15:37:10 +01:00
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
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-18 15:07:23 +09:30
Andreas Schneider
1a65f90a34 s3-printing: Make printer a const char *. 2012-03-14 17:56:14 +01: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
72b1f8be56 s3-printing: safe a ton of roundtrips by reusing existing winreg binding_handles.
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:02 +02:00
Günther Deschner
0a1ec73b96 s3-printing: use winreg_internal functions.
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Günther Deschner
ada5380d20 s3-printing: add winreg_internal functions.
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Günther Deschner
f7d6a0a112 s3-printing: include ../librpc/ndr/libndr.h in ads printing.
Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
3061f44fc9 s3-auth: printing needs auth.h
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
0a250f4946 registry: create and use shared libcli/registry/util_reg.h header.
Guenther
2011-03-30 01:13:07 +02:00
Andrew Bartlett
2e69e89456 s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.

The structure is also not ideal for it's current purpose.  Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session.  This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.

(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-22 16:20:10 +11:00
Günther Deschner
4063bde3ed s3-rpc_server: move services into individual directories.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Feb 10 22:13:17 CET 2011 on sn-devel-104
2011-02-10 22:13:17 +01:00
Volker Lendecke
24f1893b5d s3: Attempt to fix the non-ads build 2010-10-03 00:17:44 +02: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
Andrew Bartlett
03011bf118 s3-libads call common GUID_from_ndr_blob()
This does a length-limited check, and so avoids reading beyond the
allocated memory if the server sends less than 16 bytes.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-20 16:15:11 -07:00
Günther Deschner
68c9877796 s3-printing: fix non-ads build after prototype changes.
Guenther
2010-09-10 22:41:56 +02:00
Andreas Schneider
81e97c09c3 s3-printing: Make missing auth_serversupplied_info const. 2010-09-09 16:39:33 +02:00
Günther Deschner
ca765d2f50 s3-build: only include krb5 environment variables where required.
Guenther
2010-08-26 00:20:29 +02:00
Volker Lendecke
9a4ac5b2d3 s3: Fix the build without ADS 2010-08-08 16:47:19 +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
61837197d8 s3: Lift the smbd_messaging_context from nt_printer_publish_ads 2010-08-08 16:03:25 +02:00
Volker Lendecke
8c665f6da6 s3: Lift the smbd_messaging_context from store_printer_guid 2010-08-08 16:03:25 +02:00
Volker Lendecke
cb8f700855 s3: Lift the smbd_messaging_context from winreg_get_printer_dataex 2010-08-08 16:03:17 +02:00
Volker Lendecke
e4cd34926f s3: Lift the smbd_messaging_context from winreg_set_printer_dataex 2010-08-08 16:03:16 +02:00
Volker Lendecke
bd8a1d8a86 s3: Lift the smbd_messaging_context from winreg_get_printer 2010-08-08 16:03:16 +02:00
Volker Lendecke
9751d7613b s3: Lift the smbd_messaging_context from winreg_update_printer 2010-08-08 16:03:16 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Günther Deschner
31c484edb9 s3-printing: move AD related printing components to an own file.
Guenther
2010-08-05 00:32:02 +02:00