DEBUGADD(3,("checking name: %s\n",name));
if (!open_printer_hnd(p, handle, name, 0)) {
+ ZERO_STRUCTP(r->out.handle);
return WERR_INVALID_PARAM;
}
DEBUG(0,("_spoolss_OpenPrinterEx: logic error. Can't find printer "
"handle we created for printer %s\n", name ));
close_printer_handle(p,handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_INVALID_PARAM;
}
~(SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE)) {
DEBUG(3, ("access DENIED for non-printserver bits\n"));
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
if (!lp_ms_add_printer_wizard()) {
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
p->server_info->ptok,
lp_printer_admin(snum))) {
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
if (!get_printer_snum(p, handle, &snum, NULL)) {
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_BADFID;
}
if ( !check_access(get_client_fd(), lp_hostsallow(snum), lp_hostsdeny(snum)) ) {
DEBUG(3, ("access DENIED (hosts allow/deny) for printer open\n"));
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
r->in.access_mask)) {
DEBUG(3, ("access DENIED for printer open\n"));
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
if ((r->in.access_mask & SPECIFIC_RIGHTS_MASK)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) {
DEBUG(3, ("access DENIED for printer open - unknown bits\n"));
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
default:
/* sanity check to prevent programmer error */
+ ZERO_STRUCTP(r->out.handle);
return WERR_BADFID;
}