]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -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 [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoAdd an example configuration tools.conf file for tools
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Add an example configuration tools.conf file for tools

This adds an example tools.conf file. Settings are shown in the
file with default values, but commented out with documentation.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoConvert linux to __linux__ in preprocessor statements.
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Convert linux to __linux__ in preprocessor statements.

Linux ABI uses __linux__, not linux (deprecated).

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoRemove residual data when the DNS nameserver configuration changes.
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Remove residual data when the DNS nameserver configuration changes.

If the list of DNS nameservers available should shorten or both IPv4 and
IPv6 entries are present, residual data can still be available for display.
This change to nicInfoPosix.c corrects the problem.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 2 Aug 2019 18:07:20 +0000 (11:07 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoConvert linux to __linux__ in preprocessor statements.
Oliver Kurth [Fri, 2 Aug 2019 18:07:19 +0000 (11:07 -0700)] 
Convert linux to __linux__ in preprocessor statements.

Linux ABI uses __linux__, not linux (deprecated).

6 years agoFix gcc 9.1 build error in vmblocktest.c
Oliver Kurth [Fri, 2 Aug 2019 18:07:19 +0000 (11:07 -0700)] 
Fix gcc 9.1 build error in vmblocktest.c

GCC 9.1 in Ubuntu eoan (19.10) failed to build open-vm-tools:
error: '__builtin_strncpy' specified bound 4096 equals destination
size [-Werror=stringop-truncation]

6 years agoFix two issues reported by Coverity in vixTools.c:
Oliver Kurth [Fri, 2 Aug 2019 18:07:19 +0000 (11:07 -0700)] 
Fix two issues reported by Coverity in vixTools.c:

 - a superfluous NULL pointer check in VixToolsRunScript
 - a potential NULL pointer dereference in VixToolsValidateCredentials

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Fri, 2 Aug 2019 18:07:19 +0000 (11:07 -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 [Fri, 2 Aug 2019 18:07:19 +0000 (11:07 -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 [Fri, 2 Aug 2019 18:07:19 +0000 (11:07 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years ago[TOOLS] Fix dnd text from Linux guest
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
[TOOLS] Fix dnd text from Linux guest

Gtk::Widget::drag_dest_find_target() returns different values from GDK_NONE
on Gtk2 and Gtk3.

On Gtk2, it returns an empty string. It matches the existing code.
On Gtk3, it returns "NONE". The current logic breaks.

To overcome this issue, use Gdk::AtomString::to_cpp_type(GDK_NONE) to
replace the current empty string. This works on both Gtk2 and Gtk3.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -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 [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoRecord VMware Tools version 10.3.20 as TOOLS_VERSION_JACKHAMMER_UPDATE3
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
Record VMware Tools version 10.3.20 as TOOLS_VERSION_JACKHAMMER_UPDATE3

6 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
Changes to common header files not applicable to open-vm-tools.

6 years agoBump the development version of tools to 11.1.0.
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
Bump the development version of tools to 11.1.0.

6 years agoNo JSON disk array termination needed, if partition count is zero.
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
No JSON disk array termination needed, if partition count is zero.

In the unlikely case of a VM with zero disks, a jsonPerDiskFmtFooterLast
should not be emitted.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:20 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoPartial change linux -> __linux__, Tools edition
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Partial change linux -> __linux__, Tools edition

Linux ABI uses __linux__, not linux (deprecated).

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoFix the memory leak in procMgr library.
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Fix the memory leak in procMgr library.

In a specific code path, procCmdAbsPath attribute is ovewritten
with the new memory. This leads to a memory leak for the previously
allocated memory.

6 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoMake DEBUG_ONLY work with toplevel commas (Change part 3)
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Make DEBUG_ONLY work with toplevel commas (Change part 3)

Now that all the C pre-processors in use support variadic macros, make
DEBUG_ONLY work with toplevel commas (i.e. commas which are outside of
any parentheses pair). This is useful in at least 2 ways:

In C code, to easily pass debug arguments to functions in debug builds
without any overhead in non-debug builds.

  void
  foo(DEBUG_ONLY(int debugArg,) // IN
  int nonDebugArg)          // IN
  {
  ASSERT(DebugFunc(debugArg));
  NonDebugFunc(nonDebugArg);
  }

  foo(DEBUG_ONLY(debugArg,) nonDebugArg);

In asm code.

  DEBUG_ONLY(mov x0, #0)

6 years agoUse two new inline functions to replace most of the uses of
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Use two new inline functions to replace most of the uses of
HGFS_LARGE_IO_MAX and HGFS_LARGE_PACKET_MAX macros.

In preparation to bump up HGFS_LARGE_IO_MAX and HGFS_LARGE_PACKET_MAX,
replace most uses of the two macro constants with inline functions that
can return either the new limits or the older defaults based on the
configuration.

6 years ago[Tools/dndcp] Fix two coverity issues reported by a customer.
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
[Tools/dndcp] Fix two coverity issues reported by a customer.

6 years agoUpdate VMware Tools version numbers for historical information.
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Update VMware Tools version numbers for historical information.

6 years agoLOG variadic: Part 2
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
LOG variadic: Part 2

- do/while blocks removed.
- LogLevel_LookUpVar removed.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoFix return value in AsyncTCPSocketDoOneMsg
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
Fix return value in AsyncTCPSocketDoOneMsg

Trivial fix to a bug in AsyncTCPSocketDoOneMsg where ASOCKERR_SUCCESS is
returned inadvertently instead of ASOCKERR_TIMEOUT when there is a timeout.

6 years agoGuestInfo: fix memory leak in GuestInfoGetPrimaryIP()
Oliver Kurth [Sun, 21 Jul 2019 00:15:19 +0000 (17:15 -0700)] 
GuestInfo: fix memory leak in GuestInfoGetPrimaryIP()

"ipstr" was not free'ed when it was not being used.

6 years agoAdd definition for "debian11" and "debian11-64" to vmx.
Oliver Kurth [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -0700)] 
Add definition for "debian11" and "debian11-64" to vmx.

6 years agoAvoid emitting a trailing comma in the GuestInfoSendDiskInfoV1 JSON RPC
Oliver Kurth [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -0700)] 
Avoid emitting a trailing comma in the GuestInfoSendDiskInfoV1 JSON RPC

Although currently accepted by the JSMN library that we are using
in VMX, that superfluous comma is strictly invalid according to the
JSON standard - ECMA-404.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoMake LOG macro variadic: do the obviously-safe stuff first
Oliver Kurth [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -0700)] 
Make LOG macro variadic: do the obviously-safe stuff first

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -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 [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -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 [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -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 [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -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 [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -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 [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoChanges to common source files; not directly applicable to open-vm-tools.
Oliver Kurth [Sun, 21 Jul 2019 00:15:18 +0000 (17:15 -0700)] 
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 [Sun, 21 Jul 2019 00:15:17 +0000 (17:15 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoversion 11.0.0
Oliver Kurth [Sun, 21 Jul 2019 00:10:07 +0000 (17:10 -0700)] 
version 11.0.0

6 years agoFix the memory leak in procMgr library.
Oliver Kurth [Sun, 21 Jul 2019 00:03:42 +0000 (17:03 -0700)] 
Fix the memory leak in procMgr library.

In a specific code path, procCmdAbsPath attribute is ovewritten
with the new memory. This leads to a memory leak for the previously
allocated memory.

6 years agoGuestInfo: fix memory leak in GuestInfoGetPrimaryIP()
Oliver Kurth [Sun, 21 Jul 2019 00:03:42 +0000 (17:03 -0700)] 
GuestInfo: fix memory leak in GuestInfoGetPrimaryIP()

"ipstr" was not free'ed when it was not being used.

6 years agoAvoid emitting a trailing comma in the GuestInfoSendDiskInfoV1 JSON RPC
Oliver Kurth [Sun, 21 Jul 2019 00:03:42 +0000 (17:03 -0700)] 
Avoid emitting a trailing comma in the GuestInfoSendDiskInfoV1 JSON RPC

Although currently accepted by the JSON library that we are using
in VMX, that superfluous comma is strictly invalid according to the
JSON standard - ECMA-404.

6 years ago[Tools/dndcp] Fix two coverity issues reported by a customer.
Oliver Kurth [Sun, 21 Jul 2019 00:03:42 +0000 (17:03 -0700)] 
[Tools/dndcp] Fix two coverity issues reported by a customer.

6 years agoAdd the SLEDGEHAMMER code name to the 11.0.0 release version defines.
Oliver Kurth [Sun, 21 Jul 2019 00:03:42 +0000 (17:03 -0700)] 
Add the SLEDGEHAMMER code name to the 11.0.0 release version defines.

6 years agoFix a Coverity issue reported in vgauth/serviceImpl/verify.c
Oliver Kurth [Wed, 3 Jul 2019 21:28:56 +0000 (14:28 -0700)] 
Fix a Coverity issue reported in vgauth/serviceImpl/verify.c

6 years agoFix process command name for special linux processes.
Oliver Kurth [Wed, 3 Jul 2019 21:28:56 +0000 (14:28 -0700)] 
Fix process command name for special linux processes.

While listing down the processes in a linux guest, the existing
procMgr library reads /proc/<PID>/cmdline file and parses the
content.  While reading this, an assumption is made that there is
a null terminating character at the end of the file content.
This holds true for most of the processes.  But for few special processes,
the cmdline file doesn't have the terminating null character.

Proper content from cmdline file:

/usr/lib/systemd/systemd\0--switched-root\0--system\0--deserialize\021\0
/usr/sbin/vmtoolsd\0
sshd: root@pts/2\0\0\0

Example cmdline file where NUL terminator is missing:

avahi-daemon: running [linux.local]
avahi-daemon: chroot helper

6 years agoFix the command name for few linux processes.
Oliver Kurth [Wed, 3 Jul 2019 21:28:56 +0000 (14:28 -0700)] 
Fix the command name for few linux processes.

ProcMgr library publishes the 'command name' attribute for
each process while listing down all the processes.  For doing this,
the commandline is first parsed from /proc/<PID>/cmdline file
and the part starting from the right-most '/' is considered as the
command name.  This is OK only if we have an absolute path for the
command binary.  Other wise, this may result in incorrect results.

For example:
sshd: root@pts/1
gdm-session-worker [pam/gdm-autologin]

Fixed the code to ignore the parsing if we do not have an absolute
path.

Note: There are two ways how the command name is retrieved for each
process.

1. /proc/<PID>/cmdline is parsed.

If (1) fails for some reason, then

2. /proc/<PID>/status is parsed.

There is no issue with (2). This changeset fixes the parsing issue only
with (1) approach mentioned above.

6 years agoAdd support for NVMe disks; IDE and SATA disk devices in 3.x Linux kernels
Oliver Kurth [Wed, 3 Jul 2019 21:28:56 +0000 (14:28 -0700)] 
Add support for NVMe disks; IDE and SATA disk devices in 3.x Linux kernels

Support has been added for virtual disks attached to an NVMe
controller.  The device "label" will provide the "nvme<n>" for the
controller.  The disk unit is provided in the device "nsid" file.
An earlier implementation (Linux 2.6 kernels) provided the unit
number as the final digit group in the device node name.

The Linux 3.x kernel has some differences in the layout of IDE and
SATA disk devices in the sysfs filesystem.  The differences from the
sysfs in a 2.6 Linux kernel are:
 - The IDE "class" file and SATA "class" and "label" files are in a
   different directory.
 - IDE controller and SATA device nodes begin with "ata" where "host"
   was used in earlier kernel sysfs filesystems.

GuestInfoGetDevClass() has been modfied to check in two possible
locations for the "class" file.   The directory located will also
contain the "label" file for SCSI, SAS, and SATA disk devices.

GuestInfoGetIdeSataDev() has been modified to search for either
ata<n> or host<n> directories in the sysfs tree for the disk device.

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

6 years agoTruncate oversize partition names
Oliver Kurth [Wed, 3 Jul 2019 21:26:55 +0000 (14:26 -0700)] 
Truncate oversize partition names

Truncate disk partition names if they are too large, rather than just
skipping all the disk information for the guest. Closes
https://github.com/vmware/open-vm-tools/issues/346 .

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

6 years agoSuppress possible NULL pointer deref in a debug message.
Oliver Kurth [Wed, 3 Jul 2019 21:26:55 +0000 (14:26 -0700)] 
Suppress possible NULL pointer deref in a debug message.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 3 Jul 2019 21:26:55 +0000 (14:26 -0700)] 
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, 3 Jul 2019 21:26:55 +0000 (14:26 -0700)] 
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, 3 Jul 2019 21:26:55 +0000 (14:26 -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, 3 Jul 2019 21:26:55 +0000 (14:26 -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, 3 Jul 2019 21:26:54 +0000 (14:26 -0700)] 
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 [Wed, 3 Jul 2019 21:26:54 +0000 (14:26 -0700)] 
Common header file change not directly applicable to open-vm-tools.

6 years agoChanges to common source files not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 3 Jul 2019 21:26:54 +0000 (14:26 -0700)] 
Changes to common source files not directly applicable to open-vm-tools.

Reduce malloc/free overheads in the VMX for HGFS over VMCI

6 years agocopyPasteCompatX11.c code generating unnecessary Coverity warning
Oliver Kurth [Mon, 17 Jun 2019 18:41:38 +0000 (11:41 -0700)] 
copyPasteCompatX11.c code generating unnecessary Coverity warning

This patch aims to fix an issue found by Coverity Scan.

This issue is a False Positive, the outBuf is only freed in specific
scenario, so there is no 'BAD FREE'.  But it's better to reconstruct the
related code to clear the SCA error.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:38 +0000 (11:41 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agolinuxDeployment.c: Suppress the telinit error if the first telinit commands
Oliver Kurth [Mon, 17 Jun 2019 18:41:38 +0000 (11:41 -0700)] 
linuxDeployment.c: Suppress the telinit error if the first telinit commands
                   has made VM reboot.

The code executes '/sbin/telinit 6' repeatedly to reboot VM.  VM will be
rebooting if the telinit command executed successfully(exitcode==0).
Observed the repeated telinit command might get error(exitcode==1) on some
GOSes, ex: Ubuntu18.04, RHEL7.4/7.5 and Fedora 29.
Observed no such error on older GOSes, ex: Ubuntu14.04, RHEL6.6

The error telinit log is confusing, actually it does NOT mean customization
failed.

This change does NOT log telinit error, and returns deployPkg status to
make sure the log is consistent with customization result when the first
'telinit 6' succeeded but one of the following 'telinit 6' command failed.

The following actions are unchanged with or without this change:
1. log telinit error, stop loop and exit 127 if the first 'telinit 6' fails.
2. repeatedly execute 'telinit 6' if previous one executed successfully
   (exitcode==0).

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -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 [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoHgfsServer: Fix coverity issue - uninitialized variable "requestId"
Oliver Kurth [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -0700)] 
HgfsServer: Fix coverity issue - uninitialized variable "requestId"

Fix coverity uninitialized variable "requestId" by zeroing it
in HgfsServerGetRequest before passing to the request packet
HgfsUnpackPacketParams extraction function which will use it
in a log message.

Also moved an assert useful for testing protocol changes which was
incorrect in its placement.

6 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -0700)] 
Changes to common header files not applicable to open-vm-tools.

Remove checks for GCC 4.1 in xsave, xrstor, etc. instructions

6 years agoDetermine Linux OS disk devices associated with mounted filesystems.
Oliver Kurth [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -0700)] 
Determine Linux OS disk devices associated with mounted filesystems.

For each filesystem for which disk guestInfo is currently collected,
determine the virtual hardware device being used.   This is currently
represented as <cntrl class><cntrl #>:<device #>, eg. scsi0:0,
scsi1:0, ide0:0 or sata1:4 and matches the virtual device label seen
in VMX.

A Linux logical volume based filesystem can reside on multiple disks.
In order to handle LVMs, the disk devices for each filesystem are
maintained as a variable array of disk device names.
For Linux guests, disk device names are passed as a json array.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoFix 'Using uninitialized value' issue reported by Coverity.
Oliver Kurth [Mon, 17 Jun 2019 18:41:37 +0000 (11:41 -0700)] 
Fix 'Using uninitialized value' issue reported by Coverity.

* In a error code path, 'exitCode' variable is used without
  any initialization.  This issue was reported by the Coverity.
  Fixed it by initializing the 'exitCode' to -1.

* While fixing this, moved the variables to the if block where
  they are acutally used.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:36 +0000 (11:41 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoFix leak in error path reported by Coverity.
Oliver Kurth [Mon, 17 Jun 2019 18:41:36 +0000 (11:41 -0700)] 
Fix leak in error path reported by Coverity.

6 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:36 +0000 (11:41 -0700)] 
Common source file change not directly applicable to open-vm-tools.

6 years agoImprovements for ProcMgr library.
Oliver Kurth [Mon, 17 Jun 2019 18:41:36 +0000 (11:41 -0700)] 
Improvements for ProcMgr library.

* This changeset fixes various issues related to ProcMgr library.

== Retrieve the absolute path of the image for each process ==
* When listing down the processes, it is useful to retrieve the
  absolute path of the process binary.

=== For Linux ===:
* In /proc filesystem, /proc/{PID}/exe is a symlink to the binary
  and we can make use of it to figure out the absolute path.

* If /proc/{PID}/exe is not a valid symlink, then the 'cmdline'
  is parsed and aboslute path is calculated accordingly.

* Note: This changeset tries its best to figure out the absolute path.
  If it can't, then the attribute is set to NULL.

== Misc issues fixed. ==
=== Linux ===
* Fixed a memory leak with 'procCmdName' while looping through the
  /proc/ directory entries.

* Fixed another memory leak with cmdLineTemp and cmdStatTemp variables
  while listing down the processes in linux guests.

* In few cases, /proc/{PID}/cmdline file contains multiple NUL
  characters at the end.  In that case, the existing code converts them
  into 'whitespaces'. Fixed the code to chop of all the trailing
  whitespaces in the command line.

6 years agoSkip loading/unloading user profile for VMXI_HGFS_SEND_PACKET_COMMAND.
Oliver Kurth [Mon, 17 Jun 2019 18:41:35 +0000 (11:41 -0700)] 
Skip loading/unloading user profile for VMXI_HGFS_SEND_PACKET_COMMAND.

This command is used repeatedly to transfer file to/from the guest.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 17 Jun 2019 18:41:35 +0000 (11:41 -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 [Mon, 17 Jun 2019 18:41:35 +0000 (11:41 -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 [Mon, 17 Jun 2019 18:41:35 +0000 (11:41 -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 [Mon, 17 Jun 2019 18:41:35 +0000 (11:41 -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 [Mon, 17 Jun 2019 18:41:33 +0000 (11:41 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 3 Jun 2019 20:39:45 +0000 (13:39 -0700)] 
Common source file change not applicable to open-vm-tools.

6 years agoFix memory leak in SNEBuildHash function.
Oliver Kurth [Mon, 3 Jun 2019 20:39:45 +0000 (13:39 -0700)] 
Fix memory leak in SNEBuildHash function.

In a specific code path, if a key already exists in the hashtable,
the memory allocated for 'value' variable is not being freed.  This
leads to a memory leak.  Fixed.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Common header file change not applicable to open-vm-tools.

6 years agoCrash during File_WalkDirectoryNext
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Crash during File_WalkDirectoryNext

In the rewrite of File_WalkDirectoryNext, a bug was introduced in the
invalid Unicode path. Invalid Unicode occurs very rarely... and the
bug finally turned up. Fix this... the bug is rather obvious.

6 years agoFix asianux identification.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Fix asianux identification.

Add asianux to distroArray and change how asianux releases 7 and 8
are identified.

This came in as a pull request on github for open-vm-tools:
https://github.com/vmware/open-vm-tools/pull/325 .  Apparently
the OS identification in /etc/asianux-release changed with Asianux
7, and as a result tools does not identify it correctly.

6 years agoFallback to /proc/mounts.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Fallback to /proc/mounts.

Use /proc/mounts on systems where /etc/mtab may not be there.
This change is targeted for guestInfo reporting at the moment.

6 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Common source file change not applicable to open-vm-tools.

6 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
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 [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
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 [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Common source file change not directly applicable to open-vm-tools.

6 years agoUpdate to common source code; does not affect open-vm-tools.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Update to common source code; does not affect open-vm-tools.

Allow an asyncWebSocket to connect through an existing socket descriptor

Because Windows does not allow unprivileged processes to specify
DSCP (formerly ToS) values on TCP traffic, in order to support
DSCP for Blast WebSockets we must obtain a preconfigured socket
descriptor from a privileged process and then build the WebSocket
connection over that socket.

This changeset extends the asyncWebSocket API by adding a Connect
function that can accept and use an existing socket descriptor in
addition to the usual collection of WebSocket Connect parameters.

Because the asyncWebSocket is built over an asyncTCPSocket, this
change ripples down into the asyncTCPSocket API which also gets a
new Connect variant with a socket descriptor parameter.

To avoid duplicating existing logic, the old Connect variants
are modified to do their work by invoking the new API with
a distinguished socket descriptor value of -1.        This value
indicates that no existing socket descriptor is provided and
that a new socket should be created and used for the connection.

In this changeset, passing in an existing socket is supported
only on the Windows platform.  The feature is not required on
other platforms, where unprivileged processes are permitted to
define DSCP values for their connections.  Attempting to create
a connection over an existing socket on other platforms will
result in a Connect failure.

6 years agoRound out Log functions to all levels
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Round out Log functions to all levels

Logs would be measurably more useful for debugging if the available
levels were used correctly and consistently. As a step towards
encouraging such use, define Log_Warning() and Log_Info() as synonyms
for Warning() and Log() (which, for historical reasons, are not
declared in log.h). Also remove all the conflicting private definitions.

6 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)] 
Common header file change not applicable to open-vm-tools.