Ignore:
Timestamp:
Nov 29, 2012, 2:06:31 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.9 2nd part

Location:
trunk/server
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/torture/smb2/compound.c

    r745 r752  
    3333                goto done; \
    3434        }} while (0)
    35 
    36 #define TARGET_IS_W2K8(_tctx) (torture_setting_bool(_tctx, "w2k8", false))
    37 #define TARGET_IS_WIN7(_tctx) (torture_setting_bool(_tctx, "win7", false))
    3835
    3936static bool test_compound_related1(struct torture_context *tctx,
     
    167164        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    168165        status = smb2_close_recv(req[3], &cl);
    169         CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
     166        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    170167        status = smb2_close_recv(req[4], &cl);
    171         CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
     168        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    172169
    173170        tree->tid = saved_tid;
     
    253250        struct smb2_close cl;
    254251        bool ret = true;
    255         struct smb2_request *req[2];
    256 
    257         smb2_transport_credits_ask_num(tree->session->transport, 2);
     252        struct smb2_request *req[3];
     253
     254        smb2_transport_credits_ask_num(tree->session->transport, 3);
    258255
    259256        smb2_util_unlink(tree, fname);
     
    279276        cr.in.fname                     = fname;
    280277
    281         smb2_transport_compound_start(tree->session->transport, 2);
     278        smb2_transport_compound_start(tree->session->transport, 3);
    282279
    283280        /* passing the first request with the related flag is invalid */
     
    292289        cl.in.file.handle = hd;
    293290        req[1] = smb2_close_send(tree, &cl);
     291
     292        smb2_transport_compound_set_related(tree->session->transport, false);
     293        req[2] = smb2_close_send(tree, &cl);
    294294
    295295        status = smb2_create_recv(req[0], tree, &cr);
     
    298298        status = smb2_close_recv(req[1], &cl);
    299299        CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
     300        status = smb2_close_recv(req[2], &cl);
     301        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    300302
    301303        smb2_util_unlink(tree, fname);
     
    368370        CHECK_STATUS(status, NT_STATUS_OK);
    369371        status = smb2_close_recv(req[2], &cl);
    370         CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
     372        CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED);
    371373        status = smb2_close_recv(req[3], &cl);
    372         CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
     374        CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED);
    373375        status = smb2_close_recv(req[4], &cl);
    374376        CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
     
    440442        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    441443        status = smb2_close_recv(req[3], &cl);
    442         CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
     444        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    443445        status = smb2_close_recv(req[4], &cl);
    444         CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
     446        CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
    445447
    446448        smb2_util_unlink(tree, fname);
     
    466468     * SMB2 spec as noted in MS-SMB2 <159>, <162>.  This, test currently
    467469     * verifies the Windows behavior, not the general spec behavior. */
    468     if (!TARGET_IS_WIN7(tctx) && !TARGET_IS_W2K8(tctx)) {
    469             torture_skip(tctx, "Interim test is specific to Windows server "
    470                                "behavior.\n");
    471     }
    472470
    473471    smb2_transport_credits_ask_num(tree->session->transport, 5);
     
    537535     * SMB2 spec as noted in MS-SMB2 <159>, <162>.  This, test currently
    538536     * verifies the Windows behavior, not the general spec behavior. */
    539     if (!TARGET_IS_WIN7(tctx) && !TARGET_IS_W2K8(tctx)) {
    540             torture_skip(tctx, "Interim test is specific to Windows server "
    541                                "behavior.\n");
    542     }
    543537
    544538    smb2_transport_credits_ask_num(tree->session->transport, 5);
  • trunk/server/source4/torture/smb2/connect.c

    r745 r752  
    7272        DATA_BLOB data;
    7373        int i;
     74        uint32_t size = torture_setting_int(tctx, "smb2maxwrite", 64*1024);
    7475       
    75         if (torture_setting_bool(tctx, "dangerous", false)) {
    76                 data = data_blob_talloc(tree, NULL, 160000);
    77         } else if (torture_setting_bool(tctx, "samba4", false)) {
    78                 data = data_blob_talloc(tree, NULL, UINT16_MAX);
    79         } else {
    80                 data = data_blob_talloc(tree, NULL, torture_setting_int(tctx, "smb2maxwrite", 120000));
    81         }
     76        data = data_blob_talloc(tree, NULL, size);
     77        if (size != data.length) {
     78                printf("data_blob_talloc(%s) failed\n", size);
     79                return NT_STATUS_NO_MEMORY;
     80        }
     81
    8282        for (i=0;i<data.length;i++) {
    8383                data.data[i] = i;
  • trunk/server/source4/torture/smb2/oplock.c

    r745 r752  
    23852385        int te;
    23862386
    2387         if (torture_setting_bool(tctx, "samba3", false)) {
    2388                 torture_skip(tctx, "BATCH22 disabled against samba3\n");
    2389         }
    2390 
    23912387        status = torture_smb2_testdir(tree1, BASEDIR, &h);
    23922388        torture_assert_ntstatus_ok(tctx, status, "Error creating directory");
     
    27272723                {&fname_default_stream, true,  SMB2_OPLOCK_LEVEL_EXCLUSIVE, SMB2_OPLOCK_LEVEL_II},
    27282724        };
    2729 
    2730         /* Only passes against windows at the moment. */
    2731         if (torture_setting_bool(tctx, "samba3", false) ||
    2732             torture_setting_bool(tctx, "samba4", false)) {
    2733                 torture_skip(tctx, "STREAM1 disabled against samba3+4\n");
    2734         }
    27352725
    27362726        fname_stream = talloc_asprintf(tctx, "%s:%s", fname_base, stream);
  • trunk/server/source4/torture/smb2/read.c

    r745 r752  
    5252        NTSTATUS status;
    5353        struct smb2_handle h;
    54         uint8_t buf[70000];
     54        uint8_t buf[64*1024];
    5555        struct smb2_read rd;
    5656        TALLOC_CTX *tmp_ctx = talloc_new(tree);
     
    135135        NTSTATUS status;
    136136        struct smb2_handle h;
    137         uint8_t buf[70000];
     137        uint8_t buf[64*1024];
    138138        struct smb2_read rd;
    139139        TALLOC_CTX *tmp_ctx = talloc_new(tree);
Note: See TracChangeset for help on using the changeset viewer.