diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-03-27 09:17:15 +1300 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2014-04-02 11:05:46 +0200 |
commit | 4d50c751595511936c3d9a44ebb26a925c50a8bc (patch) | |
tree | d4abcf2c0089bb6532d85e272108e1f829d51830 /source3/winbindd | |
parent | e1ec1f5d8df8511b2320cd25676896de170983d1 (diff) | |
download | samba-4d50c751595511936c3d9a44ebb26a925c50a8bc.tar.gz |
s3-auth: Finally change make_user_info_*() use a parent talloc context
Change-Id: Iedf516e8c24e0d18064aeedd8e287ed692d3c5b4
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index b41291e3751..415dc79974c 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -1215,6 +1215,7 @@ static NTSTATUS winbindd_dual_auth_passdb(TALLOC_CTX *mem_ctx, struct tsocket_address *local; NTSTATUS status; int rc; + TALLOC_CTX *frame = talloc_stackframe(); rc = tsocket_address_inet_from_strings(mem_ctx, "ip", @@ -1222,13 +1223,15 @@ static NTSTATUS winbindd_dual_auth_passdb(TALLOC_CTX *mem_ctx, 0, &local); if (rc < 0) { + TALLOC_FREE(frame); return NT_STATUS_NO_MEMORY; } - status = make_user_info(&user_info, user, user, domain, domain, + status = make_user_info(frame, &user_info, user, user, domain, domain, lp_netbios_name(), local, lm_resp, nt_resp, NULL, NULL, NULL, AUTH_PASSWORD_RESPONSE); if (!NT_STATUS_IS_OK(status)) { DEBUG(10, ("make_user_info failed: %s\n", nt_errstr(status))); + TALLOC_FREE(frame); return status; } user_info->logon_parameters = logon_parameters; @@ -1236,11 +1239,11 @@ static NTSTATUS winbindd_dual_auth_passdb(TALLOC_CTX *mem_ctx, /* We don't want any more mapping of the username */ user_info->mapped_state = True; - status = check_sam_security_info3(challenge, talloc_tos(), user_info, + status = check_sam_security_info3(challenge, mem_ctx, user_info, pinfo3); - free_user_info(&user_info); DEBUG(10, ("Authenticaticating user %s\\%s returned %s\n", domain, user, nt_errstr(status))); + TALLOC_FREE(frame); return status; } |