summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-11-15 20:31:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:52 -0500
commite2ebe810873f1e5f5592e7378f130e87904d8de2 (patch)
tree31a94ac8701c6f27e5cd8a1bad1ad909d6142d88 /source4/libcli
parent55d195f30b9a88c1bee84804f88c01e71246d958 (diff)
downloadsamba-e2ebe810873f1e5f5592e7378f130e87904d8de2.tar.gz
samba-e2ebe810873f1e5f5592e7378f130e87904d8de2.tar.bz2
samba-e2ebe810873f1e5f5592e7378f130e87904d8de2.zip
r3770: - fix endless recursion loop in spnego fallback code
- fix compiler warnings metze (This used to be commit 37a8bd2e30cab98bc8b1bf10d0a516827cbb3373)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/spnego.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c
index bafbf64294..316deaee0d 100644
--- a/source4/libcli/auth/spnego.c
+++ b/source4/libcli/auth/spnego.c
@@ -218,6 +218,10 @@ static NTSTATUS gensec_spnego_server_try_fallback(struct gensec_security *gensec
if (!all_ops[i]->oid) {
continue;
}
+ if (strcasecmp(OID_SPNEGO,all_ops[i]->oid) == 0) {
+ continue;
+ }
+
nt_status = gensec_subcontext_start(gensec_security,
&spnego_state->sub_sec_security);
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -437,7 +441,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (spnego.type != spnego_state->expected_packet) {
DEBUG(1, ("Invalid SPNEGO request: %d, expected %d\n", spnego.type,
spnego_state->expected_packet));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
spnego_free_data(&spnego);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -497,7 +501,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (len == -1) {
DEBUG(1, ("Invalid SPNEGO request:\n"));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -505,7 +509,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (spnego.type != spnego_state->expected_packet) {
DEBUG(1, ("Invalid SPNEGO request: %d, expected %d\n", spnego.type,
spnego_state->expected_packet));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
spnego_free_data(&spnego);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -563,7 +567,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (len == -1) {
DEBUG(1, ("Invalid SPNEGO request:\n"));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -571,7 +575,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (spnego.type != spnego_state->expected_packet) {
DEBUG(1, ("Invalid SPNEGO request: %d, expected %d\n", spnego.type,
spnego_state->expected_packet));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
spnego_free_data(&spnego);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -603,7 +607,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (len == -1) {
DEBUG(1, ("Invalid SPNEGO request:\n"));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -611,7 +615,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (spnego.type != spnego_state->expected_packet) {
DEBUG(1, ("Invalid SPNEGO request: %d, expected %d\n", spnego.type,
spnego_state->expected_packet));
- dump_data(1, (const char *)in.data, in.length);
+ dump_data(1, in.data, in.length);
spnego_free_data(&spnego);
return NT_STATUS_INVALID_PARAMETER;
}