[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2425-geeb598a

Günther Deschner gd at samba.org
Tue Feb 19 02:18:42 GMT 2008


The branch, v3-2-test has been updated
       via  eeb598a19a3d09f2175032e013857fe743da3eec (commit)
       via  300bf76a79bfa0a9cf55505fd1e928aba9fec171 (commit)
       via  23d37a9aed145d38e2bd98b170b65096ab69b0d9 (commit)
       via  939da2eb58ea8cfa637ec63b254755d77702da45 (commit)
       via  8a621f517fe38ce91f10e12fccc2963af6afc33d (commit)
       via  1cc0e9b7e5b8685dc4aff8e379837dd32e386f9f (commit)
       via  5453d97ef4967755ef0c903dd665325d50845028 (commit)
       via  84112a24f5292b8d2e4d446e39462e0402453b4a (commit)
       via  49375f0b4d5ead7d26659cfc94997bd3e18c48a9 (commit)
       via  4797ca0bd5dc922f6ba5ebb93bf65ceee09a678e (commit)
       via  57e03a7fd56062bbff19c88c3b6928e8a0481794 (commit)
       via  5ca4358c1a2c13b316df7cc07d8ca5b820c79988 (commit)
       via  d95998ffd321eccf19f7de671eed2c741038b81e (commit)
      from  bd6e2fcf3b3ab15736584edbbfb941b381988499 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit eeb598a19a3d09f2175032e013857fe743da3eec
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:50:54 2008 +0100

    Remove unused marshalling for SVCCTL_UNLOCK_SERVICE_DB.
    
    Guenther

commit 300bf76a79bfa0a9cf55505fd1e928aba9fec171
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:50:01 2008 +0100

    Use pidl for _svcctl_UnlockServiceDatabase().
    
    Guenther

commit 23d37a9aed145d38e2bd98b170b65096ab69b0d9
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:48:08 2008 +0100

    Remove unused marshalling for SVCCTL_LOCK_SERVICE_DB.
    
    Guenther

commit 939da2eb58ea8cfa637ec63b254755d77702da45
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:47:05 2008 +0100

    Use pidl for _svcctl_LockServiceDatabase().
    
    Guenther

commit 8a621f517fe38ce91f10e12fccc2963af6afc33d
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:43:56 2008 +0100

    Remove unused marshalling for SVCCTL_QUERY_STATUS.
    
    Guenther

commit 1cc0e9b7e5b8685dc4aff8e379837dd32e386f9f
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:43:04 2008 +0100

    Use rpccli_svcctl_QueryServiceStatus() in net.
    
    Guenther

commit 5453d97ef4967755ef0c903dd665325d50845028
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:41:05 2008 +0100

    Use pidl for _svcctl_QueryServiceStatus().
    
    Guenther

commit 84112a24f5292b8d2e4d446e39462e0402453b4a
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:37:32 2008 +0100

    Remove unused marshalling for SVCCTL_CONTROL_SERVICE.
    
    Guenther

commit 49375f0b4d5ead7d26659cfc94997bd3e18c48a9
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:37:12 2008 +0100

    Use rpccli_svcctl_ControlService() in net.
    
    Guenther

commit 4797ca0bd5dc922f6ba5ebb93bf65ceee09a678e
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:35:03 2008 +0100

    Use pidl for _svcctl_ControlService().
    
    Guenther

commit 57e03a7fd56062bbff19c88c3b6928e8a0481794
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:30:53 2008 +0100

    Remove unused marshalling for SVCCTL_START_SERVICE.
    
    Guenther

commit 5ca4358c1a2c13b316df7cc07d8ca5b820c79988
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:29:16 2008 +0100

    Use rpccli_svcctl_StartServiceW() in net.
    
    Guenther

commit d95998ffd321eccf19f7de671eed2c741038b81e
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 19 02:28:46 2008 +0100

    Use pidl for _svcctl_StartServiceW().
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/include/rpc_svcctl.h       |   58 ----------
 source/rpc_client/cli_svcctl.c    |   91 ---------------
 source/rpc_parse/parse_svcctl.c   |  219 -------------------------------------
 source/rpc_server/srv_svcctl.c    |   90 +--------------
 source/rpc_server/srv_svcctl_nt.c |   75 +++++--------
 source/utils/net_rpc_service.c    |   34 ++++--
 6 files changed, 58 insertions(+), 509 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_svcctl.h b/source/include/rpc_svcctl.h
index c40ea8e..99d0c70 100644
--- a/source/include/rpc_svcctl.h
+++ b/source/include/rpc_svcctl.h
@@ -198,41 +198,6 @@ typedef struct _ServiceInfo {
 
 typedef struct {
 	POLICY_HND handle;
-	uint32 parmcount;
-	UNISTR4_ARRAY *parameters;
-} SVCCTL_Q_START_SERVICE;
-
-typedef struct {
-	WERROR status;
-} SVCCTL_R_START_SERVICE;
-
-/**************************/
-
-typedef struct {
-	POLICY_HND handle;
-	uint32 control;
-} SVCCTL_Q_CONTROL_SERVICE;
-
-typedef struct {
-	SERVICE_STATUS svc_status;
-	WERROR status;
-} SVCCTL_R_CONTROL_SERVICE;
-
-/**************************/
-
-typedef struct {
-	POLICY_HND handle;
-} SVCCTL_Q_QUERY_STATUS;
-
-typedef struct {
-	SERVICE_STATUS svc_status;
-	WERROR status;
-} SVCCTL_R_QUERY_STATUS;
-
-/**************************/
-
-typedef struct {
-	POLICY_HND handle;
 	uint32 type;
 	uint32 state;
 	uint32 buffer_size;
@@ -311,29 +276,6 @@ typedef struct {
 
 typedef struct {
 	POLICY_HND handle;
-} SVCCTL_Q_LOCK_SERVICE_DB;
-
-typedef struct {
-	POLICY_HND h_lock;
-	WERROR status;
-} SVCCTL_R_LOCK_SERVICE_DB;
-
-
-/**************************/
-
-typedef struct {
-	POLICY_HND h_lock;
-} SVCCTL_Q_UNLOCK_SERVICE_DB;
-
-typedef struct {
-	WERROR status;
-} SVCCTL_R_UNLOCK_SERVICE_DB;
-
-
-/**************************/
-
-typedef struct {
-	POLICY_HND handle;
 	uint32 security_flags;
 	uint32 buffer_size;	
 } SVCCTL_Q_QUERY_SERVICE_SEC;
diff --git a/source/rpc_client/cli_svcctl.c b/source/rpc_client/cli_svcctl.c
index cdd1b93..b21909f 100644
--- a/source/rpc_client/cli_svcctl.c
+++ b/source/rpc_client/cli_svcctl.c
@@ -129,36 +129,6 @@ WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX
 /*******************************************************************
 *******************************************************************/
 
-WERROR rpccli_svcctl_query_status( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                POLICY_HND *hService, SERVICE_STATUS *status )
-{
-	SVCCTL_Q_QUERY_STATUS in;
-	SVCCTL_R_QUERY_STATUS out;
-	prs_struct qbuf, rbuf;
-	
-	ZERO_STRUCT(in);
-	ZERO_STRUCT(out);
-	
-	memcpy( &in.handle, hService, sizeof(POLICY_HND) );
-	
-	CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_STATUS, 
-	            in, out, 
-	            qbuf, rbuf,
-	            svcctl_io_q_query_status,
-	            svcctl_io_r_query_status, 
-	            WERR_GENERAL_FAILURE );
-	
-	if ( !W_ERROR_IS_OK( out.status ) )
-		return out.status;
-
-	memcpy( status, &out.svc_status, sizeof(SERVICE_STATUS) );
-	
-	return out.status;
-}
-
-/*******************************************************************
-*******************************************************************/
-
 WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                 POLICY_HND *hService, SERVICE_CONFIG *config )
 {
@@ -229,64 +199,3 @@ WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 	
 	return out.status;
 }
-
-/*******************************************************************
-*******************************************************************/
-
-WERROR rpccli_svcctl_start_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                 POLICY_HND *hService,
-                                 const char **parm_array, uint32 parmcount )
-{
-	SVCCTL_Q_START_SERVICE in;
-	SVCCTL_R_START_SERVICE out;
-	prs_struct qbuf, rbuf;
-	
-	ZERO_STRUCT(in);
-	ZERO_STRUCT(out);
-	
-	memcpy( &in.handle, hService, sizeof(POLICY_HND) );
-	
-	in.parmcount  = 0;
-	in.parameters = NULL;
-	
-	CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_START_SERVICE_W,
-	            in, out, 
-	            qbuf, rbuf,
-	            svcctl_io_q_start_service,
-	            svcctl_io_r_start_service,
-	            WERR_GENERAL_FAILURE );
-	
-	return out.status;
-}
-
-/*******************************************************************
-*******************************************************************/
-
-WERROR rpccli_svcctl_control_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                   POLICY_HND *hService, uint32 control,
-				   SERVICE_STATUS *status )
-{
-	SVCCTL_Q_CONTROL_SERVICE in;
-	SVCCTL_R_CONTROL_SERVICE out;
-	prs_struct qbuf, rbuf;
-	
-	ZERO_STRUCT(in);
-	ZERO_STRUCT(out);
-	
-	memcpy( &in.handle, hService, sizeof(POLICY_HND) );
-	in.control = control;
-	
-	CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_CONTROL_SERVICE, 
-	            in, out, 
-	            qbuf, rbuf,
-	            svcctl_io_q_control_service,
-	            svcctl_io_r_control_service,
-	            WERR_GENERAL_FAILURE );
-	
-	if ( !W_ERROR_IS_OK( out.status ) )
-		return out.status;
-
-	memcpy( status, &out.svc_status, sizeof(SERVICE_STATUS) );
-	
-	return out.status;
-}
diff --git a/source/rpc_parse/parse_svcctl.c b/source/rpc_parse/parse_svcctl.c
index f3ed8d1..ececf1b 100644
--- a/source/rpc_parse/parse_svcctl.c
+++ b/source/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)
@@ -305,50 +262,6 @@ 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)
-{
-	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;
-}
-
-
-/*******************************************************************
-********************************************************************/
-
 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)
@@ -405,53 +318,6 @@ 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)
-{
-	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)
@@ -727,91 +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)
-		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)
diff --git a/source/rpc_server/srv_svcctl.c b/source/rpc_server/srv_svcctl.c
index 84c986d..565c93f 100644
--- a/source/rpc_server/srv_svcctl.c
+++ b/source/rpc_server/srv_svcctl.c
@@ -77,23 +77,7 @@ static bool api_svcctl_get_display_name(pipes_struct *p)
 
 static bool api_svcctl_query_status(pipes_struct *p)
 {
-	SVCCTL_Q_QUERY_STATUS q_u;
-	SVCCTL_R_QUERY_STATUS r_u;
-	prs_struct *data = &p->in_data.data;
-	prs_struct *rdata = &p->out_data.rdata;
-
-	ZERO_STRUCT(q_u);
-	ZERO_STRUCT(r_u);
-
-	if(!svcctl_io_q_query_status("", &q_u, data, 0))
-		return False;
-
-	r_u.status = _svcctl_query_status(p, &q_u, &r_u);
-
-	if(!svcctl_io_r_query_status("", &r_u, rdata, 0))
-		return False;
-
-	return True;
+	return proxy_svcctl_call(p, NDR_SVCCTL_QUERYSERVICESTATUS);
 }
 
 /*******************************************************************
@@ -171,23 +155,7 @@ static bool api_svcctl_enum_dependent_services(pipes_struct *p)
 
 static bool api_svcctl_start_service(pipes_struct *p)
 {
-	SVCCTL_Q_START_SERVICE q_u;
-	SVCCTL_R_START_SERVICE r_u;
-	prs_struct *data = &p->in_data.data;
-	prs_struct *rdata = &p->out_data.rdata;
-
-	ZERO_STRUCT(q_u);
-	ZERO_STRUCT(r_u);
-
-	if(!svcctl_io_q_start_service("", &q_u, data, 0))
-		return False;
-
-	r_u.status = _svcctl_start_service(p, &q_u, &r_u);
-
-	if(!svcctl_io_r_start_service("", &r_u, rdata, 0))
-		return False;
-
-	return True;
+	return proxy_svcctl_call(p, NDR_SVCCTL_STARTSERVICEW);
 }
 
 /*******************************************************************
@@ -195,23 +163,7 @@ static bool api_svcctl_start_service(pipes_struct *p)
 
 static bool api_svcctl_control_service(pipes_struct *p)
 {
-	SVCCTL_Q_CONTROL_SERVICE q_u;
-	SVCCTL_R_CONTROL_SERVICE r_u;
-	prs_struct *data = &p->in_data.data;
-	prs_struct *rdata = &p->out_data.rdata;
-
-	ZERO_STRUCT(q_u);
-	ZERO_STRUCT(r_u);
-
-	if(!svcctl_io_q_control_service("", &q_u, data, 0))


-- 
Samba Shared Repository


More information about the samba-cvs mailing list