diff options
author | Volker Lendecke <vl@samba.org> | 2014-02-18 09:49:56 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-02-18 10:29:01 +0100 |
commit | 97c6fd4010b28d6c099a3150e2822cd800c626e2 (patch) | |
tree | c172e17aaf2febc0b9ed34934ff108b2c919791c /source4/auth/ntlm/auth.c | |
parent | 2a345b2d401ac79290e9186682ce2db62719ec76 (diff) | |
download | samba-97c6fd4010b28d6c099a3150e2822cd800c626e2.tar.gz |
Revert "auth4: Do not generate just a temporary wbc_context"
This reverts commit 5124a9e1183de990ca3146cd355152094495a779.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/auth/ntlm/auth.c')
-rw-r--r-- | source4/auth/ntlm/auth.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c index ccfd20ad05f..a8c257f94ae 100644 --- a/source4/auth/ntlm/auth.c +++ b/source4/auth/ntlm/auth.c @@ -461,12 +461,21 @@ static NTSTATUS auth_generate_session_info_wrapper(struct auth4_context *auth_co if ((session_info_flags & AUTH_SESSION_INFO_UNIX_TOKEN) && NT_STATUS_IS_OK(status)) { - status = auth_session_info_fill_unix(auth_context->event_ctx, + struct wbc_context *wbc_ctx = wbc_init(auth_context, + auth_context->msg_ctx, + auth_context->event_ctx); + if (!wbc_ctx) { + TALLOC_FREE(*session_info); + DEBUG(1, ("Cannot contact winbind to provide unix token\n")); + return NT_STATUS_INVALID_SERVER_STATE; + } + status = auth_session_info_fill_unix(wbc_ctx->event_ctx, auth_context->lp_ctx, original_user_name, *session_info); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(*session_info); } + TALLOC_FREE(wbc_ctx); } return status; } |