diff options
author | Volker Lendecke <vl@samba.org> | 2010-10-18 10:10:43 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-10-20 18:09:20 +0200 |
commit | 1d5cb5125c9ed911e9560a3cd99bc428306539c5 (patch) | |
tree | b484767751b73b9a9e6effd49b3f3485a4ebd26e /source3 | |
parent | 347ca8f757d6a0b61bb22be21ffffec95986ad94 (diff) | |
download | samba-1d5cb5125c9ed911e9560a3cd99bc428306539c5.tar.gz samba-1d5cb5125c9ed911e9560a3cd99bc428306539c5.tar.bz2 samba-1d5cb5125c9ed911e9560a3cd99bc428306539c5.zip |
s3: Use any_nt_status_not_ok in winbind
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/wb_dsgetdcname.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_gid2sid.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_group_members.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_lookupname.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_lookupuseraliases.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_lookupusergroups.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_query_user_list.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_queryuser.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_seqnum.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_sid2gid.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_sid2uid.c | 6 | ||||
-rw-r--r-- | source3/winbindd/wb_uid2sid.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_allocate_gid.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_allocate_uid.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_change_machine_acct.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_check_machine_acct.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dsgetdcname.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_lookuprids.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_ping_dc.c | 6 |
19 files changed, 19 insertions, 95 deletions
diff --git a/source3/winbindd/wb_dsgetdcname.c b/source3/winbindd/wb_dsgetdcname.c index 71aecfe97d..8c78599e9e 100644 --- a/source3/winbindd/wb_dsgetdcname.c +++ b/source3/winbindd/wb_dsgetdcname.c @@ -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); } diff --git a/source3/winbindd/wb_gid2sid.c b/source3/winbindd/wb_gid2sid.c index 6bde2b5abf..fd2fd0e8eb 100644 --- a/source3/winbindd/wb_gid2sid.c +++ b/source3/winbindd/wb_gid2sid.c @@ -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); } diff --git a/source3/winbindd/wb_group_members.c b/source3/winbindd/wb_group_members.c index 1fb7af3694..5be04a9c10 100644 --- a/source3/winbindd/wb_group_members.c +++ b/source3/winbindd/wb_group_members.c @@ -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); } diff --git a/source3/winbindd/wb_lookupname.c b/source3/winbindd/wb_lookupname.c index c28b51a774..783ee4cabc 100644 --- a/source3/winbindd/wb_lookupname.c +++ b/source3/winbindd/wb_lookupname.c @@ -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); } diff --git a/source3/winbindd/wb_lookupuseraliases.c b/source3/winbindd/wb_lookupuseraliases.c index d8f8023b66..0459fe99f4 100644 --- a/source3/winbindd/wb_lookupuseraliases.c +++ b/source3/winbindd/wb_lookupuseraliases.c @@ -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); } diff --git a/source3/winbindd/wb_lookupusergroups.c b/source3/winbindd/wb_lookupusergroups.c index e1478aa6bd..fb675e3523 100644 --- a/source3/winbindd/wb_lookupusergroups.c +++ b/source3/winbindd/wb_lookupusergroups.c @@ -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); } diff --git a/source3/winbindd/wb_query_user_list.c b/source3/winbindd/wb_query_user_list.c index 5480763890..fafbb76e3d 100644 --- a/source3/winbindd/wb_query_user_list.c +++ b/source3/winbindd/wb_query_user_list.c @@ -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)); diff --git a/source3/winbindd/wb_queryuser.c b/source3/winbindd/wb_queryuser.c index f14fbcbed6..9685119d7e 100644 --- a/source3/winbindd/wb_queryuser.c +++ b/source3/winbindd/wb_queryuser.c @@ -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); } diff --git a/source3/winbindd/wb_seqnum.c b/source3/winbindd/wb_seqnum.c index 3084564a33..15b1622831 100644 --- a/source3/winbindd/wb_seqnum.c +++ b/source3/winbindd/wb_seqnum.c @@ -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); } diff --git a/source3/winbindd/wb_sid2gid.c b/source3/winbindd/wb_sid2gid.c index 76fe326996..9adff51d16 100644 --- a/source3/winbindd/wb_sid2gid.c +++ b/source3/winbindd/wb_sid2gid.c @@ -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); diff --git a/source3/winbindd/wb_sid2uid.c b/source3/winbindd/wb_sid2uid.c index 21bf61b3fc..5395d534a7 100644 --- a/source3/winbindd/wb_sid2uid.c +++ b/source3/winbindd/wb_sid2uid.c @@ -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); diff --git a/source3/winbindd/wb_uid2sid.c b/source3/winbindd/wb_uid2sid.c index 46b896a140..5beceafb14 100644 --- a/source3/winbindd/wb_uid2sid.c +++ b/source3/winbindd/wb_uid2sid.c @@ -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); } diff --git a/source3/winbindd/winbindd_allocate_gid.c b/source3/winbindd/winbindd_allocate_gid.c index d9264543cb..c9c19727be 100644 --- a/source3/winbindd/winbindd_allocate_gid.c +++ b/source3/winbindd/winbindd_allocate_gid.c @@ -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); } diff --git a/source3/winbindd/winbindd_allocate_uid.c b/source3/winbindd/winbindd_allocate_uid.c index b949b4a860..5eecce3d47 100644 --- a/source3/winbindd/winbindd_allocate_uid.c +++ b/source3/winbindd/winbindd_allocate_uid.c @@ -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); } diff --git a/source3/winbindd/winbindd_change_machine_acct.c b/source3/winbindd/winbindd_change_machine_acct.c index 8b31bb1f93..c98d71324c 100644 --- a/source3/winbindd/winbindd_change_machine_acct.c +++ b/source3/winbindd/winbindd_change_machine_acct.c @@ -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); } diff --git a/source3/winbindd/winbindd_check_machine_acct.c b/source3/winbindd/winbindd_check_machine_acct.c index 65a975002b..5f9cefa209 100644 --- a/source3/winbindd/winbindd_check_machine_acct.c +++ b/source3/winbindd/winbindd_check_machine_acct.c @@ -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); } diff --git a/source3/winbindd/winbindd_dsgetdcname.c b/source3/winbindd/winbindd_dsgetdcname.c index f01d35428e..7e46c9653c 100644 --- a/source3/winbindd/winbindd_dsgetdcname.c +++ b/source3/winbindd/winbindd_dsgetdcname.c @@ -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); } diff --git a/source3/winbindd/winbindd_lookuprids.c b/source3/winbindd/winbindd_lookuprids.c index 20ba79ee16..6e3d5c5ece 100644 --- a/source3/winbindd/winbindd_lookuprids.c +++ b/source3/winbindd/winbindd_lookuprids.c @@ -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); } diff --git a/source3/winbindd/winbindd_ping_dc.c b/source3/winbindd/winbindd_ping_dc.c index e69e59399c..db50f6dbec 100644 --- a/source3/winbindd/winbindd_ping_dc.c +++ b/source3/winbindd/winbindd_ping_dc.c @@ -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); } |