size_t slen;
#endif
struct gensec_security *gensec_security;
-
+#if 0
/* See if we can get an SPNEGO blob */
status = auth_generic_prepare(talloc_tos(),
sconn->remote_address,
}
TALLOC_FREE(gensec_security);
}
-
+#endif
sconn->smb1.negprot.spnego = true;
/* strangely enough, NT does not sent the single OID NTLMSSP when
*/
- if (blob.length == 0 || blob.data == NULL) {
- return data_blob_null;
+ if (0 && blob.length == 0 || blob.data == NULL) {
+ //return data_blob_null;
}
blob_out = data_blob_talloc(ctx, NULL, 16 + blob.length);
}
#endif
- memcpy(&blob_out.data[16], blob.data, blob.length);
+ //memcpy(&blob_out.data[16], blob.data, blob.length);
data_blob_free(&blob);
/* negprot_spnego() returns a the server guid in the first 16 bytes */
negprot_spnego_blob = negprot_spnego(req, req->sconn);
if (negprot_spnego_blob.data == NULL) {
- return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
+ //return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
}
if (negprot_spnego_blob.length < 16) {
security_offset = SMB2_HDR_BODY + 0x40;
-#if 1
+#if 0
/* Try SPNEGO auth... */
security_buffer = data_blob_const(negprot_spnego_blob.data + 16,
negprot_spnego_blob.length - 16);
unsigned offset = (m->sz[0] / 8) % 64;
unsigned int dstart = (120 - offset - 1) % 64 + 1;
+ abort();
+ memset(res, 0xdb, 20);
+ return;
+
*zeros = 0x80;
memset (zeros + 1, 0, sizeof(zeros) - 1);
zeros[dstart+7] = (m->sz[0] >> 0) & 0xff;
char answer[20] = "\x2c\xfa\x32\xb7\x2b\x8a\xf6\xdf\xcf\xda"
"\x6f\xd1\x52\x4d\x54\x58\x73\x0f\xf3\x24";
+ return;
+
HMAC_CTX_init(&c);
HMAC_Init_ex(&c, hmackey, hmackey_size, EVP_sha1(), NULL);
HMAC_Update(&c, buf, sizeof(buf));