]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
HGFS: Fix server check for minimum sizes of session requests
authorVMware, Inc <>
Wed, 18 Sep 2013 03:15:12 +0000 (20:15 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Sep 2013 05:01:53 +0000 (22:01 -0700)
The HGFS server check for the minimum protocol request sizes for create
and destroy session was incorrect. The full request including the reserved
fields must be sent by the clients. Currently they all do that, including any
shipping versions.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/hgfsServer/hgfsServer.c

index 671dec682b78f18a18006e15e358390876410c76..d3569a2bf4b70b708c12b108a9f5a97e03515cfa 100644 (file)
@@ -2829,8 +2829,8 @@ static struct {
     * second field is the minimum size for actual HGFS operational request
     * and not the minimum size of operational request with a header.
     */
-   { HgfsServerCreateSession,    offsetof(HgfsRequestCreateSessionV4, reserved),   REQ_SYNC},
-   { HgfsServerDestroySession,   offsetof(HgfsRequestDestroySessionV4, reserved),  REQ_SYNC},
+   { HgfsServerCreateSession,    sizeof (HgfsRequestCreateSessionV4),              REQ_SYNC},
+   { HgfsServerDestroySession,   sizeof (HgfsRequestDestroySessionV4),             REQ_SYNC},
    { HgfsServerRead,             sizeof (HgfsRequestReadV3),                       REQ_SYNC},
    { HgfsServerWrite,            sizeof (HgfsRequestWriteV3),                      REQ_SYNC},
    { HgfsServerSetDirNotifyWatch,    sizeof (HgfsRequestSetWatchV4),               REQ_SYNC},