summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-01-28 19:04:04 +0100
committerVolker Lendecke <vlendec@samba.org>2011-01-28 22:54:19 +0100
commitfe516a3fb76b389ba7dc70ec8c16522d8dc93d27 (patch)
treee86814ad77499a43acec2e3cf34d6c8f27a3edb4 /source3
parent2d174d49cd34acccacae919ed6b207ec74f26296 (diff)
downloadsamba-fe516a3fb76b389ba7dc70ec8c16522d8dc93d27.tar.gz
samba-fe516a3fb76b389ba7dc70ec8c16522d8dc93d27.tar.bz2
samba-fe516a3fb76b389ba7dc70ec8c16522d8dc93d27.zip
s3: Do not use state->mem_ctx in fillup_password_policy
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_pam.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 456e47b5ae..9555be0d85 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -390,25 +390,29 @@ static void fill_in_password_policy(struct winbindd_response *r,
static NTSTATUS fillup_password_policy(struct winbindd_domain *domain,
struct winbindd_cli_state *state)
{
+ TALLOC_CTX *frame = talloc_stackframe();
struct winbindd_methods *methods;
- NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status;
struct samr_DomInfo1 password_policy;
if ( !winbindd_can_contact_domain( domain ) ) {
DEBUG(5,("fillup_password_policy: No inbound trust to "
"contact domain %s\n", domain->name));
- return NT_STATUS_NOT_SUPPORTED;
+ status = NT_STATUS_NOT_SUPPORTED;
+ goto done;
}
methods = domain->methods;
- status = methods->password_policy(domain, state->mem_ctx, &password_policy);
+ status = methods->password_policy(domain, talloc_tos(), &password_policy);
if (NT_STATUS_IS_ERR(status)) {
- return status;
+ goto done;
}
fill_in_password_policy(state->response, &password_policy);
+done:
+ TALLOC_FREE(frame);
return NT_STATUS_OK;
}