]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
8 years agoCommon header file change; not applicable to open-vm-tools.
Oliver Kurth [Mon, 26 Feb 2018 20:29:06 +0000 (12:29 -0800)] 
Common header file change; not applicable to open-vm-tools.

8 years agoSkip davfs mount points during quiescing (part 2)
Oliver Kurth [Mon, 26 Feb 2018 20:29:06 +0000 (12:29 -0800)] 
Skip davfs mount points during quiescing (part 2)

Refactor the change to skip davfs mount points.  Capture the length
of the static URL prefixes at compile time and avoid repetitive
strlen() calls when checking each active mount point.

8 years agoSkip davfs mount points during quiescing
Oliver Kurth [Mon, 26 Feb 2018 20:29:06 +0000 (12:29 -0800)] 
Skip davfs mount points during quiescing

The davfs2 is a Linux filesystem that allows mounting a Web Distributed
Authoring and Versioning (WebDAV) network resource as a local filesystem.
On some Linux releases, the FREEZE ioctl() is rejected and quiescing
these filesystems is not attempted.  On others, however, the FREEZE is
not rejected and there exists the potential of a quiescing deadlock
if the davfs2 attempts to write to its cache in /var which has already
been quiesced.

This fix is to avoid a potential deadlock by excluding davfs2 mounts
as the networking filesystem they are.  Since davfs2 may be implemented
on the Linux fuse (default) or coda filesystem kernel module,
the detection of these network mounts must be based upon detection
of the URL prefix of the mounted device name.

The static function SyncDriverIsRemoteFSType() is being updated to
not only exclude remote filesystems based on filesystem type but also
to exclude davfs2 remote filesystems by the "http://" or "https://"
URL prefix on the device name.  The function name is being changed
to SyncDriverIsRemoteFS().

8 years agovm_basic_types.h: scrub FMTxx specifiers
Oliver Kurth [Mon, 26 Feb 2018 20:29:06 +0000 (12:29 -0800)] 
vm_basic_types.h: scrub FMTxx specifiers

Reduce the amount of magic in vm_basic_types.h... nowadays, any
system we support (including Tools) DEFINITELY supports C99-style
specifiers, with two exceptions: pre-vs2015 MSVC, and pre-10.13
macOS kernels.

Rip out all the pre-C99 junk. Add a few comments explaining exactly
what the caveats here are.

8 years agoamazonlinux2-64 should use OVT only, not tar tools linux.iso.
Oliver Kurth [Mon, 26 Feb 2018 20:29:06 +0000 (12:29 -0800)] 
amazonlinux2-64 should use OVT only, not tar tools linux.iso.

8 years agoCommon header file change; not applicable to open-vm-tools.
Oliver Kurth [Mon, 26 Feb 2018 20:29:06 +0000 (12:29 -0800)] 
Common header file change; not applicable to open-vm-tools.

8 years agoChanges to common header files; not applicable to open-vm-tools.
Oliver Kurth [Mon, 26 Feb 2018 20:29:05 +0000 (12:29 -0800)] 
Changes to common header files; not applicable to open-vm-tools.

8 years agoCommon header file change; not applicable to open-vm-tools.
Oliver Kurth [Mon, 26 Feb 2018 20:29:05 +0000 (12:29 -0800)] 
Common header file change; not applicable to open-vm-tools.

8 years agoRemove uses of header file safetime.h
Oliver Kurth [Mon, 26 Feb 2018 20:29:05 +0000 (12:29 -0800)] 
Remove uses of header file safetime.h

- (many places) replace "safetime.h" with <time.h> and/or <sys/stat.h>,
                occasionally re-ordering this header to top of file
- (many places) remove "safetime.h" as no time functions are used

8 years agoCommon header file change; not applicable to open-vm-tools.
Oliver Kurth [Mon, 26 Feb 2018 20:29:04 +0000 (12:29 -0800)] 
Common header file change; not applicable to open-vm-tools.

8 years agoRemove GLIBC_VERSION_NN macros
Oliver Kurth [Mon, 26 Feb 2018 20:29:03 +0000 (12:29 -0800)] 
Remove GLIBC_VERSION_NN macros

No existing usages. Astute observers will note we currently
use glibc-2.5 minimum (so all but one of these macros are ALWAYS
defined).

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:26 +0000 (16:39 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoUse a unique random temp directory for vmtoolsd on Linux.
Oliver Kurth [Thu, 8 Feb 2018 00:39:26 +0000 (16:39 -0800)] 
Use a unique random temp directory for vmtoolsd on Linux.

The temporay directory currently used by vmtoolsd and its plugins
on Linux is of the form /tmp/vmware-<user>.  Since it is used to
upload VMware Tools upgrade and GOS customization scripts and commands,
that name predictability may make it susceptible to attack.  This
change adds a new function File_GetSafeRandomTmpDir() in
bora/lib/file/fileTempPosix.c to both add the PID to the user name
and add a random number suffix to the temp directory path.

/tmp/vmware-<user>_<pid>-nnnnnn

VMware Tools commands and plugins are being updated to use this random
temp directory.

8 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:26 +0000 (16:39 -0800)] 
Changes to common header files not applicable to open-vm-tools.

8 years agoFix two comment typos in hostinfoPosix.c.
Oliver Kurth [Thu, 8 Feb 2018 00:39:26 +0000 (16:39 -0800)] 
Fix two comment typos in hostinfoPosix.c.

8 years agoopen-vm-tools: ignore with/without gtk2/3 options when building without X
Oliver Kurth [Thu, 8 Feb 2018 00:39:26 +0000 (16:39 -0800)] 
open-vm-tools: ignore with/without gtk2/3 options when building without X

When building without X support, we should ignore the options to enable/disable
gtk2 and gtk3. This was reported in gthub issue
https://github.com/vmware/open-vm-tools/issues/228 .

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:26 +0000 (16:39 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:25 +0000 (16:39 -0800)] 
Common header file changes not applicable to open-vm-tools.

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:25 +0000 (16:39 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:25 +0000 (16:39 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoHeader file change not applicable to open-vm-tools.
Oliver Kurth [Thu, 8 Feb 2018 00:39:25 +0000 (16:39 -0800)] 
Header file change not applicable to open-vm-tools.

8 years agofix buffer overrun in AsyncTCPSocketConnect()
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
fix buffer overrun in AsyncTCPSocketConnect()

Callers may pass a struct smaller than sockaddr_storage, but a
sockaddr_storage-sized chunk gets copied to asock->remoteAddr.
memcpy() should be used.

One such caller is AsyncSocket_ConnectUnixDomain(). It passes sockaddr_un.
sizeof(sockaddr_un) == 110, sizeof(sockaddr_storage) == 128.

Caught by AddressSanitizer.

8 years agoopen-vm-tools: use pkg-config for building with icu
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
open-vm-tools: use pkg-config for building with icu

icu uses pkg-config in recent versions, and no longer ships with
icu-config in most recent versions. Make the configure script
use pkg-config for icu if available, and icu-config if not. For
pkg-config we need to specify 'icui18n' which returns the same result
as icu-config did to link with icui18n.

8 years agoIgnore ENXIO errors with SyncDriver
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
Ignore ENXIO errors with SyncDriver

A quiesced snapshot fails when the target VM has a bind mount.  The
problem is that the syncDriver gets an ENXIO error when it tries to
open the mount point.  To fix the problem, let the quiesce operation
skip a mount point when opening it results in an ENXIO error.

This change is based on pull request
https://github.com/vmware/open-vm-tools/pull/218 .

8 years agoRefinement for memory corruption bug fix in StdIO_ReadNextLine
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
Refinement for memory corruption bug fix in StdIO_ReadNextLine

8 years agolib/file: Style clean up in the public file.h
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
lib/file: Style clean up in the public file.h

8 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
Common header file changes not applicable to open-vm-tools.

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoChanges to common header files; not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Changes to common header files; not applicable to open-vm-tools.

8 years agoopen-vm-tools: use ENV{DEVTYPE}=="disk" in udev scsi rule
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
open-vm-tools: use ENV{DEVTYPE}=="disk" in udev scsi rule

Fix udev scsi rule to not print warnings on boot.
The rule now checks for the device type. The previous fix by
trying to check for a valid timeout field did not work as expected.
This change uses the rule from Mike Latimer at
https://github.com/vmware/open-vm-tools/pull/216

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoFix memory corruption bug in StdIO_ReadNextLine
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Fix memory corruption bug in StdIO_ReadNextLine

8 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Common header file changes not applicable to open-vm-tools.

8 years agoCommon header file changes not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Common header file changes not applicable to open-vm-tools.

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Common header file change not directly applicable to open-vm-tools.

8 years agoUpdate copyright year to 2018.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Update copyright year to 2018.

8 years agoUUID: Clean up UUID_PackText
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
UUID: Clean up UUID_PackText

Use size_t, not int.

8 years agoChanges to common header files; not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:39 +0000 (16:32 -0800)] 
Changes to common header files; not applicable to open-vm-tools.

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoguestOS identification: Tweak handling the LSB
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
guestOS identification: Tweak handling the LSB

The multi-standard handing code dealt with the LSB strictly. This
causes some issues with older distros that are not LSB compliant but
happened to work due to a specific behavior.

Return the LSB to "LSB and old way" and provide some specific coverage
of detaults to ensure coverage.

8 years agoRestore "ufs" to the list of known filesystems
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Restore "ufs" to the list of known filesystems

Removing extraneous #ifdef VMX86_TOOLS - #endif

8 years agoRestore "ufs" to the list of known filesystems
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Restore "ufs" to the list of known filesystems

A previous change, 5074636, to remove "ufs" from the kernel also removed
"ufs" from the known list of Linux filesystems.   As a result, the "ufs"
filesystems on FreeBSD and Solaris VMs cannot be seen and therefore
no disk information is available in vmsvc/get.guest output.

8 years agoUpdate tools copyright to 2018
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Update tools copyright to 2018

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoCommon header file change that is not applicable to open-vm-tools.
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Common header file change that is not applicable to open-vm-tools.

8 years agoHgfs Server: replace duplicate function usage with a common function.
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Hgfs Server: replace duplicate function usage with a common function.

This change simply replaces a duplicate function usage with a common
function and removes the duplicate one.

8 years agohostinfoPosix.c: Change a warning to a log message.
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
hostinfoPosix.c: Change a warning to a log message.

8 years agoSwitch IMC to use RpcChannel_SendOne instead of deprecated RpcOut_sendOne
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
Switch IMC to use RpcChannel_SendOne instead of deprecated RpcOut_sendOne

Modify ./libDeployPkg/Makefile.am to build deploypkg module for
open-vm-tools correctlly.

8 years agolib/file: Clean up a few things.
Oliver Kurth [Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)] 
lib/file: Clean up a few things.

8 years agohostinfoPosix.c: Pick up some review comments
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
hostinfoPosix.c: Pick up some review comments

8 years agoGuestOS: Support the os-release standard
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
GuestOS: Support the os-release standard

While bringing up Amazon Linux as a guest, it was discovered that
Amazon Linux was not LSB compilant. The LSB standard defines a way
to uniquely determine which distro one is running on. Since our code
was based on the LSB standard, we made some changes to explicitly
detect Amazon Linux and handle it as a special case.

Amazon let us know that there is a "new" standard - os-release - which
they are compliant with. One must explicitly install Amazon Linux in a
special way to obtain the LSB compliance.

Researching the "new" standard, it turned out to not be that different
than the LSB standard. Further research showed that some distros (e.g.
Ubuntu) are releasing with both standards.

This change refactors the existing code, removes the explicit Amazon
Linux checking, and accepts the os-release standard. Amazon Linux then
"just falls out".

8 years agoReduce Vigor transport socket draining overhead
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
Reduce Vigor transport socket draining overhead

A previous change in VigorPollImpl and asyncsocket to fix a memory
leak that causes a performance regression for parallel reconfiguration of
running VMs (the kind requiring FSR).  During an FSR, the connection
between hostd and the source vmx would drop and hostd would then
reconnect to the destination vmx.  One source of regression is that
the buffer has to be drained when a disconnect happens and the draining
logic may potentially unregister and re-register the recv callback
multiple times.  This change adds an asyncsocket function specifically
for draining recv that reduces the manipulation of callback.  It
reduces the regression by up to ~50% (the effect is more pronounced with
more VMs).

8 years agoatomic: add TestSetBitVector and TestClearBitVector functions
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
atomic: add TestSetBitVector and TestClearBitVector functions

Implement atomic set/clear bit from a byte array.

Also add missing "memory" constraint to non-atomic ClearBitVector()
and ComplementBitVector().

8 years agoTools Hgfs Server Plugin: fix logging of client redirector handling functions
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
Tools Hgfs Server Plugin: fix logging of client redirector handling functions

Modify logging of client redirector handling functions for starting the client
redirector kernel component and reconnecting mapped drives at services start
up. This changes the level from warning to info as these messages are purely
informational and not warnings of unexpected events or conditions.

8 years agoFix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
Fix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true

Fix the logical constant compare warning/error in vixTools.c of the
vix plugin.  Rewrite the continuous for loop to simply iterate from
zero to MAX_INT32.

8 years agoAdd VMware Tools 10.2.5 to vm_tools_version.h
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
Add VMware Tools 10.2.5 to vm_tools_version.h

- Add tools version 10.2.5 as the first scheduled tools 10.2.x
  update - TOOLS_VERSION_CHAINSAW_UPDATE1
- Corrected a typo in a macro name in an earlier tools version
  definition.

8 years agohostinfo: Identify Amazon Linux
Oliver Kurth [Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)] 
hostinfo: Identify Amazon Linux

Amazon Linux is not LSB compliant. Add a small amount of code such that
Amazon Linux can differentiated from all of other Linuxen and correctly
report its identifying data.

8 years agoopen-vm-tools: use ENV{DEVTYPE}=="disk" in udev scsi rule
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
open-vm-tools: use ENV{DEVTYPE}=="disk" in udev scsi rule

8 years agoUpdate copyright year to 2018.
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
Update copyright year to 2018.

10.2.5 will be released in 2018. bora/public/vm_tools_version.h has
been modified since OVT 10.2.0. Update the copyright year
to 2018.

8 years agoRestore "ufs" to the list of known filesystems
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
Restore "ufs" to the list of known filesystems

"ufs" was mistakenly removed from the the list of known filesystems in
vmware tools 10.2.0.   Correct that mistake.

8 years agoFix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
Fix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true

This patch is a slightly modified version of the patch submitted by
Josh Paetzel in pull request:
  https://github.com/vmware/open-vm-tools/pull/221

8 years agoUpdate tools copyright to 2018
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
Update tools copyright to 2018

8 years agoGet rid of convertutf and bsd_printf for all non-Win VMware Tools
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
Get rid of convertutf and bsd_printf for all non-Win VMware Tools

8 years agoSet x11 as backend for gtk3 of open-vm-tools
Oliver Kurth [Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)] 
Set x11 as backend for gtk3 of open-vm-tools

Open-vm-tools defaults to gtk3, if available.  For distros where wayland is
the default display server, plugins will try to use wayland as the backend
of gtk3.  As a result, gdk_display_get_default() returns a wayland display,
and gdk_display_get_default_group() also returns a wayland window.  Then,
applying GDK_WINDOW_XID() on the wayland window will result in crashes.

As x11-specific code is widely used in tools plugins, as a compromized
solution, force plugins to run on XWayland, which is the compatible mode
of wayland for legacy X11 clients.

gdk_set_allowed_backends() only applies when flag GTK3 is defined,
and the gtk version is over 3.10.

8 years agoopen-vm-tools: fix finding C++ compiler for cross-compiling
Oliver Kurth [Tue, 30 Jan 2018 00:52:18 +0000 (16:52 -0800)] 
open-vm-tools: fix finding C++ compiler for cross-compiling

Patch contributed by Andrew Stormont (andy-js) on github:
 https://github.com/vmware/open-vm-tools/pull/206 and
 https://github.com/vmware/open-vm-tools/issues/92.

8 years agoGuestInfo: skip check for shrinkable disk when gathering disk info
Oliver Kurth [Tue, 30 Jan 2018 00:52:18 +0000 (16:52 -0800)] 
GuestInfo: skip check for shrinkable disk when gathering disk info

8 years agoChange the glibc constraint to 2.11 from 2.12.
Oliver Kurth [Tue, 30 Jan 2018 00:52:18 +0000 (16:52 -0800)] 
Change the glibc constraint to 2.11 from 2.12.

Earlier, a change was made to stop building open-vm-tools
for LINUX systems with glibc < 2.12 But SLES 11 SP4 which is
supported comes with glibc 2.11.3 The check will
block SLES 11 SP4 from moving to OVT 10.2.x To fix it, this change
relaxes the glibc constraint to 2.11.

8 years agoBump tools version to 10.2.5 on the vmtools-prod-cpd branch
Oliver Kurth [Tue, 30 Jan 2018 00:52:18 +0000 (16:52 -0800)] 
Bump tools version to 10.2.5 on the vmtools-prod-cpd branch

Set the version for VMware Tools 10.2.x, Update 1 to 10.2.5.
This bump is to allow versions numbers for hot patches which may
be issued before the update is GA.

8 years agoSet X11 as the backend for gtk3 of open-vm-tools
Oliver Kurth [Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)] 
Set X11 as the backend for gtk3 of open-vm-tools

Open-vm-tools defaults to gtk3.  For distros like Fedora 27, Wayland is
the default display server.  With no restriction on the backend, plugins
will try to use Wayland as the backend of Gtk+3.  As a result,
gdk_display_get_default() returns a Wayland display;
gdk_display_get_default_group() also returns a Wayland window.  Applying
GDK_WINDOW_XID() on the Wayland window will result in the crash reported
on recent Linux releases that default to a Wayland display server.

As X11-specific code is widely used in tools plugins, a migratation to
Wayland in the short term is not possible.  So, as a compromised solution,
plugins can be forced to run on XWayland, which is the compatible mode
of Wayland for legacy X11 clients.

gdk_set_allowed_backends() only applies when flag GTK3 is defined, and Gtk
version cwgreater than 3.10.

8 years agohostinfo: More cleanup
Oliver Kurth [Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)] 
hostinfo: More cleanup

Continue the prep for Amazon Linux.

8 years agohostinfo: More prep work for Amazon Linux support
Oliver Kurth [Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)] 
hostinfo: More prep work for Amazon Linux support

Amazon Linux is not LSB compliant but it does have a file that is
much like an LSB compliant release (name=value pairs). Make the names
of the structures generic... the logic can be reused for Amazon Linux
in a follow up change.

Fix up some function headers.

8 years agoRefactor HostinfoOSData...
Oliver Kurth [Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)] 
Refactor HostinfoOSData...

Refactor the HostinfoOsData in several smaller and simpler routines.
This will make it easier to maintain in the future (it was pretty
unwieldy already) and easier to add the logic for a non-LSB Linux.

More refactoring and actually adding the Amazon recognition code will
follow.

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoChanges to common source files:
Oliver Kurth [Fri, 26 Jan 2018 23:04:35 +0000 (15:04 -0800)] 
Changes to common source files:

lib/asyncsocket/asyncsocket.c: Use ASSERT instead of VERIFY when removings
                               poll callback in AsyncSocketCancelRecv.
lib/include/vm_product_versions.h: Change not applicable to open-vm-tools.

8 years agoChange the glibc constraint to 2.11 from 2.12.
Oliver Kurth [Fri, 26 Jan 2018 23:04:35 +0000 (15:04 -0800)] 
Change the glibc constraint to 2.11 from 2.12.

Earlier, we made a change to stop building open-vm-tools
for LINUX systems with glibc < 2.12 But SLES 11 SP4 which is
supported comes with glibc 2.11.3 The check will
block SLES 11 SP4 from moving to OVT 10.2.x To fix it, this change
relaxes the glibc constraint to 2.11.

8 years agoHgfs: remove Hgfs VMCI transport header from linux open-vm-tools
Oliver Kurth [Fri, 26 Jan 2018 23:04:35 +0000 (15:04 -0800)] 
Hgfs: remove Hgfs VMCI transport header from linux open-vm-tools

Linux Hgfs clients do not use the VMCI module for a transport and have
since migrated to a FUSE implementation. Therefore we do not need to
include the Hgfs VMCI transport header file.

8 years agoHgfs Server: fix error result for new dir creation in the virtual folder
Oliver Kurth [Fri, 26 Jan 2018 23:04:35 +0000 (15:04 -0800)] 
Hgfs Server: fix error result for new dir creation in the virtual folder

The Hgfs server code detects when a client tries to create a new folder in the
virtual folder containing the VMware Shares. This is not allowed as only the
host can add new Shares which appears in this folder. The current error code
returned to the client in these cases is access denied. This is only correct
when the new folder does not collide with an existing share. This stops clients
treating the virtual folder as a regular read/write physical folder. However,
for the case where the name collides, the access denied error is not correct,
as it does not tell the client the folder already exists. This causes some
applications to fail as they expect to see this error if the path component
exists as that is okay and expected. At this point the application will continue
to traverse the path and ensure the next component exists or if not create that.

To ensure that applications don't prematurely fail and can test that the share
still exists in the path the Hgfs server should return HGFS_ERROR_FILE_EXIST
and leave HGFS_ERROR_ACCESS_DENIED for all other cases.

8 years agoHgfs: get rid of vmware_pack_begin and vmware_pack_end header files
Oliver Kurth [Fri, 26 Jan 2018 23:04:35 +0000 (15:04 -0800)] 
Hgfs: get rid of vmware_pack_begin and vmware_pack_end header files

Get rid of vmware_pack_begin and vmware_pack_end header files and
replace with the pragma pack and pop.  This code currently only
affects Windows clients and the VMX HGFS VMCI transport.

8 years agoGOSTable: Amazon Linux 2
Oliver Kurth [Fri, 26 Jan 2018 23:04:35 +0000 (15:04 -0800)] 
GOSTable: Amazon Linux 2

Add the basic support for Amazon Linux 2. The distro identification
code will follow in a separate change.

8 years agoeven out remaining differences from stable-10.2.x
Oliver Kurth [Mon, 8 Jan 2018 21:05:27 +0000 (13:05 -0800)] 
even out remaining differences from stable-10.2.x

8 years agomerge -X theirs stable-10.2.x, remove files that were deleted in stable-10.2.x
Oliver Kurth [Mon, 8 Jan 2018 20:53:58 +0000 (12:53 -0800)] 
merge -X theirs stable-10.2.x, remove files that were deleted in stable-10.2.x

8 years agoChanges to common header files not applicable to open-vm-tools
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Changes to common header files not applicable to open-vm-tools

8 years agoCommon header file change not applicable to open-vm-tools
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Common header file change not applicable to open-vm-tools

8 years agoCommon header file change not applicable to open-vm-tools
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Common header file change not applicable to open-vm-tools

8 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Common header file change not applicable to open-vm-tools.

8 years agoGet rid of convertutf and bsd_printf for all non-Win VMware Tools
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Get rid of convertutf and bsd_printf for all non-Win VMware Tools

The MsgFmt_* functions are referenced in a few utilities
related to VMware Tools. This change replaces the MsgFmt_*
with a stub. This also affects the Windows version.

8 years agoFix the SSL/AsyncSocket "SSL_shutdown:shutdown while in init" problem
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Fix the SSL/AsyncSocket "SSL_shutdown:shutdown while in init" problem

QE regression tests have caught a bug in the bora SSL/AsyncSocket
layer. A normal SSL connection could be abnormally terminated by some
other random connections.

Seems a common bug of the SSL usage according to the link below.
VMware is not the first one to hit it. :-)
https://marc.info/?l=openssl-users&w=4&r=1&s=shutdown+while+in+init&q=b

The cause is that the SSL error queue was not cleared before
calling the SSL IO functions like SSL_write,read,connect,accept.
Refer to the man page of SSL_get_error, Paragraph 2 of the Description.
Fixed the problem by adding addtional call to clear the error queue.

Found another problem that the system error is not preserved between
where it is set after the SSL IO call and the use of it to determine
whether to retry the SSL IO. This is probably due to tools has its
own logging which does not preserve the system error number.
Fixed the logging.

8 years agovm_basic_types.h: use stdint.h a little more.
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
vm_basic_types.h: use stdint.h a little more.

Now that enough of the builds are C++11, let's make the common case
use the <stdint.h> header to define the intNN types directly
from language-standard intNN_t types, and treat pre-C99/C++98
code as the special case.

This also provides some clarity about the last __STRICT_ANSI__
macros in this file.  One was related to usage of 'long long' in
strict c90 mode and has been replaced with a comment indicating that
64-bit-variable compiler extensions are mandatory (strict c90 mode is
not allowed via the headers).  The other related to X11 headers; those
headers have been examined to understand the workarounds needed and
the exact scenario(s) that are problematic have been commented (turns
out FreeBSD had nothing to do with the problem).

Finally, all the Bool-related definitions have been moved and merged
to a single location NOT at the top of the file.

Net effects of this change:
- non-linux C++11 (so Windows+Mac) now uses stdint.h
- exact set of macros involved in declaring Bool is reduced
- compiling with c90 mode really will break now (use gnu90 instead).

8 years agoConsume vmx headear files in bora tree instead of gosc's own copy
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Consume vmx headear files in bora tree instead of gosc's own copy

1. Consuming header files from bora/vmx instead of gosc/vmx
2. Deprecated "gosc/vmx/public/toolsdDeployPkg.h",
use "bora/guestABI/include/vmware/guestrpc/deploypkg.h" instead.
Combined macro definition to the new header file and modified
reference accordingly.
3. Modified makefile for open-vm-tools to consume new header file,
removed old header file staging in open-vm-tools.stage

8 years agoCommon header file change not applicable to open-vm-tools
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Common header file change  not applicable to open-vm-tools

8 years agoRemove some __STRICT_ANSI__ guards in vm_basic_types.h
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
Remove some __STRICT_ANSI__ guards in vm_basic_types.h

Some time in the distant past, these guards were needed to
work around... something. (Probably, it was that 'long long'
is not a valid type in strict c90 mode). Note that we don't
use c90 mode, we only use gnu90 or c99.

This ends up being relevant because for C++ we are indeed
using -std=c++11 (which implies __STRICT_ANSI__). The Linux/C++
section of this file thus had duplicate definitions (which I am
now removing) to work around the gap.

Quick cheat sheet for -std= values:
- c90 := __STRICT_ANSI__, no long long type
- gnu90 := c90 + gcc extensions, has long long type
- c99 := __STRICT_ANSI__, has long long type (defined in c99)
- c++11 := __STRICT_ANSI__, has long long type (defined in C++11)

8 years agoopen-vm-tools: fix finding C++ compiler for cross-compiling
Oliver Kurth [Fri, 5 Jan 2018 22:47:15 +0000 (14:47 -0800)] 
open-vm-tools: fix finding C++ compiler for cross-compiling

Patch contributed by Andrew Stormont (andy-js) on github:
https://github.com/vmware/open-vm-tools/pull/206 and
https://github.com/vmware/open-vm-tools/issues/92.

8 years agoAllow copying of object policy within the same container
Oliver Kurth [Fri, 5 Jan 2018 22:47:14 +0000 (14:47 -0800)] 
Allow copying of object policy within the same container

ObjLib_CloneExtParams is currently not allowing copying of policy from
parent to child/clone object on VSAN. This is because the copy policy
check is based on unique filesystem ID, which will be different for
parent and child on VSAN because they will mostly be created on same
container but different namespace. This change uses VCFS root instead
of namespace UUID to make the comparison on VSAN.

Bonus fix: File_FullPath is now fixed to work for any combination of
ancestor path being present. Currently it only works if either the
given path exists, or when only the last component of the path does
not exist. And since this fix relies on finding the VCFS root of both
parent and child (parent is present but child is not),
ObjLibPathToVCFSRoot has been modified to rely on File_FullPath  in
addition to Util_GetCanonicalPath if the path does not exist.

8 years agoCorrection to previous change for Solaris11_64 GOS.
Oliver Kurth [Fri, 5 Jan 2018 22:47:14 +0000 (14:47 -0800)] 
Correction to previous change for Solaris11_64 GOS.

8 years agoProperly classify Solaris 11-64 as 64-bit
Oliver Kurth [Fri, 5 Jan 2018 22:47:14 +0000 (14:47 -0800)] 
Properly classify Solaris 11-64 as 64-bit

8 years agoAdd FreeBSD 10.x and later releases to the list of operating systems with open-vm...
johnwvmw [Thu, 21 Dec 2017 23:25:08 +0000 (18:25 -0500)] 
Add FreeBSD 10.x and later releases to the list of operating systems with open-vm-tools.

8 years agoupdate release notes for 10.2.0 10.2.x stable-10.2.0
Oliver Kurth [Fri, 15 Dec 2017 21:11:02 +0000 (13:11 -0800)] 
update release notes for 10.2.0

8 years agoupdate ChangeLog from 'git log'
Oliver Kurth [Fri, 15 Dec 2017 18:24:05 +0000 (10:24 -0800)] 
update ChangeLog from 'git log'

8 years agoupdate build number
Oliver Kurth [Thu, 14 Dec 2017 21:46:57 +0000 (13:46 -0800)] 
update build number