1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

Use pidl for _samr_DeleteAliasMember().

Guenther
(This used to be commit 51f5bcfd39b169866a13bb5b7878f99dc2b89462)
This commit is contained in:
Günther Deschner 2008-02-04 23:27:22 +01:00
parent e5f049887d
commit 0bdb2d42bb
2 changed files with 12 additions and 41 deletions

View File

@ -759,28 +759,7 @@ static bool api_samr_add_aliasmem(pipes_struct *p)
static bool api_samr_del_aliasmem(pipes_struct *p)
{
SAMR_Q_DEL_ALIASMEM q_u;
SAMR_R_DEL_ALIASMEM 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 (!samr_io_q_del_aliasmem("", &q_u, data, 0)) {
DEBUG(0,("api_samr_del_aliasmem: unable to unmarshall SAMR_Q_DEL_ALIASMEM.\n"));
return False;
}
r_u.status = _samr_del_aliasmem(p, &q_u, &r_u);
if (!samr_io_r_del_aliasmem("", &r_u, rdata, 0)) {
DEBUG(0,("api_samr_del_aliasmem: unable to marshall SAMR_R_DEL_ALIASMEM.\n"));
return False;
}
return True;
return proxy_samr_call(p, NDR_SAMR_DELETEALIASMEMBER);
}
/*******************************************************************

View File

@ -4006,24 +4006,26 @@ NTSTATUS _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_AD
}
/*********************************************************************
_samr_del_aliasmem
_samr_DeleteAliasMember
*********************************************************************/
NTSTATUS _samr_del_aliasmem(pipes_struct *p, SAMR_Q_DEL_ALIASMEM *q_u, SAMR_R_DEL_ALIASMEM *r_u)
NTSTATUS _samr_DeleteAliasMember(pipes_struct *p,
struct samr_DeleteAliasMember *r)
{
DOM_SID alias_sid;
uint32 acc_granted;
SE_PRIV se_rights;
bool can_add_accounts;
NTSTATUS ret;
NTSTATUS status;
DISP_INFO *disp_info = NULL;
/* Find the policy handle. Open a policy on it. */
if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &alias_sid, &acc_granted, &disp_info))
if (!get_lsa_policy_samr_sid(p, r->in.alias_handle, &alias_sid, &acc_granted, &disp_info))
return NT_STATUS_INVALID_HANDLE;
if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_REMOVE_MEMBER, "_samr_del_aliasmem"))) {
return r_u->status;
status = access_check_samr_function(acc_granted, SA_RIGHT_ALIAS_REMOVE_MEMBER, "_samr_DeleteAliasMember");
if (!NT_STATUS_IS_OK(status)) {
return status;
}
DEBUG(10, ("_samr_del_aliasmem:sid is %s\n",
@ -4037,18 +4039,18 @@ NTSTATUS _samr_del_aliasmem(pipes_struct *p, SAMR_Q_DEL_ALIASMEM *q_u, SAMR_R_DE
if ( can_add_accounts )
become_root();
ret = pdb_del_aliasmem(&alias_sid, &q_u->sid.sid);
status = pdb_del_aliasmem(&alias_sid, r->in.sid);
if ( can_add_accounts )
unbecome_root();
/******** END SeAddUsers BLOCK *********/
if (NT_STATUS_IS_OK(ret)) {
if (NT_STATUS_IS_OK(status)) {
force_flush_samr_cache(disp_info);
}
return ret;
return status;
}
/*********************************************************************
@ -5256,16 +5258,6 @@ NTSTATUS _samr_AddAliasMember(pipes_struct *p,
/****************************************************************
****************************************************************/
NTSTATUS _samr_DeleteAliasMember(pipes_struct *p,
struct samr_DeleteAliasMember *r)
{
p->rng_fault_state = true;
return NT_STATUS_NOT_IMPLEMENTED;
}
/****************************************************************
****************************************************************/
NTSTATUS _samr_GetMembersInAlias(pipes_struct *p,
struct samr_GetMembersInAlias *r)
{