The branch, master has been updated
       via  d3be108637f1ae5d2a07a87c700f42b8c26df6a0 (commit)
       via  da737f2447c925726fb944fc08683ffaf6cf8a63 (commit)
       via  af3444e6117de7d24bc2e3b61436f2804bfa1e4e (commit)
      from  76705d10c626a66cc77f3ec294f4f98bef95aeb5 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d3be108637f1ae5d2a07a87c700f42b8c26df6a0
Author: Stefan Metzmacher <me...@samba.org>
Date:   Tue Jul 14 13:32:23 2009 +0200

    SMB2-GETINFO: test SMB2_ALL_EAS
    
    metze

commit da737f2447c925726fb944fc08683ffaf6cf8a63
Author: Stefan Metzmacher <me...@samba.org>
Date:   Mon Jul 13 12:25:40 2009 +0200

    s4:libcli/smb2: add smb2_transport_credits_set_charge() to change the 
CreditsCharge value for the next request
    
    metze

commit af3444e6117de7d24bc2e3b61436f2804bfa1e4e
Author: Stefan Metzmacher <me...@samba.org>
Date:   Wed Jul 8 10:09:54 2009 +0200

    SMB2-CONNECT: unlink the test file at startup
    
    This is needed to get reproducable results...
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source4/libcli/smb2/request.c   |   10 ++++++----
 source4/libcli/smb2/smb2.h      |    1 +
 source4/libcli/smb2/transport.c |    7 +++++++
 source4/torture/smb2/connect.c  |    2 ++
 source4/torture/smb2/getinfo.c  |    4 ++--
 5 files changed, 18 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index f3684ed..5d09a50 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -78,9 +78,11 @@ struct smb2_request *smb2_request_init(struct smb2_transport 
*transport, uint16_
        req = talloc(transport, struct smb2_request);
        if (req == NULL) return NULL;
 
-       seqnum = transport->seqnum++;
-       if (seqnum == UINT64_MAX) {
-               seqnum = transport->seqnum++;
+       seqnum = transport->seqnum;
+       if (transport->credits.charge > 0) {
+               transport->seqnum += transport->credits.charge;
+       } else {
+               transport->seqnum += 1;
        }
 
        req->state     = SMB2_REQUEST_INIT;
@@ -131,7 +133,7 @@ struct smb2_request *smb2_request_init(struct 
smb2_transport *transport, uint16_
 
        SIVAL(req->out.hdr, 0,                          SMB2_MAGIC);
        SSVAL(req->out.hdr, SMB2_HDR_LENGTH,            SMB2_HDR_BODY);
-       SSVAL(req->out.hdr, SMB2_HDR_EPOCH,             0);
+       SSVAL(req->out.hdr, SMB2_HDR_EPOCH,             
transport->credits.charge);
        SIVAL(req->out.hdr, SMB2_HDR_STATUS,            0);
        SSVAL(req->out.hdr, SMB2_HDR_OPCODE,            opcode);
        SSVAL(req->out.hdr, SMB2_HDR_CREDIT,            
transport->credits.ask_num);
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index eb23198..6372cd8 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -87,6 +87,7 @@ struct smb2_transport {
        } compound;
 
        struct {
+               uint16_t charge;
                uint16_t ask_num;
        } credits;
 
diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c
index 6052237..dffd1ac 100644
--- a/source4/libcli/smb2/transport.c
+++ b/source4/libcli/smb2/transport.c
@@ -84,6 +84,7 @@ struct smb2_transport *smb2_transport_init(struct 
smbcli_socket *sock,
 
        transport->socket = talloc_steal(transport, sock);
        transport->options = *options;
+       transport->credits.charge = 0;
        transport->credits.ask_num = 1;
 
        /* setup the stream -> packet parser */
@@ -552,6 +553,12 @@ void smb2_transport_credits_ask_num(struct smb2_transport 
*transport,
        transport->credits.ask_num = ask_num;
 }
 
+void smb2_transport_credits_set_charge(struct smb2_transport *transport,
+                                      uint16_t charge)
+{
+       transport->credits.charge = charge;
+}
+
 static void idle_handler(struct tevent_context *ev, 
                         struct tevent_timer *te, struct timeval t, void 
*private_data)
 {
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index bd1abce..fd32b52 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -200,6 +200,8 @@ bool torture_smb2_connect(struct torture_context *torture)
                return false;
        }
 
+       smb2_util_unlink(tree, "test9.dat");
+
        h1 = torture_smb2_createfile(tree, "test9.dat");
        h2 = torture_smb2_createfile(tree, "test9.dat");
        status = torture_smb2_write(torture, tree, h1);
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index c4ab31f..166c3f6 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -49,9 +49,9 @@ static struct {
  { LEVEL(RAW_FILEINFO_COMPRESSION_INFORMATION) },
  { LEVEL(RAW_FILEINFO_NETWORK_OPEN_INFORMATION) },
  { LEVEL(RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION) },
-/*
+
  { LEVEL(RAW_FILEINFO_SMB2_ALL_EAS) },
-*/
+
  { LEVEL(RAW_FILEINFO_SMB2_ALL_INFORMATION) },
  { LEVEL(RAW_FILEINFO_SEC_DESC) }
 };


-- 
Samba Shared Repository

Reply via email to