summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-10-21 00:10:16 +0000
committerAndrew Tridgell <tridge@samba.org>2001-10-21 00:10:16 +0000
commitb7331220c65747c6d7de2b05372839c20f712439 (patch)
tree271071392468efd21ad8b0cfdc24c49bdc14dc74 /source3/smbd
parent7cd889f566ebe352721943e53a055db5b817f12f (diff)
downloadsamba-b7331220c65747c6d7de2b05372839c20f712439.tar.gz
samba-b7331220c65747c6d7de2b05372839c20f712439.tar.bz2
samba-b7331220c65747c6d7de2b05372839c20f712439.zip
fixed the spnego detection code in session setup
this gets share mode working again (This used to be commit 8286e5307ca47f14d27ee0d9bc9700d52151d56a)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 1ca7066c41..3cac6f338b 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -80,6 +80,11 @@ static int reply_spnego_kerberos(connection_struct *conn,
return ERROR_NT(NT_STATUS_LOGON_FAILURE);
}
+#if 0
+ chdir("/home/tridge");
+ file_save("ticket.dat", ticket.data, ticket.length);
+#endif
+
packet.length = ticket.length;
packet.data = (krb5_pointer)ticket.data;
@@ -196,7 +201,8 @@ static int reply_spnego_negotiate(connection_struct *conn,
for (i=0;OIDs[i];i++) {
DEBUG(3,("Got OID %s\n", OIDs[i]));
- if (strcmp(OID_KERBEROS5_OLD, OIDs[i]) == 0) {
+ if (strcmp(OID_KERBEROS5, OIDs[i]) == 0 ||
+ strcmp(OID_KERBEROS5_OLD, OIDs[i]) == 0) {
got_kerberos = True;
}
free(OIDs[i]);
@@ -504,7 +510,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
BOOL doencrypt = global_encrypted_passwords_negotiated;
START_PROFILE(SMBsesssetupX);
- if (SVAL(inbuf, smb_flg2) & FLAGS2_EXTENDED_SECURITY) {
+ if (SVAL(inbuf, smb_wct) == 12) {
/* it's a SPNEGO session setup */
return reply_sesssetup_and_X_spnego(conn, inbuf, outbuf, length, bufsize);
}