summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-01-07 15:05:28 +0100
committerGünther Deschner <gd@samba.org>2009-01-08 11:19:34 +0100
commit07e1e30b96dc17c60604b55a3f2a50afc9c8d791 (patch)
treeb37a4d57b59b9a058dee6fd025e5b1dc5fbd8851 /source3
parent3079e14f94c58be379474e20b488131cc2632497 (diff)
downloadsamba-07e1e30b96dc17c60604b55a3f2a50afc9c8d791.tar.gz
samba-07e1e30b96dc17c60604b55a3f2a50afc9c8d791.tar.bz2
samba-07e1e30b96dc17c60604b55a3f2a50afc9c8d791.zip
s3-svcctl: remove old hand marshalling of svcctl_QueryServiceConfig2W.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h8
-rw-r--r--source3/include/rpc_svcctl.h34
-rw-r--r--source3/rpc_parse/parse_svcctl.c187
3 files changed, 0 insertions, 229 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 301ffc109f..35cb490d17 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6160,13 +6160,6 @@ bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enu
uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status );
bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth);
bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth);
-bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth);
-void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc );
-bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth );
-uint32 svcctl_sizeof_service_description( SERVICE_DESCRIPTION *desc );
-bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth );
-uint32 svcctl_sizeof_service_fa( SERVICE_FAILURE_ACTIONS *fa);
-bool svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth);
/* The following definitions come from rpc_server/srv_eventlog.c */
@@ -6406,7 +6399,6 @@ NTSTATUS rpc_svcctl2_init(void);
bool init_service_op_table( void );
WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, SVCCTL_R_ENUM_SERVICES_STATUS *r_u);
-WERROR _svcctl_query_service_config2( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u );
/* The following definitions come from rpcclient/cmd_dfs.c */
diff --git a/source3/include/rpc_svcctl.h b/source3/include/rpc_svcctl.h
index 4f36d23644..5f83b19f68 100644
--- a/source3/include/rpc_svcctl.h
+++ b/source3/include/rpc_svcctl.h
@@ -103,25 +103,6 @@ typedef struct {
SERVICE_STATUS status;
} ENUM_SERVICES_STATUS;
-typedef struct {
- uint32 unknown;
- UNISTR description;
-} SERVICE_DESCRIPTION;
-
-typedef struct {
- uint32 type;
- uint32 delay;
-} SC_ACTION;
-
-typedef struct {
- uint32 reset_period;
- UNISTR2 *rebootmsg; /* i have no idea if these are UNISTR2's. I can't get a good trace */
- UNISTR2 *command;
- uint32 num_actions;
- SC_ACTION *actions;
-} SERVICE_FAILURE_ACTIONS;
-
-
/* rpc structures */
/**************************/
@@ -142,20 +123,5 @@ typedef struct {
WERROR status;
} SVCCTL_R_ENUM_SERVICES_STATUS;
-/**************************/
-
-typedef struct {
- POLICY_HND handle;
- uint32 level;
- uint32 buffer_size;
-} SVCCTL_Q_QUERY_SERVICE_CONFIG2;
-
-typedef struct {
- RPC_BUFFER buffer;
- uint32 needed;
- WERROR status;
-} SVCCTL_R_QUERY_SERVICE_CONFIG2;
-
-
#endif /* _RPC_SVCCTL_H */
diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c
index 8441165a1c..559c65432e 100644
--- a/source3/rpc_parse/parse_svcctl.c
+++ b/source3/rpc_parse/parse_svcctl.c
@@ -90,23 +90,6 @@ uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status )
return size;
}
-/********************************************************************
-********************************************************************/
-
-static uint32 sizeof_unistr2( UNISTR2 *string )
-{
- uint32 size = 0;
-
- if ( !string )
- return 0;
-
- size = sizeof(uint32) * 3; /* length fields */
- size += 2 * string->uni_max_len; /* string data */
- size += size % 4; /* alignment */
-
- return size;
-}
-
/*******************************************************************
********************************************************************/
@@ -170,173 +153,3 @@ bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_S
return True;
}
-
-/*******************************************************************
-********************************************************************/
-
-bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "svcctl_io_q_query_service_config2");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth))
- return False;
-
- if(!prs_uint32("level", ps, depth, &q_u->level))
- return False;
-
- if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
-********************************************************************/
-
-void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc )
-{
- desc->unknown = 0x04; /* always 0x0000 0004 (no idea what this is) */
- init_unistr( &desc->description, service_desc );
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth )
-{
- prs_struct *ps = &buffer->prs;
-
- prs_debug(ps, depth, desc, "svcctl_io_service_description");
- depth++;
-
- if ( !prs_uint32("unknown", ps, depth, &description->unknown) )
- return False;
- if ( !prs_unistr("description", ps, depth, &description->description) )
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-uint32 svcctl_sizeof_service_description( SERVICE_DESCRIPTION *desc )
-{
- if ( !desc )
- return 0;
-
- /* make sure to include the terminating NULL */
- return ( sizeof(uint32) + (2*(str_len_uni(&desc->description)+1)) );
-}
-
-/*******************************************************************
-********************************************************************/
-
-static bool svcctl_io_action( const char *desc, SC_ACTION *action, prs_struct *ps, int depth )
-{
-
- prs_debug(ps, depth, desc, "svcctl_io_action");
- depth++;
-
- if ( !prs_uint32("type", ps, depth, &action->type) )
- return False;
- if ( !prs_uint32("delay", ps, depth, &action->delay) )
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth )
-{
- prs_struct *ps = &buffer->prs;
- int i;
-
- prs_debug(ps, depth, desc, "svcctl_io_service_description");
- depth++;
-
- if ( !prs_uint32("reset_period", ps, depth, &fa->reset_period) )
- return False;
-
- if ( !prs_pointer( desc, ps, depth, (void*)&fa->rebootmsg, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) )
- return False;
- if ( !prs_pointer( desc, ps, depth, (void*)&fa->command, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) )
- return False;
-
- if ( !prs_uint32("num_actions", ps, depth, &fa->num_actions) )
- return False;
-
- if ( UNMARSHALLING(ps)) {
- if (fa->num_actions) {
- if ( !(fa->actions = TALLOC_ARRAY( talloc_tos(), SC_ACTION, fa->num_actions )) ) {
- DEBUG(0,("svcctl_io_service_fa: talloc() failure!\n"));
- return False;
- }
- } else {
- fa->actions = NULL;
- }
- }
-
- for ( i=0; i<fa->num_actions; i++ ) {
- if ( !svcctl_io_action( "actions", &fa->actions[i], ps, depth ) )
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-uint32 svcctl_sizeof_service_fa( SERVICE_FAILURE_ACTIONS *fa)
-{
- uint32 size = 0;
-
- if ( !fa )
- return 0;
-
- size = sizeof(uint32) * 2;
- size += sizeof_unistr2( fa->rebootmsg );
- size += sizeof_unistr2( fa->command );
- size += sizeof(SC_ACTION) * fa->num_actions;
-
- return size;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth)
-{
- if ( !r_u )
- return False;
-
- prs_debug(ps, depth, desc, "svcctl_io_r_query_service_config2");
- depth++;
-
- if ( !prs_align(ps) )
- return False;
-
- if (!prs_rpcbuffer("", ps, depth, &r_u->buffer))
- return False;
- if(!prs_align(ps))
- return False;
-
- if (!prs_uint32("needed", ps, depth, &r_u->needed))
- return False;
-
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}