]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Disable hgfsServer plugin when not running in a VMware VM.
authorOliver Kurth <okurth@vmware.com>
Wed, 29 Aug 2018 20:29:44 +0000 (13:29 -0700)
committerOliver Kurth <okurth@vmware.com>
Wed, 29 Aug 2018 20:29:44 +0000 (13:29 -0700)
VmCheck_GetVersion() accesses Backdoor in an unsafe manner
which is not expected to work on non-VMware environments
including physical machines. So, we need to make sure that
VmCheck_GetVersion() is called only when we are running in
a VMware VM.

open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c

index c5ef8726b96052db3ff7f5e5e2c545ea84e90dd4..129fa7504434f33db30283803d110e75b16865cd 100644 (file)
@@ -1089,6 +1089,13 @@ ToolsOnLoad(ToolsAppCtx *ctx)
       return NULL;
    }
 
+   /*
+    * If not running in a VMware VM, return NULL to disable the plugin.
+    */
+   if (!ctx->isVMware) {
+      return NULL;
+   }
+
    /*
     * Check for VM is running in a hosted environment and if so initialize
     * the Shared Folders HGFS client redirector.