[Samba] "printer admin" still working in 3.0.21c?

Thomas Limoncelli limoncelli at web.de
Tue Feb 28 00:37:24 GMT 2006


Thomas Limoncelli wrote:
> rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex(1697)
>   Setting printer access = PRINTER_ACCESS_USE

Correlating with the source code this seems to become interesting:

                 DEBUG(4,("Setting printer access = %s\n", 
(printer_default->access_required == PRINTER_ACCESS_ADMINISTER)
                         ? "PRINTER_ACCESS_ADMINISTER" : 
"PRINTER_ACCESS_USE" ));

         }

         Printer->access_granted = printer_default->access_required;

i.e. Printer->access_granted is set to PRINTER_ACCESS_USE  here, but 
later (rpc_server/srv_spoolss_nt.c:update_printer(6113)) compared to 
PRINTER_ACCESS_ADMINISTER:

         if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
                 DEBUG(3, ("update_printer: printer property change 
denied by handle\n"));
                 result = WERR_ACCESS_DENIED;
                 goto done;
         }

which fails. How's this supposed to work? What am I missing here?


-TL



More information about the samba mailing list