up, all the errors returned are DOS errors, not NT status codes. */
#include "includes.h"
+#include "nt_printing.h"
#include "srv_spoolss_util.h"
#include "../librpc/gen_ndr/srv_spoolss.h"
#include "../librpc/gen_ndr/cli_spoolss.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "registry.h"
#include "registry/reg_objects.h"
+#include "include/printing.h"
+#include "secrets.h"
/* macros stolen from s4 spoolss server */
#define SPOOLSS_BUFFER_UNION(fn,info,level) \
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= *r->out.needed)?val_true:val_false)
-
-extern userdom_struct current_user_info;
-
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-#ifndef MAX_OPEN_PRINTER_EXS
-#define MAX_OPEN_PRINTER_EXS 50
-#endif
-
-#define MAGIC_DISPLAY_FREQUENCY 0xfade2bad
-
static Printer_entry *printers_list;
typedef struct _counter_printer_0 {
static uint32_t smb_connections = 0;
-/* in printing/nt_printing.c */
+/* Map generic permissions to printer object specific permissions */
-extern struct standard_mapping printer_std_mapping, printserver_std_mapping;
+const struct standard_mapping printer_std_mapping = {
+ PRINTER_READ,
+ PRINTER_WRITE,
+ PRINTER_EXECUTE,
+ PRINTER_ALL_ACCESS
+};
+
+/* Map generic permissions to print server object specific permissions */
+
+const struct standard_mapping printserver_std_mapping = {
+ SERVER_READ,
+ SERVER_WRITE,
+ SERVER_EXECUTE,
+ SERVER_ALL_ACCESS
+};
/* API table for Xcv Monitor functions */
Printer->notify.client_connected = false;
TALLOC_FREE(Printer->devmode);
- free_a_printer( &Printer->printer_info, 2 );
/* Remove from the internal list. */
DLIST_REMOVE(printers_list, Printer);
find printer index by handle
****************************************************************************/
-static Printer_entry *find_printer_index_by_hnd(pipes_struct *p,
+static Printer_entry *find_printer_index_by_hnd(struct pipes_struct *p,
struct policy_handle *hnd)
{
Printer_entry *find_printer = NULL;
Close printer index by handle.
****************************************************************************/
-static bool close_printer_handle(pipes_struct *p, struct policy_handle *hnd)
+static bool close_printer_handle(struct pipes_struct *p, struct policy_handle *hnd)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
Delete a printer given a handle.
****************************************************************************/
-static WERROR delete_printer_handle(pipes_struct *p, struct policy_handle *hnd)
+static WERROR delete_printer_handle(struct pipes_struct *p, struct policy_handle *hnd)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
WERROR result;
Return the snum of a printer corresponding to an handle.
****************************************************************************/
-static bool get_printer_snum(pipes_struct *p, struct policy_handle *hnd,
+static bool get_printer_snum(struct pipes_struct *p, struct policy_handle *hnd,
int *number, struct share_params **params)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
int n_services=lp_numservices();
char *aprinter;
const char *printername;
- const char *servername;
+ const char *servername = NULL;
fstring sname;
bool found = false;
struct spoolss_PrinterInfo2 *info2 = NULL;
sname,
&info2);
if ( !W_ERROR_IS_OK(result) ) {
- DEBUG(0,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n",
+ DEBUG(2,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n",
sname, win_errstr(result)));
continue;
}
Find first available printer slot. creates a printer handle for you.
****************************************************************************/
-static bool open_printer_hnd(pipes_struct *p, struct policy_handle *hnd,
+static bool open_printer_hnd(struct pipes_struct *p, struct policy_handle *hnd,
const char *name, uint32_t access_granted)
{
Printer_entry *new_printer;
continue;
}
+ if (!pinfo2->drivername) {
+ continue;
+ }
+
if (strcmp(drivername, pinfo2->drivername) != 0) {
continue;
}
_spoolss_OpenPrinter
****************************************************************/
-WERROR _spoolss_OpenPrinter(pipes_struct *p,
+WERROR _spoolss_OpenPrinter(struct pipes_struct *p,
struct spoolss_OpenPrinter *r)
{
struct spoolss_OpenPrinterEx e;
_spoolss_OpenPrinterEx
****************************************************************/
-WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
+WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
struct spoolss_OpenPrinterEx *r)
{
int snum;
_spoolss_ClosePrinter
****************************************************************/
-WERROR _spoolss_ClosePrinter(pipes_struct *p,
+WERROR _spoolss_ClosePrinter(struct pipes_struct *p,
struct spoolss_ClosePrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_DeletePrinter
****************************************************************/
-WERROR _spoolss_DeletePrinter(pipes_struct *p,
+WERROR _spoolss_DeletePrinter(struct pipes_struct *p,
struct spoolss_DeletePrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_DeletePrinterDriver
****************************************************************/
-WERROR _spoolss_DeletePrinterDriver(pipes_struct *p,
+WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p,
struct spoolss_DeletePrinterDriver *r)
{
_spoolss_DeletePrinterDriverEx
****************************************************************/
-WERROR _spoolss_DeletePrinterDriverEx(pipes_struct *p,
+WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
struct spoolss_DeletePrinterDriverEx *r)
{
struct spoolss_DriverInfo8 *info = NULL;
}
-/****************************************************************************
- Internal routine for storing printerdata
- ***************************************************************************/
-
-WERROR set_printer_dataex(NT_PRINTER_INFO_LEVEL *printer,
- const char *key, const char *value,
- uint32_t type, uint8_t *data, int real_len)
-{
- /* the registry objects enforce uniqueness based on value name */
-
- return add_printer_data( printer->info_2, key, value, type, data, real_len );
-}
-
/********************************************************************
GetPrinterData on a printer server Handle.
********************************************************************/
_spoolss_GetPrinterData
****************************************************************/
-WERROR _spoolss_GetPrinterData(pipes_struct *p,
+WERROR _spoolss_GetPrinterData(struct pipes_struct *p,
struct spoolss_GetPrinterData *r)
{
struct spoolss_GetPrinterDataEx r2;
* called from api_spoolss_rffpcnex
****************************************************************/
-WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p,
+WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct pipes_struct *p,
struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
{
int snum = -1;
*
********************************************************************/
-static WERROR printserver_notify_info(pipes_struct *p,
+static WERROR printserver_notify_info(struct pipes_struct *p,
struct policy_handle *hnd,
struct spoolss_NotifyInfo *info,
TALLOC_CTX *mem_ctx)
continue; /* skip */
}
- /* FIXME: should we use a SYSTEM server_info here? */
+ /* Maybe we should use the SYSTEM server_info here... */
result = winreg_get_printer(mem_ctx, p->server_info,
Printer->servername,
lp_servicename(snum),
*
********************************************************************/
-static WERROR printer_notify_info(pipes_struct *p, struct policy_handle *hnd,
+static WERROR printer_notify_info(struct pipes_struct *p,
+ struct policy_handle *hnd,
struct spoolss_NotifyInfo *info,
TALLOC_CTX *mem_ctx)
{
get_printer_snum(p, hnd, &snum, NULL);
- /* FIXME: should we use a SYSTEM server_info here ? */
+ /* Maybe we should use the SYSTEM server_info here... */
result = winreg_get_printer(mem_ctx, p->server_info,
Printer->servername,
lp_servicename(snum), &pinfo2);
_spoolss_RouterRefreshPrinterChangeNotify
****************************************************************/
-WERROR _spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p,
+WERROR _spoolss_RouterRefreshPrinterChangeNotify(struct pipes_struct *p,
struct spoolss_RouterRefreshPrinterChangeNotify *r)
{
struct spoolss_NotifyInfo *info;
_spoolss_EnumPrinters
****************************************************************/
-WERROR _spoolss_EnumPrinters(pipes_struct *p,
+WERROR _spoolss_EnumPrinters(struct pipes_struct *p,
struct spoolss_EnumPrinters *r)
{
const char *name = NULL;
_spoolss_GetPrinter
****************************************************************/
-WERROR _spoolss_GetPrinter(pipes_struct *p,
+WERROR _spoolss_GetPrinter(struct pipes_struct *p,
struct spoolss_GetPrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
do { \
if (in && strlen(in)) { \
out = talloc_strdup(mem_ctx, in); \
- W_ERROR_HAVE_NO_MEMORY(out); \
} else { \
- out = NULL; \
+ out = talloc_strdup(mem_ctx, ""); \
} \
+ W_ERROR_HAVE_NO_MEMORY(out); \
} while (0);
#define FILL_DRIVER_UNC_STRING(mem_ctx, server, arch, ver, in, out) \
_spoolss_GetPrinterDriver2
****************************************************************/
-WERROR _spoolss_GetPrinterDriver2(pipes_struct *p,
+WERROR _spoolss_GetPrinterDriver2(struct pipes_struct *p,
struct spoolss_GetPrinterDriver2 *r)
{
Printer_entry *printer;
_spoolss_StartPagePrinter
****************************************************************/
-WERROR _spoolss_StartPagePrinter(pipes_struct *p,
+WERROR _spoolss_StartPagePrinter(struct pipes_struct *p,
struct spoolss_StartPagePrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_EndPagePrinter
****************************************************************/
-WERROR _spoolss_EndPagePrinter(pipes_struct *p,
+WERROR _spoolss_EndPagePrinter(struct pipes_struct *p,
struct spoolss_EndPagePrinter *r)
{
int snum;
_spoolss_StartDocPrinter
****************************************************************/
-WERROR _spoolss_StartDocPrinter(pipes_struct *p,
+WERROR _spoolss_StartDocPrinter(struct pipes_struct *p,
struct spoolss_StartDocPrinter *r)
{
struct spoolss_DocumentInfo1 *info_1;
int snum;
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
+ WERROR werr;
if (!Printer) {
DEBUG(2,("_spoolss_StartDocPrinter: "
return WERR_BADFID;
}
+ if (Printer->jobid) {
+ DEBUG(2, ("_spoolss_StartDocPrinter: "
+ "StartDocPrinter called twice! "
+ "(existing jobid = %d)\n", Printer->jobid));
+ return WERR_INVALID_HANDLE;
+ }
+
if (r->in.level != 1) {
return WERR_UNKNOWN_LEVEL;
}
return WERR_BADFID;
}
- Printer->jobid = print_job_start(p->server_info, snum,
- info_1->document_name,
- Printer->devmode);
+ werr = print_job_start(p->server_info, snum,
+ info_1->document_name, info_1->output_file,
+ Printer->devmode, &Printer->jobid);
/* An error occured in print_job_start() so return an appropriate
NT error code. */
- if (Printer->jobid == -1) {
- return map_werror_from_unix(errno);
+ if (!W_ERROR_IS_OK(werr)) {
+ return werr;
}
Printer->document_started = true;
_spoolss_EndDocPrinter
****************************************************************/
-WERROR _spoolss_EndDocPrinter(pipes_struct *p,
+WERROR _spoolss_EndDocPrinter(struct pipes_struct *p,
struct spoolss_EndDocPrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
+ NTSTATUS status;
int snum;
if (!Printer) {
}
Printer->document_started = false;
- print_job_end(snum, Printer->jobid, NORMAL_CLOSE);
- /* error codes unhandled so far ... */
+ status = print_job_end(snum, Printer->jobid, NORMAL_CLOSE);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(2, ("_spoolss_EndDocPrinter: "
+ "print_job_end failed [%s]\n",
+ nt_errstr(status)));
+ }
- return WERR_OK;
+ Printer->jobid = 0;
+ return ntstatus_to_werror(status);
}
/****************************************************************
_spoolss_WritePrinter
****************************************************************/
-WERROR _spoolss_WritePrinter(pipes_struct *p,
+WERROR _spoolss_WritePrinter(struct pipes_struct *p,
struct spoolss_WritePrinter *r)
{
ssize_t buffer_written;
if (!get_printer_snum(p, r->in.handle, &snum, NULL))
return WERR_BADFID;
+ /* print_job_write takes care of checking for PJOB_SMBD_SPOOLING */
buffer_written = print_job_write(snum, Printer->jobid,
(const char *)r->in.data.data,
(SMB_OFF_T)-1,
********************************************************************/
static WERROR control_printer(struct policy_handle *handle, uint32_t command,
- pipes_struct *p)
+ struct pipes_struct *p)
{
int snum;
WERROR errcode = WERR_BADFUNC;
* for spooling"
****************************************************************/
-WERROR _spoolss_AbortPrinter(pipes_struct *p,
+WERROR _spoolss_AbortPrinter(struct pipes_struct *p,
struct spoolss_AbortPrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
if (!get_printer_snum(p, r->in.handle, &snum, NULL))
return WERR_BADFID;
- print_job_delete(p->server_info, snum, Printer->jobid, &errcode );
+ if (!Printer->document_started) {
+ return WERR_SPL_NO_STARTDOC;
+ }
+
+ errcode = print_job_delete(p->server_info, snum, Printer->jobid);
return errcode;
}
********************************************************************/
static WERROR update_printer_sec(struct policy_handle *handle,
- pipes_struct *p, struct sec_desc_buf *secdesc_ctr)
+ struct pipes_struct *p,
+ struct sec_desc_buf *secdesc_ctr)
{
struct spoolss_security_descriptor *new_secdesc = NULL;
struct spoolss_security_descriptor *old_secdesc = NULL;
struct security_acl *the_acl;
int i;
- the_acl = secdesc_ctr->sd->dacl;
+ the_acl = old_secdesc->dacl;
DEBUG(10, ("old_secdesc_ctr for %s has %d aces:\n",
printer, the_acl->num_aces));
/********************************************************************
Canonicalize printer info from a client
-
- ATTN: It does not matter what we set the servername to hear
- since we do the necessary work in get_a_printer() to set it to
- the correct value based on what the client sent in the
- _spoolss_open_printer_ex().
********************************************************************/
static bool check_printer_ok(TALLOC_CTX *mem_ctx,
****************************************************************************/
bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token,
- struct spoolss_SetPrinterInfo2 *info2)
+ struct spoolss_SetPrinterInfo2 *info2,
+ const char *remote_machine)
{
char *cmd = lp_addprinter_cmd();
char **qlines;
int fd;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
bool is_print_op = false;
- char *remote_machine = talloc_strdup(ctx, "%m");
if (!remote_machine) {
return false;
}
- remote_machine = talloc_sub_basic(ctx,
- current_user_info.smb_name,
- current_user_info.domain,
- remote_machine);
- if (!remote_machine) {
- return false;
- }
command = talloc_asprintf(ctx,
"%s \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"",
DEBUGADD(10,("returned [%d]\n", ret));
TALLOC_FREE(command);
- TALLOC_FREE(remote_machine);
if ( ret != 0 ) {
if (fd != -1)
* when updating a printer description.
********************************************************************/
-static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
+static WERROR update_printer(struct pipes_struct *p,
+ struct policy_handle *handle,
struct spoolss_SetPrinterInfoCtr *info_ctr,
struct spoolss_DeviceMode *devmode)
{
{
/* add_printer_hook() will call reload_services() */
if (!add_printer_hook(tmp_ctx, p->server_info->ptok,
- printer) ) {
+ printer, p->client_address) ) {
result = WERR_ACCESS_DENIED;
goto done;
}
/****************************************************************************
****************************************************************************/
-static WERROR publish_or_unpublish_printer(pipes_struct *p,
+static WERROR publish_or_unpublish_printer(struct pipes_struct *p,
struct policy_handle *handle,
struct spoolss_SetPrinterInfo7 *info7)
{
/********************************************************************
********************************************************************/
-static WERROR update_printer_devmode(pipes_struct *p, struct policy_handle *handle,
+static WERROR update_printer_devmode(struct pipes_struct *p,
+ struct policy_handle *handle,
struct spoolss_DeviceMode *devmode)
{
int snum;
_spoolss_SetPrinter
****************************************************************/
-WERROR _spoolss_SetPrinter(pipes_struct *p,
+WERROR _spoolss_SetPrinter(struct pipes_struct *p,
struct spoolss_SetPrinter *r)
{
WERROR result;
_spoolss_FindClosePrinterNotify
****************************************************************/
-WERROR _spoolss_FindClosePrinterNotify(pipes_struct *p,
+WERROR _spoolss_FindClosePrinterNotify(struct pipes_struct *p,
struct spoolss_FindClosePrinterNotify *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_AddJob
****************************************************************/
-WERROR _spoolss_AddJob(pipes_struct *p,
+WERROR _spoolss_AddJob(struct pipes_struct *p,
struct spoolss_AddJob *r)
{
if (!r->in.buffer && (r->in.offered != 0)) {
_spoolss_EnumJobs
****************************************************************/
-WERROR _spoolss_EnumJobs(pipes_struct *p,
+WERROR _spoolss_EnumJobs(struct pipes_struct *p,
struct spoolss_EnumJobs *r)
{
WERROR result;
_spoolss_ScheduleJob
****************************************************************/
-WERROR _spoolss_ScheduleJob(pipes_struct *p,
+WERROR _spoolss_ScheduleJob(struct pipes_struct *p,
struct spoolss_ScheduleJob *r)
{
return WERR_OK;
_spoolss_SetJob
****************************************************************/
-WERROR _spoolss_SetJob(pipes_struct *p,
+WERROR _spoolss_SetJob(struct pipes_struct *p,
struct spoolss_SetJob *r)
{
int snum;
switch (r->in.command) {
case SPOOLSS_JOB_CONTROL_CANCEL:
case SPOOLSS_JOB_CONTROL_DELETE:
- if (print_job_delete(p->server_info, snum, r->in.job_id, &errcode)) {
+ errcode = print_job_delete(p->server_info,
+ snum, r->in.job_id);
+ if (W_ERROR_EQUAL(errcode, WERR_PRINTER_HAS_JOBS_QUEUED)) {
errcode = WERR_OK;
}
break;
_spoolss_EnumPrinterDrivers
****************************************************************/
-WERROR _spoolss_EnumPrinterDrivers(pipes_struct *p,
+WERROR _spoolss_EnumPrinterDrivers(struct pipes_struct *p,
struct spoolss_EnumPrinterDrivers *r)
{
const char *cservername;
_spoolss_EnumForms
****************************************************************/
-WERROR _spoolss_EnumForms(pipes_struct *p,
+WERROR _spoolss_EnumForms(struct pipes_struct *p,
struct spoolss_EnumForms *r)
{
WERROR result;
_spoolss_GetForm
****************************************************************/
-WERROR _spoolss_GetForm(pipes_struct *p,
+WERROR _spoolss_GetForm(struct pipes_struct *p,
struct spoolss_GetForm *r)
{
WERROR result;
_spoolss_EnumPorts
****************************************************************/
-WERROR _spoolss_EnumPorts(pipes_struct *p,
+WERROR _spoolss_EnumPorts(struct pipes_struct *p,
struct spoolss_EnumPorts *r)
{
WERROR result;
/****************************************************************************
****************************************************************************/
-static WERROR spoolss_addprinterex_level_2(pipes_struct *p,
+static WERROR spoolss_addprinterex_level_2(struct pipes_struct *p,
const char *server,
struct spoolss_SetPrinterInfoCtr *info_ctr,
struct spoolss_DeviceMode *devmode,
if (*lp_addprinter_cmd() ) {
if ( !add_printer_hook(p->mem_ctx, p->server_info->ptok,
- info2) ) {
+ info2, p->client_address) ) {
return WERR_ACCESS_DENIED;
}
} else {
_spoolss_AddPrinterEx
****************************************************************/
-WERROR _spoolss_AddPrinterEx(pipes_struct *p,
+WERROR _spoolss_AddPrinterEx(struct pipes_struct *p,
struct spoolss_AddPrinterEx *r)
{
switch (r->in.info_ctr->level) {
_spoolss_AddPrinter
****************************************************************/
-WERROR _spoolss_AddPrinter(pipes_struct *p,
+WERROR _spoolss_AddPrinter(struct pipes_struct *p,
struct spoolss_AddPrinter *r)
{
struct spoolss_AddPrinterEx a;
_spoolss_AddPrinterDriverEx
****************************************************************/
-WERROR _spoolss_AddPrinterDriverEx(pipes_struct *p,
+WERROR _spoolss_AddPrinterDriverEx(struct pipes_struct *p,
struct spoolss_AddPrinterDriverEx *r)
{
WERROR err = WERR_OK;
_spoolss_AddPrinterDriver
****************************************************************/
-WERROR _spoolss_AddPrinterDriver(pipes_struct *p,
+WERROR _spoolss_AddPrinterDriver(struct pipes_struct *p,
struct spoolss_AddPrinterDriver *r)
{
struct spoolss_AddPrinterDriverEx a;
_spoolss_GetPrinterDriverDirectory
****************************************************************/
-WERROR _spoolss_GetPrinterDriverDirectory(pipes_struct *p,
+WERROR _spoolss_GetPrinterDriverDirectory(struct pipes_struct *p,
struct spoolss_GetPrinterDriverDirectory *r)
{
WERROR werror;
_spoolss_EnumPrinterData
****************************************************************/
-WERROR _spoolss_EnumPrinterData(pipes_struct *p,
+WERROR _spoolss_EnumPrinterData(struct pipes_struct *p,
struct spoolss_EnumPrinterData *r)
{
WERROR result;
_spoolss_SetPrinterData
****************************************************************/
-WERROR _spoolss_SetPrinterData(pipes_struct *p,
+WERROR _spoolss_SetPrinterData(struct pipes_struct *p,
struct spoolss_SetPrinterData *r)
{
struct spoolss_SetPrinterDataEx r2;
_spoolss_ResetPrinter
****************************************************************/
-WERROR _spoolss_ResetPrinter(pipes_struct *p,
+WERROR _spoolss_ResetPrinter(struct pipes_struct *p,
struct spoolss_ResetPrinter *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_DeletePrinterData
****************************************************************/
-WERROR _spoolss_DeletePrinterData(pipes_struct *p,
+WERROR _spoolss_DeletePrinterData(struct pipes_struct *p,
struct spoolss_DeletePrinterData *r)
{
struct spoolss_DeletePrinterDataEx r2;
_spoolss_AddForm
****************************************************************/
-WERROR _spoolss_AddForm(pipes_struct *p,
+WERROR _spoolss_AddForm(struct pipes_struct *p,
struct spoolss_AddForm *r)
{
struct spoolss_AddFormInfo1 *form = r->in.info.info1;
_spoolss_DeleteForm
****************************************************************/
-WERROR _spoolss_DeleteForm(pipes_struct *p,
+WERROR _spoolss_DeleteForm(struct pipes_struct *p,
struct spoolss_DeleteForm *r)
{
const char *form_name = r->in.form_name;
_spoolss_SetForm
****************************************************************/
-WERROR _spoolss_SetForm(pipes_struct *p,
+WERROR _spoolss_SetForm(struct pipes_struct *p,
struct spoolss_SetForm *r)
{
struct spoolss_AddFormInfo1 *form = r->in.info.info1;
_spoolss_EnumPrintProcessors
****************************************************************/
-WERROR _spoolss_EnumPrintProcessors(pipes_struct *p,
+WERROR _spoolss_EnumPrintProcessors(struct pipes_struct *p,
struct spoolss_EnumPrintProcessors *r)
{
WERROR result;
_spoolss_EnumPrintProcDataTypes
****************************************************************/
-WERROR _spoolss_EnumPrintProcDataTypes(pipes_struct *p,
+WERROR _spoolss_EnumPrintProcDataTypes(struct pipes_struct *p,
struct spoolss_EnumPrintProcDataTypes *r)
{
WERROR result;
_spoolss_EnumMonitors
****************************************************************/
-WERROR _spoolss_EnumMonitors(pipes_struct *p,
+WERROR _spoolss_EnumMonitors(struct pipes_struct *p,
struct spoolss_EnumMonitors *r)
{
WERROR result;
_spoolss_GetJob
****************************************************************/
-WERROR _spoolss_GetJob(pipes_struct *p,
+WERROR _spoolss_GetJob(struct pipes_struct *p,
struct spoolss_GetJob *r)
{
WERROR result = WERR_OK;
_spoolss_GetPrinterDataEx
****************************************************************/
-WERROR _spoolss_GetPrinterDataEx(pipes_struct *p,
+WERROR _spoolss_GetPrinterDataEx(struct pipes_struct *p,
struct spoolss_GetPrinterDataEx *r)
{
_spoolss_SetPrinterDataEx
****************************************************************/
-WERROR _spoolss_SetPrinterDataEx(pipes_struct *p,
+WERROR _spoolss_SetPrinterDataEx(struct pipes_struct *p,
struct spoolss_SetPrinterDataEx *r)
{
struct spoolss_PrinterInfo2 *pinfo2 = NULL;
_spoolss_DeletePrinterDataEx
****************************************************************/
-WERROR _spoolss_DeletePrinterDataEx(pipes_struct *p,
+WERROR _spoolss_DeletePrinterDataEx(struct pipes_struct *p,
struct spoolss_DeletePrinterDataEx *r)
{
const char *printer;
_spoolss_EnumPrinterKey
****************************************************************/
-WERROR _spoolss_EnumPrinterKey(pipes_struct *p,
+WERROR _spoolss_EnumPrinterKey(struct pipes_struct *p,
struct spoolss_EnumPrinterKey *r)
{
uint32_t num_keys;
_spoolss_DeletePrinterKey
****************************************************************/
-WERROR _spoolss_DeletePrinterKey(pipes_struct *p,
+WERROR _spoolss_DeletePrinterKey(struct pipes_struct *p,
struct spoolss_DeletePrinterKey *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_EnumPrinterDataEx
****************************************************************/
-WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
+WERROR _spoolss_EnumPrinterDataEx(struct pipes_struct *p,
struct spoolss_EnumPrinterDataEx *r)
{
uint32_t count = 0;
_spoolss_GetPrintProcessorDirectory
****************************************************************/
-WERROR _spoolss_GetPrintProcessorDirectory(pipes_struct *p,
+WERROR _spoolss_GetPrintProcessorDirectory(struct pipes_struct *p,
struct spoolss_GetPrintProcessorDirectory *r)
{
WERROR result;
_spoolss_XcvData
****************************************************************/
-WERROR _spoolss_XcvData(pipes_struct *p,
+WERROR _spoolss_XcvData(struct pipes_struct *p,
struct spoolss_XcvData *r)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
_spoolss_AddPrintProcessor
****************************************************************/
-WERROR _spoolss_AddPrintProcessor(pipes_struct *p,
+WERROR _spoolss_AddPrintProcessor(struct pipes_struct *p,
struct spoolss_AddPrintProcessor *r)
{
/* for now, just indicate success and ignore the add. We'll
_spoolss_AddPort
****************************************************************/
-WERROR _spoolss_AddPort(pipes_struct *p,
+WERROR _spoolss_AddPort(struct pipes_struct *p,
struct spoolss_AddPort *r)
{
/* do what w2k3 does */
_spoolss_GetPrinterDriver
****************************************************************/
-WERROR _spoolss_GetPrinterDriver(pipes_struct *p,
+WERROR _spoolss_GetPrinterDriver(struct pipes_struct *p,
struct spoolss_GetPrinterDriver *r)
{
p->rng_fault_state = true;
_spoolss_ReadPrinter
****************************************************************/
-WERROR _spoolss_ReadPrinter(pipes_struct *p,
+WERROR _spoolss_ReadPrinter(struct pipes_struct *p,
struct spoolss_ReadPrinter *r)
{
p->rng_fault_state = true;
_spoolss_WaitForPrinterChange
****************************************************************/
-WERROR _spoolss_WaitForPrinterChange(pipes_struct *p,
+WERROR _spoolss_WaitForPrinterChange(struct pipes_struct *p,
struct spoolss_WaitForPrinterChange *r)
{
p->rng_fault_state = true;
_spoolss_ConfigurePort
****************************************************************/
-WERROR _spoolss_ConfigurePort(pipes_struct *p,
+WERROR _spoolss_ConfigurePort(struct pipes_struct *p,
struct spoolss_ConfigurePort *r)
{
p->rng_fault_state = true;
_spoolss_DeletePort
****************************************************************/
-WERROR _spoolss_DeletePort(pipes_struct *p,
+WERROR _spoolss_DeletePort(struct pipes_struct *p,
struct spoolss_DeletePort *r)
{
p->rng_fault_state = true;
_spoolss_CreatePrinterIC
****************************************************************/
-WERROR _spoolss_CreatePrinterIC(pipes_struct *p,
+WERROR _spoolss_CreatePrinterIC(struct pipes_struct *p,
struct spoolss_CreatePrinterIC *r)
{
p->rng_fault_state = true;
_spoolss_PlayGDIScriptOnPrinterIC
****************************************************************/
-WERROR _spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p,
+WERROR _spoolss_PlayGDIScriptOnPrinterIC(struct pipes_struct *p,
struct spoolss_PlayGDIScriptOnPrinterIC *r)
{
p->rng_fault_state = true;
_spoolss_DeletePrinterIC
****************************************************************/
-WERROR _spoolss_DeletePrinterIC(pipes_struct *p,
+WERROR _spoolss_DeletePrinterIC(struct pipes_struct *p,
struct spoolss_DeletePrinterIC *r)
{
p->rng_fault_state = true;
_spoolss_AddPrinterConnection
****************************************************************/
-WERROR _spoolss_AddPrinterConnection(pipes_struct *p,
+WERROR _spoolss_AddPrinterConnection(struct pipes_struct *p,
struct spoolss_AddPrinterConnection *r)
{
p->rng_fault_state = true;
_spoolss_DeletePrinterConnection
****************************************************************/
-WERROR _spoolss_DeletePrinterConnection(pipes_struct *p,
+WERROR _spoolss_DeletePrinterConnection(struct pipes_struct *p,
struct spoolss_DeletePrinterConnection *r)
{
p->rng_fault_state = true;
_spoolss_PrinterMessageBox
****************************************************************/
-WERROR _spoolss_PrinterMessageBox(pipes_struct *p,
+WERROR _spoolss_PrinterMessageBox(struct pipes_struct *p,
struct spoolss_PrinterMessageBox *r)
{
p->rng_fault_state = true;
_spoolss_AddMonitor
****************************************************************/
-WERROR _spoolss_AddMonitor(pipes_struct *p,
+WERROR _spoolss_AddMonitor(struct pipes_struct *p,
struct spoolss_AddMonitor *r)
{
p->rng_fault_state = true;
_spoolss_DeleteMonitor
****************************************************************/
-WERROR _spoolss_DeleteMonitor(pipes_struct *p,
+WERROR _spoolss_DeleteMonitor(struct pipes_struct *p,
struct spoolss_DeleteMonitor *r)
{
p->rng_fault_state = true;
_spoolss_DeletePrintProcessor
****************************************************************/
-WERROR _spoolss_DeletePrintProcessor(pipes_struct *p,
+WERROR _spoolss_DeletePrintProcessor(struct pipes_struct *p,
struct spoolss_DeletePrintProcessor *r)
{
p->rng_fault_state = true;
_spoolss_AddPrintProvidor
****************************************************************/
-WERROR _spoolss_AddPrintProvidor(pipes_struct *p,
+WERROR _spoolss_AddPrintProvidor(struct pipes_struct *p,
struct spoolss_AddPrintProvidor *r)
{
p->rng_fault_state = true;
_spoolss_DeletePrintProvidor
****************************************************************/
-WERROR _spoolss_DeletePrintProvidor(pipes_struct *p,
+WERROR _spoolss_DeletePrintProvidor(struct pipes_struct *p,
struct spoolss_DeletePrintProvidor *r)
{
p->rng_fault_state = true;
_spoolss_FindFirstPrinterChangeNotification
****************************************************************/
-WERROR _spoolss_FindFirstPrinterChangeNotification(pipes_struct *p,
+WERROR _spoolss_FindFirstPrinterChangeNotification(struct pipes_struct *p,
struct spoolss_FindFirstPrinterChangeNotification *r)
{
p->rng_fault_state = true;
_spoolss_FindNextPrinterChangeNotification
****************************************************************/
-WERROR _spoolss_FindNextPrinterChangeNotification(pipes_struct *p,
+WERROR _spoolss_FindNextPrinterChangeNotification(struct pipes_struct *p,
struct spoolss_FindNextPrinterChangeNotification *r)
{
p->rng_fault_state = true;
_spoolss_RouterFindFirstPrinterChangeNotificationOld
****************************************************************/
-WERROR _spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p,
+WERROR _spoolss_RouterFindFirstPrinterChangeNotificationOld(struct pipes_struct *p,
struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
{
p->rng_fault_state = true;
_spoolss_ReplyOpenPrinter
****************************************************************/
-WERROR _spoolss_ReplyOpenPrinter(pipes_struct *p,
+WERROR _spoolss_ReplyOpenPrinter(struct pipes_struct *p,
struct spoolss_ReplyOpenPrinter *r)
{
p->rng_fault_state = true;
_spoolss_RouterReplyPrinter
****************************************************************/
-WERROR _spoolss_RouterReplyPrinter(pipes_struct *p,
+WERROR _spoolss_RouterReplyPrinter(struct pipes_struct *p,
struct spoolss_RouterReplyPrinter *r)
{
p->rng_fault_state = true;
_spoolss_ReplyClosePrinter
****************************************************************/
-WERROR _spoolss_ReplyClosePrinter(pipes_struct *p,
+WERROR _spoolss_ReplyClosePrinter(struct pipes_struct *p,
struct spoolss_ReplyClosePrinter *r)
{
p->rng_fault_state = true;
_spoolss_AddPortEx
****************************************************************/
-WERROR _spoolss_AddPortEx(pipes_struct *p,
+WERROR _spoolss_AddPortEx(struct pipes_struct *p,
struct spoolss_AddPortEx *r)
{
p->rng_fault_state = true;
_spoolss_RouterFindFirstPrinterChangeNotification
****************************************************************/
-WERROR _spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p,
+WERROR _spoolss_RouterFindFirstPrinterChangeNotification(struct pipes_struct *p,
struct spoolss_RouterFindFirstPrinterChangeNotification *r)
{
p->rng_fault_state = true;
_spoolss_SpoolerInit
****************************************************************/
-WERROR _spoolss_SpoolerInit(pipes_struct *p,
+WERROR _spoolss_SpoolerInit(struct pipes_struct *p,
struct spoolss_SpoolerInit *r)
{
p->rng_fault_state = true;
_spoolss_ResetPrinterEx
****************************************************************/
-WERROR _spoolss_ResetPrinterEx(pipes_struct *p,
+WERROR _spoolss_ResetPrinterEx(struct pipes_struct *p,
struct spoolss_ResetPrinterEx *r)
{
p->rng_fault_state = true;
_spoolss_RouterReplyPrinterEx
****************************************************************/
-WERROR _spoolss_RouterReplyPrinterEx(pipes_struct *p,
+WERROR _spoolss_RouterReplyPrinterEx(struct pipes_struct *p,
struct spoolss_RouterReplyPrinterEx *r)
{
p->rng_fault_state = true;
_spoolss_44
****************************************************************/
-WERROR _spoolss_44(pipes_struct *p,
+WERROR _spoolss_44(struct pipes_struct *p,
struct spoolss_44 *r)
{
p->rng_fault_state = true;
_spoolss_47
****************************************************************/
-WERROR _spoolss_47(pipes_struct *p,
+WERROR _spoolss_47(struct pipes_struct *p,
struct spoolss_47 *r)
{
p->rng_fault_state = true;
_spoolss_4a
****************************************************************/
-WERROR _spoolss_4a(pipes_struct *p,
+WERROR _spoolss_4a(struct pipes_struct *p,
struct spoolss_4a *r)
{
p->rng_fault_state = true;
_spoolss_4b
****************************************************************/
-WERROR _spoolss_4b(pipes_struct *p,
+WERROR _spoolss_4b(struct pipes_struct *p,
struct spoolss_4b *r)
{
p->rng_fault_state = true;
_spoolss_4c
****************************************************************/
-WERROR _spoolss_4c(pipes_struct *p,
+WERROR _spoolss_4c(struct pipes_struct *p,
struct spoolss_4c *r)
{
p->rng_fault_state = true;
_spoolss_53
****************************************************************/
-WERROR _spoolss_53(pipes_struct *p,
+WERROR _spoolss_53(struct pipes_struct *p,
struct spoolss_53 *r)
{
p->rng_fault_state = true;
_spoolss_55
****************************************************************/
-WERROR _spoolss_55(pipes_struct *p,
+WERROR _spoolss_55(struct pipes_struct *p,
struct spoolss_55 *r)
{
p->rng_fault_state = true;
_spoolss_56
****************************************************************/
-WERROR _spoolss_56(pipes_struct *p,
+WERROR _spoolss_56(struct pipes_struct *p,
struct spoolss_56 *r)
{
p->rng_fault_state = true;
_spoolss_57
****************************************************************/
-WERROR _spoolss_57(pipes_struct *p,
+WERROR _spoolss_57(struct pipes_struct *p,
struct spoolss_57 *r)
{
p->rng_fault_state = true;
_spoolss_5a
****************************************************************/
-WERROR _spoolss_5a(pipes_struct *p,
+WERROR _spoolss_5a(struct pipes_struct *p,
struct spoolss_5a *r)
{
p->rng_fault_state = true;
_spoolss_5b
****************************************************************/
-WERROR _spoolss_5b(pipes_struct *p,
+WERROR _spoolss_5b(struct pipes_struct *p,
struct spoolss_5b *r)
{
p->rng_fault_state = true;
_spoolss_5c
****************************************************************/
-WERROR _spoolss_5c(pipes_struct *p,
+WERROR _spoolss_5c(struct pipes_struct *p,
struct spoolss_5c *r)
{
p->rng_fault_state = true;
_spoolss_5d
****************************************************************/
-WERROR _spoolss_5d(pipes_struct *p,
+WERROR _spoolss_5d(struct pipes_struct *p,
struct spoolss_5d *r)
{
p->rng_fault_state = true;
_spoolss_5e
****************************************************************/
-WERROR _spoolss_5e(pipes_struct *p,
+WERROR _spoolss_5e(struct pipes_struct *p,
struct spoolss_5e *r)
{
p->rng_fault_state = true;
_spoolss_5f
****************************************************************/
-WERROR _spoolss_5f(pipes_struct *p,
+WERROR _spoolss_5f(struct pipes_struct *p,
struct spoolss_5f *r)
{
p->rng_fault_state = true;
_spoolss_60
****************************************************************/
-WERROR _spoolss_60(pipes_struct *p,
+WERROR _spoolss_60(struct pipes_struct *p,
struct spoolss_60 *r)
{
p->rng_fault_state = true;
_spoolss_61
****************************************************************/
-WERROR _spoolss_61(pipes_struct *p,
+WERROR _spoolss_61(struct pipes_struct *p,
struct spoolss_61 *r)
{
p->rng_fault_state = true;
_spoolss_62
****************************************************************/
-WERROR _spoolss_62(pipes_struct *p,
+WERROR _spoolss_62(struct pipes_struct *p,
struct spoolss_62 *r)
{
p->rng_fault_state = true;
_spoolss_63
****************************************************************/
-WERROR _spoolss_63(pipes_struct *p,
+WERROR _spoolss_63(struct pipes_struct *p,
struct spoolss_63 *r)
{
p->rng_fault_state = true;
_spoolss_64
****************************************************************/
-WERROR _spoolss_64(pipes_struct *p,
+WERROR _spoolss_64(struct pipes_struct *p,
struct spoolss_64 *r)
{
p->rng_fault_state = true;
_spoolss_65
****************************************************************/
-WERROR _spoolss_65(pipes_struct *p,
+WERROR _spoolss_65(struct pipes_struct *p,
struct spoolss_65 *r)
{
p->rng_fault_state = true;
_spoolss_GetCorePrinterDrivers
****************************************************************/
-WERROR _spoolss_GetCorePrinterDrivers(pipes_struct *p,
+WERROR _spoolss_GetCorePrinterDrivers(struct pipes_struct *p,
struct spoolss_GetCorePrinterDrivers *r)
{
p->rng_fault_state = true;
_spoolss_67
****************************************************************/
-WERROR _spoolss_67(pipes_struct *p,
+WERROR _spoolss_67(struct pipes_struct *p,
struct spoolss_67 *r)
{
p->rng_fault_state = true;
_spoolss_GetPrinterDriverPackagePath
****************************************************************/
-WERROR _spoolss_GetPrinterDriverPackagePath(pipes_struct *p,
+WERROR _spoolss_GetPrinterDriverPackagePath(struct pipes_struct *p,
struct spoolss_GetPrinterDriverPackagePath *r)
{
p->rng_fault_state = true;
_spoolss_69
****************************************************************/
-WERROR _spoolss_69(pipes_struct *p,
+WERROR _spoolss_69(struct pipes_struct *p,
struct spoolss_69 *r)
{
p->rng_fault_state = true;
_spoolss_6a
****************************************************************/
-WERROR _spoolss_6a(pipes_struct *p,
+WERROR _spoolss_6a(struct pipes_struct *p,
struct spoolss_6a *r)
{
p->rng_fault_state = true;
_spoolss_6b
****************************************************************/
-WERROR _spoolss_6b(pipes_struct *p,
+WERROR _spoolss_6b(struct pipes_struct *p,
struct spoolss_6b *r)
{
p->rng_fault_state = true;
_spoolss_6c
****************************************************************/
-WERROR _spoolss_6c(pipes_struct *p,
+WERROR _spoolss_6c(struct pipes_struct *p,
struct spoolss_6c *r)
{
p->rng_fault_state = true;
_spoolss_6d
****************************************************************/
-WERROR _spoolss_6d(pipes_struct *p,
+WERROR _spoolss_6d(struct pipes_struct *p,
struct spoolss_6d *r)
{
p->rng_fault_state = true;