summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-25 14:50:46 -0700
committerVolker Lendecke <vl@samba.org>2010-09-26 01:12:37 +0200
commit61861e4b7d37d5b483360c0e9faa3dd3a1d0e9f6 (patch)
tree3030e62a486587b6f8f06263f37463d5c58cf34c /source3/auth
parentb12744513ec24a50cc838bc6273513d3ac3ddba9 (diff)
downloadsamba-61861e4b7d37d5b483360c0e9faa3dd3a1d0e9f6.tar.gz
samba-61861e4b7d37d5b483360c0e9faa3dd3a1d0e9f6.tar.bz2
samba-61861e4b7d37d5b483360c0e9faa3dd3a1d0e9f6.zip
s3: Lift talloc_autofree_context() from make_auth_context()
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index cabff53180..a22c223e13 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -343,11 +343,12 @@ static int auth_context_destructor(void *ptr)
Make a auth_info struct
***************************************************************************/
-static NTSTATUS make_auth_context(struct auth_context **auth_context)
+static NTSTATUS make_auth_context(TALLOC_CTX *mem_ctx,
+ struct auth_context **auth_context)
{
struct auth_context *ctx;
- ctx = talloc_zero(talloc_autofree_context(), struct auth_context);
+ ctx = talloc_zero(mem_ctx, struct auth_context);
if (!ctx) {
DEBUG(0,("make_auth_context: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
@@ -431,8 +432,11 @@ static NTSTATUS make_auth_context_text_list(struct auth_context **auth_context,
return NT_STATUS_UNSUCCESSFUL;
}
- if (!NT_STATUS_IS_OK(nt_status = make_auth_context(auth_context)))
+ nt_status = make_auth_context(talloc_autofree_context(), auth_context);
+
+ if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
+ }
for (;*text_list; text_list++) {
if (load_auth_module(*auth_context, *text_list, &t)) {