[SCM] Samba Shared Repository - branch v3-6-test updated

Jeremy Allison jra at samba.org
Tue May 10 16:39:45 MDT 2011


The branch, v3-6-test has been updated
       via  25d7736 s3-printing: Fix double free of cups request.
       via  eacf55c s3-printing: very obvious fix for cups_pull_comment_location().
       via  6b919c3 s3-events: tevent_internal.h is not a public header
       via  b36fda5 s3: Use tevent_req_ntstatus properly in a few places
       via  708519e s3: Use tevent_req_ntstatus properly in a few places (cherry picked from commit 06a2ff579692ea062944e5bd90d3526327004954)
      from  76d2ce0 async_smb.c: convert cli->timeout properly

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 25d7736c82b7f6bcc56fbdec51baeec0f656083d
Author: Günther Deschner <gd at samba.org>
Date:   Tue May 10 15:49:05 2011 +0200

    s3-printing: Fix double free of cups request.
    
    We never free the request in our cups api usage except for here. The reason is
    probably htis (from the cupsDoConnect API docs):
    
    "This function sends the IPP request to the specified server, retrying and
    authenticating as necessary. The request is freed with ippDelete() after
    receiving a valid IPP response."
    
    Revert "Fix a memory leak in cups_pull_comment_location"
    
    This reverts commit fee2664dad37536b05ce8bdae3e74d45b257f632.
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Tue May 10 17:32:58 CEST 2011 on sn-devel-104
    (cherry picked from commit 019f11dd5b3240d05c1abe30dec3d793d6919313)

commit eacf55ce39cf4db9784ee500011f338a71b88c97
Author: Günther Deschner <gd at samba.org>
Date:   Tue May 10 15:48:25 2011 +0200

    s3-printing: very obvious fix for cups_pull_comment_location().
    
    This has been in there since 2008...
    
    Guenther
    (cherry picked from commit 3ba3f68e03510e3bb5b7627c200af0395e853bc2)

commit 6b919c31974be4167f217b720e975c37ee94d6a3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 10 14:55:45 2011 +0200

    s3-events: tevent_internal.h is not a public header
    
    We need to use the "foo.h" form instead of the <foo.h> form for
    headers that are not installed publicly. Otherwise when an external
    version of tevent is used we won't find the header and the build will
    fail.
    
    Note that this creates a structure dependency between the
    tevent structures in the external library and the headers in our
    source tree. That is not ideal, but is currently OK as the waf build
    will only use the external library if it is at least the same version
    as the internal tree, which means it will actually be the same
    version, as we release the external version from our tree.
    
    We should come up with a better solution, but for now this allows
    openchange to build again.
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Tue May 10 16:06:40 CEST 2011 on sn-devel-104
    (cherry picked from commit 628fcd111af9b51020191a6ee916896c127c88c1)

commit b36fda577867fe612c55b3948b9078b7e644c339
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
    (cherry picked from commit 44cc1656276d99816614408b5cd846e6a57eacf0)

commit 708519e14be1fdc0f3686e8ab386c49e58283d6a
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
    (cherry picked from commit 06a2ff579692ea062944e5bd90d3526327004954)

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/events.c                         |    2 +-
 source3/libsmb/clifile.c                     |   87 +++++++++-----------------
 source3/printing/print_cups.c                |    6 +--
 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 +-
 33 files changed, 80 insertions(+), 162 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/events.c b/source3/lib/events.c
index e461ebe..9ff1488 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include <tevent_internal.h>
+#include "lib/tevent/tevent_internal.h"
 #include "../lib/util/select.h"
 #include "system/select.h"
 
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index bc56d40..97d55d3 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -417,8 +417,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;
 	}
 	/*
@@ -713,8 +712,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);
@@ -827,8 +825,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);
@@ -1179,8 +1176,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);
@@ -1305,8 +1301,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);
@@ -1500,8 +1495,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);
@@ -1608,8 +1602,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);
@@ -1716,8 +1709,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);
@@ -1978,8 +1970,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);
@@ -2171,8 +2162,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;
@@ -2192,8 +2182,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);
@@ -2307,8 +2296,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;
@@ -2322,8 +2310,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);
@@ -2609,8 +2596,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);
@@ -2774,8 +2760,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);
@@ -3133,8 +3118,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;
 	}
 
@@ -3297,8 +3281,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;
 	}
 
@@ -3434,8 +3417,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);
@@ -3568,8 +3550,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);
@@ -3679,8 +3660,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);
@@ -3796,8 +3776,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);
@@ -3929,8 +3908,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;
 	}
 
@@ -4290,8 +4268,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);
@@ -4426,8 +4403,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);
@@ -4884,9 +4860,8 @@ static void cli_notify_done(struct tevent_req *subreq)
 	status = cli_trans_recv(subreq, talloc_tos(), &flags2, NULL, 0, NULL,
 				&params, 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;
 	}
 
@@ -5035,8 +5010,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);
@@ -5168,8 +5142,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);
@@ -5271,8 +5244,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);
@@ -5374,8 +5346,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/printing/print_cups.c b/source3/printing/print_cups.c
index da42cb6..ea2fc1d 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -1633,7 +1633,7 @@ bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
 	} else {
 		server = talloc_strdup(frame,cupsServer());
 	}
-	if (server) {
+	if (!server) {
 		goto out;
 	}
 	if (!push_utf8_talloc(frame, &sharename, printername, &size)) {
@@ -1731,10 +1731,6 @@ bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
 	if (response)
 		ippDelete(response);
 
-	if (request) {
-		ippDelete(request);
-	}
-
 	if (language)
 		cupsLangFree(language);
 
diff --git a/source3/winbindd/wb_fill_pwent.c b/source3/winbindd/wb_fill_pwent.c
index 2305738..8f09480 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);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list