]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
8 years agolib/lock: MXUser syndrome bits problem
Oliver Kurth [Fri, 15 Sep 2017 18:23:06 +0000 (11:23 -0700)] 
lib/lock: MXUser syndrome bits problem

For UWP use GetTickCount64 (since GetTickCount is gone).
Unfortunately, the lock library needs to run on Win2K
which doesn't have GetTickCount64.

An ifdef restores the non-UWP environment.

8 years agoChange to shared header file unrelated to open-vm-tools
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Change to shared header file unrelated to open-vm-tools

8 years agoAdd xmlsec1 to open-vm-tools
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Add xmlsec1 to open-vm-tools

Add the new files to open vm tools and add a switch to
turn it on.  xml-seccurity-c remains the default for
now.

Also clean up the service Makefile, which was using
the client lib (which also dragged in stuff it shouldn't have)
for common code instead of building it in.

8 years agoUpdating glib and dependent libraries for CAF to latest version
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Updating glib and dependent libraries for CAF to latest version

Update glib libiconv, pcre, zlib and libffi.

8 years agoRemove libproc linking and packaging (it's dead since v9.10.5).
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Remove libproc linking and packaging (it's dead since v9.10.5).

procps/libproc dependency was killed in Tools v9.10.5.  Clean
this up and remove the unnecessary linking and packaging of
libproc that's no longer needed. All references from Tar Tools,
OSPs and open-vm-tools are removed.  vm_procps.h was being used
for libproc only, so get rid of that, too.

8 years agoMake headers C++-friendly
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Make headers C++-friendly

Add `extern "C"` blocks to various header files.

8 years agoRemove Hostinfo_CPUCounts (hosted)
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Remove Hostinfo_CPUCounts (hosted)

The Hostinfo_CPUCounts function has an unhappy history
where not all OSes (especially Mac) make it easy to
discover the CPU topology.

There is a good reason for this: the CPU topology generally
does not matter. In fact, it does not matter for us.
So let's remove this enumeration code and instead report
a single CPU package with nCores == nThreads == what the
host OS claims.  (Especially as the host OS does not really
expose cores versus threads information...). Then rip out
the underlying functions, all the way down.

8 years agoReturn default value in case of NULL key instead of ASSERTing.
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
Return default value in case of NULL key instead of ASSERTing.

The configKey is NULL for NullProvider, so VMTools_ConfigGetBoolean
should return default value if any of the input args is NULL.

8 years agoMore C++ goodness
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
More C++ goodness

err.h: Includes before C++

Fix this file.

8 years agoMore C++ goodness
Oliver Kurth [Fri, 15 Sep 2017 18:23:05 +0000 (11:23 -0700)] 
More C++ goodness

C++ after the includes

8 years agoMore C++ goodness
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
More C++ goodness

8 years agoBackout update of glib and dependent libraries for CAF to latest version
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
Backout update of glib and dependent libraries for CAF to latest version

8 years agoMore C++ goodness
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
More C++ goodness

Messed up a file, fix the build.

8 years agoC++ goodness continues
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
C++ goodness continues

8 years agoMore C++ goodness
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
More C++ goodness

Add extern "C" to header files.

8 years agoMore C++ happiness
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
More C++ happiness

Add extern "C" to header files.

8 years agoUpdate guest_os_tables.h for darwinPre15.iso for Mac OS < 10.11.
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
Update guest_os_tables.h for darwinPre15.iso for Mac OS < 10.11.

8 years agoUpdate bsdfmt.h license
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
Update bsdfmt.h license

2016 now

8 years agoDo schema validation with xmlsec1 in vgauth
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
Do schema validation with xmlsec1 in vgauth

Add schema validation for xmlsec1 based SAML verification.

8 years agoFix pointer inequality comparison against NULL.
Oliver Kurth [Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)] 
Fix pointer inequality comparison against NULL.

A pointer is being tested for whether it's less than 0.  Check
for equality with NULL instead.

8 years agoChange to shared header file unrelated to open-vm-tools
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
Change to shared header file unrelated to open-vm-tools

8 years agoTools 10.1 translations
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
Tools 10.1 translations

8 years agoUpdate glib and dependent libraries for CAF to latest version
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
Update glib and dependent libraries for CAF to latest version

8 years agoFixes to get vmnet to build on 4.7 kernel
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
Fixes to get vmnet to build on 4.7 kernel

4.7 kernels removed dev->trans_start, instead there is
wrapper called netif_trans_update().

8 years agoThe lib/AsyncSocket layer on supports SSL_Accept() and the certificate file
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
The lib/AsyncSocket layer on supports SSL_Accept() and the certificate file
is reloaded every time a connection is accepted by calling SSL_Accept().
Add support for an SSL_AcceptWithContext to allow cahing of the SSL context
and avoid loading the certificate file every time.
  modified: lib/asyncsocket/asyncsocket.c, lib/asyncsocket/asyncSocketInt.h
            lib/asyncsocket/asyncSocketInterface.c, lib/include/asyncsocket.h

Common header file change: not applicable to open-vm-tools.

8 years agoDynbuf: Improve documentation
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
Dynbuf: Improve documentation

InitWithMemory is a better name. Improve the init function descriptions.

8 years agoThaw/resume guest file system when VMX aborts the operation.
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
Thaw/resume guest file system when VMX aborts the operation.

When the operation is aborted by VMX after quiescing the
guest, we need to thaw/resume the guest.

In response to VMX message "vmbackup.abort", when guest sends
"vmbackup.eventSet req.aborted 4 Quiesce aborted." message,
it receives "Unknown command" response because VMX side RPC
handler for vmbackup event is removed before guest gets a chance
to respond. That is the behavior without this fix.
With this fix, in addition to the message above the new message
"vmbackup.eventSet req.done" added by this fix also receives
"Unknown command" response. We can fix these by keeping the RPC
handler for longer, but its not worth it because the operation
is being aborted anyway and vmbackup code in the guest is able
to tolerate these errors.

8 years agocommon version: use disable-tools-version for old hosts only
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
common version: use disable-tools-version for old hosts only

Use disable-tools-version for old hosts only, and add a
hide-tools-version flag. Set disable-tools-version to "true"
again for OSPs.

8 years agoDynBuf: Start smaller
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
DynBuf: Start smaller

DynBuf operations are mostly concerned with strings - and most strings
are less than 128 bytes long. Shorten the initial allocation.

8 years agodictionary: Limit line data growth
Oliver Kurth [Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)] 
dictionary: Limit line data growth

The dictionary code keeps the raw input line around. Since the length
of the line is unknown at parsing time, a DynBuf is used to allocate
the memory for the line.

The DynBuf initial allocation is large - 1K - and this wastes space
when lines are rarely over 64 bytes long. The fix is to have the
dictionary code preallocate a 64 byte buffer before allowing appends
to the DynBuf. This will prevent many time consuming and memory
fragmenting realloc operations.

8 years agoSplit FreeBSD in the GOSTable
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Split FreeBSD in the GOSTable

Split FreeBSD into freeBSD (old) and freeBSD11 (going forward).
This is to cover driver differences.

8 years agoHgfs Server: write op move argument checks security fixes
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Hgfs Server: write op move argument checks security fixes

Complete the argument verifications in the common code adding the
missing checks for the write request packet size checks and the
write request data size (separated from the request itself as
in V4 of the HGFS protocol).  This will now catch any attempts
from a client to pass a write request containing a data size
argument for the data to write that is greater than the amount
of data in the HGFS packet or data buffer passed.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoChanges to shared header file unrelated to open-vm-tools
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Changes to shared header file unrelated to open-vm-tools

8 years agoHgfs Server: write op move argument checks security fixes
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Hgfs Server: write op move argument checks security fixes

Consolidate the argument verifications to the common code as these
are often duplicated. This will now explicitly perform the Hgfs write
operation argument verification in the common handler before calling
the platform specific code to actually perform the write.

8 years agoFix some memory leaks in vgauth
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Fix some memory leaks in vgauth

8 years agoChange to shared header file unrelated to open-vm-tools
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Change to shared header file unrelated to open-vm-tools

8 years agoUpdate tools version to 10.0.12 on the frozen tools branch.
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Update tools version to 10.0.12 on the frozen tools branch.

8 years agoHgfs Server: add write op arg basic validate write op for security fixes
Oliver Kurth [Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)] 
Hgfs Server: add write op arg basic validate write op for security fixes

Add the basic write operation argument validation routine to obtain the data
sizes of the request and data to write for the supported HGFS protocol versions
(1 through 4). Add a call to it from the main write operation handler.

Note the argument validation checks will be added in the next change and moved
from the platform specific routines.

8 years agoRevert previous change.
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
Revert previous change.

8 years agoChanges to shared headers files unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
Changes to shared headers files unrelated to open-vm-tools.

8 years agoGuest DNDCP: Remove unused private variables.
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
Guest DNDCP: Remove unused private variables.

Updating the mac tools to build with clang found some unused private
variables in the DNDCP classes.

8 years agoTools RPC: Fix XDR invocation on mac and an uninitialized variable.
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
Tools RPC: Fix XDR invocation on mac and an uninitialized variable.

Switchng mac tools to clang found these two:

1. Uninitialized variable in rpcin.c: clang's static analyzer seems
to have had trouble figuring out that it is impossible for execution
to reach the "if (status == FALSE) {" line without being set.
To appease it, initialize it to FALSE.

2. xdrproc_t: On many platforms, xdrproc_t is an unprototyped function
pointer that can take either 2 or 3 arguments. Apple changed their
implementation to always take 3 arguments and recommend replacing calls
with 2 arguments to add a 0 3rd argument.

8 years agoCAF changes to prevent NamespaceDB frequent polling.
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
CAF changes to prevent NamespaceDB frequent polling.

8 years agoThe vthreadBase library was not designed to be unloaded and simply leaks
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
The vthreadBase library was not designed to be unloaded and simply leaks
the TLS keys it creates.  Since plugins statically link it, loading and
unloading may hit the OS limit.  This fix adds a hook into vthreadBase to
delete the TLS keys at plugin unload time.

8 years agoHgfs Server: write ops clean up for security fixes
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
Hgfs Server: write ops clean up for security fixes

Very minor write ops clean up for security fixes which renames
the arguments and local variables to be more consistent.

This is in preparation for moving some of the common argument
checks into a common routine and enhancing the checks to verify
the write data size and buffer.

8 years agoRequire rabbitmq >= 0.8 when building with caf enabled
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
Require rabbitmq >= 0.8 when building with caf enabled

caf requires rabbitmq >= 0.8, so check for this version in the
configure script.

8 years agoXP cleanout: remove pre-Vista code.
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
XP cleanout: remove pre-Vista code.

We now require Vista or later.  The CondVar APIs are
unconditionally available.

8 years agoFile rename to prep for new xmlsecurity
Oliver Kurth [Fri, 15 Sep 2017 18:23:01 +0000 (11:23 -0700)] 
File rename to prep for new xmlsecurity

Rename the xml-security-c version of saml verification as a step
towards also supporting xmlsec1.

8 years agoTools RpcIn: fix an assert triggered by a race condition
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Tools RpcIn: fix an assert triggered by a race condition

RpcIn open channel asserts that the current channel is NULL. This was being
triggered under stress testing.  The guest tools service ran slowly, so
the VMX timed out and reset the channel. This caused the tools service
to do a channel check reset and which then called the RpcChannelRestart to
stop and start the channel again. Unfortunately, this call modified the
channel global without synchronizing with the other threads sending RPCs.
DiskWipe plugin was in the middle of a RpcChannel_Send (with the lock
acquired) when the restart call ran concurrently.

To fix this issue the RpcChannelRestart now acquires the same channel lock
to around the channel stop and start calls so that all sending threads wait
or complete first.

8 years agoRevert previous change.
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Revert previous change.

Missed updating the OVT build.

8 years agoFile rename to prep for new xmlsecurity
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
File rename to prep for new xmlsecurity

Rename the xml-security-c version of saml verification as a step
towards also supporting xmlsec1.

8 years agoHgfs Server: more minor clean up of write operations
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Hgfs Server: more minor clean up of write operations

More clean up in preparation for write operation security fixes.

8 years agoUpdate Tools ISO mapping in guest_os_tables.h
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Update Tools ISO mapping in guest_os_tables.h

Update Tools ISO mapping in guest_os_tables.h for potentially
old/unsupported Linux distros.

Use frozen ISO linuxPreGlibc25.iso for:

 1. "otherlinux" because it usually refers to unidentified old Linux
     distros. We have "other26xlinux" and "other3xlinux" for newer
     versions.
 2. "sles" and "suse" because these refer to unidentified old SuSE.
 3. "redhat" because it refers to unidentified old Red Hat versions.
 4. "turbolinux" because it is not under active development.

8 years agoUpdate vm_tools_version.h with tools versions 10.0.8 and 10.0.9
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Update vm_tools_version.h with tools versions 10.0.8 and 10.0.9

8 years agoCommon header file change; not directly applicable to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Common header file change; not directly applicable to open-vm-tools.

8 years agoHgfs Server: minor clean up of request header size
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Hgfs Server: minor clean up of request header size

Consistently use the correct function for determining the header size for
the HGFS packet to be used. This is necessary due to the different protocol
versions that exist, and originally the request and reply contained different
protocol headers.

8 years agoChange "OS X" to "macOS" in the GOSTable.
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Change "OS X" to "macOS" in the GOSTable.

Apple rebranded, so react accordingly.  Also fix a misspelled message.

8 years agoFix indentation in lib/misc
Oliver Kurth [Fri, 15 Sep 2017 18:23:00 +0000 (11:23 -0700)] 
Fix indentation in lib/misc

8 years agoTLS 1.2 changes for common-agent
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
TLS 1.2 changes for common-agent

8 years agoCommon header file change; not applicable to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Common header file change; not applicable to open-vm-tools.

8 years agoLinux drivers: get_user_pages API changed to get_user_pages_remote.
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Linux drivers: get_user_pages API changed to get_user_pages_remote.

Linux 4.6.1 introduces a new get_user_pages_remote() which is a
replacement for when get_user_pages() is called.  Still use 'newer'
get_user_pages but with less args.

8 years agoReapply ICU change.
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Reapply ICU change.

Atomic_Bool isn't implemented for ARM32, but Atomic_Int is,
so use that instead.

8 years agoRevert previous change.
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Revert previous change.

8 years agoApply various ICU patches between ICU 4.4.1 and 57.1
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Apply various ICU patches between ICU 4.4.1 and 57.1

Parts of ICU 3.8 and 4.4.1 are included in bora/lib/unicode.
ICU is now at version 57.1 (which would have been 5.7.1 in
its old version numbering scheme) and has had some
security-related patches during that time.

Directly updating the ICU bits in bora/lib/unicode with the
corresponding bits from ICU 57.1 no longer seems feasible
because the ICU code has made increasing use of C++
(including C++11), which is something that we'd like to avoid
in widely shared libraries like lib/unicode and lib/misc.

Picked out a handful of fixes (particularly security-relevant
changes) that are applicable to our forked copy:

* r28300: ticket:7783: error checking in U16_GET()
* r29214: ticket:8238: Implement max subpart policy for UTF7
    toUnicode, don't consume valid bytes after err
* r30175: ticket:8569: Terminate the UTF-7 byte buffer with
    MINUS when flushing
* r30326: ticket:8265: Fix race (=> U_FILE_ACCESS_ERROR) when
    loading full set of ICU data
* r31914: ticket:8235: do not call memcpy()/memmove()/...
    with a NULL/invalid source pointer
* r31948: ticket:9340: Use bit mask instead of cast to avoid
    buffer overflow
* r32021: ticket:9340: Fix potential out of bound error in
    ICU4C ISCII converter
* r32041: ticket:9432: fix value of UDATA_FILE_ACCESS_COUNT
* r32242: ticket:9481 : handled segmentation fault issue with
    uenum_next
* r32529: ticket:9601: from-UTF-8 m:n conversion: properly
    revert to pivoting for m:n matching
* r32574: ticket:9398: avoid use of utf8_countTrailBytes[],
    rewrite/optimize U8_COUNT_TRAIL_BYTES() &
    U8_NEXT_UNSAFE(), test _UNSAFE macros only with
    (mostly) well-formed UTF-8 text
* r32907: ticket:9687: Propagate the ambiguous alias warning
    when opening converter
* r37670: ticket:11776 Thread safety fixes in data loading.
* r37889: ticket:11765: fix utrans_stripRules() source
    overruns from a comment or an escape at the end of
    the source string; make U8_SET_CP_LIMIT() work with
    index after NUL terminator, consistent with
    U16_SET_CP_LIMIT(), although strictly speaking this
    behavior is undefined
* r38086: ticket:11979: Fix max char size for iso-2022-kr in
    icu4c
* r38185: ticket:12015: Update the array size to avoid buffer
    overflow

Diffs for the ICU changes (with associated links to their
tickets) can be found at:

  http://bugs.icu-project.org/trac/changeset/REVISION

where REVISION is the corresponding numeric value.

Notes:

* r32907 makes a slight change to ucnv_open's return value
  and isn't strictly necessary, but is included as a matter
  of correctness and because we would eventually need to
  handle the new behavior anyway.  Changed sites that
  checked directly against U_ZERO_ERROR to use
  U_SUCCESS/U_FAILURE instead.

* Included r30326 and r37670 (which both involve race
  conditions when loading ICU data), but we do not execute
  those code paths.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoExtend AsyncSocket code to handle a "network unreachable" error on a Linux
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Extend AsyncSocket code to handle a "network unreachable" error on a Linux
connect() system call.
  modified: lib/asyncsocket/asyncSocketInt.h, lib/asyncsocket/asyncWebSocket.c,
            lib/asyncsocket/asyncsocket.c, lib/include/asyncsocket.h,

Changes to common header files; not applicable to open-vm-tools.

Reorder the includes in services/plugins/dndcp/xutils/xutils.cc to build
with Gtk+ 3.x at a later date.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoAdd support for gtk3
Oliver Kurth [Fri, 15 Sep 2017 18:22:59 +0000 (11:22 -0700)] 
Add support for gtk3

Changes to support building open-vm-tools with gtk3.

#ifdef statements have been added for conditional compiling for GTK2/GTK3.

8 years agoChange to header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Change to header file unrelated to open-vm-tools.

8 years agoStop building Linux kernel drivers by default in open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Stop building Linux kernel drivers by default in open-vm-tools.

All drivers have been upstreamed as of Linux kernel version 3.9,
so inhibit building them starting with kernel version 4.0.
Users can specify they want kernel modules by invoking configure
with "--with-kernel-modules".

Note one aspect of AC_WITH_ARGS that is not obvious is that specifying
--with-kernel-modules will automatically set with_kernel_modules=yes,
while specifying --without-kernel-modules will set it to no.

8 years agoHgfs Win Client: fix upgrade of driver by changing the Hgfs install settings
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Hgfs Win Client: fix upgrade of driver by changing the Hgfs install settings

Some upgrades of the vmhgfs driver are requiring an additional
reboot even after the initial reboot. The Difx APIs replace the
driver with the new one on reboot, but after the old one is loaded.
This means that after the reboot everything looks good on the surface
but the old driver is running and not even on the disk at that point.
To mitigate this we can change the driver start type and fix missed
install settings both of which makes the HGFS driver compatible with
the rest of the Windows redirectors.

Perform to system registry changes to the vmhgfs driver service:
- set the HGFS driver dependent on the MUP component which it is anyway.
- set the driver start type to be demand start and not a standard system driver.

This makes that the vmtools system service responsible for starting the
Shared Folders client driver. This is again more compatible with the
Windows redirector model.

8 years agoHgfs Win Client: prevent Windows upgrades breaking HGFS
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Hgfs Win Client: prevent Windows upgrades breaking HGFS

When Windows 10 performs system upgrades it breaks HGFS by
removing our registry entry in the network provider list.

When the client driver is loaded, it checks the entry and
sets it accordingly.

8 years agoFix crashes in vgauth SAML verification
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Fix crashes in vgauth SAML verification

The reference checker doesn't sanity check that
a URI is set before trying to work on it.

8 years agoCheck for a valid shell in pam configuration
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Check for a valid shell in pam configuration

When a program is run in a VM using vmrun from the host, the user account
is not checked for a valid shell. This changes adds this to the pam
configuration for vmtoolsd.

Note that /sbin/nologin is a valid shell in CentOS and RHEL, but
not in Ubuntu. Valid shells are those that are listed in /etc/shells.

8 years agoChange to header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Change to header file unrelated to open-vm-tools.

8 years agoRemove work-around for AMD Rev F Erratum 147.
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Remove work-around for AMD Rev F Erratum 147.
   modified: vm_atomic.h, lib/misc/hashTable.c, lib/misc/Makefile.am,
             lib/misc/vtheadBase.c, libvmtools/vmtools.c
   deleted:  lib/misc/atomic.c

8 years agoChange to header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:58 +0000 (11:22 -0700)] 
Change to header file unrelated to open-vm-tools.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoMake Vsock RPC code handle the ECONNRESET
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Make Vsock RPC code handle the ECONNRESET

VMX might delay releasing a vsock when the client side closes
the end point first.  This makes a later client vsock connect
attempt fail with ECONNRESET using the same source port as the
closed one.  Note that the client binds OK on the reused source
port, since the client side has released the socket on that port.

Rewrote the connect code as to clarify it. Explicitly separated
the retry logic.  Added code to return the system errno, and
added additional information about which socket API call failed.

8 years agoHgfs Fuse Client: fix attribute caching from hardcoded 5 seconds
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Hgfs Fuse Client: fix attribute caching from hardcoded 5 seconds

The default attribute caching of 5 seconds is too long and is not
cleared by modifications to the file. This leaves users' applications
receiving stale attribute information for a file which can cause
applications to crash.

Set the default setting for the cache timeout to 1 so that corresponds
to the same as the kernel client.

Fix the rename that purges the cache of stale attribute data for the
target of the rename.

8 years agoCommon header file change; no applicable to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Common header file change; no applicable to open-vm-tools.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoRevert previous change.
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Revert previous change.

8 years agoMake Vsock RPC code handle the ECONNRESET
Oliver Kurth [Fri, 15 Sep 2017 18:22:57 +0000 (11:22 -0700)] 
Make Vsock RPC code handle the ECONNRESET

VMX might delay releasing a vsock when the client side closes
the end point first.  This makes a later client vsock connect
attempt fail with ECONNRESET using the same source port as the
closed one.  Note that the client binds OK on the reused source
port, since the client side has released the socket on that port.

Rewrote the connect code as to clarify it. Explicitly separated
the retry logic.  Added code to return the system errno, and
added additional information about which socket API call failed.

8 years agofileIOPosix.c: Add new function FileIO_CreateRetry().
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
fileIOPosix.c: Add new function FileIO_CreateRetry().
fileIO.h: Add new function FileIO_CreateRetry().
config.h: Add new function Config_TriToBool().
hostinfo.h: Add new function Hostinfo_EnumerateAllProcessPids().
hostname.c: Allow hostname to be UTF8.
posixPosix.c: Using __GLIBC__ define to control use of euidaccess().
vmxnet3_defs.h: Update the coalescing configuration through the guest OS.
                Bump the Tx Data Desc Max Size to 2048.

The drag-n-drop plugin clipboard updated to allow the clipboard size to be adjusted by the consumer via new CPClipboard_InitWithSize() function.

Common source and header file changes that are not applicable to open-vm-tools.

8 years agoDump gErr on regex failures
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Dump gErr on regex failures

With pcre moving outside glib, there are new errors, such as pcre
not being built with UTF-8 support, that can be caught here.

8 years agoFix HGFS mount call to create mount point
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Fix HGFS mount call to create mount point

For FUSE clients and open-vm-tools installations the package
might not create the shared folders mount point. The only reliable
way to ensure that we have one is to create it ourselves.
This seems okay to do since it is a hardcoded path and has always
been set to this same path without any regard for configuration by
users, although that may change in later change sets.

This also ensures if a user has inadvertently deleted the mount
point after installing tools and before enabling the Shared Folders
feature the mount will be robust enough to still mount.

Secondly, did some clean up of the mount function to move the check
for already mounted into a separate function. This will prove useful
if a umount call is added on a disable of the feature.

Finally, the mount file table check now uses the common mount info
macros and the system calls are replaced with ProcMgr exec calls.
The file access checks now use the glib routines as do the mkdir and
rmdir for mount point creation and deletion.

8 years agoIncrease the scope of 'opLock' to avoid the race in VmBackupAsyncCallback.
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Increase the scope of 'opLock' to avoid the race in VmBackupAsyncCallback.

A previous change fixed a race between worker thread and main thread
VmBackupAsyncCallback that could lead to premature release of
'currentOp' from 'gBackupState'. If the 'currentOp' was set after
VmBackupAsyncCallback had queried status of the 'currentOp' but
VmBackupAsyncCallback was not done with 'status' value check,
it could release the 'currentOp' prematurely because 'status'
was initialized to VMBACKUP_STATUS_FINISHED. The fix was to
initialize the 'status' to VMBACKUP_STATUS_PENDING. The fix
broke tests that invoke quiescing with 'execScripts = false'
option and in that case there is no 'currentOp' setup by the
VmBackupStartScripts() call that leaves VmBackupAsyncCallback
in its initialized 'status' VMBACKUP_STATUS_PENDING forever.
This fix reverts the previous fix by restoring the 'status' initial
value to VMBACKUP_STATUS_FINISHED and increases the scope of the
lock 'opLock' to address the race condition.

This change also adds some Tools configuration settings to make
it easy to test HBR scenario.

As reading configuration is common functionality, moved
the common functions to vmtoolslib.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.

8 years agoHgfs Fuse Client: increment version for connection unavailable fix
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Hgfs Fuse Client: increment version for connection unavailable fix

Increment version for connection unavailable fix from 1.6.3 to 1.6.4

8 years agoHgfs Fuse Client: fix for backdoor not available
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Hgfs Fuse Client: fix for backdoor not available

The client dropped errors for failing to open the backdoor returning FALSE,
when the HGFS server was not enabled which migrated to a protocol error.
This could mislead users when mounting the FUSE file system when the
feature was disabled into thinking there was a different issue when
actually enabling the feature was required before mounting. It was not
a protocol mismatch between the client and server.

The main entry point now logs a message for the user if the transport init
fails and so the mount does not occur.
i
The main issue to prevent the mount being created when the feature is disabled
is addressed by the transport init function now trying to open the
transport and generate an initial connection. This fails when the HGFS
server is disabled because the feature is disabled. Hence, there will not
be a mount made and an error is reported to users.

If a mount is created when the feature is enabled and then later disabled
via the UI settings, the mount will still exist as there is no umount made
at that point. This will be addressed in later fixes. However, it should be
noted that the leftover mount which is now not accessible reports that the
"Transport endpoint is not connected" instead of the previous error of
"protocol error".

8 years agoDon't include errno.h in vsockSocketWrapper.h.
Oliver Kurth [Fri, 15 Sep 2017 18:22:56 +0000 (11:22 -0700)] 
Don't include errno.h in vsockSocketWrapper.h.

A recent change added errno.h to vsockSocketWrapper.h.
Since errno.h is intended for UNIX compatibility, whereas
vsockSocketWrapper.h redefines the error values to their
Windows equivalentsr, it needed to be removed.

8 years agoUse pkg-config directly instead of $PKG_CONFIG
Oliver Kurth [Fri, 15 Sep 2017 18:22:55 +0000 (11:22 -0700)] 
Use pkg-config directly instead of $PKG_CONFIG

$PKG_CONFIG isn't set in the configure script, but we do check for
pkg-config in the path. So use it directly to determine udev
directory path for udev rules.

8 years agovthreadBase.c: Update copyright and cleanup tabs and trailing whitespace.
Oliver Kurth [Fri, 15 Sep 2017 18:22:55 +0000 (11:22 -0700)] 
vthreadBase.c: Update copyright and cleanup tabs and trailing whitespace.

8 years agoFix open-vm-tools build on Fedora using gcc 6.
Oliver Kurth [Fri, 15 Sep 2017 18:22:55 +0000 (11:22 -0700)] 
Fix open-vm-tools build on Fedora using gcc 6.

There were two problems:

1. VMW_BIT_MASK in x86cpuid.h generated an error when trying to
   set all 32 bits.  This was due to using 33 bits in an intermediate
   calculation.

   The fix is to keep the calculation within 32 bits.

2. static const VMCI_HANDLE was defined in vmci_defs.h, but not used
   in one place that included the header.

   The fix is to add -Wno-unused-const-variable to CFLAGS to disable
   the new warning.

8 years agoChange to shared header file unrelated to open-vm-tools.
Oliver Kurth [Fri, 15 Sep 2017 18:22:55 +0000 (11:22 -0700)] 
Change to shared header file unrelated to open-vm-tools.