summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-06-22 21:29:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:30 -0500
commit240ec86942c6efad5da9b762075971f66969b2f4 (patch)
treee3d4b04d59cc7fe56ca61cc835e370374a4cb1b3 /source4/libnet
parentde2fbad4d2e325db631c67cffe9fb8f4f2d99d1c (diff)
downloadsamba-240ec86942c6efad5da9b762075971f66969b2f4.tar.gz
samba-240ec86942c6efad5da9b762075971f66969b2f4.tar.bz2
samba-240ec86942c6efad5da9b762075971f66969b2f4.zip
r16476: Error in composite functions implemented the 'old way' (single event handler,
no continue functions) need to report an error by means of state only. composite_error calls event handler function which frees the context and state structure. This fixes a segfault in some cases (caught it on modifyuser test). rafal (This used to be commit 9e800fd0cfda9e731905fc0f19781def5cdba89f)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/userman.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index 9c084eee48..cd12ece0e8 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -519,11 +519,13 @@ static NTSTATUS usermod_lookup(struct composite_context *c,
and what if there's more than one rid resolved */
if (!s->lookupname.out.rids.count) {
c->status = NT_STATUS_NO_SUCH_USER;
- composite_error(c, c->status);
+ c->state = COMPOSITE_STATE_ERROR;
+ return c->status;
} else if (!s->lookupname.out.rids.count > 1) {
c->status = NT_STATUS_INVALID_ACCOUNT_NAME;
- composite_error(c, c->status);
+ c->state = COMPOSITE_STATE_ERROR;
+ return c->status;
}
/* prepare the next rpc call */