Kruti Pendharkar [Thu, 22 Jan 2026 04:42:54 +0000 (20:42 -0800)]
Handle the new cloud-init error code and status
- A new error code[1] was introduced in cloud-init v23.4,
It was reported that the existing code should handle this
new error code properly.
This change follows the backwards-compatible approach as described in
cloud-init documentation[2], by checking that the return code is
not equal to 1.
- Running status has been changed from "not run" to "not started" in
cloud-init v24.1 (see [3]).
This change adds a "not started" match to CLOUDINIT_STATUS_NOT_RUN to
maintain compatibility.
Use different command to reboot linux VM, depending on the init system type
We currently use the "telinit 6" command to reboot linux VMs.
However, the "telinit" command will be unavailable in the future as SysVinit
will be deprecated on some modern linux systems.
For example: In SUSE, "telinit" command is part of systemd-sysvcompat
(15 SP6 and newer) or systemd-sysvinit (older than 15 SP6), whereas in some
SUSE images or templates such as SUSE minimal VM has no such packages installed.
See SUSE KB: https://www.suse.com/support/kb/doc/?id=000021564
This change detects the init system of a linux and uses different command
to trigger reboot. If the modern init system, systemd, is available, then
"systemctl reboot" command will be used to trigger reboot. Otherwise, continue
using "telinit 6" command as SysVinit, the traditional init system, is still
available.
Kruti Pendharkar [Wed, 11 Jun 2025 00:48:53 +0000 (17:48 -0700)]
Check if the user name contains any illegal characters.
Verify that the user name whose store will be used to remove and query
aliases does not contain any illegal and path traversal characters
(backward and forward slashes).
Kruti Pendharkar [Wed, 11 Jun 2025 00:48:53 +0000 (17:48 -0700)]
Set the "patch" field of VMTools version to zero.
Prior to VMTools 13.0.0, the fourth field in the VMTools version was set
to PRODUCT_BUILD_NUMBER_NUMERIC which was the sequential build number
of the product within the branch. Going forward, the fourth field
of the displayed VMTools version is to be the "patch" starting with a
'0' value.
John Wolfe [Mon, 5 May 2025 22:58:03 +0000 (15:58 -0700)]
Validate user names and file paths
Prevent usage of illegal characters in user names and file paths.
Also, disallow unexpected symlinks in file paths.
This patch contains changes to common source files not applicable
to open-vm-tools.
All files being updated should be consider to have the copyright to
be updated to:
* Copyright (c) XXXX-2025 Broadcom. All Rights Reserved.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
The 2025 Broadcom copyright information update is not part of this
patch set to allow the patch to be easily applied to previous
open-vm-tools source releases.
Kruti Pendharkar [Tue, 25 Feb 2025 09:29:11 +0000 (01:29 -0800)]
Update the AC_VMW_CHECK_LIB fields for xmlsec1 library.
Currently, the library's custom "config" (xmlsec1-config)
is being used to determine compiler and linker flags.
Customer reported cross compiler problem with the xmlsec1-config
usage and suggested the below changes to use pkg-config instead.
o Pass library name as 3rd parameter to AC_VMW_CHECK_LIB Macro
to determine the compiler and linker flags via pkg-config.
o Also use the predefined 'PKG_CONFIG' variable rather than hardcoding
'pkg-config'
Kruti Pendharkar [Tue, 25 Feb 2025 09:29:11 +0000 (01:29 -0800)]
Provide a tools.conf setting to disable timesync plugin
This change intends to address a customer issue that requires an
in-guest config to disable timesync without having to reboot VM or
restart. Although we have some ways to implement it from host side,
customer claimed the guest administator may not be the administrator
of vSphere so that an in-guest approach is still needed.
This change adds two config options under "timeSync" group:
- disable-all: This disables all time sync including one-time sync
and periodic sync.
- disable-periodic: This disables periodic sync only.
Note we cannot disable one-time sync and keep periodic sync enabled
as this is not allowed according to the product design.
Kruti Pendharkar [Tue, 25 Feb 2025 09:29:11 +0000 (01:29 -0800)]
Fix a couple of memory leaks in drag-and-drop/copy-paste code:
* `CopyPasteRpcV3::HandleMsg` calls `CPClipboard_Unserialize`
which allocates memory to the supplied `Clipboard`
structure, but it neglected to call `CPClipboard_Destroy`
to free it when done. Also update the documentation for
`CPClipboard_Unserialize` to make the contract more
explicit.
* `DnD_SetCPClipboardFromLocalText` completely neglected to
free its destination buffer.
Bonus cleanup:
* Make some pointers `const` (which also allows us to remove
some casts).
* Replace a call to `UNICODE_RELEASE_UTF16` with `free` since
the memory was allocated by lib/dnd with `malloc` and was
not allocated by lib/unicode.
Kruti Pendharkar [Tue, 25 Feb 2025 09:29:11 +0000 (01:29 -0800)]
Fix the assembler warning
The Warning "found movsd; assuming movsl was meant" was noticed while
building open-vm-tools with gcc 12.2.0 (on Debian 12.2.0-14).
It was because of the change https://sourceware.org/bugzilla/show_bug.cgi?id=29525
made to the GNU assembler code (GNU Binutils for Debian) 2.39.90.20221231.
Replace the instruction "movsd" with "movsl" to avoid this warning.
Kruti Pendharkar [Fri, 21 Feb 2025 13:54:27 +0000 (05:54 -0800)]
[componentMgr] salt-minion - update integration script to version 2024.12.05
svtminion:
New release (2024.12.05) of the salt-minion integration script.
o Supports the new repository locations at packages.broadcom.com.
o Only supports Salt 3006 and higher with new Broadcom infrastructure.
o New return code 107 (Installed but Stopped); used when the service is
installed but stopped. Added to help with customer case where the service
remains 'not running' due to user action.
NOTE: Fixed line 31 apostrophe being an unicode homoglyph in svtminion.ps1
validated the downloaded files sha256 before that change.
componentMgr:
Update component manager to support the new return code 107.
return code: 107
string id: INSTALLEDSTOPPED
string message: Installed but Stopped.
====================================================================
The "stable-13.0.x" branch was created from the "devel" branch here.
====================================================================
Update ChangeLog with the granular push of Jan 07, 2025.
- plus ChangeLog update of Sep 24, 2024.
vm_support update: gather log files based on the current tools.conf
configuration
The script's revised logic replaces the <variable>(s) in the data field
value (logfile name) with a wildcard ('*') character, and it escapes the
'$' sign in the sed match pattern to match the '${\<variable>}' syntax
in the data field.
The usage/help message for the subcommand "get \section> [key]" has also
been updated.
With this modification to VMware Tools Support script, the files listed under
"logging" section in tools.conf file are additionally bundled into tar
archive.
The next VMWare Tools product release is to be version 13.0.0.
Switching the version of tools on main from the current development
version 12.6.0 to 13.0.0.
Add VMW_FALLTHROUGH in linuxDeployment.c to avoid compiler warning
The switch case DEPLOYPKG_STATUS_CLOUD_INIT_DELEGATED was
designed to fall-through to case DEPLOYPKG_STATUS_SUCCESS.
Add VMW_FALLTHROUGH to avoid compiler warning.