summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-23 01:53:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:21 -0500
commit0229b657552dad428343b9e06ead6c66dbc347c3 (patch)
tree0e6e4d2cd9d8cb13ae850e53d97fdc107cfbd850 /source3/smbd
parent55ccaee64ae113daf092d083a3eac3cf93c55ae3 (diff)
downloadsamba-0229b657552dad428343b9e06ead6c66dbc347c3.tar.gz
samba-0229b657552dad428343b9e06ead6c66dbc347c3.tar.bz2
samba-0229b657552dad428343b9e06ead6c66dbc347c3.zip
r13647: Fix for standalone Samba servers and XP clients. Reverts
part of the PocketPC bugfix. I'm trying to get someone who has a pocketpc to test this. Jeremy. (This used to be commit ce25e6b002f39ba084c3430ca832ad4990cf1994)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/negprot.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index db061cb1b8..5d2ed6a10d 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -178,6 +178,7 @@ static int negprot_spnego(char *p, uint8 *pkeylen)
OID_KERBEROS5_OLD,
OID_NTLMSSP,
NULL};
+ const char *OIDs_plain[] = {OID_NTLMSSP, NULL};
int len;
global_spnego_negotiated = True;
@@ -212,9 +213,13 @@ static int negprot_spnego(char *p, uint8 *pkeylen)
*/
if (lp_security() != SEC_ADS && !lp_use_kerberos_keytab()) {
- memcpy(p, guid, 16);
- *pkeylen = 0;
- return 16;
+#if 0
+ /* Code for PocketPC client */
+ blob = data_blob(guid, 16);
+#else
+ /* Code for standalone WXP client */
+ blob = spnego_gen_negTokenInit(guid, OIDs_plain, "NONE");
+#endif
} else {
fstring myname;
char *host_princ_s = NULL;
@@ -224,14 +229,20 @@ static int negprot_spnego(char *p, uint8 *pkeylen)
blob = spnego_gen_negTokenInit(guid, OIDs_krb5, host_princ_s);
SAFE_FREE(host_princ_s);
}
+
memcpy(p, blob.data, blob.length);
len = blob.length;
if (len > 256) {
DEBUG(0,("negprot_spnego: blob length too long (%d)\n", len));
len = 255;
}
- *pkeylen = len;
data_blob_free(&blob);
+
+ if (lp_security() != SEC_ADS && !lp_use_kerberos_keytab()) {
+ *pkeylen = 0;
+ } else {
+ *pkeylen = len;
+ }
return len;
}