summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-07-21 12:59:44 -0400
committerSimo Sorce <simo@redhat.com>2013-07-28 13:17:51 -0400
commit976c19ccefe5053baee272de4ae136c0b4731c7c (patch)
tree60cb34e3b5d8ade3010ea2664f72a6f445917bb2
parente3ae1ee773a1cb33cd0ca06eeef0296bbf4a9b7b (diff)
downloadgss-ntlmssp-976c19ccefe5053baee272de4ae136c0b4731c7c.tar.gz
gss-ntlmssp-976c19ccefe5053baee272de4ae136c0b4731c7c.tar.xz
gss-ntlmssp-976c19ccefe5053baee272de4ae136c0b4731c7c.zip
Fix message type check
-rw-r--r--src/gss_sec_ctx.c2
-rw-r--r--src/ntlm.c4
-rw-r--r--src/ntlm.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gss_sec_ctx.c b/src/gss_sec_ctx.c
index fe60ea6..948c58d 100644
--- a/src/gss_sec_ctx.c
+++ b/src/gss_sec_ctx.c
@@ -224,7 +224,7 @@ uint32_t gssntlm_init_sec_context(uint32_t *minor_status,
goto done;
}
- if (msg_type != NTLMSSP_STAGE_CHALLENGE ||
+ if (msg_type != CHALLENGE_MESSAGE ||
ctx->stage != NTLMSSP_STAGE_NEGOTIATE) {
retmaj = GSS_S_NO_CONTEXT;
goto done;
diff --git a/src/ntlm.c b/src/ntlm.c
index 7c7ab6e..f42f105 100644
--- a/src/ntlm.c
+++ b/src/ntlm.c
@@ -308,10 +308,6 @@ static int ntlm_str_convert(iconv_t cd,
}
-#define NEGOTIATE_MESSAGE 0x00000001
-#define CHALLENGE_MESSAGE 0x00000002
-#define AUTHENTICATE_MESSAGE 0x00000003
-
uint8_t ntlmssp_sig[8] = {'N', 'T', 'L', 'M', 'S', 'S', 'P', 0};
static void ntlm_encode_header(struct wire_msg_hdr *hdr, uint32_t msg_type)
diff --git a/src/ntlm.h b/src/ntlm.h
index 18cb79a..2f1429a 100644
--- a/src/ntlm.h
+++ b/src/ntlm.h
@@ -69,6 +69,10 @@
#define NTLMSSP_VERSION_BUILD 0
#define NTLMSSP_VERSION_REV NTLMSSP_REVISION_W2K3
+#define NEGOTIATE_MESSAGE 0x00000001
+#define CHALLENGE_MESSAGE 0x00000002
+#define AUTHENTICATE_MESSAGE 0x00000003
+
struct ntlm_ctx;