This was a subtile bug where the OpenPrinter call (called directly via
dispatcher table) was modifiying r->in.printername in a way that all printers on
a server had the printername stripped off the server unc. Once we switch to full
NDR marshalling in inter RAP<->RPC server communication there is no danger
anymore to have these kind of nasty effects.
Guenther
uint32_t num_jobs;
struct policy_handle handle;
+ const char *printername;
+
+ printername = talloc_strdup(mem_ctx, printer_info[i].info2.printername);
+ if (printername == NULL) {
+ goto err;
+ }
ZERO_STRUCT(handle);
ZERO_STRUCT(devmode_ctr);
status = rpccli_spoolss_OpenPrinter(cli, mem_ctx,
- printer_info[i].info2.printername,
+ printername,
NULL,
devmode_ctr,
SEC_FLAG_MAXIMUM_ALLOWED,