diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-07-06 02:56:26 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-07-06 02:56:26 +0000 |
commit | 6915546d959b854a2ec65ce439c08631845c6c3e (patch) | |
tree | 4db2932f2b9c24eb3ab4ebc84448286b1dff38c7 /source | |
parent | 59f944de4fc5f307bae68b757cd6a7571dacc40b (diff) | |
download | samba-6915546d959b854a2ec65ce439c08631845c6c3e.tar.gz samba-6915546d959b854a2ec65ce439c08631845c6c3e.tar.xz samba-6915546d959b854a2ec65ce439c08631845c6c3e.zip |
r1356: Fix logic bugs in ntlm_auth.
Andrew Bartlett
Diffstat (limited to 'source')
-rw-r--r-- | source/utils/ntlm_auth.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c index 1685f8387fe..ad804eda3ce 100644 --- a/source/utils/ntlm_auth.c +++ b/source/utils/ntlm_auth.c @@ -436,7 +436,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, lp_winbind_separator(), session_info->server_info->account_name); talloc_destroy(session_info->mem_ctx); } - } else if ((*gensec_state)->gensec_role == GENSEC_SERVER) { + } else if ((*gensec_state)->gensec_role == GENSEC_CLIENT) { reply_code = "AF"; reply_arg = NULL; } else { @@ -447,14 +447,18 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, case GSS_SPNEGO_SERVER: if (out_base64) { x_fprintf(x_stdout, "%s %s %s\n", reply_code, out_base64, reply_arg); - } else { + } else if (reply_arg) { x_fprintf(x_stdout, "%s %s\n", reply_code, reply_arg); + } else { + x_fprintf(x_stdout, "%s\n", reply_code); } default: if (out_base64) { x_fprintf(x_stdout, "%s %s\n", reply_code, out_base64); - } else { + } else if (reply_arg) { x_fprintf(x_stdout, "%s %s\n", reply_code, reply_arg); + } else { + x_fprintf(x_stdout, "%s\n", reply_code); } } |