mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
Wrote some stubs for new win2k only spoolss rpc commands:
GetPrinterDataEx() and SetPrinterDataEx(). Not sure what the command number is for the latter is - I haven't seen it on the wire yet.
This commit is contained in:
@ -1199,6 +1199,66 @@ static BOOL api_spoolss_getjob(pipes_struct *p)
|
||||
return True;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* api_spoolss_getprinterdataex
|
||||
*
|
||||
* called from the spoolss dispatcher
|
||||
********************************************************************/
|
||||
|
||||
static BOOL api_spoolss_getprinterdataex(pipes_struct *p)
|
||||
{
|
||||
SPOOL_Q_GETPRINTERDATAEX q_u;
|
||||
SPOOL_R_GETPRINTERDATAEX r_u;
|
||||
prs_struct *data = &p->in_data.data;
|
||||
prs_struct *rdata = &p->out_data.rdata;
|
||||
|
||||
ZERO_STRUCT(q_u);
|
||||
ZERO_STRUCT(r_u);
|
||||
|
||||
/* read the stream and fill the struct */
|
||||
if (!spoolss_io_q_getprinterdataex("", &q_u, data, 0)) {
|
||||
DEBUG(0,("spoolss_io_q_getprinterdataex: unable to unmarshall SPOOL_Q_GETPRINTERDATAEX.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
r_u.status = _spoolss_getprinterdataex( p, &q_u, &r_u);
|
||||
|
||||
if (!spoolss_io_r_getprinterdataex("", &r_u, rdata, 0)) {
|
||||
DEBUG(0,("spoolss_io_r_getprinterdataex: unable to marshall SPOOL_R_GETPRINTERDATAEX.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
****************************************************************************/
|
||||
|
||||
static BOOL api_spoolss_setprinterdataex(pipes_struct *p)
|
||||
{
|
||||
SPOOL_Q_SETPRINTERDATAEX q_u;
|
||||
SPOOL_R_SETPRINTERDATAEX r_u;
|
||||
prs_struct *data = &p->in_data.data;
|
||||
prs_struct *rdata = &p->out_data.rdata;
|
||||
|
||||
ZERO_STRUCT(q_u);
|
||||
ZERO_STRUCT(r_u);
|
||||
|
||||
if(!spoolss_io_q_setprinterdataex("", &q_u, data, 0)) {
|
||||
DEBUG(0,("spoolss_io_q_setprinterdataex: unable to unmarshall SPOOL_Q_SETPRINTERDATAEX.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
r_u.status = _spoolss_setprinterdataex(p, &q_u, &r_u);
|
||||
|
||||
if(!spoolss_io_r_setprinterdataex("", &r_u, rdata, 0)) {
|
||||
DEBUG(0,("spoolss_io_r_setprinterdataex: unable to marshall SPOOL_R_SETPRINTERDATAEX.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
\pipe\spoolss commands
|
||||
********************************************************************/
|
||||
@ -1245,6 +1305,9 @@ struct api_struct api_spoolss_cmds[] =
|
||||
{"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors },
|
||||
{"SPOOLSS_GETJOB", SPOOLSS_GETJOB, api_spoolss_getjob },
|
||||
{"SPOOLSS_ENUMPRINTPROCDATATYPES", SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_enumprintprocdatatypes },
|
||||
{"SPOOLSS_GETPRINTERDATAEX", SPOOLSS_GETPRINTERDATAEX, api_spoolss_getprinterdataex },
|
||||
{"SPOOLSS_sETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex },
|
||||
|
||||
{ NULL, 0, NULL }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user