The Samba-Bugzilla – Attachment 13661 Details for
Bug 12993
AD published printers are pruned from directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-4
for-4-4-test.patch (text/plain), 2.25 KB, created by
Samuel Cabrero
on 2017-10-06 16:34:53 UTC
(
hide
)
Description:
Patch for v4-4
Filename:
MIME Type:
Creator:
Samuel Cabrero
Created:
2017-10-06 16:34:53 UTC
Size:
2.25 KB
patch
obsolete
>From 27676cae539be4f7f910060c5e746773a89e09eb Mon Sep 17 00:00:00 2001 >From: Samuel Cabrero <scabrero@suse.de> >Date: Thu, 21 Sep 2017 09:53:35 +0200 >Subject: [PATCH] s3: spoolss: Fix GUID string format on GetPrinter info > >Fix regression introduced by commit a4157e7c5d75 which removed the braces >around the printer GUID in the printer info level 7 structure. > >MS-RPRN section 2.2 says this protocol uses curly-braced GUIDs so printers >are deleted from the directory by the domain controller's pruning service. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12993 > >Signed-off-by: Samuel Cabrero <scabrero@suse.de> >Reviewed-by: David Disseldorp <ddiss@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Oct 6 05:21:25 CEST 2017 on sn-devel-144 > >(backported from commit fc03049ca1721c25c6ad3d01cba2501af3f39b93) >--- > source3/rpc_server/spoolss/srv_spoolss_nt.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c >index a15547115b4..d2ce3703d05 100644 >--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c >+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c >@@ -4230,7 +4230,7 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx, > if (is_printer_published(tmp_ctx, session_info, msg_ctx, > servername, printer, NULL)) { > struct GUID guid; >- struct GUID_txt_buf guid_txt; >+ char *guidstr; > werr = nt_printer_guid_get(tmp_ctx, session_info, msg_ctx, > printer, &guid); > if (!W_ERROR_IS_OK(werr)) { >@@ -4254,9 +4254,19 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx, > printer)); > } > } >- r->guid = talloc_strdup_upper(mem_ctx, >- GUID_buf_string(&guid, &guid_txt)); >+ >+ /* [MS-RPRN] section 2.2: must use curly-braced GUIDs */ >+ guidstr = GUID_string2(mem_ctx, &guid); >+ if (guidstr == NULL) { >+ werr = WERR_NOMEM; >+ goto out_tmp_free; >+ } >+ /* Convert GUID string to uppercase otherwise printers >+ * are pruned */ >+ r->guid = talloc_strdup_upper(mem_ctx, guidstr); > r->action = DSPRINT_PUBLISH; >+ >+ TALLOC_FREE(guidstr); > } else { > r->guid = talloc_strdup(mem_ctx, ""); > r->action = DSPRINT_UNPUBLISH; >-- >2.14.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ddiss
:
review+
Actions:
View
Attachments on
bug 12993
:
13509
|
13620
| 13661 |
13662
|
13663
|
13664