[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Tue May 10 05:12:02 MDT 2011
The branch, master has been updated
via 44cc165 s3: Use tevent_req_ntstatus properly in a few places
via 06a2ff5 s3: Use tevent_req_ntstatus properly in a few places
from 87e3542 async_smb.c: convert cli->timeout properly
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 44cc1656276d99816614408b5cd846e6a57eacf0
Author: Volker Lendecke <vl at samba.org>
Date: Tue May 10 11:05:47 2011 +0200
s3: Use tevent_req_ntstatus properly in a few places
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Tue May 10 13:11:10 CEST 2011 on sn-devel-104
commit 06a2ff579692ea062944e5bd90d3526327004954
Author: Volker Lendecke <vl at samba.org>
Date: Tue May 10 11:05:47 2011 +0200
s3: Use tevent_req_ntstatus properly in a few places
-----------------------------------------------------------------------
Summary of changes:
source3/libsmb/clifile.c | 87 +++++++++-----------------
source3/winbindd/wb_fill_pwent.c | 6 +-
source3/winbindd/wb_getgrsid.c | 9 +--
source3/winbindd/wb_getpwsid.c | 9 +--
source3/winbindd/wb_gettoken.c | 9 +--
source3/winbindd/wb_group_members.c | 18 ++----
source3/winbindd/wb_lookupname.c | 3 +-
source3/winbindd/wb_lookupsid.c | 3 +-
source3/winbindd/wb_next_grent.c | 6 +-
source3/winbindd/wb_next_pwent.c | 3 +-
source3/winbindd/wb_sid2gid.c | 3 +-
source3/winbindd/wb_sid2uid.c | 3 +-
source3/winbindd/winbindd_getdcname.c | 3 +-
source3/winbindd/winbindd_getgrgid.c | 6 +-
source3/winbindd/winbindd_getgrnam.c | 6 +-
source3/winbindd/winbindd_getgroups.c | 6 +-
source3/winbindd/winbindd_getpwent.c | 3 +-
source3/winbindd/winbindd_getpwnam.c | 6 +-
source3/winbindd/winbindd_getpwsid.c | 3 +-
source3/winbindd/winbindd_getpwuid.c | 6 +-
source3/winbindd/winbindd_getsidaliases.c | 3 +-
source3/winbindd/winbindd_getuserdomgroups.c | 3 +-
source3/winbindd/winbindd_getusersids.c | 3 +-
source3/winbindd/winbindd_gid_to_sid.c | 3 +-
source3/winbindd/winbindd_lookupname.c | 3 +-
source3/winbindd/winbindd_lookupsids.c | 3 +-
source3/winbindd/winbindd_show_sequence.c | 6 +-
source3/winbindd/winbindd_sid_to_gid.c | 3 +-
source3/winbindd/winbindd_sid_to_uid.c | 3 +-
source3/winbindd/winbindd_sids_to_xids.c | 3 +-
source3/winbindd/winbindd_uid_to_sid.c | 3 +-
31 files changed, 78 insertions(+), 156 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 48488c1..f5b6fab 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -418,8 +418,7 @@ static void cli_posix_readlink_done(struct tevent_req *subreq)
status = cli_qpathinfo_recv(subreq, state, &state->data,
&state->num_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
/*
@@ -619,8 +618,7 @@ static void cli_posix_getfacl_done(struct tevent_req *subreq)
status = cli_qpathinfo_recv(subreq, state, &state->data,
&state->num_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -733,8 +731,7 @@ static void cli_posix_stat_done(struct tevent_req *subreq)
status = cli_qpathinfo_recv(subreq, state, &state->data,
&state->num_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -1085,8 +1082,7 @@ static void cli_rename_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -1211,8 +1207,7 @@ static void cli_ntrename_internal_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -1406,8 +1401,7 @@ static void cli_unlink_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -1514,8 +1508,7 @@ static void cli_mkdir_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -1622,8 +1615,7 @@ static void cli_rmdir_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -1884,8 +1876,7 @@ static void cli_ntcreate_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, state, &inbuf, 3, &wct, &vwv,
&num_bytes, &bytes);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
state->fnum = SVAL(vwv+2, 1);
@@ -2077,8 +2068,7 @@ struct tevent_req *cli_open_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
}
status = cli_smb_req_send(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
return req;
@@ -2098,8 +2088,7 @@ static void cli_open_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, state, &inbuf, 3, &wct, &vwv, NULL,
NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
state->fnum = SVAL(vwv+2, 0);
@@ -2213,8 +2202,7 @@ struct tevent_req *cli_close_send(TALLOC_CTX *mem_ctx,
}
status = cli_smb_req_send(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
return req;
@@ -2228,8 +2216,7 @@ static void cli_close_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -2515,8 +2502,7 @@ static void cli_unlock_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -2680,8 +2666,7 @@ static void cli_unlock64_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -3039,8 +3024,7 @@ static void cli_getattrE_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, state, &inbuf, 11, &wct, &vwv,
NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -3203,8 +3187,7 @@ static void cli_getatr_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, state, &inbuf, 4, &wct, &vwv, NULL,
NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -3340,8 +3323,7 @@ static void cli_setattrE_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -3474,8 +3456,7 @@ static void cli_setatr_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -3585,8 +3566,7 @@ static void cli_chkpath_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -3702,8 +3682,7 @@ static void cli_dskattr_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, state, &inbuf, 4, &wct, &vwv, NULL,
NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
state->bsize = SVAL(vwv+1, 0)*SVAL(vwv+2,0);
@@ -3835,8 +3814,7 @@ static void cli_ctemp_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, state, &inbuf, 1, &wcnt, &vwv,
&num_bytes, &bytes);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -4196,8 +4174,7 @@ static void cli_get_ea_list_path_done(struct tevent_req *subreq)
status = cli_qpathinfo_recv(subreq, state, &state->data,
&state->num_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -4332,8 +4309,7 @@ static void cli_posix_open_internal_done(struct tevent_req *subreq)
status = cli_trans_recv(subreq, state, NULL, NULL, 0, NULL,
NULL, 0, NULL, &data, 12, &num_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
state->fnum = SVAL(data,2);
@@ -4790,9 +4766,8 @@ static void cli_notify_done(struct tevent_req *subreq)
status = cli_trans_recv(subreq, talloc_tos(), &flags2, NULL, 0, NULL,
¶ms, 0, &num_params, NULL, 0, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (tevent_req_nterror(req, status)) {
DEBUG(10, ("cli_trans_recv returned %s\n", nt_errstr(status)));
- tevent_req_nterror(req, status);
return;
}
@@ -4941,8 +4916,7 @@ static void cli_qpathinfo_done(struct tevent_req *subreq)
NULL, 0, NULL,
&state->rdata, state->min_rdata,
&state->num_rdata);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -5074,8 +5048,7 @@ static void cli_qfileinfo_done(struct tevent_req *subreq)
NULL, 0, NULL,
&state->rdata, state->min_rdata,
&state->num_rdata);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -5177,8 +5150,7 @@ static void cli_flush_done(struct tevent_req *subreq)
status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL, NULL, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
@@ -5280,8 +5252,7 @@ static void cli_shadow_copy_data_done(struct tevent_req *subreq)
NULL, 0, NULL, /* param */
&state->data, 12, &state->num_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
diff --git a/source3/winbindd/wb_fill_pwent.c b/source3/winbindd/wb_fill_pwent.c
index 6fad5f4..a716245 100644
--- a/source3/winbindd/wb_fill_pwent.c
+++ b/source3/winbindd/wb_fill_pwent.c
@@ -72,8 +72,7 @@ static void wb_fill_pwent_sid2uid_done(struct tevent_req *subreq)
status = wb_sid2uid_recv(subreq, &state->pw->pw_uid);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -98,8 +97,7 @@ static void wb_fill_pwent_sid2gid_done(struct tevent_req *subreq)
status = wb_sid2gid_recv(subreq, &state->pw->pw_gid);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
diff --git a/source3/winbindd/wb_getgrsid.c b/source3/winbindd/wb_getgrsid.c
index e55c1b0..7d7e56a 100644
--- a/source3/winbindd/wb_getgrsid.c
+++ b/source3/winbindd/wb_getgrsid.c
@@ -83,8 +83,7 @@ static void wb_getgrsid_lookupsid_done(struct tevent_req *subreq)
status = wb_lookupsid_recv(subreq, state, &state->type,
&state->domname, &state->name);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -115,8 +114,7 @@ static void wb_getgrsid_sid2gid_done(struct tevent_req *subreq)
status = wb_sid2gid_recv(subreq, &state->gid);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
subreq = wb_group_members_send(state, state->ev, &state->sid,
@@ -137,8 +135,7 @@ static void wb_getgrsid_got_members(struct tevent_req *subreq)
status = wb_group_members_recv(subreq, state, &state->members);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
diff --git a/source3/winbindd/wb_getpwsid.c b/source3/winbindd/wb_getpwsid.c
index 24ce7dc..3c942f0 100644
--- a/source3/winbindd/wb_getpwsid.c
+++ b/source3/winbindd/wb_getpwsid.c
@@ -74,8 +74,7 @@ static void wb_getpwsid_queryuser_done(struct tevent_req *subreq)
status = wb_queryuser_recv(subreq, state, &state->userinfo);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -118,8 +117,7 @@ static void wb_getpwsid_lookupsid_done(struct tevent_req *subreq)
status = wb_lookupsid_recv(subreq, state->userinfo, &type, &domain,
&state->userinfo->acct_name);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
subreq = wb_fill_pwent_send(state, state->ev, state->userinfo,
@@ -137,8 +135,7 @@ static void wb_getpwsid_done(struct tevent_req *subreq)
NTSTATUS status;
status = wb_fill_pwent_recv(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
tevent_req_done(req);
diff --git a/source3/winbindd/wb_gettoken.c b/source3/winbindd/wb_gettoken.c
index 5c2af4a..aaaffa0 100644
--- a/source3/winbindd/wb_gettoken.c
+++ b/source3/winbindd/wb_gettoken.c
@@ -90,8 +90,7 @@ static void wb_gettoken_gotgroups(struct tevent_req *subreq)
status = wb_lookupusergroups_recv(subreq, state, &state->num_sids,
&state->sids);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -135,8 +134,7 @@ static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq)
status = wb_lookupuseraliases_recv(subreq, state, &num_rids, &rids);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
domain = find_domain_from_sid_noinit(get_global_sam_sid());
@@ -181,8 +179,7 @@ static void wb_gettoken_gotbuiltins(struct tevent_req *subreq)
status = wb_lookupuseraliases_recv(subreq, state, &num_rids, &rids);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
if (!wb_add_rids_to_sids(state, &state->num_sids, &state->sids,
diff --git a/source3/winbindd/wb_group_members.c b/source3/winbindd/wb_group_members.c
index c9603e7..e6efcab 100644
--- a/source3/winbindd/wb_group_members.c
+++ b/source3/winbindd/wb_group_members.c
@@ -155,8 +155,7 @@ static struct tevent_req *wb_groups_members_send(TALLOC_CTX *mem_ctx,
state->all_members = NULL;
status = wb_groups_members_next_subreq(state, state, &subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
if (subreq == NULL) {
@@ -210,8 +209,7 @@ static void wb_groups_members_done(struct tevent_req *subreq)
* and just continue if an error occured.
*/
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -235,8 +233,7 @@ static void wb_groups_members_done(struct tevent_req *subreq)
TALLOC_FREE(members);
status = wb_groups_members_next_subreq(state, state, &subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
if (subreq == NULL) {
@@ -313,8 +310,7 @@ struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
state->groups->type = type;
status = wb_group_members_next_subreq(state, state, &subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
if (subreq == NULL) {
@@ -361,8 +357,7 @@ static void wb_group_members_done(struct tevent_req *subreq)
status = wb_groups_members_recv(subreq, state, &num_members, &members);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -440,8 +435,7 @@ static void wb_group_members_done(struct tevent_req *subreq)
}
status = wb_group_members_next_subreq(state, state, &subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
if (subreq == NULL) {
diff --git a/source3/winbindd/wb_lookupname.c b/source3/winbindd/wb_lookupname.c
index a9b4dfa..2ebaba0 100644
--- a/source3/winbindd/wb_lookupname.c
+++ b/source3/winbindd/wb_lookupname.c
@@ -91,8 +91,7 @@ static void wb_lookupname_done(struct tevent_req *subreq)
status = dcerpc_wbint_LookupName_recv(subreq, state, &result);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
if (NT_STATUS_IS_OK(result)) {
diff --git a/source3/winbindd/wb_lookupsid.c b/source3/winbindd/wb_lookupsid.c
--
Samba Shared Repository
More information about the samba-cvs
mailing list