I have the following printer driver: Lexmark_Universal_v2_UD1_PCL5_Emul_02212020.exe -> UNIDRV.DLL (0.3.16299.396) (HP) upd-pcl6-x64-6.3.0.21178.exe -> unidrv.dll (0.3.9600.18048) Windows: On windows 10 if i install the HP driver first (unidrv.dll) and then the Lexmark driver (UNIDRV.DLL), the unidrv.dll file is overwritten/replaced with the newer version in 'x64/3/UNIDRV.DLL' (case-insensitive) Samba: Samba also does the version check but then the file is copied as is: handle_pe_file: PE file [x64/{3CB1B0AC-3235-4813-AE84-C02C64D37F60}/UNIDRV.DLL] Version = 00000003:3fab018c (0.3.16299.396) handle_pe_file: PE file [x64/3/UNIDRV.DLL] Version = 00000003:25804680 (0.3.9600.18048) file_version_is_newer: Replacing [x64/3/UNIDRV.DLL] with [x64/{3CB1B0AC-3235-4813-AE84-C02C64D37F60}/UNIDRV.DLL] [2023/02/20 10:45:19, 10, pid=20257, effective(0, 5000), real(0, 0)] ../../source3/printing/nt_printing.c:1456(move_driver_file_to_download_area) move_driver_file_to_download_area: copying 'x64/{3CB1B0AC-3235-4813-AE84-C02C64D37F60}/UNIDRV.DLL' to 'x64/3/UNIDRV.DLL' and i end up with two files UNIDRV.DLL and unidrv.dll in 'x64/3' which leads to strange behaviors when downloading printer driver with windows clients. The problem seems to be that source3/printing/nt_printing.c::move_driver_file_to_download_area just copies the new file instead of replacing the old one. See nt_printing_move_driver_file_to_download_area.patch for a possible solution (driver_unix_convert for new driver file).
Created attachment 17786 [details] nt_printing_move_driver_file_to_download_area.patch