1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00

Use pidl for _samr_RemoveMemberFromForeignDomain().

Guenther
(This used to be commit ab344dea96)
This commit is contained in:
Günther Deschner 2008-02-05 11:16:58 +01:00
parent 6e36f72ce6
commit ca772c8b18
2 changed files with 10 additions and 42 deletions

View File

@ -835,28 +835,7 @@ static bool api_samr_open_group(pipes_struct *p)
static bool api_samr_remove_sid_foreign_domain(pipes_struct *p)
{
SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN q_u;
SAMR_R_REMOVE_SID_FOREIGN_DOMAIN 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_remove_sid_foreign_domain("", &q_u, data, 0)) {
DEBUG(0,("api_samr_remove_sid_foreign_domain: unable to unmarshall SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN.\n"));
return False;
}
r_u.status = _samr_remove_sid_foreign_domain(p, &q_u, &r_u);
if (!samr_io_r_remove_sid_foreign_domain("", &r_u, rdata, 0)) {
DEBUG(0,("api_samr_remove_sid_foreign_domain: unable to marshall SAMR_R_REMOVE_SID_FOREIGN_DOMAIN.\n"));
return False;
}
return True;
return proxy_samr_call(p, NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN);
}
/*******************************************************************

View File

@ -4931,36 +4931,35 @@ NTSTATUS _samr_OpenGroup(pipes_struct *p,
}
/*********************************************************************
_samr_remove_sid_foreign_domain
_samr_RemoveMemberFromForeignDomain
*********************************************************************/
NTSTATUS _samr_remove_sid_foreign_domain(pipes_struct *p,
SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN *q_u,
SAMR_R_REMOVE_SID_FOREIGN_DOMAIN *r_u)
NTSTATUS _samr_RemoveMemberFromForeignDomain(pipes_struct *p,
struct samr_RemoveMemberFromForeignDomain *r)
{
DOM_SID delete_sid, domain_sid;
uint32 acc_granted;
NTSTATUS result;
DISP_INFO *disp_info = NULL;
sid_copy( &delete_sid, &q_u->sid.sid );
sid_copy( &delete_sid, r->in.sid );
DEBUG(5,("_samr_remove_sid_foreign_domain: removing SID [%s]\n",
DEBUG(5,("_samr_RemoveMemberFromForeignDomain: removing SID [%s]\n",
sid_string_dbg(&delete_sid)));
/* Find the policy handle. Open a policy on it. */
if (!get_lsa_policy_samr_sid(p, &q_u->dom_pol, &domain_sid,
if (!get_lsa_policy_samr_sid(p, r->in.domain_handle, &domain_sid,
&acc_granted, &disp_info))
return NT_STATUS_INVALID_HANDLE;
result = access_check_samr_function(acc_granted, STD_RIGHT_DELETE_ACCESS,
"_samr_remove_sid_foreign_domain");
"_samr_RemoveMemberFromForeignDomain");
if (!NT_STATUS_IS_OK(result))
return result;
DEBUG(8, ("_samr_remove_sid_foreign_domain:sid is %s\n",
DEBUG(8, ("_samr_RemoveMemberFromForeignDomain: sid is %s\n",
sid_string_dbg(&domain_sid)));
/* we can only delete a user from a group since we don't have
@ -4978,7 +4977,7 @@ NTSTATUS _samr_remove_sid_foreign_domain(pipes_struct *p,
* other cases. */
if (!sid_check_is_builtin(&domain_sid)) {
DEBUG(1,("_samr_remove_sid_foreign_domain: domain_sid = %s, "
DEBUG(1,("_samr_RemoveMemberFromForeignDomain: domain_sid = %s, "
"global_sam_sid() = %s\n",
sid_string_dbg(&domain_sid),
sid_string_dbg(get_global_sam_sid())));
@ -5319,16 +5318,6 @@ NTSTATUS _samr_TestPrivateFunctionsUser(pipes_struct *p,
/****************************************************************
****************************************************************/
NTSTATUS _samr_RemoveMemberFromForeignDomain(pipes_struct *p,
struct samr_RemoveMemberFromForeignDomain *r)
{
p->rng_fault_state = true;
return NT_STATUS_NOT_IMPLEMENTED;
}
/****************************************************************
****************************************************************/
NTSTATUS _samr_QueryDomainInfo2(pipes_struct *p,
struct samr_QueryDomainInfo2 *r)
{