summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-07-06 02:56:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:52 -0500
commit66ac77dd124c0a3a65ef3ef835015433366d3e44 (patch)
tree40bff70a62c24ce1bb752ca0024abfb22ecd8613
parentd9f4a8328e851a6dfc2bb064c0fd6805ec54b9a8 (diff)
downloadsamba-66ac77dd124c0a3a65ef3ef835015433366d3e44.tar.gz
samba-66ac77dd124c0a3a65ef3ef835015433366d3e44.tar.bz2
samba-66ac77dd124c0a3a65ef3ef835015433366d3e44.zip
r1356: Fix logic bugs in ntlm_auth.
Andrew Bartlett (This used to be commit 871e98ce5771bc96527f7ad4da07a7d6c1ae1c3c)
-rw-r--r--source4/utils/ntlm_auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 1685f8387f..ad804eda3c 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/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);
}
}