no sha
authorStefan Metzmacher <metze@samba.org>
Tue, 19 Nov 2013 06:41:55 +0000 (07:41 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Mar 2014 23:04:48 +0000 (00:04 +0100)
source3/smbd/negprot.c
source3/smbd/smb2_negprot.c
source4/heimdal/lib/hcrypto/sha.c
source4/heimdal/lib/hcrypto/validate.c

index bd7df2231e89564a74634c223b8e66a147f8b4c6..30cd1519252a81d4ad1457ef191f9c39acde76f8 100644 (file)
@@ -168,7 +168,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
        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,
@@ -187,7 +187,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
                }
                TALLOC_FREE(gensec_security);
        }
-
+#endif
        sconn->smb1.negprot.spnego = true;
 
        /* strangely enough, NT does not sent the single OID NTLMSSP when
@@ -203,8 +203,8 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
 
        */
 
-       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);
@@ -228,7 +228,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
        }
 #endif
 
-       memcpy(&blob_out.data[16], blob.data, blob.length);
+       //memcpy(&blob_out.data[16], blob.data, blob.length);
 
        data_blob_free(&blob);
 
index 66434643782e9f5ddf7696618c538c0b9b73ab56..837d5aa8b705ebc313688e8f04454e1c5d40af9b 100644 (file)
@@ -245,7 +245,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
        /* 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) {
@@ -305,7 +305,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
 
        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);
index 9c8b39e2419006ad51b7bfef27ffaa54294ac32a..33ea43cc52920feeb0243bd135f953f118e11331 100644 (file)
@@ -262,6 +262,10 @@ SHA1_Final (void *res, struct sha *m)
   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;
index 48b9bfc6e352031fb2f6ae63bc77baf8bd8c1245..8cefce99563ef1d9118a4953572f173375bdb21f 100644 (file)
@@ -276,6 +276,8 @@ check_hmac(void)
     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));