From: VMware, Inc <> Date: Fri, 12 Apr 2013 19:51:36 +0000 (-0700) Subject: Internal branch sync. Included in this change: X-Git-Tag: 2013.04.16-1098359~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53a3aaa8c685085fa55f5f70510749540bce1fab;p=thirdparty%2Fopen-vm-tools.git Internal branch sync. Included in this change: . turn vgauth on for Windows . changes in shared code that don't affect open-vm-tools functionality `Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/include/msg.h b/open-vm-tools/lib/include/msg.h index b438e4819..3fe1c4323 100644 --- a/open-vm-tools/lib/include/msg.h +++ b/open-vm-tools/lib/include/msg.h @@ -36,6 +36,9 @@ #include "msgid.h" #include "msgfmt.h" #include "msgList.h" +#if defined VMX86_SERVER && !defined VMCORE +#include "voblib.h" +#endif #define INVALID_MSG_CODE (-1) @@ -121,6 +124,22 @@ extern Msg_String const Msg_Severities[]; void Msg_Append(const char *idFmt, ...) PRINTF_DECL(1, 2); void Msg_AppendStr(const char *id); +void Msg_AppendMsgList(const MsgList *msgs); + +static INLINE void +Msg_AppendVobContext(void) +{ +#if defined VMX86_SERVER && !defined VMCORE + /* inline to avoid lib/vob dependency unless necessary */ + MsgList *msgs = NULL; + + VobLib_CurrentContextMsgAppend(&msgs); + Msg_AppendMsgList(msgs); + + MsgList_Free(msgs); +#endif +} + void Msg_Post(MsgSeverity severity, const char *idFmt, ...) PRINTF_DECL(2, 3); @@ -134,7 +153,6 @@ char *Msg_VFormat(const char *idFmt, unsigned Msg_Question(Msg_String const *buttons, int defaultAnswer, const char *idFmt, ...) PRINTF_DECL(3, 4); -void Msg_AppendMsgList(const MsgList *msgs); /* * Unfortunately, gcc warns about both NULL and "" being passed as format diff --git a/open-vm-tools/lib/include/vixCommands.h b/open-vm-tools/lib/include/vixCommands.h index f6fd27662..d5fdd299b 100644 --- a/open-vm-tools/lib/include/vixCommands.h +++ b/open-vm-tools/lib/include/vixCommands.h @@ -99,14 +99,15 @@ enum VixCommonCommandOptionValues { * These are the flags set in the request Flags field. */ enum { - VIX_REQUESTMSG_ONLY_RELOAD_NETWORKS = 0x01, - VIX_REQUESTMSG_RETURN_ON_INITIATING_TOOLS_UPGRADE = 0x02, - VIX_REQUESTMSG_RUN_IN_ANY_VMX_STATE = 0x04, - VIX_REQUESTMSG_REQUIRES_INTERACTIVE_ENVIRONMENT = 0x08, - VIX_REQUESTMSG_INCLUDES_AUTH_DATA_V1 = 0x10, - VIX_REQUESTMSG_REQUIRES_VMDB_NOTIFICATION = 0x20, - VIX_REQUESTMSG_ESCAPE_XML_DATA = 0x40, - VIX_REQUESTMSG_HAS_HASHED_SHARED_SECRET = 0x80, + VIX_REQUESTMSG_ONLY_RELOAD_NETWORKS = 0x001, + VIX_REQUESTMSG_RETURN_ON_INITIATING_TOOLS_UPGRADE = 0x002, + VIX_REQUESTMSG_RUN_IN_ANY_VMX_STATE = 0x004, + VIX_REQUESTMSG_REQUIRES_INTERACTIVE_ENVIRONMENT = 0x008, + VIX_REQUESTMSG_INCLUDES_AUTH_DATA_V1 = 0x010, + VIX_REQUESTMSG_REQUIRES_VMDB_NOTIFICATION = 0x020, + VIX_REQUESTMSG_ESCAPE_XML_DATA = 0x040, + VIX_REQUESTMSG_HAS_HASHED_SHARED_SECRET = 0x080, + VIX_REQUESTMSG_VIGOR_COMMAND = 0x100, }; diff --git a/open-vm-tools/lib/include/vm_basic_asm_x86_64.h b/open-vm-tools/lib/include/vm_basic_asm_x86_64.h index a395c1109..4cd6aebe5 100644 --- a/open-vm-tools/lib/include/vm_basic_asm_x86_64.h +++ b/open-vm-tools/lib/include/vm_basic_asm_x86_64.h @@ -71,23 +71,36 @@ uint64 __shiftright128(uint64 lowPart, uint64 highPart, uint8 shift); #endif // _MSC_VER +#if defined(__GNUC__) /* * GET_CURRENT_RIP * - * Return an approximation of the current instruction pointer. For example for a - * function call - * foo.c - * L123: Foo(GET_CURRENT_RIP()) + * Returns the current instruction pointer. In the example below: + * + * foo.c + * L123: Foo(GET_CURRENT_RIP()) * - * The return value from GET_CURRENT_RIP will point a debugger to L123. + * the return value from GET_CURRENT_RIP will point a debugger to L123. */ -#if defined(__GNUC__) -#define GET_CURRENT_RIP() ({ \ - void *__rip; \ - asm("lea 0(%%rip), %0;\n\t" \ - : "=r" (__rip)); \ - __rip; \ +#define GET_CURRENT_RIP() ({ \ + void *__rip; \ + asm("lea 0(%%rip), %0;\n\t" \ + : "=r" (__rip)); \ + __rip; \ }) + +/* + * GET_CURRENT_LOCATION + * + * Updates the arguments with the values of the %rip, %rbp, and %rsp + * registers at the current code location where the macro is invoked. + */ +#define GET_CURRENT_LOCATION(rip, rbp, rsp) \ + asm("lea 0(%%rip), %0\n" \ + "mov %%rbp, %1\n" \ + "mov %%rsp, %2\n" \ + : "=r" (rip), "=r" (rbp), "=r" (rsp)) + #endif /* diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 6a28fcfc8..633bdeef7 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -120,14 +120,9 @@ #endif /* - * Only support Linux right now. - * - * On Windows, the SAML impersonation story is too shaky to trust, - * and without that, there's no reason to support AliasManager APIs. - * * No support for open-vm-tools. */ -#if defined(linux) && !defined(OPEN_VM_TOOLS) +#if (defined(_WIN32) || defined(linux)) && !defined(OPEN_VM_TOOLS) #define SUPPORT_VGAUTH 1 #else #define SUPPORT_VGAUTH 0