diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-02 22:17:42 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-02 22:17:42 +1000 |
commit | 83e9b1c325964a016b499ad124d161eb20f6c26c (patch) | |
tree | 910c999ac8afa4bfdc39adb2c9693ace49bb6de2 /source4/winbind/wb_pam_auth.c | |
parent | 68e1991c6cfd34a6852c5be24259285c6214ea3c (diff) | |
download | samba-83e9b1c325964a016b499ad124d161eb20f6c26c.tar.gz samba-83e9b1c325964a016b499ad124d161eb20f6c26c.tar.bz2 samba-83e9b1c325964a016b499ad124d161eb20f6c26c.zip |
s4-winbind: support the s3 response flags on krb5 auth too
This fixes the samba4.blackbox.wbinfo test, which was failing on a
wbinfo -K command
Diffstat (limited to 'source4/winbind/wb_pam_auth.c')
-rw-r--r-- | source4/winbind/wb_pam_auth.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c index b2579fd6df..0a9c37911b 100644 --- a/source4/winbind/wb_pam_auth.c +++ b/source4/winbind/wb_pam_auth.c @@ -260,11 +260,31 @@ struct composite_context *wb_cmd_pam_auth_send(TALLOC_CTX *mem_ctx, chal, nt_resp, lm_resp); } -NTSTATUS wb_cmd_pam_auth_recv(struct composite_context *c) +NTSTATUS wb_cmd_pam_auth_recv(struct composite_context *c, + TALLOC_CTX *mem_ctx, + DATA_BLOB *info3, + struct netr_UserSessionKey *user_session_key, + struct netr_LMSessionKey *lm_key, + char **unix_username) { - struct pam_auth_crap_state *state = - talloc_get_type(c->private_data, struct pam_auth_crap_state); - NTSTATUS status = composite_wait(c); - talloc_free(state); - return status; + struct pam_auth_crap_state *state = + talloc_get_type(c->private_data, struct pam_auth_crap_state); + NTSTATUS status = composite_wait(c); + if (NT_STATUS_IS_OK(status)) { + if (info3) { + info3->length = state->info3.length; + info3->data = talloc_steal(mem_ctx, state->info3.data); + } + if (user_session_key) { + *user_session_key = state->user_session_key; + } + if (lm_key) { + *lm_key = state->lm_key; + } + if (unix_username) { + *unix_username = talloc_steal(mem_ctx, state->unix_username); + } + } + talloc_free(state); + return status; } |