Bug 12763 - Package Aware Section in printer inf breaks installation.
Summary: Package Aware Section in printer inf breaks installation.
Status: ASSIGNED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing (show other bugs)
Version: 4.6.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-28 18:25 UTC by Achim Gottinger
Modified: 2021-01-05 01:17 UTC (History)
4 users (show)

See Also:


Attachments
Dymo.inf (35.02 KB, text/plain)
2017-04-28 18:25 UTC, Achim Gottinger
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Gottinger 2017-04-28 18:25:32 UTC
Created attachment 13183 [details]
Dymo.inf

Hello,

I tried to upload Dymo printer drivers. To archive this i installed the drivers on an windows 7 oc first and afterwards tried to upload them to the samba server. With an unmodified inf this fails with errors like.

 unix_clean_name [W32X86/3/LM280]
[2017/04/28 20:09:17.825840,  3] ../source3/lib/util.c:300(unix_clean_name)
  unix_clean_name [W32X86/{E6A6CE37-E50F-4832-A7D1-40CBDBE46A0D}/LM280]
[2017/04/28 20:09:17.826043,  0] ../source3/printing/nt_printing.c:1132(move_driver_file_to_download_area)
  move_driver_file_to_download_area: Unable to rename [W32X86/{E6A6CE37-E50F-4832-A7D1-40CBDBE46A0D}/lm280] to [W32X86/3/LM280]: NT_STATUS_OBJECT_NAME_NOT_FOUND
[2017/04/28 20:09:17.826297,  0] ../source3/rpc_server/spoolss/srv_spoolss_nt.c:8614(_spoolss_AddPrinterDriverEx)
  _spoolss_AddPrinterDriverEx: move_driver_to_download_area failed - WERR_ACCESS_DENIED

It treats an section name in the inf file as an file name. Then i stripped down the inf file to the bare minimum required for my desired model and installation worken. Further testings nailed the error down to this section:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;These sections are to identify the Vista drivers as "Package Aware" to allow them to
;take advantage of features such as "Package Point-and-Print" in Vista and above
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[PrinterPackageInstallation.x86]
PackageAware=TRUE
CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}

[PrinterPackageInstallation.amd64]
PackageAware=TRUE
CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}

Once I remove it from the inf file installation works fine for various models.

The driver can be downloaded here.
http://download.dymo.com/dymo/Software/Win/DLS8Setup.8.6.1.exe

For convenience i attache the unmodified inf file here.
Comment 1 Andreas Schneider 2017-04-29 09:17:38 UTC
From the SambaXP conference schedule which is next week (May, 2.-5. 2017):

New printing protocols in Samba

For a long time Samba's printing support remained relatively unchanged and was based on features that were present already since the release of Windows 2000. Just recently it became necessary to start adding more modern printing features to Samba as Windows clients start depending on them. The required changes include support for the "Print System Asynchronous Remote Protocol" (PAR). With the addition of this DCE/RPC protocol, Samba can then finally provide support for Printer Driver Packages including security signatures. The talk will discuss the interesting challenges we met while implementing the PAR protocol.

Günther Deschner
(Red Hat / Samba Team)
Comment 2 Achim Gottinger 2017-05-05 10:48:37 UTC
Aint that more an inf file parsing issue? Once i removed the package aware sections from the inf file, the drivers could be uploaded. So ignoring these parts till the ms-par protocol is implementen may fix installation issues and let drivers work without the new ms-par features.
Comment 3 Achim Gottinger 2017-06-07 12:51:53 UTC
I tried today to add kyocera universa drivers who i used a few years back without issues on samba 4.0/4.1 servers. They can be downloaded here:
https://www.rz.uni-osnabrueck.de/fileadmin/user_upload/Campuscard/Drucken/Treiber/win8/KyoceraClassicUniversalDriversCertified130315.zip.

These now also refuse to install on samba 4.6.5 and theys also contain [PrinterPackageInstallation.] sections. Once these sections are removed the drivers can be installed and used but they are not signed anymore.

So this issue does not need the mS-PAR protocol to be implemented. I guess ignoring these sections and install drivers as version 3 drivers would fix the issue for alot of drivers.
Comment 4 Arvid Requate 2019-05-09 13:56:41 UTC
According to

https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server#Enabling_the_spoolssd_Service

support for package aware drivers can be enabled by configuring smbd to fork "spoolssd", but in my experiment (Windows 7 client) that didn't make it work.

Note: I tested this against a Samba memberserver joined to an Samba/AD 4.10.2 domain, because from looking at the source code it looks like Samba/AD DCs may reset "rpc_server:spoolss" and "rpc_daemon:spoolssd" mack to the default of "embedded", so enabling "spoolssd" might currently not work on Samba AD DCs.

The error message of the windows client was (best efford translation from german):

Unable to install <Printer Name>, x64, Type3 - User Mode driver. Operation could not be completed (error 0x0000023f).