1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Use pidl for _svcctl_UnlockServiceDatabase().

Guenther
This commit is contained in:
Günther Deschner 2008-02-19 02:50:01 +01:00
parent 23d37a9aed
commit 300bf76a79
2 changed files with 6 additions and 26 deletions

View File

@ -228,23 +228,7 @@ static bool api_svcctl_lock_service_db(pipes_struct *p)
static bool api_svcctl_unlock_service_db(pipes_struct *p)
{
SVCCTL_Q_UNLOCK_SERVICE_DB q_u;
SVCCTL_R_UNLOCK_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_unlock_service_db("", &q_u, data, 0))
return False;
r_u.status = _svcctl_unlock_service_db(p, &q_u, &r_u);
if(!svcctl_io_r_unlock_service_db("", &r_u, rdata, 0))
return False;
return True;
return proxy_svcctl_call(p, NDR_SVCCTL_UNLOCKSERVICEDATABASE);
}
/*******************************************************************

View File

@ -786,17 +786,19 @@ WERROR _svcctl_LockServiceDatabase(pipes_struct *p,
}
/********************************************************************
_svcctl_UnlockServiceDatabase
********************************************************************/
WERROR _svcctl_unlock_service_db( pipes_struct *p, SVCCTL_Q_UNLOCK_SERVICE_DB *q_u, SVCCTL_R_UNLOCK_SERVICE_DB *r_u )
WERROR _svcctl_UnlockServiceDatabase(pipes_struct *p,
struct svcctl_UnlockServiceDatabase *r)
{
SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->h_lock );
SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.lock );
if ( !info || (info->type != SVC_HANDLE_IS_DBLOCK) )
return WERR_BADFID;
return close_policy_hnd( p, &q_u->h_lock) ? WERR_OK : WERR_BADFID;
return close_policy_hnd( p, r->out.lock) ? WERR_OK : WERR_BADFID;
}
/********************************************************************
@ -919,12 +921,6 @@ WERROR _svcctl_SetServiceStatus(pipes_struct *p, struct svcctl_SetServiceStatus
return WERR_NOT_SUPPORTED;
}
WERROR _svcctl_UnlockServiceDatabase(pipes_struct *p, struct svcctl_UnlockServiceDatabase *r)
{
p->rng_fault_state = True;
return WERR_NOT_SUPPORTED;
}
WERROR _svcctl_NotifyBootConfigStatus(pipes_struct *p, struct svcctl_NotifyBootConfigStatus *r)
{
p->rng_fault_state = True;