From: Katy Feng Date: Thu, 5 Oct 2023 17:35:26 +0000 (-0700) Subject: Change to common source file not applicable to open-vm-tools. X-Git-Tag: stable-12.4.0~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d90cefe349130cedc7af9722bac77198b4e0b891;p=thirdparty%2Fopen-vm-tools.git Change to common source file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 75149b7a7..75d24a29e 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -132,9 +132,11 @@ /* * No support for userworld. Enable support for open vm tools when * USE_VGAUTH is defined. + * + * XXX - Currently no support for vgauth in Windows on arm64. */ #if ((defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32)) && \ - (!defined(OPEN_VM_TOOLS) || defined(USE_VGAUTH)) + (!defined(OPEN_VM_TOOLS) || defined(USE_VGAUTH)) && !defined(_ARM64_) #define SUPPORT_VGAUTH 1 #else #define SUPPORT_VGAUTH 0 @@ -161,32 +163,6 @@ static gboolean gSupportVGAuth = USE_VGAUTH_DEFAULT; static gboolean QueryVGAuthConfig(GKeyFile *confDictRef); -#ifdef _WIN32 -/* - * Check bug 2508431 for more details. If an application is not built - * with proper flags, 'creating a remote thread' to get the process - * command line will crash the target process. To avoid any such crash, - * 'remote thread' approach is not used by default. - * - * But 'remote thread' approach can be turned on (for whatever reason) - * by setting the following option to true in the tools.conf file. - * - * For few processes, 'WMI' can provide detailed commandline information. - * But using 'WMI' is a heavy weight approach and may affect the CPU - * performance and hence it is disabled by default. It can always be - * turned on by a setting (as mentioned below) in the tools.conf file. - */ -#define VIXTOOLS_CONFIG_USE_REMOTE_THREAD_PROCESS_COMMAND_LINE \ - "useRemoteThreadForProcessCommandLine" - -#define VIXTOOLS_CONFIG_USE_WMI_PROCESS_COMMAND_LINE \ - "useWMIForProcessCommandLine" - -#define USE_REMOTE_THREAD_PROCESS_COMMAND_LINE_DEFAULT FALSE -#define USE_WMI_PROCESS_COMMAND_LINE_DEFAULT FALSE - -#endif - #if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS static gchar *gCurrentUsername = NULL; @@ -221,6 +197,32 @@ static VGAuthUserHandle *currentUserHandle = NULL; #endif +#ifdef _WIN32 +/* + * Check bug 2508431 for more details. If an application is not built + * with proper flags, 'creating a remote thread' to get the process + * command line will crash the target process. To avoid any such crash, + * 'remote thread' approach is not used by default. + * + * But 'remote thread' approach can be turned on (for whatever reason) + * by setting the following option to true in the tools.conf file. + * + * For few processes, 'WMI' can provide detailed commandline information. + * But using 'WMI' is a heavy weight approach and may affect the CPU + * performance and hence it is disabled by default. It can always be + * turned on by a setting (as mentioned below) in the tools.conf file. + */ +#define VIXTOOLS_CONFIG_USE_REMOTE_THREAD_PROCESS_COMMAND_LINE \ + "useRemoteThreadForProcessCommandLine" + +#define VIXTOOLS_CONFIG_USE_WMI_PROCESS_COMMAND_LINE \ + "useWMIForProcessCommandLine" + +#define USE_REMOTE_THREAD_PROCESS_COMMAND_LINE_DEFAULT FALSE +#define USE_WMI_PROCESS_COMMAND_LINE_DEFAULT FALSE + +#endif + /* * This should be an allocated string containing the impersonated username * while impersonation is active, and NULL when its not.