2004-06-18 11:34:28 +04:00
/*
Unix SMB / CIFS implementation .
endpoint server for the spoolss pipe
Copyright ( C ) Tim Potter 2004
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 675 Mass Ave , Cambridge , MA 0213 9 , USA .
*/
# include "includes.h"
2004-11-02 10:42:47 +03:00
# include "rpc_server/dcerpc_server.h"
2004-11-01 13:30:34 +03:00
# include "librpc/gen_ndr/ndr_spoolss.h"
2004-06-18 11:34:28 +04:00
# include "rpc_server/common/common.h"
2004-06-20 11:36:26 +04:00
# include "rpc_server/spoolss/dcesrv_spoolss.h"
2004-06-27 16:03:57 +04:00
static WERROR spoolss_EnumPrinters1 ( TALLOC_CTX * mem_ctx ,
struct ldb_message * * msgs , int num_msgs ,
struct ndr_push * ndr )
2004-06-18 11:34:28 +04:00
{
2004-06-27 16:03:57 +04:00
struct spoolss_PrinterInfo1 * info ;
int i ;
info = talloc ( mem_ctx , num_msgs * sizeof ( struct spoolss_PrinterInfo1 ) ) ;
2004-06-20 15:34:26 +04:00
2004-06-27 16:03:57 +04:00
if ( ! info )
return WERR_NOMEM ;
2004-06-23 11:31:09 +04:00
2004-06-27 16:03:57 +04:00
for ( i = 0 ; i < num_msgs ; i + + ) {
info [ i ] . flags = samdb_result_uint ( msgs [ i ] , " flags " , 0 ) ;
info [ i ] . name = samdb_result_string ( msgs [ i ] , " name " , " " ) ;
info [ i ] . description = samdb_result_string ( msgs [ i ] , " description " , " " ) ;
info [ i ] . comment = samdb_result_string ( msgs [ i ] , " comment " , " " ) ;
}
2004-06-20 15:34:26 +04:00
2004-06-26 17:28:30 +04:00
ndr_push_array ( ndr , NDR_SCALARS | NDR_BUFFERS , info ,
2004-06-27 16:03:57 +04:00
sizeof ( struct spoolss_PrinterInfo1 ) , num_msgs ,
2004-06-26 17:28:30 +04:00
( ndr_push_flags_fn_t ) ndr_push_spoolss_PrinterInfo1 ) ;
return WERR_OK ;
}
2004-06-28 11:12:45 +04:00
static WERROR spoolss_EnumPrinters2 ( TALLOC_CTX * mem_ctx ,
struct ldb_message * * msgs , int num_msgs ,
struct ndr_push * ndr )
{
struct spoolss_PrinterInfo2 * info ;
int i ;
info = talloc ( mem_ctx , num_msgs * sizeof ( struct spoolss_PrinterInfo1 ) ) ;
if ( ! info )
return WERR_NOMEM ;
for ( i = 0 ; i < num_msgs ; i + + ) {
info [ i ] . servername = samdb_result_string ( msgs [ i ] , " servername " , " " ) ;
info [ i ] . printername = samdb_result_string ( msgs [ i ] , " printername " , " " ) ;
info [ i ] . sharename = samdb_result_string ( msgs [ i ] , " sharename " , " " ) ;
info [ i ] . portname = samdb_result_string ( msgs [ i ] , " portname " , " " ) ;
info [ i ] . drivername = samdb_result_string ( msgs [ i ] , " drivername " , " " ) ;
info [ i ] . comment = samdb_result_string ( msgs [ i ] , " comment " , " " ) ;
info [ i ] . location = samdb_result_string ( msgs [ i ] , " location " , " " ) ;
/* DEVICEMODE - eek! */
info [ i ] . sepfile = samdb_result_string ( msgs [ i ] , " sepfile " , " " ) ;
info [ i ] . printprocessor = samdb_result_string ( msgs [ i ] , " printprocessor " , " " ) ;
info [ i ] . datatype = samdb_result_string ( msgs [ i ] , " datatype " , " " ) ;
info [ i ] . parameters = samdb_result_string ( msgs [ i ] , " parameters " , " " ) ;
/* SECURITY_DESCRIPTOR */
info [ i ] . attributes = samdb_result_uint ( msgs [ i ] , " attributes " , 0 ) ;
info [ i ] . priority = samdb_result_uint ( msgs [ i ] , " priority " , 0 ) ;
info [ i ] . defaultpriority = samdb_result_uint ( msgs [ i ] , " defaultpriority " , 0 ) ;
info [ i ] . starttime = samdb_result_uint ( msgs [ i ] , " starttime " , 0 ) ;
info [ i ] . untiltime = samdb_result_uint ( msgs [ i ] , " untiltime " , 0 ) ;
info [ i ] . status = samdb_result_uint ( msgs [ i ] , " status " , 0 ) ;
info [ i ] . cjobs = samdb_result_uint ( msgs [ i ] , " cjobs " , 0 ) ;
info [ i ] . averageppm = samdb_result_uint ( msgs [ i ] , " averageppm " , 0 ) ;
}
ndr_push_array ( ndr , NDR_SCALARS | NDR_BUFFERS , info ,
sizeof ( struct spoolss_PrinterInfo2 ) , num_msgs ,
( ndr_push_flags_fn_t ) ndr_push_spoolss_PrinterInfo2 ) ;
return WERR_OK ;
}
static WERROR spoolss_EnumPrinters5 ( TALLOC_CTX * mem_ctx ,
struct ldb_message * * msgs , int num_msgs ,
struct ndr_push * ndr )
{
struct spoolss_PrinterInfo5 * info ;
int i ;
info = talloc ( mem_ctx , num_msgs * sizeof ( struct spoolss_PrinterInfo1 ) ) ;
if ( ! info )
return WERR_NOMEM ;
for ( i = 0 ; i < num_msgs ; i + + ) {
info [ i ] . printername = samdb_result_string ( msgs [ i ] , " name " , " " ) ;
info [ i ] . portname = samdb_result_string ( msgs [ i ] , " port " , " " ) ;
info [ i ] . attributes = samdb_result_uint ( msgs [ i ] , " attributes " , 0 ) ;
info [ i ] . device_not_selected_timeout = samdb_result_uint ( msgs [ i ] , " device_not_selected_timeout " , 0 ) ;
info [ i ] . transmission_retry_timeout = samdb_result_uint ( msgs [ i ] , " transmission_retry_timeout " , 0 ) ;
}
ndr_push_array ( ndr , NDR_SCALARS | NDR_BUFFERS , info ,
sizeof ( struct spoolss_PrinterInfo5 ) , num_msgs ,
( ndr_push_flags_fn_t ) ndr_push_spoolss_PrinterInfo5 ) ;
return WERR_OK ;
}
2004-06-26 17:28:30 +04:00
/*
spoolss_EnumPrinters
*/
static WERROR spoolss_EnumPrinters ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrinters * r )
{
struct ndr_push * ndr ;
void * spoolss_ctx ;
WERROR result ;
2004-06-27 16:03:57 +04:00
struct ldb_message * * msgs ;
int ret ;
2004-06-20 15:34:26 +04:00
2004-06-26 17:28:30 +04:00
spoolss_ctx = spoolssdb_connect ( ) ;
if ( spoolss_ctx = = NULL )
return WERR_NOMEM ;
2004-06-27 16:03:57 +04:00
ret = spoolssdb_search ( spoolss_ctx , mem_ctx , NULL , & msgs , NULL ,
" (&(objectclass=printer)) " ) ;
2004-06-26 17:28:30 +04:00
ndr = ndr_push_init ( ) ;
2004-06-27 16:03:57 +04:00
r - > out . count = 0 ;
* r - > out . buf_size = 0 ;
2004-06-26 17:28:30 +04:00
switch ( r - > in . level ) {
case 1 :
2004-06-27 16:03:57 +04:00
result = spoolss_EnumPrinters1 ( mem_ctx , msgs , ret , ndr ) ;
2004-06-26 17:28:30 +04:00
break ;
2004-06-28 11:12:45 +04:00
case 2 :
result = spoolss_EnumPrinters2 ( mem_ctx , msgs , ret , ndr ) ;
break ;
case 5 :
result = spoolss_EnumPrinters5 ( mem_ctx , msgs , ret , ndr ) ;
break ;
2004-06-26 17:28:30 +04:00
default :
r - > out . buffer = NULL ;
2004-06-28 11:12:45 +04:00
result = WERR_UNKNOWN_LEVEL ;
2004-06-26 17:28:30 +04:00
goto done ;
}
if ( * r - > in . buf_size < ndr - > offset ) {
* r - > out . buf_size = ndr - > offset ;
2004-06-20 15:34:26 +04:00
result = WERR_INSUFFICIENT_BUFFER ;
goto done ;
}
r - > out . buffer = ( DATA_BLOB * ) talloc ( mem_ctx , sizeof ( DATA_BLOB ) ) ;
if ( ! r - > out . buffer ) {
result = WERR_NOMEM ;
goto done ;
}
2004-06-26 17:28:30 +04:00
* r - > out . buffer = data_blob_talloc ( mem_ctx , ndr - > data , ndr - > offset ) ;
* r - > out . buf_size = ndr - > offset ;
2004-06-20 15:34:26 +04:00
done :
2004-06-26 17:28:30 +04:00
ndr_push_free ( ndr ) ;
spoolssdb_close ( spoolss_ctx ) ;
2004-06-20 15:34:26 +04:00
return result ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
2004-06-20 15:34:26 +04:00
/*
destroy connection state
*/
static void spoolss_OpenPrinter_close ( struct spoolss_openprinter_state * c_state )
{
c_state - > reference_count - - ;
if ( c_state - > reference_count = = 0 ) {
talloc_destroy ( c_state - > mem_ctx ) ;
}
}
2004-06-20 11:36:26 +04:00
/*
destroy an open connection . This closes the database connection
*/
static void spoolss_OpenPrinter_destroy ( struct dcesrv_connection * conn , struct dcesrv_handle * h )
{
2004-06-20 15:34:26 +04:00
struct spoolss_openprinter_state * c_state = h - > data ;
spoolss_OpenPrinter_close ( c_state ) ;
2004-06-20 11:36:26 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_OpenPrinter
*/
static WERROR spoolss_OpenPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_OpenPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_SetJob
*/
static WERROR spoolss_SetJob ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_SetJob * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetJob
*/
static WERROR spoolss_GetJob ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetJob * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumJobs
*/
static WERROR spoolss_EnumJobs ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumJobs * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrinter
*/
static WERROR spoolss_AddPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinter
*/
static WERROR spoolss_DeletePrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_SetPrinter
*/
static WERROR spoolss_SetPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_SetPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrinter
*/
static WERROR spoolss_GetPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrinterDriver
*/
static WERROR spoolss_AddPrinterDriver ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrinterDriver * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPrinterDrivers
*/
static WERROR spoolss_EnumPrinterDrivers ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrinterDrivers * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrinterDriver
*/
static WERROR spoolss_GetPrinterDriver ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrinterDriver * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrinterDriverDirectory
*/
static WERROR spoolss_GetPrinterDriverDirectory ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrinterDriverDirectory * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterDriver
*/
static WERROR spoolss_DeletePrinterDriver ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterDriver * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrintProcessor
*/
static WERROR spoolss_AddPrintProcessor ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrintProcessor * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPrintProcessors
*/
static WERROR spoolss_EnumPrintProcessors ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrintProcessors * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrintProcessorDirectory
*/
static WERROR spoolss_GetPrintProcessorDirectory ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrintProcessorDirectory * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_StartDocPrinter
*/
static WERROR spoolss_StartDocPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_StartDocPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_StartPagePrinter
*/
static WERROR spoolss_StartPagePrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_StartPagePrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_WritePrinter
*/
static WERROR spoolss_WritePrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_WritePrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EndPagePrinter
*/
static WERROR spoolss_EndPagePrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EndPagePrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AbortPrinter
*/
static WERROR spoolss_AbortPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AbortPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ReadPrinter
*/
static WERROR spoolss_ReadPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ReadPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EndDocPrinter
*/
static WERROR spoolss_EndDocPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EndDocPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddJob
*/
static WERROR spoolss_AddJob ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddJob * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ScheduleJob
*/
static WERROR spoolss_ScheduleJob ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ScheduleJob * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrinterData
*/
static WERROR spoolss_GetPrinterData ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrinterData * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_SetPrinterData
*/
static WERROR spoolss_SetPrinterData ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_SetPrinterData * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_WaitForPrinterChange
*/
static WERROR spoolss_WaitForPrinterChange ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_WaitForPrinterChange * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ClosePrinter
*/
static WERROR spoolss_ClosePrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ClosePrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-20 11:36:26 +04:00
struct dcesrv_handle * h ;
* r - > out . handle = * r - > in . handle ;
DCESRV_PULL_HANDLE_WERR ( h , r - > in . handle , DCESRV_HANDLE_ANY ) ;
2004-06-20 15:34:26 +04:00
/* this causes the callback s_XXX_destroy() to be called by
2004-06-20 11:36:26 +04:00
the handle destroy code which destroys the state associated
with the handle */
dcesrv_handle_destroy ( dce_call - > conn , h ) ;
ZERO_STRUCTP ( r - > out . handle ) ;
return WERR_OK ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddForm
*/
static WERROR spoolss_AddForm ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddForm * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeleteForm
*/
static WERROR spoolss_DeleteForm ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeleteForm * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetForm
*/
static WERROR spoolss_GetForm ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetForm * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_SetForm
*/
static WERROR spoolss_SetForm ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_SetForm * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumForms
*/
static WERROR spoolss_EnumForms ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumForms * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPorts
*/
static WERROR spoolss_EnumPorts ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPorts * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumMonitors
*/
static WERROR spoolss_EnumMonitors ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumMonitors * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPort
*/
static WERROR spoolss_AddPort ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPort * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ConfigurePort
*/
static WERROR spoolss_ConfigurePort ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ConfigurePort * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePort
*/
static WERROR spoolss_DeletePort ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePort * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_CreatePrinterIC
*/
static WERROR spoolss_CreatePrinterIC ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_CreatePrinterIC * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_PlayGDIScriptOnPrinterIC
*/
static WERROR spoolss_PlayGDIScriptOnPrinterIC ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_PlayGDIScriptOnPrinterIC * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterIC
*/
static WERROR spoolss_DeletePrinterIC ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterIC * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrinterConnection
*/
static WERROR spoolss_AddPrinterConnection ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrinterConnection * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterConnection
*/
static WERROR spoolss_DeletePrinterConnection ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterConnection * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_PrinterMessageBox
*/
static WERROR spoolss_PrinterMessageBox ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_PrinterMessageBox * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddMonitor
*/
static WERROR spoolss_AddMonitor ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddMonitor * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeleteMonitor
*/
static WERROR spoolss_DeleteMonitor ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeleteMonitor * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrintProcessor
*/
static WERROR spoolss_DeletePrintProcessor ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrintProcessor * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrintProvidor
*/
static WERROR spoolss_AddPrintProvidor ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrintProvidor * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrintProvidor
*/
static WERROR spoolss_DeletePrintProvidor ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrintProvidor * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPrintProcDataTypes
*/
static WERROR spoolss_EnumPrintProcDataTypes ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrintProcDataTypes * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ResetPrinter
*/
static WERROR spoolss_ResetPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ResetPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrinterDriver2
*/
static WERROR spoolss_GetPrinterDriver2 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrinterDriver2 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_FindFirstPrinterChangeNotification
*/
static WERROR spoolss_FindFirstPrinterChangeNotification ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_FindFirstPrinterChangeNotification * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_FindNextPrinterChangeNotification
*/
static WERROR spoolss_FindNextPrinterChangeNotification ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_FindNextPrinterChangeNotification * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_FindClosePrinterNotify
*/
static WERROR spoolss_FindClosePrinterNotify ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_FindClosePrinterNotify * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_RouterFindFirstPrinterChangeNotificationOld
*/
static WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_RouterFindFirstPrinterChangeNotificationOld * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ReplyOpenPrinter
*/
static WERROR spoolss_ReplyOpenPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ReplyOpenPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_RouterReplyPrinter
*/
static WERROR spoolss_RouterReplyPrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_RouterReplyPrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ReplyClosePrinter
*/
static WERROR spoolss_ReplyClosePrinter ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ReplyClosePrinter * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPortEx
*/
static WERROR spoolss_AddPortEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPortEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_RouterFindFirstPrinterChangeNotification
*/
static WERROR spoolss_RouterFindFirstPrinterChangeNotification ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_RouterFindFirstPrinterChangeNotification * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_SpoolerInit
*/
static WERROR spoolss_SpoolerInit ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_SpoolerInit * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_ResetPrinterEx
*/
static WERROR spoolss_ResetPrinterEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_ResetPrinterEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_RemoteFindFirstPrinterChangeNotifyEx
*/
static WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_RemoteFindFirstPrinterChangeNotifyEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_RouterRefreshPrinterChangeNotification
*/
static WERROR spoolss_RouterRefreshPrinterChangeNotification ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_RouterRefreshPrinterChangeNotification * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_RemoteFindNextPrinterChangeNotifyEx
*/
static WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_RemoteFindNextPrinterChangeNotifyEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_44
*/
static WERROR spoolss_44 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_44 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
2004-07-01 08:17:26 +04:00
static WERROR spoolss_OpenPrinterEx_server ( struct dcesrv_call_state * dce_call ,
TALLOC_CTX * mem_ctx ,
struct spoolss_OpenPrinterEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-20 11:36:26 +04:00
struct spoolss_openprinter_state * state ;
struct dcesrv_handle * handle ;
TALLOC_CTX * op_mem_ctx ;
2004-07-01 08:17:26 +04:00
/* Check printername is our name */
2004-06-20 11:36:26 +04:00
2004-07-01 08:17:26 +04:00
if ( ! strequal ( r - > in . printername + 2 , lp_netbios_name ( ) ) )
2004-06-20 11:36:26 +04:00
return WERR_INVALID_PRINTER_NAME ;
op_mem_ctx = talloc_init ( " spoolss_OpenPrinter " ) ;
if ( ! op_mem_ctx ) {
return WERR_OK ;
}
state = talloc_p ( op_mem_ctx , struct spoolss_openprinter_state ) ;
if ( ! state ) {
return WERR_OK ;
}
state - > mem_ctx = op_mem_ctx ;
handle = dcesrv_handle_new ( dce_call - > conn , SPOOLSS_HANDLE_SERVER ) ;
if ( ! handle ) {
talloc_destroy ( state - > mem_ctx ) ;
return WERR_NOMEM ;
}
handle - > data = state ;
handle - > destroy = spoolss_OpenPrinter_destroy ;
state - > reference_count = 1 ;
2004-10-25 19:19:19 +04:00
state - > access_mask = r - > in . access_mask ;
2004-06-20 11:36:26 +04:00
* r - > out . handle = handle - > wire_handle ;
2004-07-01 08:17:26 +04:00
return WERR_OK ;
}
static WERROR spoolss_OpenPrinterEx_printer ( struct dcesrv_call_state * dce_call ,
TALLOC_CTX * mem_ctx ,
struct spoolss_OpenPrinterEx * r )
{
char * server = talloc_strdup ( mem_ctx , r - > in . printername + 2 ) ;
char * pos , * printer ;
pos = strchr ( server , ' \\ ' ) ;
* pos = 0 ;
printer = talloc_strdup ( mem_ctx , pos + 1 ) ;
if ( ! strequal ( server , lp_netbios_name ( ) ) )
return WERR_INVALID_PRINTER_NAME ;
DEBUG ( 0 , ( " looking for server %s, printer %s \n " , server , printer ) ) ;
return WERR_INVALID_PRINTER_NAME ;
}
/*
spoolss_OpenPrinterEx
*/
static WERROR spoolss_OpenPrinterEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_OpenPrinterEx * r )
{
ZERO_STRUCTP ( r - > out . handle ) ;
/* Printername must start with \\ */
2004-09-20 11:26:35 +04:00
if ( strncmp ( r - > in . printername , " \\ \\ " , 2 ) = = 0 )
2004-07-01 08:17:26 +04:00
return WERR_INVALID_PARAM ;
if ( strchr_m ( r - > in . printername + 2 , ' \\ ' ) )
return spoolss_OpenPrinterEx_server ( dce_call , mem_ctx , r ) ;
return spoolss_OpenPrinterEx_printer ( dce_call , mem_ctx , r ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrinterEx
*/
static WERROR spoolss_AddPrinterEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrinterEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_47
*/
static WERROR spoolss_47 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_47 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPrinterData
*/
static WERROR spoolss_EnumPrinterData ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrinterData * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterData
*/
static WERROR spoolss_DeletePrinterData ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterData * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_4a
*/
static WERROR spoolss_4a ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_4a * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_4b
*/
static WERROR spoolss_4b ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_4b * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_4c
*/
static WERROR spoolss_4c ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_4c * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_SetPrinterDataEx
*/
static WERROR spoolss_SetPrinterDataEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_SetPrinterDataEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_GetPrinterDataEx
*/
static WERROR spoolss_GetPrinterDataEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_GetPrinterDataEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPrinterDataEx
*/
static WERROR spoolss_EnumPrinterDataEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrinterDataEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_EnumPrinterKey
*/
static WERROR spoolss_EnumPrinterKey ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_EnumPrinterKey * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterDataEx
*/
static WERROR spoolss_DeletePrinterDataEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterDataEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterKey
*/
static WERROR spoolss_DeletePrinterKey ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterKey * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_53
*/
static WERROR spoolss_53 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_53 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_DeletePrinterDriverEx
*/
static WERROR spoolss_DeletePrinterDriverEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_DeletePrinterDriverEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_55
*/
static WERROR spoolss_55 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_55 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_56
*/
static WERROR spoolss_56 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_56 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_57
*/
static WERROR spoolss_57 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_57 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_58
*/
static WERROR spoolss_58 ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_58 * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_AddPrinterDriverEx
*/
static WERROR spoolss_AddPrinterDriverEx ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_AddPrinterDriverEx * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_5a
*/
static WERROR spoolss_5a ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_5a * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_5b
*/
static WERROR spoolss_5b ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_5b * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_5c
*/
static WERROR spoolss_5c ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_5c * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_5d
*/
static WERROR spoolss_5d ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_5d * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_5e
*/
static WERROR spoolss_5e ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_5e * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
/*
spoolss_5f
*/
static WERROR spoolss_5f ( struct dcesrv_call_state * dce_call , TALLOC_CTX * mem_ctx ,
struct spoolss_5f * r )
2004-06-18 11:34:28 +04:00
{
2004-06-18 16:11:41 +04:00
DCESRV_FAULT ( DCERPC_FAULT_OP_RNG_ERROR ) ;
2004-06-18 11:34:28 +04:00
}
2004-06-18 16:11:41 +04:00
2004-06-18 11:34:28 +04:00
/* include the generated boilerplate */
# include "librpc/gen_ndr/ndr_spoolss_s.c"