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

s3: Use any_nt_status_not_ok in winbind

This commit is contained in:
Volker Lendecke 2010-10-18 10:10:43 +02:00
parent 347ca8f757
commit 1d5cb5125c
19 changed files with 19 additions and 95 deletions

View File

@ -93,14 +93,10 @@ static void wb_dsgetdcname_done(struct tevent_req *subreq)
status = dcerpc_wbint_DsGetDcName_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -97,14 +97,10 @@ static void wb_gid2sid_done(struct tevent_req *subreq)
status = dcerpc_wbint_Gid2Sid_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -92,14 +92,10 @@ static void wb_lookupgroupmem_done(struct tevent_req *subreq)
status = dcerpc_wbint_LookupGroupMembers_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -129,14 +129,10 @@ static void wb_lookupname_root_done(struct tevent_req *subreq)
status = dcerpc_wbint_LookupName_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -65,14 +65,10 @@ static void wb_lookupuseraliases_done(struct tevent_req *subreq)
status = dcerpc_wbint_LookupUserAliases_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -64,14 +64,10 @@ static void wb_lookupusergroups_done(struct tevent_req *subreq)
status = dcerpc_wbint_LookupUserGroups_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -60,14 +60,10 @@ static void wb_query_user_list_done(struct tevent_req *subreq)
status = dcerpc_wbint_QueryUserList_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
DEBUG(10, ("dcerpc_wbint_QueryUserList returned %d users\n",
state->users.num_userinfos));

View File

@ -73,14 +73,10 @@ static void wb_queryuser_done(struct tevent_req *subreq)
status = dcerpc_wbint_QueryUser_recv(subreq, state->info, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -57,14 +57,10 @@ static void wb_seqnum_done(struct tevent_req *subreq)
status = dcerpc_wbint_QuerySequenceNumber_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -145,14 +145,10 @@ static void wb_sid2gid_done(struct tevent_req *subreq)
status = dcerpc_wbint_Sid2Gid_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
state->gid = state->gid64;
tevent_req_done(req);

View File

@ -143,14 +143,10 @@ static void wb_sid2uid_done(struct tevent_req *subreq)
status = dcerpc_wbint_Sid2Uid_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
state->uid = state->uid64;
tevent_req_done(req);

View File

@ -97,14 +97,10 @@ static void wb_uid2sid_done(struct tevent_req *subreq)
status = dcerpc_wbint_Uid2Sid_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -65,14 +65,10 @@ static void winbindd_allocate_gid_done(struct tevent_req *subreq)
status = dcerpc_wbint_AllocateGid_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -65,14 +65,10 @@ static void winbindd_allocate_uid_done(struct tevent_req *subreq)
status = dcerpc_wbint_AllocateUid_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -75,14 +75,10 @@ static void winbindd_change_machine_acct_done(struct tevent_req *subreq)
NTSTATUS status, result;
status = dcerpc_wbint_ChangeMachineAccount_recv(subreq, state, &result);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -79,14 +79,10 @@ static void winbindd_check_machine_acct_done(struct tevent_req *subreq)
NTSTATUS status, result;
status = dcerpc_wbint_CheckMachineAccount_recv(subreq, state, &result);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -89,14 +89,10 @@ static void winbindd_dsgetdcname_done(struct tevent_req *subreq)
status = dcerpc_wbint_DsGetDcName_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -102,14 +102,10 @@ static void winbindd_lookuprids_done(struct tevent_req *subreq)
status = dcerpc_wbint_LookupRids_recv(subreq, state, &result);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}

View File

@ -78,14 +78,10 @@ static void winbindd_ping_dc_done(struct tevent_req *subreq)
NTSTATUS status, result;
status = dcerpc_wbint_PingDc_recv(subreq, state, &result);
if (!NT_STATUS_IS_OK(status)) {
if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
if (!NT_STATUS_IS_OK(result)) {
tevent_req_nterror(req, result);
return;
}
tevent_req_done(req);
}