summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-23 17:27:02 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-23 20:48:02 +1000
commit4f7666f97120a01e5bbbf335cf3effbddd2b5cd2 (patch)
tree530b93ad719b09064febdbf5da48ffcc2cc1b178
parent3ffd0f8423ce5d6bf3c9dd06c9402193c00c33b1 (diff)
downloadsamba-4f7666f97120a01e5bbbf335cf3effbddd2b5cd2.tar.gz
samba-4f7666f97120a01e5bbbf335cf3effbddd2b5cd2.tar.bz2
samba-4f7666f97120a01e5bbbf335cf3effbddd2b5cd2.zip
s4-libnet Always return after composite_error()
This can and does cause crashes as multiple conflicting sets of callbacks run on memory that may have been destroyed. Andrew Bartlett
-rw-r--r--source4/libnet/groupinfo.c1
-rw-r--r--source4/libnet/libnet_domain.c1
-rw-r--r--source4/libnet/userinfo.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c
index 932ab0ca9a..0bc0d9f4b8 100644
--- a/source4/libnet/groupinfo.c
+++ b/source4/libnet/groupinfo.c
@@ -93,6 +93,7 @@ static void continue_groupinfo_lookup(struct tevent_req *subreq)
- we're looking for only one at the moment */
if (s->lookup.out.rids->count == 0) {
composite_error(c, NT_STATUS_NO_SUCH_USER);
+ return;
}
/* TODO: find proper status code for more than one rid found */
diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c
index d2b96958ee..acd2ece7a9 100644
--- a/source4/libnet/libnet_domain.c
+++ b/source4/libnet/libnet_domain.c
@@ -1137,6 +1137,7 @@ static void continue_samr_close_handle(struct tevent_req *subreq)
/* did everything go fine ? */
if (!NT_STATUS_IS_OK(s->samrclose.out.result)) {
composite_error(c, s->samrclose.out.result);
+ return;
}
composite_done(c);
diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c
index d485eecf5b..ddb249ee96 100644
--- a/source4/libnet/userinfo.c
+++ b/source4/libnet/userinfo.c
@@ -92,6 +92,7 @@ static void continue_userinfo_lookup(struct tevent_req *subreq)
- we're looking for only one at the moment */
if (s->lookup.out.rids->count == 0) {
composite_error(c, NT_STATUS_NO_SUCH_USER);
+ return;
}
/* TODO: find proper status code for more than one rid found */