From: VMware, Inc <> Date: Thu, 17 Jun 2010 22:33:12 +0000 (-0700) Subject: Remove VIX_COMMAND_[GET|SET|]_PROPERTY. X-Git-Tag: 2010.06.16-268169~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52d6f7af432fed005642e23cb063d735b265e7ad;p=thirdparty%2Fopen-vm-tools.git Remove VIX_COMMAND_[GET|SET|]_PROPERTY. They are unused. The Tools does process GET_PROPERTY like GET_TOOLS_STATE, but I couldn't find or remember a version of the client library that sent a command with this op code for this purpose. Also, as a side benefit, remove the flag VIX_COMMAND_GUEST_RETURNS_ENCODED_STRING, since no request message sets this flag, and it is a left over remenant from the incorrect assumption that GuestRPC couldn't handle binary data. This gives an additional benefit since inspection suggests that there's a bug in the VMX code for processing responses when this flag is set: the response length is computed using the encoded string, not the decoded string (causing random VMX memory to be sent in the response). Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/foundryMsg/foundryMsg.c b/open-vm-tools/lib/foundryMsg/foundryMsg.c index 9a50ece44..301eeff16 100644 --- a/open-vm-tools/lib/foundryMsg/foundryMsg.c +++ b/open-vm-tools/lib/foundryMsg/foundryMsg.c @@ -83,10 +83,8 @@ static const VixCommandInfo vixCommandInfoTable[] = { VIX_COMMAND_CATEGORY_PRIVILEGED), VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_RUN_PROGRAM, VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_GET_PROPERTY, - VIX_COMMAND_CATEGORY_PRIVILEGED), - VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_SET_PROPERTY, - VIX_COMMAND_CATEGORY_PRIVILEGED), + VIX_DEFINE_UNUSED_COMMAND, + VIX_DEFINE_UNUSED_COMMAND, VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_KEYSTROKES, VIX_COMMAND_CATEGORY_ALWAYS_ALLOWED), VIX_DEFINE_COMMAND_INFO(VIX_COMMAND_READ_REGISTRY, diff --git a/open-vm-tools/lib/include/vixCommands.h b/open-vm-tools/lib/include/vixCommands.h index 4c4cebc16..46613b394 100644 --- a/open-vm-tools/lib/include/vixCommands.h +++ b/open-vm-tools/lib/include/vixCommands.h @@ -78,7 +78,7 @@ enum VixCommonCommandOptionValues { VIX_COMMAND_FORWARD_TO_GUEST = 0x04, VIX_COMMAND_GUEST_RETURNS_STRING = 0x08, VIX_COMMAND_GUEST_RETURNS_INTEGER_STRING = 0x10, - VIX_COMMAND_GUEST_RETURNS_ENCODED_STRING = 0x20, + /* DEPRECATED VIX_COMMAND_GUEST_RETURNS_ENCODED_STRING = 0x20, */ VIX_COMMAND_GUEST_RETURNS_PROPERTY_LIST = 0x40, VIX_COMMAND_GUEST_RETURNS_BINARY = 0x80, // We cannot add more constants here. This is stored in a uint8, @@ -2040,8 +2040,8 @@ enum { VIX_COMMAND_VM_RESET = 2, VIX_COMMAND_VM_SUSPEND = 3, VIX_COMMAND_RUN_PROGRAM = 4, - VIX_COMMAND_GET_PROPERTY = 5, - VIX_COMMAND_SET_PROPERTY = 6, + /* DEPRECATED VIX_COMMAND_GET_PROPERTY = 5, */ + /* DEPRECATED VIX_COMMAND_SET_PROPERTY = 6, */ VIX_COMMAND_KEYSTROKES = 7, VIX_COMMAND_READ_REGISTRY = 8, VIX_COMMAND_WRITE_REGISTRY = 10, diff --git a/open-vm-tools/lib/vixTools/vixTools.c b/open-vm-tools/lib/vixTools/vixTools.c index 11079a61d..e6ca241b4 100644 --- a/open-vm-tools/lib/vixTools/vixTools.c +++ b/open-vm-tools/lib/vixTools/vixTools.c @@ -4248,7 +4248,6 @@ VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg, // IN break; //////////////////////////////////// - case VIX_COMMAND_GET_PROPERTY: case VIX_COMMAND_GET_TOOLS_STATE: err = VixTools_GetToolsPropertiesImpl(confDictRef, &resultValue,