Spoolss: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 63: | Line 63: | ||
Original: |
Original: |
||
SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print |
SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers |
||
SYSTEM\\CurrentControlSet001 |
SYSTEM\\CurrentControlSet001 |
||
Line 69: | Line 69: | ||
SYSTEM\\CurrentControlSet -> SYSTEM\\CurrentControlSet001 |
SYSTEM\\CurrentControlSet -> SYSTEM\\CurrentControlSet001 |
||
SYSTEM\\CurrentControlSet001\\Control\\Print\\Printers -> SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print |
SYSTEM\\CurrentControlSet001\\Control\\Print\\Printers -> SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers |
||
http://blogs.sepago.de/helge/2008/05/04/free-tool-list-registry-links-reg_link/ |
|||
== References == |
== References == |
Latest revision as of 21:45, 14 April 2010
Spoolss / printing TODO list
- torture and win32 tests to validate winreg and spoolss PrinterData consistency
- torture and win32 tests for XcvData
- torture and win32 tests for truncated devicemodes
- torture and win32 tests for printer ports
- torture and win32 tests for ChangeNotify
- torture and win32 tests for PRINTER_INFO_STRESS (level 0)
- torture and win32 tests for alignement in particular of EnumPrinterDataEx
- fix subkey implementation when subkeys are created via PrinterData functions
- check for / and \ in key and valuenames
- fix marshalling of spoolss_PrinterDriverInfo101
Detach registry from spoolss implementation
In order to better separate and detach the printing code (spoolss server) and eventually to be able to move out spoolss out of smbd entirely into a separate process, we need to remove various dependencies, including:
- winreg server dynamically loads ntprinters.tdb in order to expose spoolss PrinterData registry content
- RAP server directly accesses printing and spoolss functions in order to do LANMAN printing
The plan is to talk to a (local) winreg server in order to access the printing data backend via standardized winreg client API.
Global HKLM hive
First we need to have a global hive opened for the spoolss server:
- use rpc_pipe_open_internal() to access winreg server from within spoolss server
- use rpccli_winreg_OpenHKLM() to open HKLM hive and preserve policy handle globally
Spoolss server calls
Then for each spoolss server call, notably:
- SetPrinterData{Ex}
- GetPrinterData{Ex}
- EnumPrinterData{Ex}
- DeletePrinterData{Ex}
- EnumPrinterKey
- DeletePrinterKey
we need to open the printer specific key and set,get or enum the values directly via winreg API:
- use rpccli_winreg_OpenKey(SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers\\printername) to open printer specific key
- use rpccli_winreg_SetValue() to set value
- use rpccli_winreg_QueryValue() to query value
- use rpccli_winreg_EnumValue() to enumerate values
etc.
- use rpccli_winreg_Close() to close the printer specific key
Eliminate printing registry backend
The dynamic retrieval of PrinterData content currently loaded from ntprinters.tdb needs to be removed.
Migration
It is planned to have no in-place migration of data stored in ntprinters.tdb into registry.tdb. Instead we will provide a tool/script that does this migration offline.
RAP callout to spoolss
As the RAP calls for user enumeration currently callout into the samr server, the RAP printing calls need to callout into the spoolss server.
Registry links
Original:
SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers SYSTEM\\CurrentControlSet001
Links:
SYSTEM\\CurrentControlSet -> SYSTEM\\CurrentControlSet001 SYSTEM\\CurrentControlSet001\\Control\\Print\\Printers -> SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers
http://blogs.sepago.de/helge/2008/05/04/free-tool-list-registry-links-reg_link/
References
- MS-RPRN Print System Remote Protocol Specification
- MS-RPRN footnote 134: Persistence of Abstract Data Model in the Registry
- MS-RRP: Windows Remote Registry Protocol Specification
--gd 18:25, 5 March 2010 (CST)