John Wolfe [Fri, 9 Jul 2021 03:10:23 +0000 (20:10 -0700)]
Added a configurable logging capability to the network script.
The network script has been updated to:
- use the vmware-toolbox-cmd to query any network logging configuration.
- use 'vmtoolsd --cmd "log ..."' to log a message to the vmx logfile
when the logginging handler is configured to "vmx" or when the logfile
is full or is not writeable.
Added an example configuration in the tools.conf example file.
John Wolfe [Wed, 30 Jun 2021 18:37:27 +0000 (11:37 -0700)]
Use os-release preferentially for guest identification.
If the "score" of the Linux guest identification from os-release is
the same as from the LSB score, use the os-release data. The os-release
standard is well established and the LSB is deprecated.
John Wolfe [Wed, 30 Jun 2021 18:37:27 +0000 (11:37 -0700)]
Throttle the "Nic limit reached" log message from the guestInfo plugin.
Implement a wrapper API for throttling vmtools log messages.
Use the API to throttle the repetitive log message, "Nic limit reached",
from the guestInfo plugin.
This change addresses the log spew reported in open-vm-tools issue:
https://github.com/vmware/open-vm-tools/issues/128
John Wolfe [Thu, 17 Jun 2021 18:47:50 +0000 (11:47 -0700)]
Prepare to make the 11.3.0 OVT release announcement.
- ReleaseNotes.md - copy in the iinitial (final ?) 11.3.0 OVT release notes.
- configure.ac = set the tools version to 11.3.0.
- buildNumber.h - set the build and product number from the internal
release build.
John Wolfe [Mon, 7 Jun 2021 15:25:09 +0000 (08:25 -0700)]
Add check that the packet size received is >= expected packet header size.
DnD RpcV3: A corrupted packet received may result in an out of bounds (OOB)
memory access if the length of the message received is less than the size
of the expected packet header.
John Wolfe [Mon, 7 Jun 2021 15:25:08 +0000 (08:25 -0700)]
Customization: Retry the Linux reboot if telinit is a soft link to systemctl.
Issues have been reported on some newer versions of Linux where the VM
failed to reboot at the end of a traditional customization. The command
'/sbin/telinit 6' exited abnormally due to SIGTERM sent by systemd and
where telinit is a symlink to systemctl.
This fix checks if telinit is a soft link to systemctl and if yes, retries
a system reboot until the telinit command succeeds or the reboot literally
happens.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Remove unwanted "volatile" from static variable used with g_once_init_enter()
The glib api documentation for g_once_init_enter() specifically states
that "volatile" should NOT be used with the address passed as the
argument. Recent compilers (GCC-11 & clang 11) and recent versions of
glib-2 will result in a warning that the "volatile" qualifier has been
dropped if it has been used.
Remove the unneeded and unwanted "volatile" qualifier from the definition
of "inited" in pollGtk.c.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Add backdoor support for host time of day in Arm
The timeSync plugin makes backdoor calls to get host time of day.
Update the time of day backdoor calls to function with the Arm
backdoor implementation. Also fix a bug where an error returned
by the GETTIME backdoor handler is incorrectly treated as a time value.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Common source file change not directly applicable to open-vm-tools.
Introduce peek() to the asyncsocket API, only supported by TCP vtable.
Peeks are similar to recv(), except that they do not drain the socket
after reading. Subsequent peek/recv reads the same data back. However
since recv does SSL_Read, a recv() following a peek() may not get the same
data as peek() after SSL is initialized. This is not a problem when
peeks are done before SSL setup.
Implementation notes:
- peek is a one-shot operation. The poll callback is unregistered
once it fires (recv keeps the callback until recv is cancelled).
- non-partial peek is not supported, so the peek callback will be fired when
any amount of data less than or equal amount of the requested length is
available in the socket buffer.
- It is possible to invoke recv() or peek() recursively from within the peek()
callback. A peek is disallowed from within the recv() callback.
John Wolfe [Thu, 20 May 2021 18:38:38 +0000 (11:38 -0700)]
Fix an ASSERT in bora/lib/misc/timeutil.c.
Fix a problem with TimeUtil_NtTimeToUnixTime on Arm that was encountered
when running tools tests on Apple silicon. The problem was the routine
assumed that a variable was 32-bits if VM_X86_64 was not defined. This
may have been true in the past, but it is no longer true now that the code
is also built for 64-bit Arm.
John Wolfe [Tue, 4 May 2021 02:39:41 +0000 (19:39 -0700)]
VGAuth: Use GUESTRPCPKT_FIELD_FAST_CLOSE flag for log messages.
VGauth is a single action service. With the GUESTRPCPKT_FIELD_FAST_CLOSE
flag added, VMX closes the vsocket as soon as the RPC response is sent.
This cleans up the vsocket connections faster and minimizes the number
of connect() failures in the guest.
John Wolfe [Tue, 4 May 2021 02:39:40 +0000 (19:39 -0700)]
Asyncsocket: Add comments about AsyncSocket_SetErrorFn usage.
Document that AsyncSocket_SetErrorFn must be called before an internal
asyncsocket callback can fire and trigger a call to the error handler.
The error handler must be set immediately after the asyncsocket is created,
either from the poll thread, which requires no additional synchronization,
or while holding the asyncsocket lock, which is passed via pollParams.