]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common source files not applicable to open-vm-tools.
authorKaty Feng <fkaty@vmware.com>
Thu, 16 Nov 2023 17:21:20 +0000 (09:21 -0800)
committerKaty Feng <fkaty@vmware.com>
Thu, 16 Nov 2023 17:21:20 +0000 (09:21 -0800)
open-vm-tools/lib/include/conf.h
open-vm-tools/vgauth/cli/main.c
open-vm-tools/vgauth/service/main.c

index babafc82e25edc0db734ced17a16559416ec518c..edb8440936e2be0526e9d78cad5b36224226d866 100644 (file)
 
 
 /** Where to find Tools data in the Win32 registry. */
-#define CONF_VMWARE_TOOLS_REGKEY    "Software\\VMware, Inc.\\VMware Tools"
+#if defined(_WIN32)
+#   ifndef WSTR
+#      define WSTR_(X) L##X
+#      define WSTR(X) WSTR_(X)
+#   endif
+#   define CONF_VMWARE_TOOLS_REGKEY  "Software\\VMware, Inc.\\VMware Tools"
+#   define CONF_VMWARE_TOOLS_INSTPATH_KEY "InstallPath"
+
+#   define CONF_VMWARE_TOOLS_REGKEY_W WSTR(CONF_VMWARE_TOOLS_REGKEY)
+#   define CONF_VMWARE_TOOLS_INSTPATH_KEY_W WSTR(CONF_VMWARE_TOOLS_INSTPATH_KEY)
+#endif
 
 /* Wait 5 seconds between polls to see if the conf file has changed */
 #define CONF_POLL_TIME     5
index 2ffafb0ccd4faaf19057d2a6436edbf94ed56947..e2b7ef06190f491f0521cb9faf50f48c143b608f 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2011-2020 VMware, Inc. All rights reserved.
+ * Copyright (c) 2011-2020, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -41,6 +41,9 @@
 #define VMW_TEXT_DOMAIN "VGAuthCli"
 #include "i18n.h"
 #include "prefs.h"
+#ifdef _WIN32
+#   include "winUtil.h"
+#endif
 
 static gchar *appName;
 
@@ -940,6 +943,13 @@ wmain(int argc,
    int i;
    char **argvUtf8 = g_malloc0((argc + 1) * sizeof (char*));
 
+#ifdef _WIN32
+   WinUtil_EnableSafePathSearching();
+#if defined(VMX86_RELEASE)
+   WinUtil_VerifyExePathW();
+#endif
+#endif
+
    for (i = 0; i < argc; ++i) {
       CHK_UTF16_TO_UTF8(argvUtf8[i], argv[i], goto end);
    }
index 71713e138928b3f4fd5f49c6a067cd43cedd4537..f157cf40ce82d62d9a825c86265ce86ae5aff33a 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2011-2021 VMware, Inc. All rights reserved.
+ * Copyright (c) 2011-2021, 2023 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -532,6 +532,9 @@ main(int argc,
 {
 #ifdef _WIN32
    WinUtil_EnableSafePathSearching();
+#if defined(VMX86_RELEASE)
+   WinUtil_VerifyExePathW();
+#endif
 #endif
 
    gPrefs = Pref_Init(VGAUTH_PREF_CONFIG_FILENAME);