]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
5 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Common header file changes not applicable to open-vm-tools.

5 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Common source file changes not applicable to open-vm-tools.

Tools Windows: test plugin DLLs are the correct version

5 years agoBackout previous change for the vmware-vgauth-cmd.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Backout previous change for the vmware-vgauth-cmd.

5 years agoAdd option to vmware-vgauth-cmd to support remove alias by [username]
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Add option to vmware-vgauth-cmd to support remove alias by [username]
and subject

a. subject is mandatory
b. if user only provide subject, will only remove subject matched mapped aliases
c. if user provide username and subject, remove matched aliases

5 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Common source file changes not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Common source file changes not applicable to open-vm-tools.

5 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
Common source file changes not applicable to open-vm-tools.

5 years agoupdate version
Oliver Kurth [Wed, 8 Apr 2020 19:05:18 +0000 (12:05 -0700)] 
update version

5 years agosync tclodefs.h to source
Oliver Kurth [Wed, 8 Apr 2020 19:04:15 +0000 (12:04 -0700)] 
sync tclodefs.h to source

5 years agoupdate version to 11.1.0
Oliver Kurth [Wed, 1 Apr 2020 18:54:20 +0000 (11:54 -0700)] 
update version to 11.1.0

5 years agosync tclodefs.h to source
Oliver Kurth [Wed, 1 Apr 2020 18:53:33 +0000 (11:53 -0700)] 
sync tclodefs.h to source

5 years agoserviceDiscovery: Adding sleep before 'RpcChannel_SendOneRawPriv' call.
Oliver Kurth [Wed, 1 Apr 2020 18:34:06 +0000 (11:34 -0700)] 
serviceDiscovery: Adding sleep before 'RpcChannel_SendOneRawPriv' call.

5 years agoDo a 100 msec delay for each vsock channel start retry.
Oliver Kurth [Wed, 1 Apr 2020 18:34:06 +0000 (11:34 -0700)] 
Do a 100 msec delay for each vsock channel start retry.

Move the 100 msec delay into the vsock RPC start retry loop.  The
100 msec delay before each start retry is needed for errors that
will return quickly.

5 years agoAdd a retry loop to VSockChannelStart() to recover on start failure.
Oliver Kurth [Wed, 1 Apr 2020 18:34:06 +0000 (11:34 -0700)] 
Add a retry loop to VSockChannelStart() to recover on start failure.

On failure, a vsock RPC channel will eventually fallback to the
backdoor channel.  Services that require or are limited to the
priviledge RPC channel will fail.

Adding a simple, limited loop in VSockChannelStart to retry the vsock
channel start before ultimately switching to the backdoor channel.
Retries are not done for "send once" operations.

5 years agoDestroy the dedicated RPCI channel set up for the Vmx Guest Logging
Oliver Kurth [Wed, 1 Apr 2020 18:34:06 +0000 (11:34 -0700)] 
Destroy the dedicated RPCI channel set up for the Vmx Guest Logging
when vmtoolsd process exits.

5 years agoServiceDiscovery: Fixing failure of sending message via RPCChannel after
Oliver Kurth [Wed, 1 Apr 2020 18:34:06 +0000 (11:34 -0700)] 
ServiceDiscovery: Fixing failure of sending message via RPCChannel after
it has failed to the backdoor.

5 years agoFixing some log messages
Oliver Kurth [Wed, 1 Apr 2020 18:34:06 +0000 (11:34 -0700)] 
Fixing some log messages

1. PublishScriptOutputToNamespaceDB can fail for various reasons,
   caller can't know exact reason from return values, so just printing
   that the function failed in case return value is FALSE.  Exact cause
   must be inferred from the function's logs itself.
2. Printing log for chunkCount only if we successfully wrote it in NDB

5 years agoopen-vm-tools: stage all *.vmsg files
Oliver Kurth [Wed, 1 Apr 2020 18:34:05 +0000 (11:34 -0700)] 
open-vm-tools: stage all *.vmsg files

Only a subset of the *.vmsg files were installed. Fixing this by
using a glob.

5 years agovmtools: fix compiler errors in posix service discovery core plugin
Oliver Kurth [Wed, 1 Apr 2020 18:34:05 +0000 (11:34 -0700)] 
vmtools: fix compiler errors in posix service discovery core plugin

As we build the vmtools for arm (unfortunately not on main), we hit
a compiler warnings "ISO C90 forbids mixed declarations and code"
in this new code.

5 years agoAnnotate a Coverity false positive.
Oliver Kurth [Wed, 1 Apr 2020 18:34:05 +0000 (11:34 -0700)] 
Annotate a Coverity false positive.

The open-vm-tools Coverity scan reports a NULL pointer dereference
for the variable untrustedCerts.  However, untrustedCerts is NULL
only if no untrusted certs are found, in which case the code that
dereferences untrustedCerts isn't executed.

5 years agoserviceDiscovery: Adding sleep before 'RpcChannel_SendOneRawPriv' call.
Oliver Kurth [Wed, 1 Apr 2020 18:31:38 +0000 (11:31 -0700)] 
serviceDiscovery: Adding sleep before 'RpcChannel_SendOneRawPriv' call.

5 years agoDo a 100 msec delay for each vsock channel start retry.
Oliver Kurth [Wed, 1 Apr 2020 18:31:38 +0000 (11:31 -0700)] 
Do a 100 msec delay for each vsock channel start retry.

Move the 100 msec delay into the vsock RPC start retry loop.  The
100 msec delay before each start retry is needed for errors that
will return quickly.

5 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:38 +0000 (11:31 -0700)] 
Common source file change not directly applicable to open-vm-tools.

5 years agoFix localization issue on windows guests.
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Fix localization issue on windows guests.

Some fields of GOptionContext used in help are not public, so add 2
arguments to Usage to get needed info.

5 years agoAdd a retry loop to VSockChannelStart() to recover on start failure.
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Add a retry loop to VSockChannelStart() to recover on start failure.

On failure, a vsock RPC channel will eventually fallback to the
backdoor channel.  Services that require or are limited to the
priviledge RPC channel will fail.

Adding a simple, limited loop in VSockChannelStart to retry the vsock
channel start before ultimately switching to the backdoor channel.
Retries are not done for "send once" operations.

5 years agoDestroy the dedicated RPCI channel set up for the Vmx Guest Logging
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Destroy the dedicated RPCI channel set up for the Vmx Guest Logging
when vmtoolsd process exits.

5 years agoFixing some log messages
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Fixing some log messages

1. PublishScriptOutputToNamespaceDB can fail for various reasons,
   caller can't know exact reason from return values, so just printing
   that the function failed in case return value is FALSE.  Exact cause
   must be inferred from the function's logs itself.
2. Printing log for chunkCount only if we successfully wrote it in NDB

5 years agoServiceDiscovery: Fixing failure of sending message via RPCChannel after
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
ServiceDiscovery: Fixing failure of sending message via RPCChannel after
it has failed to the backdoor.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoopen-vm-tools: stage all *.vmsg files
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
open-vm-tools: stage all *.vmsg files

Only a subset of the *.vmsg files were installed. Fixing this by
using a glob.

5 years agoRecord the assignment of tools version 11.0.6.
Oliver Kurth [Wed, 1 Apr 2020 18:31:37 +0000 (11:31 -0700)] 
Record the assignment of tools version 11.0.6.

Add TOOLS_VERSION_SLEDGEHAMMER_PATCH2 for version 11.0.6 to the
historical version information.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoAdd a Coverity annotation.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Add a Coverity annotation.

The Coverity scan of open-vm-tools reports an out-of-bounds access
issue in Util_BacktraceWithFunc.  This is intentional, to compute
the base pointer for a stack trace.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoUpdating the tools version on the devel branch to 11.2.0.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Updating the tools version on the devel branch to 11.2.0.

5 years agolib/unicode/unicodeSimpleTypes.c: fix leak on exit
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
lib/unicode/unicodeSimpleTypes.c: fix leak on exit

The hashtable used for encoding name -> IANA table index
lookups was not getting freed.

Also, HashTable_AllocOnce() incorrectly instructs
the hashtable to clear its clientData, which contains
an integer index and not a pointer, using "free".

5 years agoAnnotate a Coverity false positive.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Annotate a Coverity false positive.

The open-vm-tools Coverity scan reports a NULL pointer dereference
for the variable untrustedCerts.  However, untrustedCerts is NULL
only if no untrusted certs are found, in which case the code that
dereferences untrustedCerts isn't executed.

5 years agolib/mics/sha1.c: Include string.h unconditionally.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
lib/mics/sha1.c: Include string.h unconditionally.

string.h is part of POSIX, lets include it unconditionally

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agovmtools: fix compiler errors in posix service discovery core plugin
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
vmtools: fix compiler errors in posix service discovery core plugin

As we build the vmtools for arm (unfortunately not on main), we hit
a compiler warnings "ISO C90 forbids mixed declarations and code"
in this new code.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:36 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 1 Apr 2020 18:31:35 +0000 (11:31 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoFix localization issue of vmware-vgauth-cmd
Oliver Kurth [Wed, 1 Apr 2020 18:31:35 +0000 (11:31 -0700)] 
Fix localization issue of vmware-vgauth-cmd
1. default msg catalog folder is wrong, add correct msgCatalog in
   vgauth.conf
2. rename vmsg file name to "VGAuthCli" since file name used in main
   is "VGAuthCli"
3. Move I18n init up to fix variable localization issue

5 years agoServiceDiscovery: Correcting warning log if operation over RPC has failed.
Oliver Kurth [Tue, 17 Mar 2020 21:36:58 +0000 (14:36 -0700)] 
ServiceDiscovery: Correcting warning log if operation over RPC has failed.

5 years agoService Discovery plugin integration into open-vm-tools
Oliver Kurth [Tue, 17 Mar 2020 21:36:58 +0000 (14:36 -0700)] 
Service Discovery plugin integration into open-vm-tools

5 years agoBackout previous change to lib/unicode/unicodeSimpleTypes.c
Oliver Kurth [Tue, 17 Mar 2020 21:36:58 +0000 (14:36 -0700)] 
Backout previous change to lib/unicode/unicodeSimpleTypes.c

5 years agobora/lib/unicode: fix leak on exit
Oliver Kurth [Tue, 17 Mar 2020 21:36:57 +0000 (14:36 -0700)] 
bora/lib/unicode: fix leak on exit

The hashtable used for encoding name -> IANA table index
lookups was not getting freed.

Also, HashTable_AllocOnce() incorrectly instructs
the hashtable to clear its clientData, which contains
an integer index and not a pointer, using "free".

5 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:57 +0000 (14:36 -0700)] 
Common source file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:57 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open=vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:57 +0000 (14:36 -0700)] 
Common header file change not applicable to open=vm-tools.

5 years agoFix a Coverity-reported overrun.
Oliver Kurth [Tue, 17 Mar 2020 21:36:57 +0000 (14:36 -0700)] 
Fix a Coverity-reported overrun.

A Coverity scan of open-vm-tools reports a buffer overrun in
Escape_Unescape.  The problem is that Escape_Unescape uses
sizeof('\0') to specify the size of a buffer that consists of
a single character in the variable nulByte (previously named
nullbyte).  However, character literals in C are ints, so
sizeof('\0') is equivalent to sizeof int rather than sizeof char.
Use "sizeof nulByte" instead.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:56 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoRemove the now unused LOGLEVEL_VARIADIC
Oliver Kurth [Tue, 17 Mar 2020 21:36:56 +0000 (14:36 -0700)] 
Remove the now unused LOGLEVEL_VARIADIC

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:56 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:56 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoLOG variadic: remove LOGLEVEL_VARIADIC [1 of 2]
Oliver Kurth [Tue, 17 Mar 2020 21:36:56 +0000 (14:36 -0700)] 
LOG variadic: remove LOGLEVEL_VARIADIC [1 of 2]

Mass conversion is complete. It's time to remove the intermediate state.
[1/2]: remove LOGLEVEL_VARIADIC from loglevel_defs.h.  This removes the
backwards-compat path.

5 years agoUpdate copyright to reflect previous change.
Oliver Kurth [Tue, 17 Mar 2020 21:36:55 +0000 (14:36 -0700)] 
Update copyright to reflect previous change.

5 years agoFix a trivial memory leak in namespacetool.c.
Oliver Kurth [Tue, 17 Mar 2020 21:36:55 +0000 (14:36 -0700)] 
Fix a trivial memory leak in namespacetool.c.

Fix a memory leak reported by a customer based on their Coverity
scans of open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:55 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:55 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:55 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:55 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoProvide a switch in VMTools configuration to disable guest customization.
Oliver Kurth [Tue, 17 Mar 2020 21:36:54 +0000 (14:36 -0700)] 
Provide a switch in VMTools configuration to disable guest customization.

This switch can prevent a VI admin from running customization on a VM that
is already customized and give control to guest admin to decide this.

By default the guest customization is enabled.

5 years agoProvide a switch in VMTools configuration to disable guest customization.
Oliver Kurth [Tue, 17 Mar 2020 21:36:54 +0000 (14:36 -0700)] 
Provide a switch in VMTools configuration to disable guest customization.

Header file change: adding error enumerations.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:54 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoopen-vm-tools: add --enable-valgrind configure option
Oliver Kurth [Tue, 17 Mar 2020 21:36:54 +0000 (14:36 -0700)] 
open-vm-tools: add --enable-valgrind configure option

Add the option "--enable-valgrind" to the ./configure command, and test
if the necessary headers are installed.

5 years agoFix crash because xerror in get_monitor_at_window
Oliver Kurth [Tue, 17 Mar 2020 21:36:54 +0000 (14:36 -0700)] 
Fix crash because xerror in get_monitor_at_window

Sometimes there is an x drawable error while calling get_monitor_at_window.
This error can be safely ignored.

5 years agoVMware Tools service discovery core plugin changes
Oliver Kurth [Tue, 17 Mar 2020 21:36:53 +0000 (14:36 -0700)] 
VMware Tools service discovery core plugin changes

First step in creating a new plugin to collect in-guest process related
data over Namespace DB.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 17 Mar 2020 21:36:53 +0000 (14:36 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:13 +0000 (12:07 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoMapping the deployPkg log error level to g_log warning level.
Oliver Kurth [Wed, 4 Mar 2020 20:07:13 +0000 (12:07 -0800)] 
Mapping the deployPkg log error level to g_log warning level.

g_error() is always fatal, resulting in terminating the application.  In
this case the guest customization will fail.  So mapping the deployPkg log
error level to g_log warning level to avoid application termination.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:13 +0000 (12:07 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoSend GUESTRPCPKT_FIELD_FAST_CLOSE when doing one-off RPC via vsock
Oliver Kurth [Wed, 4 Mar 2020 20:07:13 +0000 (12:07 -0800)] 
Send GUESTRPCPKT_FIELD_FAST_CLOSE when doing one-off RPC via vsock

To work around a vsock/vmci/VMX issue with vsock cleanup, send a special
command that tells the VXM to immediately close a vsock after completing
an RPC.  This minimizes delays/timeouts when sending one-off RPCs rapdily.

Can still run out of vsockets, but they clean up pretty quickly,
so add logic to sleep a bit and retry if ENOBUFS is returned
by connect().

5 years agoChanges to common source files not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:13 +0000 (12:07 -0800)] 
Changes to common source files not directly applicable to open-vm-tools.

5 years agoMisc. Appinfo plugin cleanup.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Misc. Appinfo plugin cleanup.

- Used 'g' prefix for the global variables.
- Added '%s' at the beginning of each log message.
- Renamed a non-static function with the proper naming convention.
- Fixed documentation for few functions.
- Added '.' at the end of each log message to maintain consistency.
- Used proper '// IN' comments for each function argument.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoReplace VixTools_ConfigGetBoolean with VMTools_ConfigGetBoolean
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Replace VixTools_ConfigGetBoolean with VMTools_ConfigGetBoolean

Initially came up with a utility function named VixTools_ConfigGetBoolean
to retrieve the boolean value from the config dictionary.  This function
was designed as local/specific to VIX plugin.  Later, VMTools_ConfigGetBoolean
function was designed with the same functionality and is being used everywhere
in the Tools repository.

This changeset gets rid of VixTools_ConfigGetBoolean and replaces
all those occurrences with VMTools_ConfigGetBoolean.

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Common source file changes not directly applicable to open-vm-tools.

Add a new error ASOCKERR_WEBSOCK_UPGRADE_NOT_FOUND in asyncsocket

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Common source file changes not directly applicable to open-vm-tools.

Fix procMgr library for Windows.

- For windows, to retrieve the command line for a target process,
the procMgr library creates a remote thread in the target process
and executes GetCommandLine function.  This approach is OK. But for
few applications that are not built with proper flags, creating a
remote thread may crash the application.  In order to avoid any
issues, it was decided not use the 'remote thread' approach by DEFAULT.

- Refactored the procMgr APIs to take an input argument from the
user if the 'remote thread' approach needs to be used.

- Refactored the procMgr APIs to conditionally use the WMI for
retrieving the command line for a target process.

- New options are provided to the user if the 'remote thread'
and 'WMI' approaches need to be forced.  Modified the VIX tools plugin
to read and honor the new flags from tools.conf

The following are the new flags under guestoperations group.
useRemoteThreadForProcessCommandLine
useWMIForProcessCommandLine

The default value for the above new flags is false. User can set them
to true if needed.

- Re-factored some code in appInfo plugin that calls procMgr library.
The appinfo plugin doesn't really use the commandline.  So, modified the
appinfo plugin to just use the API that doesn't use the complicated
approaches for the listing down the processes.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoArm64 backdoor: Disable USE_HYPERCALL for Arm64 tools build.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Arm64 backdoor: Disable USE_HYPERCALL for Arm64 tools build.

Undefine USE_HYPERCALL on ESXi-Arm to force the backdoor interface type
to BACKDOOR_INTERFACE_IO.  This is necessary to fix the Arm64 tools build.
This change does not affect x86 (open-vm-tools).

5 years agoFreeBSD has removed some vnops flags that have never been used.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
FreeBSD has removed some vnops flags that have never been used.

Two flags that were being tested in the nullfs vnops.c source have
never actually been used by any filesystem layer on top of the nullfs.
FreeBSD is doing a little house cleaning and the VDESC_NOMAP_VPP and
VDESC_VPP_WILLRELE defines are being removed from the source base.

FreeBSD has provided source code changes for the FreeBSD vmblock
driver as they have made in identical nullfs code in the FreeBSD
base code.

Pull request: https://github.com/vmware/open-vm-tools/pull/403

5 years agoVMTools 11.1.0: update visible copyrights to 2020.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
VMTools 11.1.0: update visible copyrights to 2020.

5 years agoAdd hypercall to bora/lib/backdoor.
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Add hypercall to bora/lib/backdoor.

Use vmcall or vmmcall when they are available.
Removed #include <string.h>, it was added in an earlier version
  but is not needed in the current code.
Limit HostinfoBackdoorGetInterface to x86 architecture.
Fix some indents.

5 years agoRemove 'VMware Confidential' from license files for publishing
Oliver Kurth [Wed, 4 Mar 2020 20:07:12 +0000 (12:07 -0800)] 
Remove 'VMware Confidential' from license files for publishing

5 years agoHandle LSI Logic Parallel and BusLogic SCSI on PCI bus 0.
Oliver Kurth [Wed, 4 Mar 2020 20:07:11 +0000 (12:07 -0800)] 
Handle LSI Logic Parallel and BusLogic SCSI on PCI bus 0.

When a LSI Logic Parallel or BusLogic SCSI controller appears on PCI
bus 0, the disk device controller name is not present; the "label" file
is missing.  Adding logic to check if disk device is attached to a
SCSI controller on bus 0 (0000:00:10.0) if a "label" file cannot be
found.  If that is the case, setting the device name to "scsi0.n"
where "n" is the device unit number previously determined.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:11 +0000 (12:07 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 4 Mar 2020 20:07:11 +0000 (12:07 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoFix broken PowerCLI Invoke-VMScript cmdtlet by an earlier change.
Oliver Kurth [Wed, 4 Mar 2020 20:07:11 +0000 (12:07 -0800)] 
Fix broken PowerCLI Invoke-VMScript cmdtlet by an earlier change.
Also fixed a handle leak in VixToolsGetTokenHandleFromTicketID.

Note: Credential type VIX_USER_CREDENTIAL_TICKETED_SESSION, started by
VIX_COMMAND_ACQUIRE_CREDENTIALS, is not built upon VGAuth lib
VGAuth_GenerateSSPIChallenge/VGAuth_ValidateSSPIResponse, impersonation is
done via lib/impersonate/impersonate.c::Impersonate_Do, the loaded user
profile is designed to be unloaded after 5 minutes, but because vix.dll is
linked with stub lib poll whose Poll_CB_RTime() does not do anything, the
profile is never unloaded.

5 years agoHandle Photon's "/dev/root" mount point when doing disk device mapping
Oliver Kurth [Wed, 4 Mar 2020 20:07:11 +0000 (12:07 -0800)] 
Handle Photon's "/dev/root" mount point when doing disk device mapping

Photon EFI boot VMs have the root disc mounted long before the various
PCI controllers are initialized and the attached devices enumerated.
When looking through the /proc/mounts, the root filesystem mounted
at '/' is displayed as if on device /dev/root/  But there is no "root"
device in /dev, nor in the PCI device tree at /sys/class/block.  Later
Photon builds fabricate a block device at "/dev/root" but again nothing
in the /sys/class/block PCI tree.

For this situation, it is necessary to use the pseudo device's major and
minor number to access the PCI device tree through /sys/dev/block.
The major and minor device number can be extracted from the contents of
/proc/self/mountinfo.

19 0 8:2 / / rw,relatime shared:1 - ext4 /dev/root rw

The 3rd field is the major:minor number and the 9th or 10th, depending
on Linux release, is the pseudo device in this case.

5 years agoRectify a log spew in vmsvc logging (vmware-vmsvc-root.log)
Oliver Kurth [Wed, 4 Mar 2020 20:07:11 +0000 (12:07 -0800)] 
Rectify a log spew in vmsvc logging (vmware-vmsvc-root.log)

When a LSI Logic Parallel SCSI controller sits in PCI bus 0
(SCSI controller 0), the Linux disk device enumeration does not provide
a "label" file with the controller name.  This results in messages like

'GuestInfoGetDiskDevice: Missing disk device name; VMDK mapping
unavailable for "/var/log", fsName: "/dev/sda2"'

repeatedly appearing in the vmsvc logging.  The patch converts what
previously was a warning message to a debug message and thus avoids
the log spew.

This patch has been made available for open-vm-tools 11.0.x on the
open-vm-tools github repo.

https://github.com/vmware/open-vm-tools/issues/404

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 13 Feb 2020 00:49:09 +0000 (16:49 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 13 Feb 2020 00:49:09 +0000 (16:49 -0800)] 
Common header file change not applicable to open-vm-tools.

5 years agoFreeBSD kernel API changes with FreeBSD 13.0 (development)
Oliver Kurth [Thu, 13 Feb 2020 00:49:09 +0000 (16:49 -0800)] 
FreeBSD kernel API changes with FreeBSD 13.0 (development)

VOP_UNLOCK(): second argument "flags" has been dropped when the kernel
version is >= 1300074.

The timeout(9) interface has been deprecated and must be replaced with
callout(9) (v2) when the kernel version >= 1300067.

https://github.com/vmware/open-vm-tools/pull/398

5 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Thu, 13 Feb 2020 00:49:09 +0000 (16:49 -0800)] 
Common source file change not directly applicable to open-vm-tools.

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Thu, 13 Feb 2020 00:49:09 +0000 (16:49 -0800)] 
Common source file changes not directly applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 13 Feb 2020 00:49:09 +0000 (16:49 -0800)] 
Common header file change not applicable to open-vm-tools.