From 5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Mar 2005 23:26:33 +0000 Subject: r6014: rather large change set.... pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221) --- source3/rpc_parse/parse_svcctl.c | 665 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 665 insertions(+) create mode 100644 source3/rpc_parse/parse_svcctl.c (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c new file mode 100644 index 0000000000..15f71b0ca0 --- /dev/null +++ b/source3/rpc_parse/parse_svcctl.c @@ -0,0 +1,665 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines + * Copyright (C) Gerald (Jerry) Carter 2005. + * + * 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 02139, USA. + */ + +#include "includes.h" + +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_PARSE + +/******************************************************************* +********************************************************************/ + +static BOOL svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, prs_struct *ps, int depth ) +{ + + prs_debug(ps, depth, desc, "svcctl_io_service_status"); + depth++; + + if(!prs_uint32("type", ps, depth, &status->type)) + return False; + + if(!prs_uint32("state", ps, depth, &status->state)) + return False; + + if(!prs_uint32("controls_accepted", ps, depth, &status->controls_accepted)) + return False; + + if(!prs_uint32("win32_exit_code", ps, depth, &status->win32_exit_code)) + return False; + + if(!prs_uint32("service_exit_code", ps, depth, &status->service_exit_code)) + return False; + + if(!prs_uint32("check_point", ps, depth, &status->check_point)) + return False; + + if(!prs_uint32("wait_hint", ps, depth, &status->wait_hint)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +static BOOL svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, prs_struct *ps, int depth ) +{ + + prs_debug(ps, depth, desc, "svcctl_io_service_config"); + depth++; + + if(!prs_uint32("service_type", ps, depth, &config->service_type)) + return False; + if(!prs_uint32("start_type", ps, depth, &config->start_type)) + return False; + if(!prs_uint32("error_control", ps, depth, &config->error_control)) + return False; + + if (!prs_io_unistr2_p("", ps, depth, &config->executablepath)) + return False; + if (!prs_io_unistr2_p("", ps, depth, &config->loadordergroup)) + return False; + + if(!prs_uint32("tag_id", ps, depth, &config->tag_id)) + return False; + + if (!prs_io_unistr2_p("", ps, depth, &config->dependencies)) + return False; + if (!prs_io_unistr2_p("", ps, depth, &config->startname)) + return False; + if (!prs_io_unistr2_p("", ps, depth, &config->displayname)) + return False; + + if (!prs_io_unistr2("", ps, depth, config->executablepath)) + return False; + if (!prs_io_unistr2("", ps, depth, config->loadordergroup)) + return False; + if (!prs_io_unistr2("", ps, depth, config->dependencies)) + return False; + if (!prs_io_unistr2("", ps, depth, config->startname)) + return False; + if (!prs_io_unistr2("", ps, depth, config->displayname)) + return False; + + return True; +} + + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth ) +{ + prs_struct *ps=&buffer->prs; + + prs_debug(ps, depth, desc, "svcctl_io_enum_services_status"); + depth++; + + if ( !smb_io_relstr("servicename", buffer, depth, &enum_status->servicename) ) + return False; + if ( !smb_io_relstr("displayname", buffer, depth, &enum_status->displayname) ) + return False; + + if ( !svcctl_io_service_status("svc_status", &enum_status->status, ps, depth) ) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status ) +{ + uint32 size = 0; + + size += size_of_relative_string( &status->servicename ); + size += size_of_relative_string( &status->displayname ); + size += sizeof(SERVICE_STATUS); + + return size; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_close_service(const char *desc, SVCCTL_Q_CLOSE_SERVICE *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_close_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) + return False; + + return True; +} + + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_close_service(const char *desc, SVCCTL_R_CLOSE_SERVICE *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_close_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_open_scmanager"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("srv_ptr", ps, depth, &q_u->ptr_srv)) + return False; + if(!smb_io_unistr2("servername", &q_u->servername, q_u->ptr_srv, ps, depth)) + return False; + if(!prs_align(ps)) + return False; + + if(!prs_uint32("db_ptr", ps, depth, &q_u->ptr_db)) + return False; + if(!smb_io_unistr2("database", &q_u->database, q_u->ptr_db, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_open_scmanager"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("scm_pol", &r_u->handle, ps, depth)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_get_display_name"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) + return False; + + if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("display_name_len", ps, depth, &q_u->display_name_len)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname ) +{ + r_u->display_name_len = strlen(displayname); + init_unistr2( &r_u->displayname, displayname, UNI_STR_TERMINATE ); + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_get_display_name"); + depth++; + + if(!prs_align(ps)) + return False; + + + if(!smb_io_unistr2("displayname", &r_u->displayname, 1, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("display_name_len", ps, depth, &r_u->display_name_len)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_open_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) + return False; + + if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_open_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &r_u->handle, ps, depth)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_query_status"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_query_status"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!svcctl_io_service_status("service_status", &r_u->svc_status, ps, depth)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_enum_services_status"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) + return False; + + if(!prs_uint32("type", ps, depth, &q_u->type)) + return False; + if(!prs_uint32("state", ps, depth, &q_u->state)) + return False; + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + if(!prs_pointer("resume", ps, depth, (void**)&q_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_enum_services_status"); + 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_uint32("returned", ps, depth, &r_u->returned)) + return False; + + if(!prs_pointer("resume", ps, depth, (void**)&r_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_start_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) + return False; + + if(!prs_uint32("parmcount", ps, depth, &q_u->parmcount)) + return False; + + if(!smb_io_unistr2_array("parameters", &q_u->parameters, ps, depth)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_start_service"); + depth++; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_enum_dependent_services"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) + return False; + + if(!prs_uint32("state", ps, depth, &q_u->state)) + return False; + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_enum_dependent_services"); + 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_uint32("returned", ps, depth, &r_u->returned)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_control_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) + return False; + + if(!prs_uint32("control", ps, depth, &q_u->control)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_control_service"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!svcctl_io_service_status("service_status", &r_u->svc_status, ps, depth)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_query_service_config"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) + return False; + + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + return True; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_query_service_config"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!svcctl_io_service_config("config", &r_u->config, ps, depth)) + 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; +} + + -- cgit From 259d44dbb2c2239339f6888fd5da12632abcbb28 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Mar 2005 16:11:23 +0000 Subject: r6038: adding more flesh to 'net rpc service' open and close the service control manager. Also experimenting with ideas for cli_xxx() interface. (This used to be commit 4da89ef17b8c4644b97b923cebfe8e446b508b4d) --- source3/rpc_parse/parse_svcctl.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 15f71b0ca0..f13f01a05a 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -192,22 +192,17 @@ BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, if(!prs_align(ps)) return False; - if(!prs_uint32("srv_ptr", ps, depth, &q_u->ptr_srv)) - return False; - if(!smb_io_unistr2("servername", &q_u->servername, q_u->ptr_srv, ps, depth)) + if(!prs_pointer("servername", ps, depth, (void**)&q_u->servername, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) return False; if(!prs_align(ps)) return False; - if(!prs_uint32("db_ptr", ps, depth, &q_u->ptr_db)) - return False; - if(!smb_io_unistr2("database", &q_u->database, q_u->ptr_db, ps, depth)) + if(!prs_pointer("database", ps, depth, (void**)&q_u->database, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) return False; - if(!prs_align(ps)) return False; - if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) + if(!prs_uint32("access", ps, depth, &q_u->access)) return False; return True; -- cgit From dbb5a1fdabf8e66343cd2a4a2dda79cef95e14b1 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Mar 2005 22:32:31 +0000 Subject: r6046: $ net -S block -U % -W VALE rpc service status spooler spooler service is SVCCTL_RUNNING. Configuration details: Service Type = 0x110 Start Type = 0x2 Error Control = 0x1 Tag ID = 0x0 Executable Path = C:\WINNT\system32\spoolsv.exe Load Order Group = SpoolerGroup Dependencies = RPCSS/ Start Name = LocalSystem Display Name = Print Spooler (This used to be commit b921bf568835042a43bb0bcb2abd9d36c9d2e43f) --- source3/rpc_parse/parse_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index f13f01a05a..acebcf34c6 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -325,7 +325,7 @@ BOOL svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_ if(!prs_align(ps)) return False; - if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) + if(!prs_uint32("access", ps, depth, &q_u->access)) return False; return True; -- cgit From 0aa89db9471330fd02db395c2eb387ac2dfef54f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 26 Mar 2005 06:52:56 +0000 Subject: r6071: * clean up UNISTR2_ARRAY ( really just an array of UNISTR4 + count ) * add some backwards compatibility to 'net rpc rights list' * verify privilege name in 'net rpc rights privileges ' in order to give back better error messages. (This used to be commit 0e29dc8aa384dfa6d2495beb8a9ffb5371e60a13) --- source3/rpc_parse/parse_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index acebcf34c6..1c41a18b99 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -481,7 +481,7 @@ BOOL svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, pr if(!prs_uint32("parmcount", ps, depth, &q_u->parmcount)) return False; - if(!smb_io_unistr2_array("parameters", &q_u->parameters, ps, depth)) + if ( !prs_pointer("rights", ps, depth, (void**)&q_u->parameters, sizeof(UNISTR4_ARRAY), (PRS_POINTER_CAST)prs_unistr4_array) ) return False; return True; -- cgit From d559edcce23ada96c4a788c3dbeb66c2890db054 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 14 Jun 2005 03:17:31 +0000 Subject: r7563: svcctl patches from Marcin; have cleaned up formating and am checking the code in to snapshot it before I start changing more things (This used to be commit 560ce111ce8de37d02bce64d2ca60a5f471d5477) --- source3/rpc_parse/parse_svcctl.c | 174 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 1c41a18b99..1f21cb2aab 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -100,6 +100,21 @@ static BOOL svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, return True; } +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_service_description( const char *desc, UNISTR2 *svcdesc, prs_struct *ps, int depth ) +{ + + prs_debug(ps, depth, desc, "svcctl_io_service_description"); + depth++; + + //DEBUG(10, ("_svcctl_io_service_description: descrption is [%s]\n",svcdesc)); + if (!prs_io_unistr2("", ps, depth, svcdesc)) + return False; + + return True; +} /******************************************************************* @@ -142,6 +157,7 @@ uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status ) BOOL svcctl_io_q_close_service(const char *desc, SVCCTL_Q_CLOSE_SERVICE *q_u, prs_struct *ps, int depth) { + if (q_u == NULL) return False; @@ -170,7 +186,10 @@ BOOL svcctl_io_r_close_service(const char *desc, SVCCTL_R_CLOSE_SERVICE *r_u, pr depth++; if(!prs_align(ps)) - return False; + return False; + + if(!smb_io_pol_hnd("pol_handle", &r_u->handle, ps, depth)) + return False; if(!prs_werror("status", ps, depth, &r_u->status)) return False; @@ -642,6 +661,7 @@ BOOL svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_C prs_debug(ps, depth, desc, "svcctl_io_r_query_service_config"); depth++; + if(!prs_align(ps)) return False; @@ -654,6 +674,158 @@ BOOL svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_C if(!prs_werror("status", ps, depth, &r_u->status)) return False; + + 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("info_level", ps, depth, &q_u->info_level)) + return False; + + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + return True; +} + + +/******************************************************************* + Creates a service description response buffer. + The format seems to be DWORD:length of buffer + DWORD:offset (fixed as four) + UNISTR: unicode description in the rest of the buffer +********************************************************************/ + +void init_service_description_buffer(RPC_DATA_BLOB *str, const char *service_desc, int blob_length) +{ + uint32 offset; + char *bp; + + ZERO_STRUCTP(str); + + offset = 4; + + /* set up string lengths. */ + + str->buf_len = create_rpc_blob(str, blob_length); + DEBUG(10, ("init_service_description buffer: Allocated a blob of [%d] \n",str->buf_len)); + + if ( str && str->buffer && str->buf_len) { + memset(str->buffer,0,str->buf_len); + memcpy(str->buffer, &offset, sizeof(uint32)); + bp = &str->buffer[4]; + if (service_desc) { + rpcstr_push(bp, service_desc,str->buf_len-4,0); + } + } +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_query_service_status_ex"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) + return False; + + if(!prs_uint32("info_level", ps, depth, &q_u->info_level)) + return False; + + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + return True; + +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth) +{ + if ( !r_u ) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_query_service_status_ex"); + depth++; + + 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; +} + +/******************************************************************* +********************************************************************/ + +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_uint32("returned", ps, depth, &r_u->returned)) + return False; + + if (r_u->returned > 4) { + if (!prs_uint32("offset", ps, depth, &r_u->offset)) + return False; + if(!prs_unistr2(True, "description ", ps, depth, r_u->description)) + return False; + if(!prs_align(ps)) + return False; + } else { + /* offset does double duty here */ + r_u->offset = 0; + if (!prs_uint32("offset", ps, depth, &r_u->offset)) + 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; } -- cgit From bc8954c4fce89992eb31bcb88e27728859aa7132 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 22 Jun 2005 20:33:30 +0000 Subject: r7839: remove C++ style comment (This used to be commit e04fd56e0097dc8007394bf295b227b454e524b4) --- source3/rpc_parse/parse_svcctl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 1f21cb2aab..85889d5889 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -109,7 +109,6 @@ BOOL svcctl_io_service_description( const char *desc, UNISTR2 *svcdesc, prs_stru prs_debug(ps, depth, desc, "svcctl_io_service_description"); depth++; - //DEBUG(10, ("_svcctl_io_service_description: descrption is [%s]\n",svcdesc)); if (!prs_io_unistr2("", ps, depth, svcdesc)) return False; -- cgit From 14a9d52832b19a698968900da6378d542d6a21ce Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 1 Aug 2005 20:54:31 +0000 Subject: r8899: various compiler warning fixes reported by Jason Mader (This used to be commit d8ae9f2b3e5387ef2c4e84cd9c33f4a7c795b0d3) --- source3/rpc_parse/parse_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 85889d5889..77b48fd0ee 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -714,7 +714,7 @@ BOOL svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_ void init_service_description_buffer(RPC_DATA_BLOB *str, const char *service_desc, int blob_length) { uint32 offset; - char *bp; + uint8 *bp; ZERO_STRUCTP(str); -- cgit From 4ff44ae90e59d305bb765c88327a3d3292bafb35 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Aug 2005 23:23:25 +0000 Subject: r8956: fix segfault caused by trying to parse a UNISTR2 and not a UNISTR2* (This used to be commit f775fc7209da9e11768625f4084297aa16c9a4d1) --- source3/rpc_parse/parse_svcctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 77b48fd0ee..b86ca23df1 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -808,8 +808,10 @@ BOOL svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_ if (r_u->returned > 4) { if (!prs_uint32("offset", ps, depth, &r_u->offset)) return False; - if(!prs_unistr2(True, "description ", ps, depth, r_u->description)) + + if ( !prs_pointer( desc, ps, depth, (void**)&r_u->description, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) ) return False; + if(!prs_align(ps)) return False; } else { -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/rpc_parse/parse_svcctl.c | 305 ++++++++++++++++++++++++++++++++------- 1 file changed, 253 insertions(+), 52 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index b86ca23df1..e1a7ad8427 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -100,40 +100,48 @@ static BOOL svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, return True; } + /******************************************************************* ********************************************************************/ -BOOL svcctl_io_service_description( const char *desc, UNISTR2 *svcdesc, prs_struct *ps, int depth ) +BOOL svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth ) { - - prs_debug(ps, depth, desc, "svcctl_io_service_description"); + prs_struct *ps=&buffer->prs; + + prs_debug(ps, depth, desc, "svcctl_io_enum_services_status"); depth++; - - if (!prs_io_unistr2("", ps, depth, svcdesc)) + + if ( !smb_io_relstr("servicename", buffer, depth, &enum_status->servicename) ) + return False; + if ( !smb_io_relstr("displayname", buffer, depth, &enum_status->displayname) ) return False; + if ( !svcctl_io_service_status("svc_status", &enum_status->status, ps, depth) ) + return False; + return True; } - /******************************************************************* ********************************************************************/ -BOOL svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth ) +BOOL svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth ) { prs_struct *ps=&buffer->prs; - - prs_debug(ps, depth, desc, "svcctl_io_enum_services_status"); + + prs_debug(ps, depth, desc, "svcctl_io_service_status_process"); depth++; - - if ( !smb_io_relstr("servicename", buffer, depth, &enum_status->servicename) ) + + if ( !svcctl_io_service_status("status", &status->status, ps, depth) ) return False; - if ( !smb_io_relstr("displayname", buffer, depth, &enum_status->displayname) ) + if(!prs_align(ps)) return False; - if ( !svcctl_io_service_status("svc_status", &enum_status->status, ps, depth) ) + if(!prs_uint32("process_id", ps, depth, &status->process_id)) return False; - + if(!prs_uint32("service_flags", ps, depth, &status->service_flags)) + return False; + return True; } @@ -151,6 +159,45 @@ 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; +} + +/******************************************************************** +********************************************************************/ + +uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config ) +{ + uint32 size = 0; + + size = sizeof(uint32) * 4; /* static uint32 fields */ + + /* now add the UNISTR2 + pointer sizes */ + + size += sizeof(uint32) * sizeof_unistr2(config->executablepath); + size += sizeof(uint32) * sizeof_unistr2(config->loadordergroup); + size += sizeof(uint32) * sizeof_unistr2(config->dependencies); + size += sizeof(uint32) * sizeof_unistr2(config->startname); + size += sizeof(uint32) * sizeof_unistr2(config->displayname); + + return size; +} + + + /******************************************************************* ********************************************************************/ @@ -694,7 +741,7 @@ BOOL svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_ if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) return False; - if(!prs_uint32("info_level", ps, depth, &q_u->info_level)) + if(!prs_uint32("level", ps, depth, &q_u->level)) return False; if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) @@ -705,36 +752,145 @@ BOOL svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_ /******************************************************************* - Creates a service description response buffer. - The format seems to be DWORD:length of buffer - DWORD:offset (fixed as four) - UNISTR: unicode description in the rest of the buffer ********************************************************************/ -void init_service_description_buffer(RPC_DATA_BLOB *str, const char *service_desc, int blob_length) +void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc ) { - uint32 offset; - uint8 *bp; + desc->unknown = 0x04; /* always 0x0000 0004 (no idea what this is) */ + init_unistr( &desc->description, service_desc ); +} - ZERO_STRUCTP(str); +/******************************************************************* +********************************************************************/ - offset = 4; +BOOL svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth ) +{ + prs_struct *ps = &buffer->prs; - /* set up string lengths. */ + prs_debug(ps, depth, desc, "svcctl_io_service_description"); + depth++; - str->buf_len = create_rpc_blob(str, blob_length); - DEBUG(10, ("init_service_description buffer: Allocated a blob of [%d] \n",str->buf_len)); + if ( !prs_uint32("unknown", ps, depth, &description->unknown) ) + return False; + if ( !prs_unistr("description", ps, depth, &description->description) ) + return False; - if ( str && str->buffer && str->buf_len) { - memset(str->buffer,0,str->buf_len); - memcpy(str->buffer, &offset, sizeof(uint32)); - bp = &str->buffer[4]; - if (service_desc) { - rpcstr_push(bp, service_desc,str->buf_len-4,0); + 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) && fa->num_actions ) { + if ( !(fa->actions = TALLOC_ARRAY( get_talloc_ctx(), SC_ACTION, fa->num_actions )) ) { + DEBUG(0,("svcctl_io_service_fa: talloc() failure!\n")); + return False; } } + + for ( i=0; inum_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; +} + + /******************************************************************* ********************************************************************/ @@ -752,7 +908,7 @@ BOOL svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVIC if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) return False; - if(!prs_uint32("info_level", ps, depth, &q_u->info_level)) + if(!prs_uint32("level", ps, depth, &q_u->level)) return False; if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) @@ -771,7 +927,7 @@ BOOL svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC return False; prs_debug(ps, depth, desc, "svcctl_io_r_query_service_status_ex"); - depth++; + depth++; if (!prs_rpcbuffer("", ps, depth, &r_u->buffer)) return False; @@ -791,37 +947,80 @@ BOOL svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u, prs_struct *ps, int depth) +BOOL svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_lock_service_db"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("scm_handle", &q_u->handle, ps, depth)) + return False; + + return True; + +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) { if ( !r_u ) return False; - prs_debug(ps, depth, desc, "svcctl_io_r_query_service_config2"); + prs_debug(ps, depth, desc, "svcctl_io_r_lock_service_db"); depth++; if(!prs_align(ps)) return False; - if(!prs_uint32("returned", ps, depth, &r_u->returned)) + if(!smb_io_pol_hnd("lock_handle", &r_u->h_lock, ps, depth)) return False; - if (r_u->returned > 4) { - if (!prs_uint32("offset", ps, depth, &r_u->offset)) - return False; + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; - if ( !prs_pointer( desc, ps, depth, (void**)&r_u->description, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) ) - return False; + return True; +} - if(!prs_align(ps)) - return False; - } else { - /* offset does double duty here */ - r_u->offset = 0; - if (!prs_uint32("offset", ps, depth, &r_u->offset)) - return False; - } +/******************************************************************* +********************************************************************/ - if (!prs_uint32("needed", ps, depth, &r_u->needed)) +BOOL svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_unlock_service_db"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("h_lock", &q_u->h_lock, ps, depth)) + return False; + + return True; + +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) +{ + if ( !r_u ) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_unlock_service_db"); + depth++; + + if(!prs_align(ps)) return False; if(!prs_werror("status", ps, depth, &r_u->status)) @@ -831,3 +1030,5 @@ BOOL svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_ } + + -- cgit From 7cd1af4a639b0852df25fe936519c9613b342dca Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 11 Dec 2005 04:41:54 +0000 Subject: r12176: fix type mismatch after rpc structure change in rpc_svcctl.h (This used to be commit ba67d3ae0430abc196d245218556c23002e52076) --- source3/rpc_parse/parse_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index e1a7ad8427..dd0c68bd79 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -41,7 +41,7 @@ static BOOL svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, if(!prs_uint32("controls_accepted", ps, depth, &status->controls_accepted)) return False; - if(!prs_uint32("win32_exit_code", ps, depth, &status->win32_exit_code)) + if(!prs_werror("win32_exit_code", ps, depth, &status->win32_exit_code)) return False; if(!prs_uint32("service_exit_code", ps, depth, &status->service_exit_code)) -- cgit From e7a1a0ead2013464dc8204e5b997ddc3ae46e973 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 13 Jan 2006 20:24:50 +0000 Subject: r12914: adding query/set ops for security descriptors on services. (This used to be commit cefd2d7cb6140b068d66e2383e9acfa4c3c4b4c7) --- source3/rpc_parse/parse_svcctl.c | 103 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index dd0c68bd79..2cb44c6319 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -1029,6 +1029,109 @@ BOOL svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB return True; } +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_query_service_sec"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("handle", &q_u->handle, ps, depth)) + return False; + if(!prs_uint32("security_flags", ps, depth, &q_u->security_flags)) + return False; + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + return True; + +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC *r_u, prs_struct *ps, int depth) +{ + if ( !r_u ) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_query_service_sec"); + depth++; + + if(!prs_align(ps)) + return False; + + if (!prs_rpcbuffer("buffer", ps, depth, &r_u->buffer)) + 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; +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_q_set_service_sec"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("handle", &q_u->handle, ps, depth)) + return False; + if(!prs_uint32("security_flags", ps, depth, &q_u->security_flags)) + return False; + + if (!prs_rpcbuffer("buffer", ps, depth, &q_u->buffer)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) + return False; + + return True; + +} + +/******************************************************************* +********************************************************************/ + +BOOL svcctl_io_r_set_service_sec(const char *desc, SVCCTL_R_SET_SERVICE_SEC *r_u, prs_struct *ps, int depth) +{ + if ( !r_u ) + return False; + + prs_debug(ps, depth, desc, "svcctl_io_r_set_service_sec"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_werror("status", ps, depth, &r_u->status)) + return False; + + return True; +} + -- cgit From fbdcf2663b56007a438ac4f0d8d82436b1bfe688 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Jul 2006 18:01:26 +0000 Subject: r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8) --- source3/rpc_parse/parse_svcctl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 2cb44c6319..dc4ee3e6e9 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -257,12 +257,12 @@ BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, if(!prs_align(ps)) return False; - if(!prs_pointer("servername", ps, depth, (void**)&q_u->servername, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) + if(!prs_pointer("servername", ps, depth, (void*)&q_u->servername, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) return False; if(!prs_align(ps)) return False; - if(!prs_pointer("database", ps, depth, (void**)&q_u->database, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) + if(!prs_pointer("database", ps, depth, (void*)&q_u->database, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) return False; if(!prs_align(ps)) return False; @@ -486,7 +486,7 @@ BOOL svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_S if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) return False; - if(!prs_pointer("resume", ps, depth, (void**)&q_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32)) + if(!prs_pointer("resume", ps, depth, (void*)&q_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32)) return False; return True; @@ -517,7 +517,7 @@ BOOL svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_S if(!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if(!prs_pointer("resume", ps, depth, (void**)&r_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32)) + if(!prs_pointer("resume", ps, depth, (void*)&r_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32)) return False; if(!prs_werror("status", ps, depth, &r_u->status)) @@ -546,7 +546,7 @@ BOOL svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, pr if(!prs_uint32("parmcount", ps, depth, &q_u->parmcount)) return False; - if ( !prs_pointer("rights", ps, depth, (void**)&q_u->parameters, sizeof(UNISTR4_ARRAY), (PRS_POINTER_CAST)prs_unistr4_array) ) + if ( !prs_pointer("rights", ps, depth, (void*)&q_u->parameters, sizeof(UNISTR4_ARRAY), (PRS_POINTER_CAST)prs_unistr4_array) ) return False; return True; @@ -821,9 +821,9 @@ BOOL svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BU 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 ) ) + 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 ) ) + 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) ) -- cgit From 138668d5d284f7d2496f22c16a99be107cdfc872 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 29 Apr 2007 21:13:13 +0000 Subject: r22577: Change all of parse/*.c to use standard form. Fix some marshalling bugs. Jeremy. (This used to be commit 3df99006f8a52af7cff0fbca1bf16157a8648254) --- source3/rpc_parse/parse_svcctl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index dc4ee3e6e9..3846812f31 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -829,10 +829,14 @@ BOOL svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BU if ( !prs_uint32("num_actions", ps, depth, &fa->num_actions) ) return False; - if ( UNMARSHALLING(ps) && fa->num_actions ) { - if ( !(fa->actions = TALLOC_ARRAY( get_talloc_ctx(), SC_ACTION, fa->num_actions )) ) { - DEBUG(0,("svcctl_io_service_fa: talloc() failure!\n")); - return False; + if ( UNMARSHALLING(ps)) { + if (fa->num_actions) { + if ( !(fa->actions = TALLOC_ARRAY( get_talloc_ctx(), SC_ACTION, fa->num_actions )) ) { + DEBUG(0,("svcctl_io_service_fa: talloc() failure!\n")); + return False; + } + } else { + fa->actions = NULL; } } -- cgit From d99f4f004ca46e4c0f2e60a231a14708a128f0f2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 31 May 2007 17:24:30 +0000 Subject: r23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26 (This used to be commit 0b1bc3521fac52f3164b6cc9e053abc3ceabf5e7) --- source3/rpc_parse/parse_svcctl.c | 47 ---------------------------------------- 1 file changed, 47 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 3846812f31..8302218e34 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -196,53 +196,6 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config ) return size; } - - -/******************************************************************* -********************************************************************/ - -BOOL svcctl_io_q_close_service(const char *desc, SVCCTL_Q_CLOSE_SERVICE *q_u, prs_struct *ps, int depth) -{ - - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_close_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) - return False; - - return True; -} - - -/******************************************************************* -********************************************************************/ - -BOOL svcctl_io_r_close_service(const char *desc, SVCCTL_R_CLOSE_SERVICE *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_close_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("pol_handle", &r_u->handle, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - /******************************************************************* ********************************************************************/ -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/rpc_parse/parse_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 8302218e34..99f231adae 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -5,7 +5,7 @@ * * 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 + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- cgit From 153cfb9c83534b09f15cc16205d7adb19b394928 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 05:23:25 +0000 Subject: r23801: The FSF has moved around a lot. This fixes their Mass Ave address. (This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227) --- source3/rpc_parse/parse_svcctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 99f231adae..b366b14e7f 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -14,8 +14,7 @@ * 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 02139, USA. + * along with this program; if not, see . */ #include "includes.h" -- cgit From 929e1d99209e20a9c2c95c8bdfc8eaa37b2c2291 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 30 Aug 2007 19:48:31 +0000 Subject: r24809: Consolidate the use of temporary talloc contexts. This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker (This used to be commit 6585ea2cb7f417e14540495b9c7380fe9c8c717b) --- source3/rpc_parse/parse_svcctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index b366b14e7f..b571034d4c 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -783,7 +783,7 @@ BOOL svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BU if ( UNMARSHALLING(ps)) { if (fa->num_actions) { - if ( !(fa->actions = TALLOC_ARRAY( get_talloc_ctx(), SC_ACTION, 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; } -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/rpc_parse/parse_svcctl.c | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index b571034d4c..18e12ef0a6 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -25,7 +25,7 @@ /******************************************************************* ********************************************************************/ -static BOOL svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, prs_struct *ps, int depth ) +static bool svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, prs_struct *ps, int depth ) { prs_debug(ps, depth, desc, "svcctl_io_service_status"); @@ -58,7 +58,7 @@ static BOOL svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, /******************************************************************* ********************************************************************/ -static BOOL svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, prs_struct *ps, int depth ) +static bool svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, prs_struct *ps, int depth ) { prs_debug(ps, depth, desc, "svcctl_io_service_config"); @@ -103,7 +103,7 @@ static BOOL svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, /******************************************************************* ********************************************************************/ -BOOL svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth ) +bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth ) { prs_struct *ps=&buffer->prs; @@ -124,7 +124,7 @@ BOOL svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enu /******************************************************************* ********************************************************************/ -BOOL svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth ) +bool svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth ) { prs_struct *ps=&buffer->prs; @@ -198,7 +198,7 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config ) /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -228,7 +228,7 @@ BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -251,7 +251,7 @@ BOOL svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -280,7 +280,7 @@ BOOL svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q /******************************************************************* ********************************************************************/ -BOOL init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname ) +bool init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname ) { r_u->display_name_len = strlen(displayname); init_unistr2( &r_u->displayname, displayname, UNI_STR_TERMINATE ); @@ -291,7 +291,7 @@ BOOL init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -322,7 +322,7 @@ BOOL svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -351,7 +351,7 @@ BOOL svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_ /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -374,7 +374,7 @@ BOOL svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_ /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -394,7 +394,7 @@ BOOL svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_ /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -417,7 +417,7 @@ BOOL svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_ /******************************************************************* ********************************************************************/ -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_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -447,7 +447,7 @@ BOOL svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_S /******************************************************************* ********************************************************************/ -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_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -481,7 +481,7 @@ BOOL svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_S /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -507,7 +507,7 @@ BOOL svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, pr /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -525,7 +525,7 @@ BOOL svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, pr /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -550,7 +550,7 @@ BOOL svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDE /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -581,7 +581,7 @@ BOOL svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDE /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -604,7 +604,7 @@ BOOL svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -628,7 +628,7 @@ BOOL svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -651,7 +651,7 @@ BOOL svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_C /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -679,7 +679,7 @@ BOOL svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_C /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_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) { if (q_u == NULL) return False; @@ -715,7 +715,7 @@ void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *serv /******************************************************************* ********************************************************************/ -BOOL svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth ) +bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth ) { prs_struct *ps = &buffer->prs; @@ -745,7 +745,7 @@ uint32 svcctl_sizeof_service_description( SERVICE_DESCRIPTION *desc ) /******************************************************************* ********************************************************************/ -static BOOL svcctl_io_action( const char *desc, SC_ACTION *action, prs_struct *ps, int depth ) +static bool svcctl_io_action( const char *desc, SC_ACTION *action, prs_struct *ps, int depth ) { prs_debug(ps, depth, desc, "svcctl_io_action"); @@ -762,7 +762,7 @@ static BOOL svcctl_io_action( const char *desc, SC_ACTION *action, prs_struct *p /******************************************************************* ********************************************************************/ -BOOL svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth ) +bool svcctl_io_service_fa( const char *desc, SERVICE_FAILURE_ACTIONS *fa, RPC_BUFFER *buffer, int depth ) { prs_struct *ps = &buffer->prs; int i; @@ -821,7 +821,7 @@ 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) +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; @@ -850,7 +850,7 @@ BOOL svcctl_io_r_query_service_config2(const char *desc, SVCCTL_R_QUERY_SERVICE_ /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -877,7 +877,7 @@ BOOL svcctl_io_q_query_service_status_ex(const char *desc, SVCCTL_Q_QUERY_SERVIC /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u, prs_struct *ps, int depth) { if ( !r_u ) return False; @@ -903,7 +903,7 @@ BOOL svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -924,7 +924,7 @@ BOOL svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) { if ( !r_u ) return False; @@ -947,7 +947,7 @@ BOOL svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -968,7 +968,7 @@ BOOL svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) { if ( !r_u ) return False; @@ -988,7 +988,7 @@ BOOL svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1013,7 +1013,7 @@ BOOL svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC *r_u, prs_struct *ps, int depth) { if ( !r_u ) return False; @@ -1039,7 +1039,7 @@ BOOL svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC /******************************************************************* ********************************************************************/ -BOOL svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth) +bool svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1071,7 +1071,7 @@ BOOL svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u /******************************************************************* ********************************************************************/ -BOOL svcctl_io_r_set_service_sec(const char *desc, SVCCTL_R_SET_SERVICE_SEC *r_u, prs_struct *ps, int depth) +bool svcctl_io_r_set_service_sec(const char *desc, SVCCTL_R_SET_SERVICE_SEC *r_u, prs_struct *ps, int depth) { if ( !r_u ) return False; -- cgit From 330fe0a62a29ff994e1520dae209eb4980a7259c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 12:12:43 +0100 Subject: Remove unused marshalling for SVCCTL_OPEN_SCMANAGER. Guenther (This used to be commit 1162b8a02d365b79f5a3e86c936bae80092f1869) --- source3/rpc_parse/parse_svcctl.c | 53 ---------------------------------------- 1 file changed, 53 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 18e12ef0a6..488f060e6e 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -198,59 +198,6 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config ) /******************************************************************* ********************************************************************/ -bool svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_open_scmanager"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_pointer("servername", ps, depth, (void*)&q_u->servername, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) - return False; - if(!prs_align(ps)) - return False; - - if(!prs_pointer("database", ps, depth, (void*)&q_u->database, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2)) - return False; - if(!prs_align(ps)) - return False; - - if(!prs_uint32("access", ps, depth, &q_u->access)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_open_scmanager(const char *desc, SVCCTL_R_OPEN_SCMANAGER *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_open_scmanager"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("scm_pol", &r_u->handle, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - bool svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth) { if (q_u == NULL) -- cgit From 6d95d7d9b9277e3aba6b43869a31fd3226ac697c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 12:48:43 +0100 Subject: Remove unused marshalling for SVCCTL_OPEN_SERVICE. Guenther (This used to be commit e0a8818af0e3e82e9b70ff6c485090986b435fed) --- source3/rpc_parse/parse_svcctl.c | 52 ---------------------------------------- 1 file changed, 52 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 488f060e6e..7fd13e8f21 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -266,58 +266,6 @@ bool svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r } -/******************************************************************* -********************************************************************/ - -bool svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_open_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) - return False; - - if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth)) - return False; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("access", ps, depth, &q_u->access)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_open_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("service_pol", &r_u->handle, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - /******************************************************************* ********************************************************************/ -- cgit From 4673706e1d130555231b409baa270d7000267117 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 13:45:36 +0100 Subject: Remove unused marshalling for SVCCTL_GET_DISPLAY_NAME. Guenther (This used to be commit 144f41e7c3c97afede71ed771acd130f9018f0df) --- source3/rpc_parse/parse_svcctl.c | 71 ---------------------------------------- 1 file changed, 71 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 7fd13e8f21..f3ed8d1bf5 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -195,77 +195,6 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config ) return size; } -/******************************************************************* -********************************************************************/ - -bool svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_get_display_name"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth)) - return False; - - if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth)) - return False; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("display_name_len", ps, depth, &q_u->display_name_len)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname ) -{ - r_u->display_name_len = strlen(displayname); - init_unistr2( &r_u->displayname, displayname, UNI_STR_TERMINATE ); - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_get_display_name"); - depth++; - - if(!prs_align(ps)) - return False; - - - if(!smb_io_unistr2("displayname", &r_u->displayname, 1, ps, depth)) - return False; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("display_name_len", ps, depth, &r_u->display_name_len)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - - /******************************************************************* ********************************************************************/ -- cgit From a750bbf1b8d0d2b48af6be40f8d505b5e0edd899 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Feb 2008 02:30:53 +0100 Subject: Remove unused marshalling for SVCCTL_START_SERVICE. Guenther (This used to be commit 57e03a7fd56062bbff19c88c3b6928e8a0481794) --- source3/rpc_parse/parse_svcctl.c | 44 ---------------------------------------- 1 file changed, 44 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index f3ed8d1bf5..075d619331 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -302,50 +302,6 @@ bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_S return True; } -/******************************************************************* -********************************************************************/ - -bool svcctl_io_q_start_service(const char *desc, SVCCTL_Q_START_SERVICE *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_start_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) - return False; - - if(!prs_uint32("parmcount", ps, depth, &q_u->parmcount)) - return False; - - if ( !prs_pointer("rights", ps, depth, (void*)&q_u->parameters, sizeof(UNISTR4_ARRAY), (PRS_POINTER_CAST)prs_unistr4_array) ) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_start_service(const char *desc, SVCCTL_R_START_SERVICE *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_start_service"); - depth++; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - - /******************************************************************* ********************************************************************/ -- cgit From 35e48a4b1dfa3d63476fca105766da1ec980b446 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Feb 2008 02:37:32 +0100 Subject: Remove unused marshalling for SVCCTL_CONTROL_SERVICE. Guenther (This used to be commit 84112a24f5292b8d2e4d446e39462e0402453b4a) --- source3/rpc_parse/parse_svcctl.c | 47 ---------------------------------------- 1 file changed, 47 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 075d619331..0f39de0746 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -358,53 +358,6 @@ bool svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDE return True; } -/******************************************************************* -********************************************************************/ - -bool svcctl_io_q_control_service(const char *desc, SVCCTL_Q_CONTROL_SERVICE *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_control_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) - return False; - - if(!prs_uint32("control", ps, depth, &q_u->control)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_control_service(const char *desc, SVCCTL_R_CONTROL_SERVICE *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_control_service"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!svcctl_io_service_status("service_status", &r_u->svc_status, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - - /******************************************************************* ********************************************************************/ -- cgit From c147f2fd6b5d8f319b2cf6903da093211f46e575 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Feb 2008 02:43:56 +0100 Subject: Remove unused marshalling for SVCCTL_QUERY_STATUS. Guenther (This used to be commit 8a621f517fe38ce91f10e12fccc2963af6afc33d) --- source3/rpc_parse/parse_svcctl.c | 43 ---------------------------------------- 1 file changed, 43 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 0f39de0746..ef9f03705d 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -198,49 +198,6 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config ) /******************************************************************* ********************************************************************/ -bool svcctl_io_q_query_status(const char *desc, SVCCTL_Q_QUERY_STATUS *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_query_status"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_query_status(const char *desc, SVCCTL_R_QUERY_STATUS *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_query_status"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!svcctl_io_service_status("service_status", &r_u->svc_status, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth) { if (q_u == NULL) -- cgit From 35a30ac841583326e81c27a18e93e53de9bdfc4f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Feb 2008 02:48:08 +0100 Subject: Remove unused marshalling for SVCCTL_LOCK_SERVICE_DB. Guenther (This used to be commit 23d37a9aed145d38e2bd98b170b65096ab69b0d9) --- source3/rpc_parse/parse_svcctl.c | 44 ---------------------------------------- 1 file changed, 44 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index ef9f03705d..d5b1466535 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -593,50 +593,6 @@ bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC /******************************************************************* ********************************************************************/ -bool svcctl_io_q_lock_service_db(const char *desc, SVCCTL_Q_LOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_lock_service_db"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("scm_handle", &q_u->handle, ps, depth)) - return False; - - return True; - -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_lock_service_db(const char *desc, SVCCTL_R_LOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) -{ - if ( !r_u ) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_lock_service_db"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("lock_handle", &r_u->h_lock, ps, depth)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - bool svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) { if (q_u == NULL) -- cgit From 1c9990fcfe7ac36050351f7c2b99d1e3e044a01a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Feb 2008 02:50:54 +0100 Subject: Remove unused marshalling for SVCCTL_UNLOCK_SERVICE_DB. Guenther (This used to be commit eeb598a19a3d09f2175032e013857fe743da3eec) --- source3/rpc_parse/parse_svcctl.c | 41 ---------------------------------------- 1 file changed, 41 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index d5b1466535..ececf1b5ed 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -593,47 +593,6 @@ bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC /******************************************************************* ********************************************************************/ -bool svcctl_io_q_unlock_service_db(const char *desc, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_unlock_service_db"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("h_lock", &q_u->h_lock, ps, depth)) - return False; - - return True; - -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_unlock_service_db(const char *desc, SVCCTL_R_UNLOCK_SERVICE_DB *r_u, prs_struct *ps, int depth) -{ - if ( !r_u ) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_unlock_service_db"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - bool svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth) { if (q_u == NULL) -- cgit From 8a1249817e8642de20095527db0c37ee3c4bd077 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 00:16:46 +0100 Subject: Remove unused marshalling for SVCCTL_QUERY_SERVICE_SEC. Guenther (This used to be commit a69c6422bb7b1ab64236cbab193d54fd90c106f0) --- source3/rpc_parse/parse_svcctl.c | 51 ---------------------------------------- 1 file changed, 51 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index ececf1b5ed..cd08dbef1f 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -593,57 +593,6 @@ bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC /******************************************************************* ********************************************************************/ -bool svcctl_io_q_query_service_sec(const char *desc, SVCCTL_Q_QUERY_SERVICE_SEC *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_query_service_sec"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("handle", &q_u->handle, ps, depth)) - return False; - if(!prs_uint32("security_flags", ps, depth, &q_u->security_flags)) - return False; - if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) - return False; - - return True; - -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_query_service_sec(const char *desc, SVCCTL_R_QUERY_SERVICE_SEC *r_u, prs_struct *ps, int depth) -{ - if ( !r_u ) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_query_service_sec"); - depth++; - - if(!prs_align(ps)) - return False; - - if (!prs_rpcbuffer("buffer", ps, depth, &r_u->buffer)) - 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; -} - -/******************************************************************* -********************************************************************/ - bool svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth) { if (q_u == NULL) -- cgit From edacb74344961d366828087e6f95c19a698e6e0e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 00:34:45 +0100 Subject: Remove unused marshalling for SVCCTL_SET_SERVICE_SEC. Guenther (This used to be commit 9ac2606d5214f1bf4a8ec2ac46bcaeba62e56992) --- source3/rpc_parse/parse_svcctl.c | 56 ---------------------------------------- 1 file changed, 56 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index cd08dbef1f..62c1e21927 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -589,59 +589,3 @@ bool svcctl_io_r_query_service_status_ex(const char *desc, SVCCTL_R_QUERY_SERVIC return True; } - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_set_service_sec"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("handle", &q_u->handle, ps, depth)) - return False; - if(!prs_uint32("security_flags", ps, depth, &q_u->security_flags)) - return False; - - if (!prs_rpcbuffer("buffer", ps, depth, &q_u->buffer)) - return False; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) - return False; - - return True; - -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_set_service_sec(const char *desc, SVCCTL_R_SET_SERVICE_SEC *r_u, prs_struct *ps, int depth) -{ - if ( !r_u ) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_set_service_sec"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - - - - -- cgit From 8ca8dad7a1f9f1df2ee18d8944489c58e9feb070 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 20 Mar 2008 01:40:04 +0100 Subject: Remove unused marshalling for SVCCTL_ENUM_DEPENDENT_SERVICES. Guenther (This used to be commit 5838d81346a51ef1e996bab938533ae2097f7e47) --- source3/rpc_parse/parse_svcctl.c | 56 ---------------------------------------- 1 file changed, 56 deletions(-) (limited to 'source3/rpc_parse/parse_svcctl.c') diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c index 62c1e21927..c5d93864ba 100644 --- a/source3/rpc_parse/parse_svcctl.c +++ b/source3/rpc_parse/parse_svcctl.c @@ -262,62 +262,6 @@ bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_S /******************************************************************* ********************************************************************/ -bool svcctl_io_q_enum_dependent_services(const char *desc, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_q_enum_dependent_services"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth)) - return False; - - if(!prs_uint32("state", ps, depth, &q_u->state)) - return False; - if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - -bool svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "svcctl_io_r_enum_dependent_services"); - 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_uint32("returned", ps, depth, &r_u->returned)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - -/******************************************************************* -********************************************************************/ - bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth) { if (q_u == NULL) -- cgit