make smb2 read and write size configurable
authorAndrew Tridgell <tridge@samba.org>
Thu, 17 Apr 2008 07:37:29 +0000 (09:37 +0200)
committerAndrew Tridgell <tridge@samba.org>
Thu, 17 Apr 2008 07:37:29 +0000 (09:37 +0200)
(This used to be commit 2090e75e0c28f8d2aada305059bdb455f42ed0d5)

source4/smb_server/smb2/negprot.c

index e7352f7c423972410fa728d7bdd44c64ce6ac8cb..4479ae2da1d7ff9d234acbc3ffed6118193980f2 100644 (file)
@@ -114,9 +114,12 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2
        io->out.security_mode      = 0; /* no signing yet */
        io->out.dialect_revision   = SMB2_DIALECT_REVISION;
        io->out.capabilities       = 0;
-       io->out.max_transact_size  = 0x10000;
-       io->out.max_read_size      = 0x10000;
-       io->out.max_write_size     = 0x10000;
+       io->out.max_transact_size  = lp_parm_ulong(req->smb_conn->lp_ctx, NULL, 
+                                                  "smb2", "max transaction size", 0x10000);
+       io->out.max_read_size      = lp_parm_ulong(req->smb_conn->lp_ctx, NULL, 
+                                                  "smb2", "max read size", 0x10000);
+       io->out.max_write_size     = lp_parm_ulong(req->smb_conn->lp_ctx, NULL, 
+                                                  "smb2", "max write size", 0x10000);
        io->out.system_time        = timeval_to_nttime(&current_time);
        io->out.server_start_time  = timeval_to_nttime(&boot_time);
        io->out.reserved2          = 0;