From d2b836e19a20fee66e26e6ed4de359cf73149078 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 16 Oct 2008 01:35:27 +0200 Subject: s3: remove rpccli_svcctl_query_config. Guenther --- source3/rpc_client/cli_svcctl.c | 76 ----------------------------------------- 1 file changed, 76 deletions(-) (limited to 'source3/rpc_client') diff --git a/source3/rpc_client/cli_svcctl.c b/source3/rpc_client/cli_svcctl.c index 3c29dcdee8..51678083d3 100644 --- a/source3/rpc_client/cli_svcctl.c +++ b/source3/rpc_client/cli_svcctl.c @@ -90,79 +90,3 @@ WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX return out.status; } - -/******************************************************************* -*******************************************************************/ - -WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hService, SERVICE_CONFIG *config ) -{ - SVCCTL_Q_QUERY_SERVICE_CONFIG in; - SVCCTL_R_QUERY_SERVICE_CONFIG out; - prs_struct qbuf, rbuf; - - ZERO_STRUCT(in); - ZERO_STRUCT(out); - - memcpy( &in.handle, hService, sizeof(POLICY_HND) ); - in.buffer_size = 0; - - - CLI_DO_RPC_WERR( cli, mem_ctx, &ndr_table_svcctl.syntax_id, - SVCCTL_QUERY_SERVICE_CONFIG_W, - in, out, - qbuf, rbuf, - svcctl_io_q_query_service_config, - svcctl_io_r_query_service_config, - WERR_GENERAL_FAILURE ); - - if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) { - in.buffer_size = out.needed; - - CLI_DO_RPC_WERR( cli, mem_ctx, &ndr_table_svcctl.syntax_id, - SVCCTL_QUERY_SERVICE_CONFIG_W, - in, out, - qbuf, rbuf, - svcctl_io_q_query_service_config, - svcctl_io_r_query_service_config, - WERR_GENERAL_FAILURE ); - } - - if ( !W_ERROR_IS_OK( out.status ) ) - return out.status; - - memcpy( config, &out.config, sizeof(SERVICE_CONFIG) ); - - config->executablepath = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - config->loadordergroup = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - config->dependencies = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - config->startname = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - config->displayname = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - - if ( out.config.executablepath ) { - config->executablepath = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - copy_unistr2( config->executablepath, out.config.executablepath ); - } - - if ( out.config.loadordergroup ) { - config->loadordergroup = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - copy_unistr2( config->loadordergroup, out.config.loadordergroup ); - } - - if ( out.config.dependencies ) { - config->dependencies = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - copy_unistr2( config->dependencies, out.config.dependencies ); - } - - if ( out.config.startname ) { - config->startname = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - copy_unistr2( config->startname, out.config.startname ); - } - - if ( out.config.displayname ) { - config->displayname = TALLOC_ZERO_P( mem_ctx, UNISTR2 ); - copy_unistr2( config->displayname, out.config.displayname ); - } - - return out.status; -} -- cgit