Add torture test to call openPrinter as UserA and with the handle
windows sure does weird stuff, it can open a printer handle as the logged in user (from client machine) and closes the printer handle as a different user (actually the machine account of the machine the user that opened the printer is logged into). In my case we have a customer that is making heavy use of samba with printers and they get an awful lot of these errors in the system log.
To be honest this all sounds very hokey, I didn't really get much enlightenment reading MS-RPRN, the appendix (see https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rprn/e81cbc09-ab05-4a32-ae4a-8ec57b436c43 last paragraph(s) at end of page) mention security wrt handles, but the description there imho isn't really clear or unambiguous. but... the windows behaviour seems clear
Checklist
-
Commits have Signed-off-by:with name/author being identical to the commit author -
(optional) This MR is just one part towards a larger feature. -
(optional, if backport required) Bugzilla bug filed and BUG:tag added -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated -
CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
-
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code