summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-07-01 14:08:43 +1000
committerAndrew Tridgell <tridge@samba.org>2009-07-01 15:15:37 +1000
commit6a192020a230ab8e085f32b5559c0fe0d2f5c1a4 (patch)
tree82e11df394842eeebc893e7b1e5a2c88401fe9c0
parent386211a81ce9091db0d6dbb711dc656af412c649 (diff)
downloadsamba-6a192020a230ab8e085f32b5559c0fe0d2f5c1a4.tar.gz
samba-6a192020a230ab8e085f32b5559c0fe0d2f5c1a4.tar.bz2
samba-6a192020a230ab8e085f32b5559c0fe0d2f5c1a4.zip
gensec_start now steals the auth_context
-rw-r--r--source4/auth/gensec/gensec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 2feb545f53..1addf937d0 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -504,6 +504,8 @@ const char **gensec_security_oids(struct gensec_security *gensec_security,
@param mem_ctx The parent TALLOC memory context.
@param gensec_security Returned GENSEC context pointer.
@note The mem_ctx is only a parent and may be NULL.
+ @note, the auth context is moved to be a child of the
+ @ gensec_security return
*/
static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
@@ -532,7 +534,7 @@ static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
(*gensec_security)->event_ctx = ev;
SMB_ASSERT(settings->lp_ctx != NULL);
(*gensec_security)->settings = talloc_reference(*gensec_security, settings);
- (*gensec_security)->auth_context = talloc_reference(*gensec_security, auth_context);
+ (*gensec_security)->auth_context = talloc_steal(*gensec_security, auth_context);
return NT_STATUS_OK;
}