1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

Use pidl for _lsa_OpenAccount().

Guenther
(This used to be commit e1968880a88ad2a56c5fef7d416646dcb96965ef)
This commit is contained in:
Günther Deschner 2008-02-06 19:19:29 +01:00
parent 026dddcbcd
commit 02abf612c8
2 changed files with 8 additions and 35 deletions

View File

@ -316,29 +316,7 @@ static bool api_lsa_create_account(pipes_struct *p)
static bool api_lsa_open_account(pipes_struct *p)
{
LSA_Q_OPENACCOUNT q_u;
LSA_R_OPENACCOUNT 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(!lsa_io_q_open_account("", &q_u, data, 0)) {
DEBUG(0,("api_lsa_open_account: failed to unmarshall LSA_Q_OPENACCOUNT.\n"));
return False;
}
r_u.status = _lsa_open_account(p, &q_u, &r_u);
/* store the response in the SMB stream */
if(!lsa_io_r_open_account("", &r_u, rdata, 0)) {
DEBUG(0,("api_lsa_open_account: Failed to marshall LSA_R_OPENACCOUNT.\n"));
return False;
}
return True;
return proxy_lsa_call(p, NDR_LSA_OPENACCOUNT);
}
/***************************************************************************

View File

@ -1655,16 +1655,17 @@ NTSTATUS _lsa_CreateAccount(pipes_struct *p,
/***************************************************************************
Lsa Open Account
_lsa_OpenAccount
***************************************************************************/
NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u)
NTSTATUS _lsa_OpenAccount(pipes_struct *p,
struct lsa_OpenAccount *r)
{
struct lsa_info *handle;
struct lsa_info *info;
/* find the connection policy handle. */
if (!find_policy_by_hnd(p, &q_u->pol, (void **)(void *)&handle))
if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&handle))
return NT_STATUS_INVALID_HANDLE;
/* check if the user have enough rights */
@ -1686,11 +1687,11 @@ NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENAC
return NT_STATUS_NO_MEMORY;
ZERO_STRUCTP(info);
info->sid = q_u->sid.sid;
info->access = q_u->access;
info->sid = *r->in.sid;
info->access = r->in.access_mask;
/* get a (unique) handle. open a policy on it. */
if (!create_policy_hnd(p, &r_u->pol, free_lsa_info, (void *)info))
if (!create_policy_hnd(p, *r->out.acct_handle, free_lsa_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_OK;
@ -2240,12 +2241,6 @@ NTSTATUS _lsa_LookupSids(pipes_struct *p, struct lsa_LookupSids *r)
return NT_STATUS_NOT_IMPLEMENTED;
}
NTSTATUS _lsa_OpenAccount(pipes_struct *p, struct lsa_OpenAccount *r)
{
p->rng_fault_state = True;
return NT_STATUS_NOT_IMPLEMENTED;
}
NTSTATUS _lsa_EnumPrivsAccount(pipes_struct *p, struct lsa_EnumPrivsAccount *r)
{
p->rng_fault_state = True;