diff options
author | Günther Deschner <gd@samba.org> | 2008-02-19 02:47:05 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-19 03:13:34 +0100 |
commit | e0860ccc824c336103a1e57c9e43c27936265769 (patch) | |
tree | e61ea4118496e0be9af41f4e4b6c8ebb31d88a6f | |
parent | c147f2fd6b5d8f319b2cf6903da093211f46e575 (diff) | |
download | samba-e0860ccc824c336103a1e57c9e43c27936265769.tar.gz samba-e0860ccc824c336103a1e57c9e43c27936265769.tar.bz2 samba-e0860ccc824c336103a1e57c9e43c27936265769.zip |
Use pidl for _svcctl_LockServiceDatabase().
Guenther
(This used to be commit 939da2eb58ea8cfa637ec63b254755d77702da45)
-rw-r--r-- | source3/rpc_server/srv_svcctl.c | 18 | ||||
-rw-r--r-- | source3/rpc_server/srv_svcctl_nt.c | 15 |
2 files changed, 6 insertions, 27 deletions
diff --git a/source3/rpc_server/srv_svcctl.c b/source3/rpc_server/srv_svcctl.c index 3b9960c647..4689e38dea 100644 --- a/source3/rpc_server/srv_svcctl.c +++ b/source3/rpc_server/srv_svcctl.c @@ -219,23 +219,7 @@ static bool api_svcctl_query_service_config2(pipes_struct *p) static bool api_svcctl_lock_service_db(pipes_struct *p) { - SVCCTL_Q_LOCK_SERVICE_DB q_u; - SVCCTL_R_LOCK_SERVICE_DB 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_lock_service_db("", &q_u, data, 0)) - return False; - - r_u.status = _svcctl_lock_service_db(p, &q_u, &r_u); - - if(!svcctl_io_r_lock_service_db("", &r_u, rdata, 0)) - return False; - - return True; + return proxy_svcctl_call(p, NDR_SVCCTL_LOCKSERVICEDATABASE); } diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index 9baf2d5110..96eafe4215 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -764,11 +764,13 @@ WERROR _svcctl_query_service_config2( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CO } /******************************************************************** + _svcctl_LockServiceDatabase ********************************************************************/ -WERROR _svcctl_lock_service_db( pipes_struct *p, SVCCTL_Q_LOCK_SERVICE_DB *q_u, SVCCTL_R_LOCK_SERVICE_DB *r_u ) +WERROR _svcctl_LockServiceDatabase(pipes_struct *p, + struct svcctl_LockServiceDatabase *r) { - SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->handle ); + SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle ); /* perform access checks */ @@ -780,8 +782,7 @@ WERROR _svcctl_lock_service_db( pipes_struct *p, SVCCTL_Q_LOCK_SERVICE_DB *q_u, /* Just open a handle. Doesn't actually lock anything */ - return create_open_service_handle( p, &r_u->h_lock, SVC_HANDLE_IS_DBLOCK, NULL, 0 ); -; + return create_open_service_handle( p, r->out.lock, SVC_HANDLE_IS_DBLOCK, NULL, 0 ); } /******************************************************************** @@ -900,12 +901,6 @@ WERROR _svcctl_DeleteService(pipes_struct *p, struct svcctl_DeleteService *r) return WERR_NOT_SUPPORTED; } -WERROR _svcctl_LockServiceDatabase(pipes_struct *p, struct svcctl_LockServiceDatabase *r) -{ - p->rng_fault_state = True; - return WERR_NOT_SUPPORTED; -} - WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p, struct svcctl_QueryServiceObjectSecurity *r) { p->rng_fault_state = True; |