summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-25 15:35:44 -0700
committerVolker Lendecke <vl@samba.org>2010-09-26 01:12:37 +0200
commit6ee0d866c2d7dbdede8511fb906c10f6118fa87d (patch)
treed4ff03c45e7f1b579ab83df33298d610ef79a4d5
parent242e3296108f513b286787ac12ea768b9c4ed954 (diff)
downloadsamba-6ee0d866c2d7dbdede8511fb906c10f6118fa87d.tar.gz
samba-6ee0d866c2d7dbdede8511fb906c10f6118fa87d.tar.bz2
samba-6ee0d866c2d7dbdede8511fb906c10f6118fa87d.zip
s3: Lift talloc_autofree_context() from make_auth_context_fixed()
-rw-r--r--source3/auth/auth.c7
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/rpc_server/srv_netlog_nt.c2
-rw-r--r--source3/smbd/sesssetup.c4
4 files changed, 10 insertions, 7 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 4eb0845ba0..790bfaca23 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -538,11 +538,12 @@ NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
Make a auth_info struct with a fixed challenge
***************************************************************************/
-NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8])
+NTSTATUS make_auth_context_fixed(TALLOC_CTX *mem_ctx,
+ struct auth_context **auth_context,
+ uchar chal[8])
{
NTSTATUS nt_status;
- nt_status = make_auth_context_subsystem(talloc_autofree_context(),
- auth_context);
+ nt_status = make_auth_context_subsystem(mem_ctx, auth_context);
if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 38ee2818ad..c252b0e19c 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -31,7 +31,9 @@ bool load_auth_module(struct auth_context *auth_context,
const char *module, auth_methods **ret) ;
NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
struct auth_context **auth_context);
-NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8]) ;
+NTSTATUS make_auth_context_fixed(TALLOC_CTX *mem_ctx,
+ struct auth_context **auth_context,
+ uchar chal[8]) ;
/* The following definitions come from auth/auth_builtin.c */
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 963737f897..fb60ef86ca 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -1323,7 +1323,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
{
const char *wksname = nt_workstation;
- status = make_auth_context_fixed(&auth_context,
+ status = make_auth_context_fixed(talloc_tos(), &auth_context,
logon->network->challenge);
if (!NT_STATUS_IS_OK(status)) {
return status;
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 68b91b7f1b..c2a2d16303 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -147,8 +147,8 @@ static NTSTATUS check_guest_password(struct auth_serversupplied_info **server_in
DEBUG(3,("Got anonymous request\n"));
- if (!NT_STATUS_IS_OK(nt_status = make_auth_context_fixed(&auth_context,
- chal))) {
+ nt_status = make_auth_context_fixed(talloc_tos(), &auth_context, chal);
+ if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}