[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha6-1093-g443743d
Günther Deschner
gd at samba.org
Mon Feb 23 15:35:27 GMT 2009
The branch, master has been updated
via 443743d423f591ce388fff76c60fed23b5494d90 (commit)
via 2234984fd0a745603b3131e330234349fe428742 (commit)
via fc703a14928c61031589ac6cce8f2985e5fb87a9 (commit)
via 0295008a87478a6fa1c685128fa01918102d286d (commit)
via ce8ca0e68a577d09b492bd226b22e9c61d35ce09 (commit)
from c1e76d0dd9a1a7134fa3c0012a9cbe8f51f0716c (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 443743d423f591ce388fff76c60fed23b5494d90
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 17 00:13:24 2009 +0100
s3-spoolss: remove old SPOOL_NOTIFY_OPTION definitions.
Guenther
commit 2234984fd0a745603b3131e330234349fe428742
Author: Günther Deschner <gd at samba.org>
Date: Mon Feb 16 23:34:12 2009 +0100
s3-spoolss: remove old spoolss_RemoteFindFirstPrinterChangeNotifyEx.
Guenther
commit fc703a14928c61031589ac6cce8f2985e5fb87a9
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 12 14:33:26 2009 +0100
s3-spoolss: remove SPOOL_NOTIFY_INFO_DATA and SPOOL_NOTIFY_INFO alltogether.
Guenther
commit 0295008a87478a6fa1c685128fa01918102d286d
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 12 14:28:33 2009 +0100
s3-spoolss: remove old spoolss_RouterReplyPrinterEx.
Guenther
commit ce8ca0e68a577d09b492bd226b22e9c61d35ce09
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 12 16:21:59 2009 +0100
s3-spoolss: remove old spoolss_RouterRefreshPrinterChangeNotify.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/include/proto.h | 25 --
source3/include/rpc_spoolss.h | 121 ------
source3/rpc_client/cli_spoolss_notify.c | 86 ----
source3/rpc_parse/parse_spoolss.c | 696 -------------------------------
4 files changed, 0 insertions(+), 928 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 93b4ca8..525cb3c 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5524,15 +5524,6 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *me
/* The following definitions come from rpc_client/cli_spoolss_notify.c */
-WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 notify_data_len,
- SPOOL_NOTIFY_INFO_DATA *notify_data,
- uint32 change_low, uint32 change_high);
-WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 flags, uint32 options,
- const char *localmachine, uint32 printerlocal,
- SPOOL_NOTIFY_OPTION *option);
-
/* The following definitions come from rpc_client/init_spoolss.c */
bool init_systemtime(struct spoolss_Time *r,
@@ -5817,8 +5808,6 @@ bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int
bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
-bool smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
- prs_struct *ps, int depth);
bool spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u );
bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode);
bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u,
@@ -5835,10 +5824,6 @@ bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
const char *valuename, uint32 size);
bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth);
bool smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth);
bool smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth);
bool smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth);
@@ -5994,11 +5979,6 @@ void free_printer_info_5(PRINTER_INFO_5 *printer);
void free_printer_info_6(PRINTER_INFO_6 *printer);
void free_printer_info_7(PRINTER_INFO_7 *printer);
void free_job_info_2(JOB_INFO_2 *job);
-bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
- uint32 change_low, uint32 change_high,
- SPOOL_NOTIFY_INFO *info);
-bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
POLICY_HND *hnd, const char *key,
uint32 size);
@@ -6012,9 +5992,6 @@ bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
uint32 jobid, uint32 level, RPC_BUFFER *buffer,
uint32 offered);
-bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
- uint32 flags, uint32 options, const char *localmachine,
- uint32 printerlocal, SPOOL_NOTIFY_OPTION *option);
/* The following definitions come from rpc_server/srv_eventlog_lib.c */
@@ -6140,7 +6117,6 @@ bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
uint32 type, uint8 *data, int real_len );
WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
-WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u);
void spoolss_notify_server_name(int snum,
struct spoolss_Notify *data,
print_queue_struct *queue,
@@ -6206,7 +6182,6 @@ void spoolss_notify_cjobs(int snum,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
TALLOC_CTX *mem_ctx);
-WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u);
void construct_info_data(struct spoolss_Notify *info_data,
enum spoolss_NotifyType type,
enum spoolss_Field field,
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 670eca4..504cfea 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -343,28 +343,6 @@ PRINTER_DEFAULT;
/********************************************/
-typedef struct spool_notify_option_type
-{
- uint16 type;
- uint16 reserved0;
- uint32 reserved1;
- uint32 reserved2;
- uint32 count;
- uint32 fields_ptr;
- uint32 count2;
- uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
-}
-SPOOL_NOTIFY_OPTION_TYPE;
-
-typedef struct spool_notify_option_type_ctr
-{
- uint32 count;
- SPOOL_NOTIFY_OPTION_TYPE *type;
-}
-SPOOL_NOTIFY_OPTION_TYPE_CTR;
-
-
-
typedef struct s_header_type
{
uint32 type;
@@ -396,86 +374,6 @@ typedef struct spool_r_getprinterdata
}
SPOOL_R_GETPRINTERDATA;
-typedef struct spool_notify_option
-{
- uint32 version;
- uint32 flags;
- uint32 count;
- uint32 option_type_ptr;
- SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
-}
-SPOOL_NOTIFY_OPTION;
-
-typedef struct spool_notify_info_data
-{
- uint16 type;
- uint16 field;
- uint32 reserved;
- uint32 id;
- union {
- uint32 value[2];
- struct {
- uint32 length;
- uint16 *string;
- } data;
- struct {
- uint32 size;
- SEC_DESC *desc;
- } sd;
- }
- notify_data;
- uint32 size;
- uint32 enc_type;
-} SPOOL_NOTIFY_INFO_DATA;
-
-typedef struct spool_notify_info
-{
- uint32 version;
- uint32 flags;
- uint32 count;
- SPOOL_NOTIFY_INFO_DATA *data;
-}
-SPOOL_NOTIFY_INFO;
-
-/* If the struct name looks obscure, yes it is ! */
-/* RemoteFindFirstPrinterChangeNotificationEx query struct */
-typedef struct spoolss_q_rffpcnex
-{
- POLICY_HND handle;
- uint32 flags;
- uint32 options;
- uint32 localmachine_ptr;
- UNISTR2 localmachine;
- uint32 printerlocal;
- uint32 option_ptr;
- SPOOL_NOTIFY_OPTION *option;
-}
-SPOOL_Q_RFFPCNEX;
-
-typedef struct spool_r_rffpcnex
-{
- WERROR status;
-}
-SPOOL_R_RFFPCNEX;
-
-/* Remote Find Next Printer Change Notify Ex */
-typedef struct spool_q_rfnpcnex
-{
- POLICY_HND handle;
- uint32 change;
- uint32 option_ptr;
- SPOOL_NOTIFY_OPTION *option;
-}
-SPOOL_Q_RFNPCNEX;
-
-typedef struct spool_r_rfnpcnex
-{
- uint32 info_ptr;
- SPOOL_NOTIFY_INFO info;
- WERROR status;
-}
-SPOOL_R_RFNPCNEX;
-
typedef struct printer_info_0
{
UNISTR printername;
@@ -1349,25 +1247,6 @@ typedef struct spool_r_getjob
}
SPOOL_R_GETJOB;
-typedef struct spool_q_rrpcn
-{
- POLICY_HND handle;
- uint32 change_low;
- uint32 change_high;
- uint32 unknown0;
- uint32 unknown1;
- uint32 info_ptr;
- SPOOL_NOTIFY_INFO info;
-}
-SPOOL_Q_REPLY_RRPCN;
-
-typedef struct spool_r_rrpcn
-{
- uint32 unknown0;
- WERROR status;
-}
-SPOOL_R_REPLY_RRPCN;
-
typedef struct spool_q_enumprinterkey
{
POLICY_HND handle;
diff --git a/source3/rpc_client/cli_spoolss_notify.c b/source3/rpc_client/cli_spoolss_notify.c
index 8ae7835..41abcd4 100644
--- a/source3/rpc_client/cli_spoolss_notify.c
+++ b/source3/rpc_client/cli_spoolss_notify.c
@@ -30,90 +30,4 @@
*/
/*********************************************************************
- This SPOOLSS_REPLY_RRPCN function is used to send a change
- notification event when the registration **did** use
- SPOOL_NOTIFY_OPTION_TYPE structure to specify the events to monitor
- Also see cli_spoolss_routereplyprinter()
*********************************************************************/
-
-WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 notify_data_len,
- SPOOL_NOTIFY_INFO_DATA *notify_data,
- uint32 change_low, uint32 change_high)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_REPLY_RRPCN q;
- SPOOL_R_REPLY_RRPCN r;
- WERROR result = W_ERROR(ERRgeneral);
- SPOOL_NOTIFY_INFO notify_info;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- ZERO_STRUCT(notify_info);
-
- /* Initialise input parameters */
-
- notify_info.version = 0x2;
- notify_info.flags = 0x00020000; /* ?? */
- notify_info.count = notify_data_len;
- notify_info.data = notify_data;
-
- /* create and send a MSRPC command with api */
- /* store the parameters */
-
- make_spoolss_q_reply_rrpcn(&q, pol, change_low, change_high,
- ¬ify_info);
-
- /* Marshall data and send request */
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_RRPCN,
- q, r,
- qbuf, rbuf,
- spoolss_io_q_reply_rrpcn,
- spoolss_io_r_reply_rrpcn,
- WERR_GENERAL_FAILURE );
-
- if (r.unknown0 == 0x00080000)
- DEBUG(8,("cli_spoolss_reply_rrpcn: I think the spooler resonded that the notification was ignored.\n"));
- else if ( r.unknown0 != 0x0 )
- DEBUG(8,("cli_spoolss_reply_rrpcn: unknown0 is non-zero [0x%x]\n", r.unknown0));
-
- result = r.status;
- return result;
-}
-
-/*********************************************************************
- *********************************************************************/
-
-WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 flags, uint32 options,
- const char *localmachine, uint32 printerlocal,
- SPOOL_NOTIFY_OPTION *option)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_RFFPCNEX q;
- SPOOL_R_RFFPCNEX r;
- WERROR result = W_ERROR(ERRgeneral);
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise input parameters */
-
- make_spoolss_q_rffpcnex(
- &q, pol, flags, options, localmachine, printerlocal,
- option);
-
- /* Marshall data and send request */
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_RFFPCNEX,
- q, r,
- qbuf, rbuf,
- spoolss_io_q_rffpcnex,
- spoolss_io_r_rffpcnex,
- WERR_GENERAL_FAILURE );
-
- result = r.status;
- return result;
-}
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 577ba73..435bb1b 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -71,387 +71,6 @@ bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime)
}
/*******************************************************************
-reads or writes an NOTIFY OPTION TYPE structure.
-********************************************************************/
-
-/* NOTIFY_OPTION_TYPE and NOTIFY_OPTION_TYPE_DATA are really one
- structure. The _TYPE structure is really the deferred referrants (i.e
- the notify fields array) of the _TYPE structure. -tpot */
-
-static bool smb_io_notify_option_type(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "smb_io_notify_option_type");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if(!prs_uint16("type", ps, depth, &type->type))
- return False;
- if(!prs_uint16("reserved0", ps, depth, &type->reserved0))
- return False;
- if(!prs_uint32("reserved1", ps, depth, &type->reserved1))
- return False;
- if(!prs_uint32("reserved2", ps, depth, &type->reserved2))
- return False;
- if(!prs_uint32("count", ps, depth, &type->count))
- return False;
- if(!prs_uint32("fields_ptr", ps, depth, &type->fields_ptr))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes an NOTIFY OPTION TYPE DATA.
-********************************************************************/
-
-static bool smb_io_notify_option_type_data(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
-{
- int i;
-
- prs_debug(ps, depth, desc, "smb_io_notify_option_type_data");
- depth++;
-
- /* if there are no fields just return */
- if (type->fields_ptr==0)
- return True;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("count2", ps, depth, &type->count2))
- return False;
-
- if (type->count2 != type->count)
- DEBUG(4,("What a mess, count was %x now is %x !\n", type->count, type->count2));
-
- if (type->count2 > MAX_NOTIFY_TYPE_FOR_NOW) {
- return False;
- }
-
- /* parse the option type data */
- for(i=0;i<type->count2;i++)
- if(!prs_uint16("fields",ps,depth,&type->fields[i]))
- return False;
- return True;
-}
-
-/*******************************************************************
-reads or writes an NOTIFY OPTION structure.
-********************************************************************/
-
-static bool smb_io_notify_option_type_ctr(const char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth)
-{
- int i;
-
- prs_debug(ps, depth, desc, "smb_io_notify_option_type_ctr");
- depth++;
-
- if(!prs_uint32("count", ps, depth, &ctr->count))
- return False;
-
- /* reading */
- if (UNMARSHALLING(ps) && ctr->count)
- if((ctr->type=PRS_ALLOC_MEM(ps,SPOOL_NOTIFY_OPTION_TYPE,ctr->count)) == NULL)
- return False;
-
- /* the option type struct */
- for(i=0;i<ctr->count;i++)
- if(!smb_io_notify_option_type("", &ctr->type[i] , ps, depth))
- return False;
-
- /* the type associated with the option type struct */
- for(i=0;i<ctr->count;i++)
- if(!smb_io_notify_option_type_data("", &ctr->type[i] , ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes an NOTIFY OPTION structure.
-********************************************************************/
-
-static bool smb_io_notify_option(const char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "smb_io_notify_option");
- depth++;
-
- if(!prs_uint32("version", ps, depth, &option->version))
- return False;
- if(!prs_uint32("flags", ps, depth, &option->flags))
- return False;
- if(!prs_uint32("count", ps, depth, &option->count))
- return False;
- if(!prs_uint32("option_type_ptr", ps, depth, &option->option_type_ptr))
- return False;
-
- /* marshalling or unmarshalling, that would work */
- if (option->option_type_ptr!=0) {
- if(!smb_io_notify_option_type_ctr("", &option->ctr ,ps, depth))
- return False;
- }
- else {
- option->ctr.type=NULL;
- option->ctr.count=0;
- }
-
- return True;
-}
-
-/*******************************************************************
-reads or writes an NOTIFY INFO DATA structure.
-********************************************************************/
-
-static bool smb_io_notify_info_data(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth)
-{
- uint32 useless_ptr=0x0FF0ADDE;
-
- prs_debug(ps, depth, desc, "smb_io_notify_info_data");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!prs_uint16("type", ps, depth, &data->type))
- return False;
- if(!prs_uint16("field", ps, depth, &data->field))
- return False;
-
- if(!prs_uint32("how many words", ps, depth, &data->size))
- return False;
- if(!prs_uint32("id", ps, depth, &data->id))
- return False;
- if(!prs_uint32("how many words", ps, depth, &data->size))
- return False;
-
- switch (data->enc_type) {
-
- /* One and two value data has two uint32 values */
-
- case NOTIFY_ONE_VALUE:
- case NOTIFY_TWO_VALUE:
-
- if(!prs_uint32("value[0]", ps, depth, &data->notify_data.value[0]))
- return False;
- if(!prs_uint32("value[1]", ps, depth, &data->notify_data.value[1]))
- return False;
- break;
-
- /* Pointers and strings have a string length and a
- pointer. For a string the length is expressed as
- the number of uint16 characters plus a trailing
- \0\0. */
-
- case NOTIFY_POINTER:
--
Samba Shared Repository
More information about the samba-cvs
mailing list