From 25d6eaae8d0d885add7e64b96df7a489328c6b0f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 10 Dec 2006 05:23:47 +0000 Subject: r20098: Properly fix issues with create_token_from_username() reported by James. Ensure that this function allocates everything on the temporary context except the return memory. Never call this with a null mem context, and now use conn->mem_ctx instead in smbd/service.c. Remove separate free functions for conn->ngroups and conn->nt_user_token as they are now always talloc'ed off the conn->mem_ctx. Future optimization will be to remove conn->mem_ctx and make all objects pointed to in the conn struct talloc'ed off conn itself. Easy to free then :-). Jeremy. (This used to be commit f83b6de44f1058811ff94ac72a8a71bd8e49e4e8) --- source3/include/smb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/smb.h b/source3/include/smb.h index 765e153b37..aefc06548e 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -547,7 +547,7 @@ struct share_iterator { typedef struct connection_struct { struct connection_struct *next, *prev; - TALLOC_CTX *mem_ctx; + TALLOC_CTX *mem_ctx; /* long-lived memory context for things hanging off this struct. */ unsigned cnum; /* an index passed over the wire */ struct share_params *params; BOOL force_user; -- cgit