summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-25 15:31:29 -0700
committerVolker Lendecke <vl@samba.org>2010-09-26 01:12:37 +0200
commit242e3296108f513b286787ac12ea768b9c4ed954 (patch)
tree326069ebcf1a00836ba561173d829d4170a40504 /source3/auth
parent2d8be31e880bcd1b7444ffd45295cc9948079b6f (diff)
downloadsamba-242e3296108f513b286787ac12ea768b9c4ed954.tar.gz
samba-242e3296108f513b286787ac12ea768b9c4ed954.tar.bz2
samba-242e3296108f513b286787ac12ea768b9c4ed954.zip
s3: Lift talloc_autofree_context() from make_auth_context_subsystem()
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth.c10
-rw-r--r--source3/auth/auth_compat.c5
-rw-r--r--source3/auth/auth_ntlmssp.c2
3 files changed, 11 insertions, 6 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 8a3e3497be..4eb0845ba0 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -455,7 +455,8 @@ static NTSTATUS make_auth_context_text_list(TALLOC_CTX *mem_ctx,
Make a auth_context struct for the auth subsystem
***************************************************************************/
-NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
+NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
+ struct auth_context **auth_context)
{
char **auth_method_list = NULL;
NTSTATUS nt_status;
@@ -526,8 +527,7 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
DEBUG(5,("Using specified auth order\n"));
}
- nt_status = make_auth_context_text_list(talloc_autofree_context(),
- auth_context,
+ nt_status = make_auth_context_text_list(mem_ctx, auth_context,
auth_method_list);
TALLOC_FREE(auth_method_list);
@@ -541,7 +541,9 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8])
{
NTSTATUS nt_status;
- if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(auth_context))) {
+ nt_status = make_auth_context_subsystem(talloc_autofree_context(),
+ auth_context);
+ if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}
diff --git a/source3/auth/auth_compat.c b/source3/auth/auth_compat.c
index bd4c433ab9..ffad36e9f2 100644
--- a/source3/auth/auth_compat.c
+++ b/source3/auth/auth_compat.c
@@ -42,7 +42,10 @@ NTSTATUS check_plaintext_password(const char *smb_name,
struct auth_usersupplied_info *user_info = NULL;
uint8_t chal[8];
NTSTATUS nt_status;
- if (!NT_STATUS_IS_OK(nt_status = make_auth_context_subsystem(&plaintext_auth_context))) {
+
+ nt_status = make_auth_context_subsystem(talloc_tos(),
+ &plaintext_auth_context);
+ if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index af3a6f3827..3905914884 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -229,7 +229,7 @@ NTSTATUS auth_ntlmssp_start(struct auth_ntlmssp_state **auth_ntlmssp_state)
return nt_status;
}
- nt_status = make_auth_context_subsystem(&auth_context);
+ nt_status = make_auth_context_subsystem(talloc_tos(), &auth_context);
if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}