Bug 8618 - nt_printing_migrate writes path to driver files into registry
nt_printing_migrate writes path to driver files into registry
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing
4.5.0
All All
: P5 regression
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-18 13:04 UTC by Björn Baumbach
Modified: 2016-10-25 07:37 UTC (History)
3 users (show)

See Also:


Attachments
enumprinters output for one driver (1.19 KB, text/plain)
2011-11-18 13:06 UTC, Björn Baumbach
no flags Details
proposed fix (3.20 KB, patch)
2011-11-18 22:11 UTC, Björn Baumbach
no flags Details
proposed fix v2 (3.56 KB, patch)
2011-11-18 22:11 UTC, Björn Baumbach
no flags Details
proposed fix (2.24 KB, patch)
2011-12-06 15:18 UTC, Björn Baumbach
asn: review+
gd: review+
Details
Patch for master (picked from v3-6-stable) (2.46 KB, patch)
2016-10-04 13:58 UTC, Stefan Metzmacher
gd: review+
asn: review+
Details
Patch for v4-5-test (2.83 KB, text/plain)
2016-10-13 08:25 UTC, Stefan Metzmacher
metze: review? (gd)
asn: review+
Details
Patch for v4-4-test (2.83 KB, text/plain)
2016-10-13 08:25 UTC, Stefan Metzmacher
metze: review? (gd)
asn: review+
Details
Patch for v4-3-test (2.83 KB, text/plain)
2016-10-13 08:26 UTC, Stefan Metzmacher
metze: review? (gd)
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Baumbach 2011-11-18 13:04:50 UTC
The nt_printing_migrate code, which migrates the driver information from ntdrivers.tdb to Sambas registry, writes the full share path (which is stored in the tdb) into the registry.

For example:
Valuename  = Dependent Files
Type       = REG_MULTI_SZ
Value[000] = "\print$\x64\3\TTYRES.DLL"

should look like:
Valuename  = Dependent Files
Type       = REG_MULTI_SZ
Value[000] = "TTYRES.DLL"

Problem:
Clients, asking for the drivers dependent files will receive a path like this:
Dependentfiles: [\\printserver\print$\x64\3\\print$\x64\3\TTYRES.DLL]


Newly added printers have the correct registry Value-entries without the path.


Workaround:
Remove the path from the registry values or store the driver again :-)
Comment 1 Björn Baumbach 2011-11-18 13:06:44 UTC
Created attachment 7120 [details]
enumprinters output for one driver
Comment 2 Björn Baumbach 2011-11-18 22:11:11 UTC
Created attachment 7125 [details]
proposed fix
Comment 3 Björn Baumbach 2011-11-18 22:11:51 UTC
Created attachment 7126 [details]
proposed fix v2
Comment 4 Kuba Ober 2011-11-27 16:22:31 UTC
I've run into the same bug, so consider this confirmed.
Comment 5 Björn Baumbach 2011-12-06 15:18:50 UTC
Created attachment 7162 [details]
proposed fix
Comment 6 Andreas Schneider 2011-12-06 15:30:23 UTC
Comment on attachment 7162 [details]
proposed fix

This one looks good. Thanks!
Comment 7 Guenther Deschner 2012-01-09 10:53:31 UTC
Comment on attachment 7162 [details]
proposed fix

looks good, thanks!
Comment 8 Guenther Deschner 2012-01-09 10:54:01 UTC
Karolin, please add to the next 3.6.x release.
Comment 9 Karolin Seeger 2012-01-10 20:01:19 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!
Comment 10 Stefan Metzmacher 2016-10-04 13:58:25 UTC
Created attachment 12540 [details]
Patch for master (picked from v3-6-stable)
Comment 11 Guenther Deschner 2016-10-05 09:02:43 UTC
Comment on attachment 12540 [details]
Patch for master (picked from v3-6-stable)

Of course correct, thanks!
Comment 12 Stefan Metzmacher 2016-10-05 11:58:37 UTC
Pushed to master.
Comment 13 Stefan Metzmacher 2016-10-13 08:25:06 UTC
Created attachment 12568 [details]
Patch for v4-5-test
Comment 14 Stefan Metzmacher 2016-10-13 08:25:33 UTC
Created attachment 12569 [details]
Patch for v4-4-test
Comment 15 Stefan Metzmacher 2016-10-13 08:26:16 UTC
Created attachment 12570 [details]
Patch for v4-3-test
Comment 16 Andreas Schneider 2016-10-14 06:11:48 UTC
Comment on attachment 12570 [details]
Patch for v4-3-test

LGTM
Comment 17 Andreas Schneider 2016-10-14 06:12:09 UTC
Karolin, please add the patches to the relevant branches. Thanks!
Comment 18 Karolin Seeger 2016-10-19 10:08:21 UTC
(In reply to Andreas Schneider from comment #17)
Pushed to autobuild-v4-{5,4,3}-test.
Comment 19 Karolin Seeger 2016-10-25 07:37:19 UTC
(In reply to Karolin Seeger from comment #18)
Pushed to all branches.
Closing out bug report.

Thanks!