]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
6 years agoAsyncsocket in low latency send mode may write into freed memory
Oliver Kurth [Wed, 10 Apr 2019 21:14:53 +0000 (14:14 -0700)] 
Asyncsocket in low latency send mode may write into freed memory

Blast service encounters access violation exception during scale tests
in AsyncTCPSocketSend() at bora\lib\asyncsocket\asyncsocket.c.

Root cause is asock refcount is not incremented before the inline
invocation of AsyncTCPSocketSendCallback() in the low latency send
mode and asock is accessed right after this invocation to decrement
inLowLatencySendCb counter. AsyncTCPSocketSendCallback() on error
would invoke error handler which in turn could close the asock
leading to freeing of asock.

Issue wouldn't happen if AsyncWebSocket impl guarded all of its
transport->send(transport) calls with AsyncSocketAddRef(transport)
and AsyncSocketRelease(transport) but isn't the case currently.

Fix is to add and release asock reference around the inline
invocation of AsyncTCPSocketSendCallback().

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Apr 2019 21:14:53 +0000 (14:14 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Apr 2019 21:14:52 +0000 (14:14 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoInitiateFileTransferToGuest fails when uploading file to root directory
Oliver Kurth [Wed, 10 Apr 2019 21:14:52 +0000 (14:14 -0700)] 
InitiateFileTransferToGuest fails when uploading file to root directory

File upload to '/' on Linux fails the directory exists check.
This is caused by the file dirname being an empty string when parsed from
the guest file path name per the documented behavior of File_GetPathName.

The caller of File_GetPathName needs to handle the expected empty dirname
string when dealing with file path in the root ('/') filesystem on Linux.

Proposed fix is to replace the dirname string with the root path ('/') when:
A. dirname obtained from File_GetPathName call is an empty string AND
B. the original file path name starts with the path separator ('/') on
   Linux (or *nix like) GOSes

This allows for the directory checks to inspect the root folder before
proceeding with the file transfer.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Apr 2019 21:14:51 +0000 (14:14 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoBacking out the previous change to vixTools.c
Oliver Kurth [Wed, 10 Apr 2019 21:14:51 +0000 (14:14 -0700)] 
Backing out the previous change to vixTools.c

As the code committed was not the one reviewed but another version of the
fix under exploration, reverting the previous change.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Apr 2019 21:14:51 +0000 (14:14 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoInitiateFileTransferToGuest fails when uploading file to root directory
Oliver Kurth [Wed, 10 Apr 2019 21:14:49 +0000 (14:14 -0700)] 
InitiateFileTransferToGuest fails when uploading file to root directory

File upload to '/' on Linux fails the directory exists check.
This is caused by the file dirname being an empty string when parsed from the guest file path name per the documented behavior of File_GetPathName.

The caller of File_GetPathName needs to handle the expected empty dirname string when dealing with file path in the root ('/') filesystem on Linux.

Proposed fix is to replace the dirname string with the root path ('/') when:
A. dirname obtained from File_GetPathName call is an empty string AND
B. the original file path name starts with the path separator ('/') on Linux (or *nix like) GOSes

This allows for the directory checks to inspect the root folder before proceedeing with the file transfer.

6 years agoMake building without ICU the default for Linux.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Make building without ICU the default for Linux.

6 years agoQuery disks for UUID
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Query disks for UUID

As part of identifying a guest disk so it can be associated with a vmdk,
query its serial number, which is the same as the vmdk's ddb.uuid

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoBug fix for DnD performance tuning for Mac and Windows clients; not
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Bug fix for DnD performance tuning for Mac and Windows clients; not
directly applicable to open-vm-tools.

6 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Common source file changes not applicable to open-vm-tools.

Security fix for dll load paths in Tools and vgauth.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoGOS Table: Add Linux 5.x
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
GOS Table: Add Linux 5.x

Linux 5.x is here!  Add it to our supported guests list.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoRemove the /etc/security directory from the guest vm-support bundle.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Remove the /etc/security directory from the guest vm-support bundle.

This directory contains sensitive guest side data that we should not
expose to the host side.

Although running the vm-support requires the root privilege in the guest,
the guest admin might not be aware of the ramification of running the script.
Therefore, better be cautious.

No file from the /etc/security has been needed in the past.  If any file is
needed in the future, that need will be evaluated case-by-case at that time.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoDnD performance tuning for Mac and Windows clients; not directly applicable
Oliver Kurth [Thu, 28 Mar 2019 19:43:00 +0000 (12:43 -0700)] 
DnD performance tuning for Mac and Windows clients; not directly applicable
to open-vm-tools.

6 years agoFix a memory leak in vmbackup.
Oliver Kurth [Thu, 28 Mar 2019 19:42:59 +0000 (12:42 -0700)] 
Fix a memory leak in vmbackup.

Note: vm_free() is called here because GuestApp_GetConfPath() is calling
Util_SafeStrdup() to allocate the memory.  Both GuestApp_GetConfPath and
vm_free are implemented inside libvmtools.so.

6 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 28 Mar 2019 19:42:59 +0000 (12:42 -0700)] 
Common source file change not applicable to open-vm-tools.

6 years agoFix memory leak in GetFormattedCommandLine() function (linuxDeployment.c)
Oliver Kurth [Thu, 28 Mar 2019 19:42:59 +0000 (12:42 -0700)] 
Fix memory leak in GetFormattedCommandLine() function (linuxDeployment.c)

1. There are malloc() calls happening in a loop; this function returns
   NULL when one of malloc fails.  If a malloc call fails in the loop,
   all memory allocated in previous iterations should be freed before
   the return NULL.
2. Clear allocated resources before return NULL in this file.
3. Add NULL check following malloc calls in this file.
4. Encapsulate %s in () only if %s is strerror(errno), otherwise encapsulate
   %s in single quotes.
5. End with \n in sLog.

6 years agoRemove dead code in vmtoolsConfig.c
Oliver Kurth [Wed, 27 Feb 2019 22:39:58 +0000 (14:39 -0800)] 
Remove dead code in vmtoolsConfig.c

There is a lot code in vmtoolsConfig.c that handles the 'tools upgrades'
from legacy tools versions.

But as per
https://docs.vmware.com/en/VMware-Tools/10.1/rn/vmware-tools-1010-release-notes.html#installupgrade,
legacy tools versions (prior to 9.4.x) must be first upgraded to 10.1.0 before
upgrading to the latest tools versions. Hence, removed all the code which is
no longer applicable for the 'latest tools version'.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:58 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:58 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoLog guest OP results to guest side only.
Oliver Kurth [Wed, 27 Feb 2019 22:39:58 +0000 (14:39 -0800)] 
Log guest OP results to guest side only.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:57 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:57 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:57 +0000 (14:39 -0800)] 
Changes to common header files not applicable to open-vm-tools.

6 years agoTools Vix Plugin: minor cleanup remove unnecessary undefs
Oliver Kurth [Wed, 27 Feb 2019 22:39:57 +0000 (14:39 -0800)] 
Tools Vix Plugin: minor cleanup remove unnecessary undefs

A minor cleanup remove unnecessary undefs and fixing a misspelling in
a function header. The function header somehow got removed from the
previous clean up so here it is again anyway, with the addition of the
spelling correction.

6 years agoLinux DeployPkg should provide a configurable timeout for the spanning
Oliver Kurth [Wed, 27 Feb 2019 22:39:57 +0000 (14:39 -0800)] 
Linux DeployPkg should provide a configurable timeout for the spanning
customization process.

Change the upper limit of the timeout value in tools.conf to 3600 instead
of MAX_UINT16.  Revise the log message displayed when an invalid value
is configured in tools.conf.

6 years agoRemove some redundant code in lib/poll/poll.c detected by cppcheck.
Oliver Kurth [Wed, 27 Feb 2019 22:39:57 +0000 (14:39 -0800)] 
Remove some redundant code in lib/poll/poll.c detected by cppcheck.

6 years agoTools Vix Plugin: remove unused hgfs rpc channel
Oliver Kurth [Wed, 27 Feb 2019 22:39:56 +0000 (14:39 -0800)] 
Tools Vix Plugin: remove unused hgfs rpc channel

This change removes the unused VIX_BACKDOORCOMMAND_SEND_HGFS_PACKET
rpc handler from the Vix plugin.

6 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:56 +0000 (14:39 -0800)] 
Changes to common header files not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:56 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:56 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:55 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:55 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:55 +0000 (14:39 -0800)] 
Common source file changes not directly applicable to open-vm-tools.

6 years agoGCC 9 caught several misaligned accesses and a format overflow.
Oliver Kurth [Wed, 27 Feb 2019 22:39:55 +0000 (14:39 -0800)] 
GCC 9 caught several misaligned accesses and a format overflow.

GCC 9 generated several instances of "Werror=address-of-packed-member"
in HGFS Fuse support code and hgfsmounter. There is also one instance of
"Werror=format-overflow" generated in util_misc.c.

According to stackoverflow discussion -
https://stackoverflow.com/questions/8568432/is-gccs-attribute-packed-pragma-pack-unsafe,
x86 hardware handles misaligned access and does not exhibit any real
issues. However, GCC 9 generates misaligned access warning
("Werror=address-of-packed-member) for all architectures. In case of
open-vm-tools build we treat warnings as errors and also we want code
to be as portable as possible in general unless there is a reason not
to do so.

6 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:54 +0000 (14:39 -0800)] 
Common source file changes not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 27 Feb 2019 22:39:54 +0000 (14:39 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoBump up the SYSIMAGE_VERSION to be same as the VMTools version.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Bump up the SYSIMAGE_VERSION to be same as the VMTools version.

6 years agoHgfs Server Manager Tools: fix a memory leak
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Hgfs Server Manager Tools: fix a memory leak

The Hgfs server manager interface assumes that it is called only once
for each application that uses it.  However, in the tools services there
are multiple clients.  Hence, the initialization is done multiple times
and causes the previous initializations which allocate resources to be
overwritten and lost.  Thus memory is being leaked.

Initialize the policy shares once on the first register and cleanup
the policy shares on final unregister by introducing a reference count.

The channel is already reference counted and initializes the channel once.
However it is necessary to call the channel init on each register
and exit on each unregister as it saves a channel reference in the data manager
object passed to it by the caller for subsequent retrieval.

Add an additional log to the policy init and cleanup calls for tracking purposes.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common source file change not directly applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Changes to common header files not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:33 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoChanges to common header files not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Changes to common header files not directly applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon source file changes not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common source file changes not applicable to open-vm-tools.

6 years agoChanges to common source files not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Changes to common source files not directly applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoFix the missing IP aliases in the guest info.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Fix the missing IP aliases in the guest info.

IP aliases were missing in the guest info when libdnet is not used.

Previously tried to use the MAC address as the key to identify the IP aliases
on Linux.  However, that didn't work for vlan devices which share the same
MAC as the parent NIC.  The previous attempt was backed out.

Ideally, need to find a way to map the label name to the NIC name, but
have not been able to find a simple solution for this.  There might be a
netlink based solution but it is way too costly to do.

After more investigation, found out that a valid IP alias name must start
with the original NIC name followed by a colon.  Even though the ip addr allows
any string as the start of the NIC name, configuration file requires the colon.
In addition, ifconfig would error out when the name is not of the standard:
  ens192wwwww: error fetching interface information: Device not found

Therefore, a correctly configured system should use eth0:1, ens192:2 etc.

A lookup of libdnet source revealed the same assumption in the libdnet code.

/* Get addresses for this interface. */
for (ifr = intf->ifc.ifc_req; ifr < lifr && (ap + 1) < lap;
ifr = NEXTIFR(ifr)) {
/* XXX - Linux, Solaris ifaliases */
if ((p = strchr(ifr->ifr_name, ':')) != NULL)
*p = '\0';

Therefore, doing just the same.  Look for the colon, then trim it, and then
compare it with the NIC name.

6 years agoUpdate copyright year to 2019 for OVT 10.3.10 files.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Update copyright year to 2019 for OVT 10.3.10 files.

6 years agoBack out the previous change to bump up the SYSIMAGE_VERSION to be the same
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Back out the previous change to bump up the SYSIMAGE_VERSION to be the same
with VMTools version.

6 years agoBack out the previous change to fix the missing IP aliases in the guest info.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Back out the previous change to fix the missing IP aliases in the guest info.

6 years agoBump up the SYSIMAGE_VERSION to be the same with VMTools version.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Bump up the SYSIMAGE_VERSION to be the same with VMTools version.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoGuestOS: Improve the guest OS identification code
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
GuestOS: Improve the guest OS identification code

Now that we often have an explicit, unambiguous version string for
a distro, use it. In the rare case we don't have one, search the
distro string for a digit and use that. If we can't find anything,
note this and let the code fall into the default appropriate to the
distro.

With this change, we stop using strings and so are no longer confused
by things like "7.5". For a few of the distros, we now no longer care
about the upper bound, we can report what we find. Anything above what
the release supports will be fixed by the GuestMapper.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoFix the missing IP aliases in the guest info.
Oliver Kurth [Tue, 19 Feb 2019 20:51:32 +0000 (12:51 -0800)] 
Fix the missing IP aliases in the guest info.

IP aliases were missing in the guest info when the libdnet is not used.
ESX does not seem to support IP aliases, so the ESX code path is kept logically
the same as before.

On Linux, for each IP entry, get the label name, and use ioctl to get its MAC.
Use the MAC to match the current device MAC.

The getifaddrs() call ensures that the ifa_name is not NULL, so there is no
need to check for NULL pointers.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoInclude vmware/tools/log.h to define g_info.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Include vmware/tools/log.h to define g_info.

A recent change added a call to g_info from syncManifest.c.  This
in turn is causing open-vm-tools builds to fail because g_info is
not available on SLES 12sp1.

To fix the problem, include vmware/tools/log.h in syncManifest.c.
log.h defines g_info as a macro.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoBack out the previous change to remove support for building with
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Back out the previous change to remove support for building with
xml-security-c and xerces-c.

6 years agoRemove support for building with xml-security-c and xerces-c
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Remove support for building with xml-security-c and xerces-c

Remove support for building VMTools with xml-security-c.  Since
xml-security-c is the only requirement for xerces-c, xerces-c
is dropped as well.

There is also some cleanup of the handling of some configure
options related to vgauth, ssl, xmlsec1, and xml2.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoAlways send VMBACKUP_EVENT_GENERIC_MANIFEST during quiesced snapshots.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Always send VMBACKUP_EVENT_GENERIC_MANIFEST during quiesced snapshots.

vSphere 6.7 added a host-side interface that allows VMTools to send
a "generic" backup manifest during a quiesced snapshot on Linux guests.
VMTools 10.2.0 or later tries to notify the host of the backup manifest
file through a vmbackup event message VMBACKUP_EVENT_GENERIC_MANIFEST.
If the host is unable to field the message, then VMTools logs the
failure and then continues with the quiesced snapshot in the older
fashion, without the backup manifest.

An earlier change attempted to reduce the amount of logging done when
running on older hosts that don't support VMBACKUP_EVENT_GENERIC_MANIFEST
by detecting when sending VMBACKUP_EVENT_GENERIC_MANIFEST fails and
not sending the message again for subsequent quiesced snapshots.
However, subsequent stress testing has uncovered problems with this
approach when running on newer hosts; specifically, errors may sometimes
be encountered on newer hosts when sending VMBACKUP_EVENT_GENERIC_MANIFEST.
Therefore this change backs out that earlier change.

Note that the need to solve the problem that that earlier change was
intended to solve has been reduced because support for
VMBACKUP_EVENT_GENERIC_MANIFEST has been backported to vSphere 6.5
P03, which is available, and vSphere 6.0 P08, which is scheduled for
release later this year.  ESXi 5.5 is out of general support.

This change also addresses an issue that surfaced when testing on a
host without support for VMBACKUP_EVENT_GENERIC_MANIFEST.
If VMTools fails to send VMBACKUP_EVENT_GENERIC_MANIFEST, the quiesced
snapshot operation will be aborted rather than continuing as it should.
To address this, create a new function, VmBackup_SendEventNoAbort,
which does not abort the quiesced snapshot on failure, and call that
function rather than VmBackup_SendEvent when sending
VMBACKUP_EVENT_GENERIC_MANIFEST.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoAdd disk UUID to GuestDiskInfo
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Add disk UUID to GuestDiskInfo

Add UUID/Serial number to the GuestDiskInfo.

6 years agoLinux DeployPkg should provide a configurable timeout for the spanning
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Linux DeployPkg should provide a configurable timeout for the spanning
customization process.  Right now it is hard-coded to 100 seconds.

Sources to provide "timeout" value:
1. Clients such as vCenter and SRM can pack timeout value in cab header
   via API func "DeployPkg_SetProcessTimeout(uint16 timeout)".  this timeout
   value will be implemented during the package deployment process.
2. Package deployment engines:
  - tools deployPkg plugin:
    Add "process-timeout" in tools.conf.  The tools deployPkg plugin will use
    that value to control the time period of the package deployment.
  - linuxDeployPkg:
    Add "-t <timeout>" as optional argument in linuxDeployPkg
    Usage: ./linuxDeployPkg -d <cabfile> -t <timeout> --skip-reboot
3. Default value in deployPkg is 100s.  If both the client and package
   deployment engines don't provid this value, then the default value of
   100s will be used.
4. The "timeout" value from clients will overwrite the value from the
   deployment engines when both of them provid this value.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common source file changes not directly applicable to open-vm-tools.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:31 +0000 (12:51 -0800)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-toold.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-toold.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoUse the LSB and os-release data to find the best guest identification
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Use the LSB and os-release data to find the best guest identification

Historically, we have the LSB to describe a Linux distro.  More
recently, the os-release standard was added.  Change our guest
identification code to attempt to use both data - when available - and
make a value judgement as to which is better.

6 years agoSend diskInfo as a json document. Modernize diskInfo RPC.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Send diskInfo as a json document.  Modernize diskInfo RPC.

6 years ago[Part 2] GuestLib support for 64bit memory shares.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
[Part 2] GuestLib support for 64bit memory shares.

MEMSCHED_SHARES_MAX is currently set to MAX_PPN and will not fit in
32-bit soon. 'memshares' property which is currently available in GuestSDK
is an unsigned 32bit value.  Starting from ESX 7.0, this value is available
only if it can be fit in an unsigned 32-bit data type.

'memShares64' is the new unsigned 64-bit property added in GuestSDK for the
memory shares.

Added necessary APIs to retrieve the memshares64 value.  The new API
VMGuestLib_GetMemShares64 will first try to retrieve the memShares64 property.
If the underlying host is an older one, then the API will return the memShares
property.

Updated the vmGuestLibTest code to retrieve and print the new memShares64 value.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoUpdate seamless window's copyright year as 1998-2019
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Update seamless window's copyright year as 1998-2019

1. Changing the COPYRIGHT_YEARS in vm_legal.h to 1998-2019
2. COPYRIGHT_YEARS is used by UTF8_COPYRIGHT_STRING_BASE and
   UTF16_COPYRIGHT_STRING for win32 UTF-16 version.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not directly applicable to open-vm-tools.

6 years ago[Part 1] GuestLib support for 64bit memory shares.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
[Part 1] GuestLib support for 64bit memory shares.

MEMSCHED_SHARES_MAX is currently set to MAX_PPN and will not fit in 32-bit soon.

Changed the datatype of 'memshares' property to uint64 for the future support.

'memshares' is exposed in GuestLib as unsigned 32-bit value.
Modified the ESX code to set this property only if the vaulue can be fit in
a uint32 type. Else, the value is not set and 'valid' bit set is set to FALSE.

Added a new property "memShares64" (as uint64) in GuestLib for the new
64-bit memory shares.

This CLN implements only the necessary changes on ESX side.

6 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Changes to common header files not applicable to open-vm-tools.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
Common header file change not applicable to open-vm-tools.

6 years ago[Asyncsocket] Avoid ASSERT failure when removing recv callback if fd has POLL_FLAG_AC...
Oliver Kurth [Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)] 
[Asyncsocket] Avoid ASSERT failure when removing recv callback if fd has POLL_FLAG_ACCEPT_INVALID_FDS flag set.

6 years agoSecurity issue with the intermediate staging directory used for DnD and CnP
Oliver Kurth [Tue, 19 Feb 2019 20:51:29 +0000 (12:51 -0800)] 
Security issue with the intermediate staging directory used for DnD and CnP

Problem:
/tmp/VMwareDnD is a staging directory used for DnD and CnP.  It should be
a regular directory, but malicious code or user may create the /tmp/VMwareDnD
 as a symbolic link which points to the home directory of the current desktop
user before the staging directory is created.  Later when the desktop user
initiates a DnD or CnP operation, the permission of that user's home directory
will be changed allowing the malicious user full access to the desktop user's
home directory.

Solution:
Do not set the permission of the staging directory if that directory already
exists and has the wrong permission.  The permission of the directory will
be 1777 if it is created by VMTools.  If that is not the case, the directory
has been created or modified by malicious code or user; just cancel the host
to guest DnD or CnP operation.