Bug 12993 - AD published printers are pruned from directory
Summary: AD published printers are pruned from directory
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing (show other bugs)
Version: 4.4.15
Hardware: All All
: P5 minor (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-28 11:15 UTC by Samuel Cabrero
Modified: 2017-11-01 08:46 UTC (History)
4 users (show)

See Also:


Attachments
For v4-4-test (1.59 KB, patch)
2017-08-28 11:15 UTC, Samuel Cabrero
ddiss: review+
Details
Patch for master (1.93 KB, patch)
2017-09-21 13:35 UTC, Samuel Cabrero
no flags Details
Patch for v4-4 (2.25 KB, patch)
2017-10-06 16:34 UTC, Samuel Cabrero
ddiss: review+
Details
Patch for v4-5 (2.25 KB, patch)
2017-10-06 16:35 UTC, Samuel Cabrero
ddiss: review+
Details
Patch for v4-6 (2.26 KB, patch)
2017-10-06 16:36 UTC, Samuel Cabrero
ddiss: review+
jra: review+
Details
Patch for v4-7 (2.26 KB, patch)
2017-10-06 16:36 UTC, Samuel Cabrero
ddiss: review+
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Cabrero 2017-08-28 11:15:36 UTC
Created attachment 13509 [details]
For v4-4-test

Printers published in Active Directory are deleted by the pruning task running on domain controllers.

This task pings the print server each eight hours to check the printer availability and prune it from the directory if the printer is no longer available.

Commit a4157e7c5d75 removed the braces from the printer GUID in the GetPrinter info level 7 response, but MS-RPRN section 2.2 says this protocol uses curly braced string representation.
Comment 1 David Disseldorp 2017-08-28 11:42:51 UTC
Comment on attachment 13509 [details]
For v4-4-test

Would have preferred to avoid the double strdup, but still looks okay as-is.
Comment 2 Samuel Cabrero 2017-09-21 13:35:35 UTC
Created attachment 13620 [details]
Patch for master

The double strdup is necessary to convert the GUID string to uppercase, otherwise the printers are pruned. New patch attached freeing the temporary copy.
Comment 3 Jeremy Allison 2017-09-21 16:09:19 UTC
Patch looks good to me. Can you submit to samba-technical@lists.samba.org so David and I can +1 and push it ?

Thanks,

Jeremy.
Comment 4 Samuel Cabrero 2017-10-06 16:34:53 UTC
Created attachment 13661 [details]
Patch for v4-4
Comment 5 Samuel Cabrero 2017-10-06 16:35:34 UTC
Created attachment 13662 [details]
Patch for v4-5
Comment 6 Samuel Cabrero 2017-10-06 16:36:14 UTC
Created attachment 13663 [details]
Patch for v4-6
Comment 7 Samuel Cabrero 2017-10-06 16:36:50 UTC
Created attachment 13664 [details]
Patch for v4-7
Comment 8 Jeremy Allison 2017-10-06 18:21:41 UTC
Reassigning to Karolin for inclusion in 4.7.next, 4.6.next.
Comment 9 Karolin Seeger 2017-10-24 08:09:19 UTC
(In reply to Jeremy Allison from comment #8)
Pushed to autobuild-v4-{7,6}-test.
Comment 10 Karolin Seeger 2017-11-01 08:46:25 UTC
(In reply to Karolin Seeger from comment #9)
Pushed to both branches.
Closing out bug report.

Thanks!