diff options
author | Volker Lendecke <vl@samba.org> | 2011-01-28 19:04:04 +0100 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-01-28 22:54:19 +0100 |
commit | fe516a3fb76b389ba7dc70ec8c16522d8dc93d27 (patch) | |
tree | e86814ad77499a43acec2e3cf34d6c8f27a3edb4 | |
parent | 2d174d49cd34acccacae919ed6b207ec74f26296 (diff) | |
download | samba-fe516a3fb76b389ba7dc70ec8c16522d8dc93d27.tar.gz samba-fe516a3fb76b389ba7dc70ec8c16522d8dc93d27.tar.bz2 samba-fe516a3fb76b389ba7dc70ec8c16522d8dc93d27.zip |
s3: Do not use state->mem_ctx in fillup_password_policy
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 12 |
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; } |