commit 4826a76513b6f8254132f664e07fa70ed18f22c4 Author: Oliver Kurth Date: Sat Mar 16 10:40:23 2019 -0700 update version and build number commit 990cc40de10f257d1d3c01b69fe476c233afb950 Author: Oliver Kurth Date: Sat Mar 16 10:39:48 2019 -0700 correct verson numbers commit f6a274cf64eebfd574e8cf587b4ebaf1c579267f Author: Oliver Kurth Date: Sat Mar 16 10:27:03 2019 -0700 Update release notes for 10.3.10 commit 640bd4f9c012b201ad1d45a131dad2e804f53766 Author: Oliver Kurth Date: Wed Feb 6 16:47:22 2019 -0800 sync deploypkg files commit 182eda3bc5f371339114241f0581f446e72def6d Author: Oliver Kurth Date: Tue Feb 5 17:36:53 2019 -0800 Update copyright year to 2019 for OVT 10.3.10 files. * Few dnd related files have been modified since 10.3.5 OVT and we just missed updating the copyright year to 2019. * Updated the copyright year accordingly. commit ba83c29fcd703ecb6a13a7767bad180033234aea Author: Oliver Kurth Date: Tue Jan 29 17:24:44 2019 -0800 Fix CentOS 7.6 detection The version information in /etc/centos-release has 3 parts, in particular for CentOS 7.6: CentOS Linux release 7.6.1810 (Core) This was misidentified as CentOS 6 because the substring "6." was matched before matching "7.". This change fixes this by requiring a space before the major version. commit f4708f4b5a9d24b122237875ce6a542f267caab3 Author: Oliver Kurth Date: Tue Jan 29 17:24:44 2019 -0800 Include vmware/tools/log.h to define g_info. A recent change added a call to g_info from syncManifest.c. This in turn is causing open-vm-tools builds to fail because g_info is not available on SLES 12sp1. To fix the problem, include vmware/tools/log.h in syncManifest.c. log.h defines g_info as a macro. commit 139a21cab79d971e9fe3ea5b8e993646b2e6cb48 Author: Oliver Kurth Date: Tue Jan 29 17:24:44 2019 -0800 Always send VMBACKUP_EVENT_GENERIC_MANIFEST during quiesced snapshots. vSphere 6.7 added a host-side interface that allows VMTools to send a "generic" backup manifest during a quiesced snapshot on Linux guests. VMTools 10.2.0 or later tries to notify the host of the backup manifest file through a vmbackup event message VMBACKUP_EVENT_GENERIC_MANIFEST. If the host is unable to field the message, then VMTools logs the failure and then continues with the quiesced snapshot in the older fashion, without the backup manifest. An earlier change attempted to reduce the amount of logging done when running on older hosts that don't support VMBACKUP_EVENT_GENERIC_MANIFEST by detecting when sending VMBACKUP_EVENT_GENERIC_MANIFEST fails and not sending the message again for subsequent quiesced snapshots. However, subsequent stress testing has uncovered problems with this approach when running on newer hosts; specifically, errors may sometimes be encountered on newer hosts when sending VMBACKUP_EVENT_GENERIC_MANIFEST. Therefore this change backs out that earlier change. Note that the need to solve the problem that that earlier change was intended to solve has been reduced because support for VMBACKUP_EVENT_GENERIC_MANIFEST has been backported to vSphere 6.5 P03, which is available, and vSphere 6.0 P08, which is scheduled for release later this year. ESXi 5.5 is out of general support. This change also addresses an issue that surfaced when testing on a host without support for VMBACKUP_EVENT_GENERIC_MANIFEST. If VMTools fails to send VMBACKUP_EVENT_GENERIC_MANIFEST, the quiesced snapshot operation will be aborted rather than continuing as it should. To address this, create a new function, VmBackup_SendEventNoAbort, which does not abort the quiesced snapshot on failure, and call that function rather than VmBackup_SendEvent when sending VMBACKUP_EVENT_GENERIC_MANIFEST. commit f9a93010ac532ab8eaaeba7f1de5c0c3e732554a Author: Oliver Kurth Date: Tue Jan 29 17:24:43 2019 -0800 Update copyright year to 2019. commit 74d165bab17132b50d909b7f2e5cb19f3f140a01 Author: Oliver Kurth Date: Tue Jan 29 14:03:19 2019 -0800 Fix some bad derefs in primary NIC gather code Found by user in https://github.com/vmware/open-vm-tools/issues/272 Debug code tries to access a struct field that may not be init'd. Pointer deref'd without a sanity check. commit e88f91b00a715b79255de6576506d80ecfdb064c Author: Oliver Kurth Date: Tue Jan 29 14:03:19 2019 -0800 Fix possible security issue with the permissions of the intermediate staging directory and path /tmp/VMwareDnD is a staging directory used for DnD and CnP. It should be a regular directory, but malicious code or user may create the /tmp/VMwareDnD as a symbolic link which points elsewhere on the system. This may provide user access to user B's files. Do not set the permission of the root directory if the root directory already exists and has the wrong permission. The permission of the directory must be 1777 if it is created by the VMToolsi. If not, then the directory has been created or modified by malicious code or user, so just cancel the host to guest DnD or CnP operation. commit bfa5e5d27a8a96a9c71fbe581f3fe32dcd2e55fd Author: Oliver Kurth Date: Tue Jan 29 14:03:19 2019 -0800 CONSTANT_EXPRESSION_RESULT in TimeUtil_StringToDate(). Red Hat ran coverity scan on open-vm-tools and found an occurrence of CONSTANT_EXPRESSION_RESULT in TimeUtil_StringToDate(). commit 4bba1dcd28806eff0cb3795cbfeea32f91fb1c40 Author: Oliver Kurth Date: Tue Jan 29 14:03:19 2019 -0800 Bail out vmtoolsd early when there are RPC errors. VMX state machine could give up quiescing operation for various reasons when vmtoolsd is busy performing necessary state transitions. Once VMX gives up quiescing operation, there is no point in vmtoolsd continuing with it. vmtoolsd should also give up the operation asap. vmtoolsd can detect VMX state machine change when it gets errors sending VMBACKUP_PROTOCOL_EVENT_SET RPC. RPC errors are only used as a trigger to abort the operation. We ignore the RPC errors that might occur after aborting the operation. commit 0cb7f7a903015e5e711fa6eb5b41748f797ce794 Author: Oliver Kurth Date: Tue Jan 29 14:03:19 2019 -0800 [10.3.10] Update copyright year to 2019. Update the copyright year to 2019 for ALL open-vm-tools destined files modified since the release of 10.3.5. commit e569c47f85fa8520f0834148d6774c1cb66df68c Author: Oliver Kurth Date: Tue Jan 29 14:03:19 2019 -0800 Don't send a backup manifest when aborting a Linux quiesced snapshot. When taking a Linux quiesced snapshot, communication failures between VMX and VMTools may result in VMTools sending a genericManifest event message after the quiesced snapshot operation has been aborted. If this happens, VMX will send an error back to VMTools, which in turn causes VMTools not to send genericManifest messages on subsequent quiesced snapshots even if the host supports such messages. One aspect of the implementation that gives rise to this behavior is the use of the sync provider's snapshotDone function to undo a quiescing operation. Specifically, if VMTools aborts a quiesced snapshot when the file system is quiesced, the quiescing must be undone. Currently, this is handled by calling the sync provider's snapshotDone function. This is the same function that is called to complete the quiescing snapshot protocol when it is successful. In some respects this makes sense, since in either case snapshotDone unquiesces the file system. However, architecturally and conceptually, it seems useful to distinguish between the action to be taken in the successful case versus the aborting case. It's also useful to do so in practice, because the successful case sends the genericManifest event to notify the host there is a backup manifest file, while the aborting case should not do that. To address the issue, add an "undo" function for the Linux sync provider. The undo function is called instead of snapshotDone as part of aborting a quiesced snapshot in which the file system is quiesced at the time of the abort. commit 81835cd72369b5b75fc5b0bed761f3b75cb7146b Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 Special-case profile loading for StartProgram Keep the user's profile loaded for the life of the program, to avoid races where its unloaded too quickly. commit d3515adb2a1617dcde4b65a6a9ab72ee8624454b Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 Changes to common source files not applicable to open-vm-tools. commit 4d3e3183bc04517cf75ab590a12e14224207eb6d Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 Bump up the SYSIMAGE_VERSION for VMware tools 10.3.10 The last released deploypkg version for 'VMware Tools' 10.3.5 is 8.4.1. Bumping up the CBS version to 8.4.10. commit 8f3630e77bcf647c22c40093bb37500f3032e578 Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 Deploypkg log files of linux should not be world readable. commit 4470d99e5eaf19cea741e6fa6f46c72acd57b3e1 Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 General code clean-up. bora/lib/misc/posixPosix.c: Treat local variables "len" consistently as "size_t" type in Posix_Getmntent_r() bora-vmsoft/apps/toolbox-cmd/toolboxcmd-shrink.c: Improve readability of error handling logic in ShrinkDoWipeAndShrink() and remove another line of dead code. bora-vmsoft/lib/procMgr/procMgrPosix.c: Recent discussions about setting "errno" to ENOENT when either getpwuid_r() or getpwnam_r() return 0 (success) if there is no passwd entry for the user have vacillated. Since none of the current callers of the routines in procMgrPosix.c query the contents of "errno", the current consensus is to simply log a warning message along with reason for the failure. commit 5f3f6ccd3ad143d64f2927bd19791a6148e1e2ba Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 Fix NULL pointer dereference and remove three lines of dead code. QbitLogic has run [Code]Ai on the open-vm-tools source code and and notified VMware of a potential NULL pointer reference and four pieces of dead code. See https://github.com/vmware/open-vm-tools/pull/247 bora-vmsoft/services/vmtoolsd/pluginMgr.c The proposed fix conditionally emitted a log message. That fix has been reworked to consistently emit a log message with conditional content. bora/lib/misc/posixPosix.c bora-vmsoft/apps/toolbox-cmd/toolboxcmd-shrink.c Remove one line of dead code from each source file. bora-vmsoft/lib/procMgr/procMgrPosix.c: Suggested dead code fix actually pointed to a bug where errno was not getting updated as intended. bora-vmsoft/services/plugins/guestInfo/perfMonLinux.c: Suggested dead code is no longer dead; change not applicable. commit f10780bc3d7119d90bf72c0cf2f07066955d7d98 Author: Oliver Kurth Date: Tue Jan 29 14:03:18 2019 -0800 Bump VMware Tools version to 10.3.10 for the next scheduled update release Set the VMware Tools version as TOOLS_VERSION_JACKHAMMER_UPDATE2 = 10.3.10 commit f2ff192717375b95a6b7e278fb47dbb3d3bc56d1 Author: Oliver Kurth Date: Wed Nov 7 15:00:09 2018 -0800 release notes for 10.3.5 commit 8f98dbc87304546cbb75756bbad8ba0dbc0221a4 Author: Oliver Kurth Date: Wed Nov 7 14:13:03 2018 -0800 add 10.3.5 changes to ChangeLog commit 583fc02dbee4ba88a20c67a0f5e5a9b023b551ea Author: Oliver Kurth Date: Tue Nov 6 17:14:40 2018 -0800 bump version and build number commit d51ec15038c43472e9bc48de7081b0954a122f97 Author: Oliver Kurth Date: Tue Nov 6 17:13:04 2018 -0800 sync deploypkg files commit b4b07f53c71a83beed8fdc11f2dfeeb43aa20fda Author: Oliver Kurth Date: Fri Oct 5 13:55:27 2018 -0700 Use bitwise AND operation while fetching current IOPL. Iopl_Get() was using logical AND operation which could result in wrong IOPL value. We should be using bitwise AND instead. commit 87593b29e5c337141be65e4430fb95a4f1741afb Author: Oliver Kurth Date: Fri Oct 5 13:55:27 2018 -0700 Optional override for short and long OS names sent from Tools Added support for customers to override the returned long and short OS names through the tools config file. If the setting is present, then names gathered by hostinfo will be ignored. The user is responsible for setting the appropriate names. The override will be ignored if the short-name setting is not present in tools.conf. An empty string will be sent for the long OS name if only the short-name setting is present. Appropriate warning msg will be generated in both cases. Example of the conf setting: [guestosinfo] short-name = centos6-64 long-name = some long name commit b08cd0da457263f80e84ca95348c2a97cb7e22a5 Author: Oliver Kurth Date: Mon Sep 17 16:41:19 2018 -0700 Hgfs Server Linux: fix the share permissions on a file rename or delete Coverity found that the argumeents to obtain the share permissions on a file rename were swapped. Even though they are tested together in an if statement which is not an issue, it could be in the future. Reverse arguments so the share read and write permissions are correct. commit bdde701699212ca7fb118f3a49a9bbc7fb06df68 Author: Oliver Kurth Date: Mon Sep 17 16:41:18 2018 -0700 Hgfs FUSE Client: fix missing pthread_mutex_unlock call Fix missing pthread_mutex_unlock call in HgfsSetAttrCache when updating the cached attributes on a file and a memory allocation fails. commit 01376aca4d4bee5efed9b4b2597d141722a7feb5 Author: Oliver Kurth Date: Mon Sep 17 16:41:18 2018 -0700 Bump up the SYSIMAGE_VERSION for VMware Tools 10.3.5 commit 7fc13e2b58dc91627d4ff78fd532b77898adf2d2 Author: Oliver Kurth Date: Mon Sep 17 16:41:18 2018 -0700 Update the copyright year for OVT bundled files modified since 10.3.2 commit c7a186e204cdff46b5e02bcb5208ef8979eaf261 Author: Oliver Kurth Date: Mon Sep 17 16:41:18 2018 -0700 Handle Linux kernel /proc FS uint32 type stat overflow when calculating tools rate stats. On both 32-bit and 64-bit Linux, tools always parses Linux kernel /proc FS stats as uint64 values. For rate stats, current - previous can handle uint64 type stat overflow, but not uint32 type. commit 064d0a3458991f0c34a397664b6b5cd8cc00e5b3 Author: Oliver Kurth Date: Mon Sep 17 16:41:18 2018 -0700 nicinfo: skip loopback devices When libdnet isn't used, loopback devices were reported. This change skips these interfaces. Also skip interfaces that are down. The interface was visible with vim-cmd, but not in the VC or ESX UI. It did not contain any IP addresses. commit 8979f11f78ef7fdbb51afa298896e06b4d874e5b Author: Oliver Kurth Date: Mon Sep 17 16:41:18 2018 -0700 Allow only a single instance of vmusr when multiple users are logged into a VM When a vmusr process gets the "channel conflict" error while attempting to open the toolbox-dnd channel, a channel reset is triggered. That reset results in the channel being restarted and a subsequent conflict and reset occurs - every second until the channel becomes available. For *nix guests: The fix is making use of the repetitive channel resets where the only RpcIn message received is a "reset" to catch this channel "permanently" unavailable state. If other RpcIn messages are received, a channel is considered to be working and the cumulative error count is cleared.. lib/rpcin/rpcin.c: - struct RpcIn: Added error status boolean and callback function to notify the dependent layer that a channel error has been resolved. - RpcInLoop(): If a non "reset" message is received, clear any channel error status. This will also notify the dependent layer that the channel is functioning. - RpcIn_start(): Added additional argument for new callback; NULL if not needed. lib/rpcChannel/rpcChannel.c: - struct rpcChannelInt: - Renamed "rpcErrorCount" to "rpcResetErrorCount" since it is actually a count of the consecutive channel reset failures and not a count of RpcChannel errors. - Added counter "rpcFailureCount" for the cumulative channel errors. - Added "rpcFailureCb" for optional callback to notify the app of a "permanent" channel failure. - New function RpcChannelClearError() for RpcIn to notify when the channel is working; to clear the rpcFailureCount . - RpcChannel_Setup() - added two arguments for (1) an optional function to be called when there is a channel failure and (2) a failure count threshold. These optional values are stored in the RpcChannel structure being created. - RpcChannelError(): Added logic to notify the calling app if the error threshold has been reached and notify the app if a callback was provided. A zero threshold signifies the single vmusr limit should not be enforced. (fix disable switch). services/vmtoolsd/mainLoop.c: - New function ToolsCore_GetVmusrLimit() to retrieve the channel error threshold default or over-ride from tools.conf. services/vmtoolsd/toolsRpc.c: - Added ToolsCoreAppChannelFail(): Callback for "permanent" channel connection failure. A warning is logged based on whether another "vmtoolsd -n vmusr" is running or not and the process is terminated. On Mac OS, the process is terminated with exit(1) as an indication to launchd that the vmusr process should not automatically be restarted. The current implementation uses the error callback only for the vmusr server on Linux (*nix). The default channel error limit is 5 (approx. 5 second), but is user configurable in tools.conf. [vmusr] maxChannelAttempts = n # where allowed n = 0, 3-15 When "maxChannelAttempts = 0" is used, the restriction to a single running vmusr process is not enforced. The existing behavior is restored with all the accompanying VMX log spew. This is essentially a user configurable feature disablement switch. commit 0c34a86b232a9904941f825ce8b16320cadaace1 Author: Oliver Kurth Date: Mon Sep 17 16:41:17 2018 -0700 Changes to common header files not directly applicable to open-vm-tools VGAuth Windows: fix file properties product version and file version Product name of the VGAuth binaries are set to VMware Workstation and the Product version set to experimental (e.x.p). Experimental version has the e.x.p build number in the Product Version field of each of the shipped binaries. Now that we are WHQL signing a DLL too for security it does make sense for the feature to use an official version. This changes the Product name and version fields from Product name -> VMware Workstation Product version -> e.x.p build-4013326 to Product name -> VMware Guest Authentication Product version -> 1.0.0 build-4013326 commit 5f5a7f4a0984ee35ce79d736426a5335c91da332 Author: Oliver Kurth Date: Fri Sep 7 15:53:28 2018 -0700 Remove vmxnet and vmxnet3 drivers from FreeBSD builds and open-vm-tools The vmxnet (version 1) network driver is not supported by any currently supported VMware virtualization platform. Removing the FreeBSD specific vmxnet source and deleting the vmxnet.ko driver build from the tools and the open-vm-tools builds. FreeBSD has their own vmxnet3 network driver based on community source and has never made use of the vmxnet3 source code or drivers from VMware. Removing the unneeded FreeBSD vmxnet3 source and builds commit 1a413064fee53ac3e334e96c546886e60724d07a Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Update SSL configuration with more secure settings. Due to SSL issues in the past, The preference is to have default settings to be more secure than compatible. This change mainly inherits the default settings from ssl.c. commit 450aca9f244b5e56bcef130df1a06137fd1f07e0 Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Add virbr* interfaces on RHEL to the default exclude-nics. commit 5a6e8bc0ef8af2eedbbc4dc1973cb7fe18afa939 Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Fix a gcc-8 compiler warning in lib/misc/vthreadBase.c gcc-8 generates a stringop-truncation warning when it's possible for strncpy to exclude the trailing nul. The code was fine, we never touch the last byte in the buffer and it's a static, but explicitly set a nul at the end of the buffer so gcc sees it. This is needed for open-vm-tools to build on Suse Tumbleweed. commit 5200ba3a770463e5c6a9e9d7e7a6a949857332ec Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Return proper vix error code when guest op VIX_COMMAND_DELETE_GUEST_DIRECTORY_EX fails. commit 8ffda7dbae4b916b28e3f903554bc37db1d5f974 Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Make Tools logfiles readable only by owner and root commit b0e2fab2787fbc511d240c4ce0f52a74b55152fe Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Reduce quiesced snapshot warning messages when running on older hosts. vSphere 6.7 added a new interface on the host side that allows tools to send a "generic" backup manifest during a quiesced snapshot on Linux guests. VMTools 10.2.0 or later will try to send the manifest file and if the host is unable to field it, then VMTools logs this information and continues with the quiesced snapshot in the older fashion. This change reduces the logging that is done in this case. commit a4b4c338f1202d161e8cad2eb7cf78d44f2fd302 Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Common source file change not directly applicable to open-vm-tools Verify existence of the returned path, retry the guest OP CreateTemporaryFileInGuest/CreateTemporaryDirectoryInGuest using system temp folder if the path disappears. commit b6c450d123141a752bd4805263b7d476f5b1f26b Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Fix coverity complaint; not a real bug commit 23bd37544bb9ae4069002d73cb1c1b40e221d36a Author: Oliver Kurth Date: Fri Sep 7 15:53:27 2018 -0700 Common source file change not directly applicable to open-vm-tools. commit c2dd430ea5c8c9309700d25548513469dae68c9b Author: Oliver Kurth Date: Fri Sep 7 15:53:26 2018 -0700 Disable hgfsServer plugin when not running in a VMware VM. VmCheck_GetVersion() accesses Backdoor in an unsafe manner which is not expected to work on non-VMware environments including physical machines. So, we need to make sure that VmCheck_GetVersion() is called only when we are running in a VMware VM. commit 31a60ab3529a8dad8d602a524d194013d90abeec Author: Oliver Kurth Date: Fri Sep 7 15:53:26 2018 -0700 Expose more guest stats for vROPS to report the exact physical memory stats as the guest OS UI does. Windows: guest.mem.modifiedPages (Win32_PerfRawData_PerfOS_Memory#ModifiedPageListBytes) guest.mem.standby.core (Win32_PerfRawData_PerfOS_Memory#StandbyCacheCoreBytes) guest.mem.standby.normal (Win32_PerfRawData_PerfOS_Memory#StandbyCacheNormalPriorityBytes) guest.mem.standby.reserve (Win32_PerfRawData_PerfOS_Memory#StandbyCacheReserveBytes) Linux: guest.mem.total (/proc/meminfo#MemTotal) guest.mem.buffers (/proc/meminfo#Buffers) guest.mem.cached (/proc/meminfo#Cached) guest.mem.slabReclaim (/proc/meminfo#SReclaimable) guest.mem.available (/proc/meminfo#MemAvailable since Linux 3.14, emulated by VMTools for kernels 2.6.27+) commit 0b01aefe3ee960c6035863bcf4fd7e2ff654b99b Author: Oliver Kurth Date: Fri Sep 7 15:53:26 2018 -0700 Update the tools version to 10.3.5 Set the tools version in vm_tools_version.h to be TOOLS_VERSION_JACKHAMMER_UPDATE1 = 10.3.5. commit 2147df6aabe639fc5ff423ed791a8e7f02bf8d0a Author: Oliver Kurth Date: Fri Jul 13 11:54:23 2018 -0700 prepare for 10.3.0 release commit a30d7aaa4d10fbce4b7d262487fffaf1dc32d949 Author: Oliver Kurth Date: Fri Jul 6 14:31:55 2018 -0700 Common source file change, not directly applicable to open-vm-tools. Enforce monotonic behavior for the value returned by times() on Mac. commit 12e5559e4dcf3968dd45131077b68364578f3bef Author: Oliver Kurth Date: Fri Jul 6 14:31:55 2018 -0700 Update the Tools-10.3.0 OSL. Update the Tools-10.3.0 open source license files. commit c80bb3fc7960bc78a6d39c89b6952218a401b0cf Author: Oliver Kurth Date: Fri Jul 6 14:31:55 2018 -0700 [tools-plugin] Potential solution for reported desktopEvent crash On several distros like RHEL, CentOS and Fedora, plugin desktopEvents.so crashes have been reported. However, neither development or QE can reproduce this issue in local environments. The XFetchName document states that it may generate BadWindow error. That means that the value for a Window argument does not name a defined Window. X FAQ also suggests handling badwindow error after finding it. Since the window does not exist when XFetchName is run on it, the name is not needed. Suppress this error to avoid a crash. After grabbing the X server, use XSetErrorHandler to temporarily define a local error handler to intercept and cleanly handle any BadWindow errors. XSetErrorHandler returns the current error handler, so it is straightforward to reinstate GDK's original handler. commit 6172812c021469704c51817693c6c8f6bf226509 Author: Oliver Kurth Date: Fri Jul 6 14:31:55 2018 -0700 Remove the new guest metrics feature switch, permanently enabling the collection of new guest metrics for vROps.. commit 6e6285ec690a13ff8ba894ee463a5aa0fd034269 Author: Oliver Kurth Date: Tue Jun 19 11:07:46 2018 -0700 Previous change to configure.ac and vmtools.m4 caused a regression Backing out of 10.3.0. commit 699cda01fab8b1ad8a1e912d650aa92f7ffdf0e6 Author: Oliver Kurth Date: Tue Jun 19 11:07:46 2018 -0700 [OVT] Update copyright year to 2018 for few files. Updated the copyright year to 2018 for few files changed in the last few days. commit cecbaf6b16f5fd1ecbfe4419310352353b047ba2 Author: Oliver Kurth Date: Tue Jun 19 11:07:46 2018 -0700 open-vm-tools: use AC_CHECK_TOOL for pkg-config AC_CHECK_TOOL honors the --host setting to configure, and searches for tools with the cross compile prefix thus allowing for cross compile specific tools. Fixes issue #26 in github. commit f2c8d02161569c96ac452f9d1063756d133562ba Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 open-vm-tools: build dndcp with thread libs Recent changes in the dndcp plugin made it necessary to make sure that it links against pthread libs. commit 99df5712ba7b8910c3db138c64aab6957f31c914 Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 Clipboard content on the host gets loaded to tmp on Linux guest with a right click on Guest Root Cause: Dndcp plugin creates a sub thread to monitor if there is other application access the specific file. The root cause for this bug is the main thread doesn't update its field before wakeup the sub thread, this cause the sub thread get a wrong value. Solution: Main thread should update the field before wakeup the sub thread. commit 99af79200f91c246580197b5698995fba4dc47af Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 open-vm-tools: build for FreeBSD fails in fakeMouseWayland Root Cause: In the file fakeMouseWayland.cpp, several Linux related header files are included: These header files do not exist for FreeBSD and Solaris. Solution: Lib fakeMouse is not needed by FreeBSD and Solaris, so update the makefile to build the fakemouse related code only on Linux. commit 104cab14e08b93a2525992e09f0d13ff26d52d9d Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 Use "/var/run" or "/run" instead of "/tmp" in Linux guest for imc package copy 1. check if /var/run is a directory in VM 2. if Yes, use /var/run/XXXXXX 3. check if /run is a directory in VM 4. if Yes, use /run/XXXXXX 5. if both No, use /tmp/XXXXXX as before commit 8f93d803066032a738b9d9a6990e32ed17b589e1 Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 Build open-vm-tools with xmlsec1 by default. Build open-vm-tools with xmlsec1 by default, rather than with xml-security-c as is done currently. This requires modifications to configure.ac to change the default for use_xmlsec1, plus modifications to bora-vmsoft/install/Source/tools-pkg.make to initialize flags for xmlsec1 and xml2 now needed by the OVT build that is done during tools builds. Another change that surfaced during this was that the symbol that configure checks for the xmlsec library was wrong. It should be xmlSecCheckVersionExt rather than xmlSecCheckVersion. The latter is a header-defined macro but not a library symbol. commit 7313fdc5b2b14ac83340b2e59752b934494c2ae9 Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 [Wayland Copy & Paste] Part2: Uses VMBlock notification mechanism for Copy & Paste This patch is part of the new feature for Workstation 15: \[P0\] Wayland support in Linux guest - Copy & Paste. In the first patch, the notification mechanism is added to the VMBlock module. In this patch, the notification mechanism is used, commit c04b9987786901f544c4df04f7701b48ac8f6475 Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 [Wayland Copy & Paste] Part1: Add notification mechanism to the VMBlock module This patch is part of the new feature for Workstation 15: [P0] Wayland support in Linux guest - Copy & Paste. In the implementation of current VMTools, there is a restriction, in the first second after grab into the guest, the CopyPasteUIX11::LocalGetFileRequestCB, which is a callback from a file paste request from another guest application and begins copying the files from host to guest and return the file list, will return none directly. The Wayland file explorer will request the content in the clipboard after the user clicks on the file explorer, and the request will get nothing since the restriction in the VMTools, so the following ‘Paste’ operation will fail. Solution: This solution is only used for the Linux guest with Wayland. The behavior for Linux guest with X11 will not change. The restriction, the CopyPasteUIX11::LocalGetFileRequestCB returns directly in the first second after grab into the guest, will be removed. And, the notification mechanism will be added into the VM block file system. This mechanism is similar with the inotify module. Take the VMBlock Fuse File System as an example, currently, the mount point contains below contents: * /blockdir/ * /dev /blockdir/ contains the symlinks to the contents of the target directory. /dev is the control file for VMBlock Fuse File System. In this new solution, a new folder /notifydir/ will be added, each file in this folder is a special file, read from this file will be blocked until any other process read from the corresponding file in target directory or the block on the target directory is removed. This patch only focus on the notification mechanism. commit 6c0b2130e7ee103ece06eb674c5f5dfea66c26f1 Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 FreeBSD: clang compiler related changes to configure.ac On FreeBSD, the unwind.h header is available in the libunwind package (/usr/ports/devel/libunwind) which may or may not be installed on a system. The libunwind functions to determine the call-chain in a program are defined only if " __GNU_SOURCE" is defined to enable "all" GCC extensions. Avoid the unwind.h header if seen on FreeBSD. The "clang" compiler will issue warnings if the address of a member of a packed structure is taken. Since warnings are errors with -Wall, add --Wno-address-of-packed-member to CFLAGS when compiling with "clang". commit bba52bfa5b29c8860f18200022db5b8b250d326b Author: Oliver Kurth Date: Tue Jun 19 11:07:45 2018 -0700 open-vm-tools: build with tirpc Newer distros (Fedora, OpenSuSE Tumblweed) no longer ship rpcgen with glibc, so we need to build with libtirpc (see https://bugzilla.redhat.com/show_bug.cgi?id=1531540 and https://bugzilla.suse.com/show_bug.cgi?id=1089181). With this change, configure will check for the presence of libtirpc and if found, sets flags to build with it. configure will also exit with an error if rpcgen is not found. commit 5c0b9496db96af9ea5e4b3b1321f0612a3f62d99 Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 Changes to build CAF with VS 2015; not applicable to open-vm-tools. commit 3961588fcce58090c249f4a65ad8cc109efecc5c Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 Log full version of Tools in vmware.log. Currently, only the Tools build number is logged in vmware.log. It will be very handy to have the full version logged in there and avoid the need to manually lookup the build. commit bf494fd02a77a4f34ff420c03c0c5a19e43218d3 Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 Tools 10.3.0 L10n drop2 This is to integrate the final L10n drop for VMware Tools 10.3. commit 065f09b94e09f1127901db29e73cc9b9f36df4fc Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 Add two switches for max IPv4/6 routes to gather Gathering nic info in a Linux guest OS which is configured with large number(60000+) of ipv6 routes could result in vmtoolsd process taking a long time and rock solid 100% CPU of a core. Though tools only exports at most NICINFO_MAX_ROUTES(100) routes, it tries to read all the contents of /proc/net/ipv6_route which costs too much time because: 1. IPv6 route table is not efficient natively compared to ipv4 due to its implementation. 2. The g_io library can aggravate the performance. On the other hand, when gathering routes, IPv4 comes first, and IPv6 second. And the routes reported to VMX has an overall limitation of serializing (NICINFO_MAX_ROUTES). If there's more than NICINFO_MAX_ROUTES IPv4 routes in system, no IPv6 will get reported. Added two switches "max-ipv4-routes" and "max-ipv6-routes" (NICINFO_MAX_ROUTES by default) in tools.conf and let SlashProcNet_GetRoute*() only read the first max ipv4/6 routes lines of /proc/net/[ipv6_]route to avoid performance problem. Users can disable ipv4/ipv6 routes gathering separately if they want ipv6 or ipv4 only. commit bf86c612a8ffe1d20b98c20b76f0c34840a7a2a3 Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 Not checking symbols when building open-vm-tools Using a hard-coded mangled name is not a good idea because C++ does not have any standard for name mangling. Remove these mangled names introduced in an earlier fix. commit d36ed6e5b4784a36cb93f50e05d6a49b5d76b86e Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 [OVT] Update copyright year to 2018 for files modified since 10.2.5 GA commit 8086ead225faf3a051952773c0b98b2c751b1e84 Author: Oliver Kurth Date: Tue Jun 19 11:07:44 2018 -0700 Hgfs Win Client: fix bad illegal character escaping; not applicable to open-vm-tools. commit 7efc7b70a57cf734012a069fabab19e96f8cf16d Author: Oliver Kurth Date: Tue Jun 19 11:07:43 2018 -0700 Add the JACKHAMMER code name to the 10.3.0 release version defines. Adding the code name JACKHAMMER to the 10.3.x series version notation for the public source release and use by future 10.3.x patches or updates. commit d71381445f6c3b986e263435006428a44be0451a Author: Oliver Kurth Date: Tue Jun 19 11:07:43 2018 -0700 Hgfs Server Plugin: only handle the shared folders client in hosted products Only initialize the Shared Folders client redirector in hosted product environments. Details: Check if the tools system service started in a non-hosted product and if so do not start the shared folders client redirector. Check if the tools user service started in a non-hosted product product and if so then skip reconnecting any Shared Folders mapped drives. commit ad7c68780a773d6d456687aff0d27f9cff808370 Author: Oliver Kurth Date: Thu May 10 16:47:16 2018 -0700 update version number commit cac0f086ffcc00da73dd7dd80fef6956962f4dd6 Author: Oliver Kurth Date: Thu May 10 16:38:11 2018 -0700 Remove debug display of CPUID vendor string seen in VmCheck_IsVirtualWorld The "Debug" message containing vendor string returned by the CPUID instruction will appear on STDERR for stand-alone programs such as vmware-checkvm. This unexpected output is at best noise and may adversely affect existing scripts. commit 7ddbe3c9df400dfdf7d67d259ae3942d157dedb4 Author: Oliver Kurth Date: Mon Apr 30 15:42:54 2018 -0700 sync deploypkg files commit 80a23d71a281493071668fd45b77d7f8248fad68 Author: Oliver Kurth Date: Mon Apr 30 14:04:14 2018 -0700 Changes to common header files: - Add Amazon Linux 2 to the known guest OS list. - Other change not application to open-vm-tools. commit 48dc7a57ff3fe5cb1441040876f74b69772c1ea5 Author: Oliver Kurth Date: Mon Apr 30 14:04:13 2018 -0700 [DeployPkg] Replace Log() references with g_log() * Modified the code to replace a couple of Log() references with g_debug() so that they are properly logged with 'deplogPkg' domain instead of the generic 'vmsvc' domain in the tools log files. commit 9cb12223b4da529df043d95ab025f22c6ee00c39 Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 [oss] Upgrade GTK+ and its dependent libraries for VMtools GTK+ and its dependent libraries are upgraded to: gtk+ 2.24.32 atk 2.28.1 gdk-pixbuf 2.36.11 pango 1.40.13 cairo 1.14.12 fontconfig 2.13.0 freetype 2.9 commit a5c03957c95ec78c92246b87cdf60a90b2eca7f7 Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 Common header file change not applicable to open-vm-tools. commit f87d177acab33f00229234ed51722504e2f7afc7 Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 Changes to common header files not directly applicable to open-vm-tools. commit ba65905dfc7e6c07d1aeea37db885284e54b02fa Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 Set perms on Tools script logs. Make the network script logs secure; set log file perms to 0600. commit aa59d16e0b5968efc298065ef50ece282d406265 Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 [Wayland DnD] Part2: Open the uinput device file with root permission. The device file /dev/uinput (or /dev/input/uinput) can only be accessed by root account, so the dndcp plugin may failed to open this device file if the current user is not root account. A way to fix this issue is opening this device file with root account, then pass the file descriptor to the sub task which is started with the current account. An example for this solution is blockVM file system device file. This patch is part of the new feature 'Wayland support in Linux guest'. commit b3899c91d348d23c2e6c22944b8ac1a06e4e3988 Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 [Wayland DnD] Part1: Add 'fakeMouse' module which is used to simulate the mouse motion under Wayland For Linux guest with X11, the VMTools uses the X system APIs to simulate the mouse motion, but these X11 System APIs do not work in Wayland. Need to pick up another method to simulate the mouse motion. Another way to simulate the mouse motion is using uinput module. uinput is a kernel module that makes it possible to emulate input devices from userspace. By writing to /dev/uinput (or /dev/input/uinput) device, a process can create a virtual input device with specific capabilities. Once this virtual device is created, the process can send events through it, that will be delivered to userspace and in-kernel consumers. Here is the link which contains more information about the uinput module: https://www.kernel.org/doc/html/v4.12/input/uinput.html This patch adds a new module named 'fakeMouse' which is used to simulate the mouse motion under Wayland. This patch is part of the new feature 'Wayland support in Linux guest'. commit 995befcb0d6156fb47773c96db6d478173d1bc89 Author: Oliver Kurth Date: Mon Apr 23 17:08:18 2018 -0700 Add new guest metrics to be consumed by vROps. Windows: * ProcessorQueueLength * CurrentDiskQueueLength * AvgDiskQueueLength Linux: * CPU run queue size * Current disk queue size * Average disk queue size commit 9d6cfe650cd15095e65024fbb5d9cd6944e1cf14 Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Historical: Recording version numbers assigned for 10.2.x patches. Define TOOLS_VERSION_CHAINSAW_PATCH1 as 10.2.1. Define TOOLS_VERSION_CHAINSAW_PATCH2 as 10.2.6. commit ba6c319f18d294b36c0e989f851fbfdbc8a629b7 Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Bump up the version requirement for glib and friends to 2.34.0 For open-vm-tools, we are bumping up the minimum version requirement to 2.34.0 for glib and its friends. Modified the configure.ac with the proper new version checks. Also, updated the error message with the proper version. commit 26d03ad8075913cb869b814462b7285c02367252 Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Common header file change not applicable to open-vm-tools. commit ce1ed002f5e05f09678e15b4021bac8155edb1eb Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Common source file changes that are not directly related to open-vm-tools. Build vmtools and vgauth for Windows with xmlsec instead of xml-security-c. It will still be possible to build with xml-security-c either by commenting out the definition of USE_XMLSEC_FOR_WINDOWS in bora-vmsoft/vgauth/make/inc/defs.mk or adding a make command line argument of USE_XMLSEC_FOR_WINDOWS=0. commit d5c0bcea04aae65484ba3c2756b64acf6f6388d0 Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Update bora-vmsoft/install/Source/README The content is stale. Since the file is used internally and is not published, rather than maintain it in two places, point to the current README file and Release Notes on github. commit 512d5475520ec5e0525633cd47530faaae774b5e Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Common header file change not applicable to open-vm-tools. commit 982998c9a6a3ec8664f9c4c08ff9ef30f52a9ae2 Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Common header file change not applicable to open-vm-tools. commit ab36b3227275a5beded8a5115929e2d649c6aad3 Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Common header file changes not applicable to open-vm-tools. commit 0527d5c5f14f626a5129231778ec433dfff55c2a Author: Oliver Kurth Date: Mon Apr 23 17:08:17 2018 -0700 Common header file change not applicable to open-vm-tools. commit 571dc1fbadd962d91dcb7a44652b501de3f48e0e Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Common header file change not applicable to open-vm-tools. commit 998903d73496bf6080053f994c8410dc880db2f9 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Common header file change not applicable to open-vm-tools. commit 3b814f9b4dcbf54893078a4ba187d8d0cbf23e31 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 lib/hashMap/hashMap.c: Add new HashMap_Get() which uses a constant time memory comparison function. lib/misc/utilMem.c: Constant time memory and string comparison functions. commit 5daceb4448834143d884b061f391c37aeaaad683 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Changes to common header files not applicable to open-vm-tools. commit 42d1e6b11c0b11c1b1f6f967cb5c4d7e2f3b39e0 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Change to common header file not applicable to open-vm-tools. commit f4b7b227119712c90be4a3583d4430a3fcc1d093 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Change to common header file not applicable to open-vm-tools. commit 874b8b4801a5bba439401db8e624e3e3d1989ca7 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Common header file change not applicale to open-vm-tools. commit ff2616a657c32bbb5e6799f8b8cd0a470d0e5202 Author: Oliver Kurth Date: Mon Apr 23 17:08:16 2018 -0700 Common header file changes not applicable to open-vm-tools. commit 5d9cc73f1c7979466d55f7897f98c0888d2fb15d Author: Oliver Kurth Date: Mon Apr 23 17:08:15 2018 -0700 Header file change in preparation for C++11 compilation. Also updating copyright dates. commit 29fb30f6d1956ccd4ad803b1b7f0430e4ef28ceb Author: Oliver Kurth Date: Mon Apr 23 17:08:15 2018 -0700 FreeBSD vmmemctl: Fold in open-vm-tools pull requests #125 and #140 This change incorporates two open-vm-tools pull requests that provide code changes that allows the existing vmmemctl.ko driver to be compiled on FreeBSD 10, 11 or 12. Pull request #125: An optional argument has been added to the sysctl_add_oid() function in FreeBSD 12.x. All releases have a SYSCTL_ADD_OID() macro that does not require the additional argument. Pull request #140: Functions and macros to lock and unlock memory pages and objects have changed between the FBSD 10 & 11. The pull request provides a set C preprocessor directives to select the appropriate code based on the FreeBSD release being targeted. The code change as been tidied up by using the release version checks to define LOCK and UNLOCK macros for memory pages and objects at the beginning of the source file. The code logic is easier to follow without the abundance of #if, #else and #endif statements scattered about. Ed Schouten: https://github.com/vmware/open-vm-tools/pull/125 Steve Wills: https://github.com/vmware/open-vm-tools/pull/140 commit 2a34b181de524b3f0d01cad90d3da184bde7ad99 Author: Oliver Kurth Date: Mon Apr 23 17:08:15 2018 -0700 Common source file changes not directly applicable to open-vm-tools. commit fab45e62a1468b86d2097a6a0784c4f259d6b0ef Author: Oliver Kurth Date: Mon Apr 23 17:08:15 2018 -0700 Common header file change not applicable to open-vm-tools. commit 357e8418e5441c2c5fc75a19f7b6529d6bce7452 Author: Oliver Kurth Date: Mon Apr 23 17:08:15 2018 -0700 Common header file change not applicable to open-vm-tools. commit fad97e4a7c756b3b297e0fe9e68a1a4674c4fdcc Author: Oliver Kurth Date: Mon Apr 23 17:08:15 2018 -0700 Common header file change not applicable to open-vm-tools. commit 357d9139342c19a98ed12f5961f415d099df3287 Author: Oliver Kurth Date: Fri Mar 23 15:05:36 2018 -0700 Common source file changes that are not applicable to open-vm-tools. commit 6c3261d152442fa11fc2b928490d74846f23465d Author: Oliver Kurth Date: Fri Mar 23 15:05:36 2018 -0700 Common header file change not applicable to open-vm-tools. commit 3747daca8efbfe8e709687b97c874a29f183b717 Author: Oliver Kurth Date: Fri Mar 23 15:05:36 2018 -0700 Backout previous change to lib/include/vm_basic_math.h. commit f9414d19532a9664e6c260a8644ee09200e32429 Author: Oliver Kurth Date: Fri Mar 23 15:05:36 2018 -0700 Common header file change: lib/include/vm_basic_math.h Define portability macros for Inf and Nan tests. commit de2010a1a45a9e515b932a1a83374539661a2b39 Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 Add missing memory constraints for vm_atomic RMW (Read/Modify/Write) instructions There are two inseparable concepts involved when dealing with atomics: 1. Atomicity of the access itself 2. Ordering of the access with respect to other reads&writes (from the view of other processors). Our Read-Modify-Write functions are all meant to provide the highest level of ordering guarantee: Sequential Consistency, which means no reordering of reads or writes across the access. We properly implement that on ARM, and on x86/x64 at the hardware layer. But, on x86/x64 we needed to tell the compiler (it must flush out any pending reads/writes that are currently hiding in registers) Side Note: we do *not* change the pure Read and pure Write functions, only the Read/Modify/Write ones. On both ARM and x86/x64, vm_atomic functions like Atomic_WriteN provide no (re)ordering guarantees today (at the hardware layer on ARM or at the compiler layer on x86/x64). This is because some callers didn't need or want such guarantees - as such, Atomic_WriteN by itself is *not* sufficient to, say, release a lock. Making these remaining atomic weapons safe by default will require us to first 1. add new unordered atomic equivalents of Atomic_ReadN/TestBitN and Atomic_WriteN (in C11 terminology, acquire/release and relaxed) 2. Scan the tree and switch appropriate callers to the new functions *and only then* 3. Strengthen the defaults, affecting only callers who needed the stronger defaults to be correct. ... but that would be a separate change in the future. Codegen differences (vmm.vmm64): -------------------------------- The function that uncovered this was ST_HandleCrossCall, which invoked Atomic_And64. original w/o explicit compiler mem barrier in ST_HandleCrossCall: ... lock and QWORD PTR [rdx+0x0],rax movsxd rax,DWORD PTR [rip+offset] <-- load reordered after Atomic_And64 lea rax,[rax+rax*2] lea rdi,[rax*8+0x0] with "memory" constraint, it's now identical to code w/an explicit compiler mem barrier (which was the workaround): ... mov edx,DWORD PTR [rip+offset] <-- load emitted prior to Atomic_And64 ... lock and QWORD PTR [rsi+0x0],rax movsxd rax,edx <-- ... and used after Atomic_And64 lea rax,[rax+rax*2] lea rdi,[rax*8+0x0] vmm.vmm64's .text section shrank 28 bytes vmware-vmx's .text section shrank 16 bytes Given that these are tiny fractions of the .text section, this suggests the problem was quite rare, which is why it escaped our attention until now. (Testing of vmx's lib/lock, lib/sync, lib/vprobe, and lib/misc saw no differences with GCC 4.4, 6.4, 7.1 or Clang) While in there: nuke some tabs Slated for a future change: vmkapi_atomic.h commit 333ac41076afff4e31ccb0d0688e1581e8c9019a Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 Common header file change not applicable to open-vm-tools. commit 8671bd8d4f68a490a5b20f1876f05797f3057c4b Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 vmcheck.c VmCheck_IsVirtualWorld(): Always check for a working backdoor. The specific checks for Xen and VirtualPC hypervisors currently happen only if the VMware hypervisor is not detected. The test for a working VMware backdoor is then done to avoid all other hypervisors. In the case where running on a VMware hypervisor and the backdoor channel has been disabled such as with monitor_control.restrict_backdoor = "TRUE" vmtoolsd, vmware-toolbox-cmd and vmware-checkvm will crash when attempting to get the version number of the installed VMware Tools. Added an additional test to detect Linux KVM with the existing tests for the Xen hypervisor and Microsoft Virtual PC. Avoid checking for a working backdoor if a non VMware hypervisor is seen. Microsoft Hv checking to be added later and is tracked in a separate PR. Oracle VirtualBox provides no unique CPUID vendor signature string. commit 09958952cc761075d5546b18bed0ce59260ec4db Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 FreeBSD open-vm-tools kernel modules compilations cannot locate With the change for VMware headers to utilize the standard types defined in C99 standard headers, the compilation of FreeBSD kernel modules must specifically add /usr/include to the compilation options. CFLAGS += -isystem /usr/include This change updates the Makefiles's for FreeBSD kernel modules and drivers. commit cdf0406dc669f2284e1e810ac5820f123d46a50e Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 FreeBSD: Improper use of sysconf() for getpwent buffer size leads to vmtoolsd crash. On FreeBSD, sysconf(_SC_GETPW_R_SIZE_MAX) can return -1 if it has no hard limit ultimately resulting in an incorrect buffer size. This change is adapting the sysconf() ifixes done elsewhere to bora-vmsoft/services/plugins/vix/vixTools.c and updating the open-vm-tools AUTHORS file to share credit for the pull request. https://github.com/vmware/open-vm-tools/pull/238 commit e20e9bd49d244749ee6bcd4ea7d57a26d891afbe Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 Common header file change not applicable to open-vm-tools. commit 7e03f0676a8d1a8667d7d6aeda968a74c8708c0e Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 Common header file change not applicable to open-vm-tools. commit 0c4420178932c1879f402ece689e5cfaf5f37d84 Author: Oliver Kurth Date: Fri Mar 23 15:05:35 2018 -0700 CAF changes for Windows; not applicable to open-vm-tools. commit e9463abdc0d56d0612237faf01a5736c9998b499 Author: Oliver Kurth Date: Fri Mar 23 14:57:12 2018 -0700 sysconf() usage leads to crashes in BSD tools Not using the sysconf interface properly when determinining the getpwent buffer size. Fix this. Problem was identified and proposed fix was submitted in pull request https://github.com/vmware/open-vm-tools/pull/238 commit 4eff69adab058331a1e93aee17ed9a4e13fa8714 Author: Oliver Kurth Date: Fri Mar 23 14:57:12 2018 -0700 [lib/file]: remove useless heap allocation FileIO_AtomicUpdateEx allocates the argument to the "swap" ioctl on the heap. This argument is a struct which contains a single int fd... there is no need to heap-allocate it, the stack is just fine. commit 6de42f7d96fb5c70d70ae3b68011477f8b93aef2 Author: Oliver Kurth Date: Fri Mar 23 14:57:12 2018 -0700 bora/lib: Use _exit when in the context of a signal handler There are a few cases in bora/lib where exit(3) is used in the context of a signal handler. It was recently noticed that exit(3) is not async-signal-safe, and _exit(2) should be used instead. This patch changes a call from exit(3) to _exit(2) in bora/lib. commit 54415a34a372388374bf322d8118ef47c7b0f9f7 Author: Oliver Kurth Date: Fri Mar 23 14:57:12 2018 -0700 Hgfs FUSE Client: enable the FUSE client for RHEL 7, Ubuntu 14.04 and others The RHEL 7.x releases are all kernel 3.10 based. Currently the Hgfs FUSE client will not be enabled for these earlier kernel versions, enabled only for 4.0 kernels and later. This means for default tools install on plaftorms running those kernel versions the Hgfs kernel client must be installed and used for Shared Folders. The consequence of this means that the tar tools installer must be run to provide the Hgfs kernel client on top of the OVT install. To remove the need to install the tar tools we must enable support for the Hgfs FUSE client, which just requires the kernel version check to be modified from 4.0.0 to 3.10.0. commit 84977ad9a0ca964d5873516c42efec328bac23c9 Author: Oliver Kurth Date: Fri Mar 23 14:57:12 2018 -0700 Changes to common header files; not applicable to open-vm-tools. commit 587d95eeadbdab2f20020ef24686bd989af6d8b0 Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 lib/misc/hostinfoPosix.c: Fix sscanf format string case typo. commit 8e22cb4da06036b71a06698da3377ed72cfef440 Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 Changes to common header files; not applicable to open-vm-tools. commit 9e3738b457eba1d9f8302fa449e9521da59f2dfd Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 Changes to common header files; not applicable to open-vm-tools. commit 18358aecd27f7d77b71d5ab31250edc600b7bfbc Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 Changes to common header files; not applicable to open-vm-tools. commit 670dba44e90c64173a1f67e617a7193f18fc3a2c Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 Common header file change not applicable to open-vm-tools. commit 5fe941cd27194495811036667d312f14aece1975 Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 Common header file change not applicable to open-vm-tools. commit 03faa87192b23354a996b4d62282c002de002c59 Author: Oliver Kurth Date: Fri Mar 23 14:57:11 2018 -0700 Common header file change not applicable to open-vm-tools. commit 2438cefba37d37de65bf2003b1880f47b529ef47 Author: Oliver Kurth Date: Tue Mar 6 10:38:43 2018 -0800 Enhancements for rpcChannel library. rpcChannel.c file contains the code for building rpcChannel library. A good amount of the same code is duplicated in rpcChannelSimple.c file to build a simplified version (no glib dependency) of the rpcChannel library. It's recommended to remove the duplication and maintain only one single file which can be used to build both 'glib-dependent rpcChannel' and 'glib independent rpcChannel' library. This changeset implements the following changes: * Removed rpcChannelSimple.c * Renamed I_USE_SIMPLE_RPC make variable to USE_RPCI_ONLY. If this flag is specified, rpcChannel library will be built using only RPCI. No dependencies on rpcIn will be added. This inturn will remove dependencies on dynxdr, xdr and glib. * Modified the RpcChannelInt structure to have only the necessary attributes when USE_RPCI_ONLY is defined. * Modified a bunch of functions into '#if defined(NEED_RPCIN)' block to make available only when necessary. * Modified guestrpc.h to provide the declarations for few RpcChannel_* functions only when needed. * Modified rpcChannel library to implement necessary stub files / functions when it has to be built 'with rpci only' setting. * Removed various copies of 'glib_stubs.c' maintained by different consumers of rpcChannel (appmonitorlib, vmGuestLib, 'imgcust' components). * Modified the make files of various consumers (vmGuestLib, appmonitorlib, imgcust components [linux-pkg-deployer, guestcustutil, UnitTest]) to remove the dependencies for dynxdr library. * Did some code refactoring. - Removed some dead code in some make files. commit 87be66f17bf7911a8ec59ce9917778f7f653a398 Author: Oliver Kurth Date: Tue Mar 6 10:38:43 2018 -0800 Implement a new function VMTools_GetTimeAsString. * Implemented a new function VMTools_GetTimeAsString in vmtools library which returns a properly formatted UTC timestamp information. This function can be used by different modules / plugins in 'VMware Tools' to add the timestamp information in log files. Example of UTC timestamp information: "2018-02-22T21:17:38.517Z" * Modified vmtools logging module to call the new function and prepend the UTC timestamp information in every log message. * Modified deployPkgLog.c to use the new function. * Removed references / definition of System_GetTimeAsString since it is no longer used anywhere in the code. commit acbf7d90add72d9d3aa70bb8677179e7b3d28e23 Author: Oliver Kurth Date: Tue Mar 6 10:38:43 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 87ddd2684bff33836db5667718449f42642c76e2 Author: Oliver Kurth Date: Tue Mar 6 10:38:43 2018 -0800 GOS Table: The official Amazon Linux 2 string is "amazonlinux2-64" The hosted UI isn't creating an Amazon 2 VM with the correct guest OS identifier string. Fix this. commit 91b42f829a0ddc13a1657610700332dad7a9e362 Author: Oliver Kurth Date: Tue Mar 6 10:38:43 2018 -0800 Fix vgauth log timestamps to have zone and use UTC commit d225ed26cca556f559c035234d11bd7d380c6d7f Author: Oliver Kurth Date: Tue Mar 6 10:38:42 2018 -0800 Common header file change; not applicable to open-vm-tools commit d585ee8fcc4135d6d52fdc38ec2e0ca747663bf7 Author: Oliver Kurth Date: Tue Mar 6 10:38:42 2018 -0800 Compilation fixes to build Tools with VS2015 This change consists of fixing warnings/errors as a result of building Tools with VS2015. commit 03c98a1fb30513b223e3d6eafb21b5f4d4c6c5bc Author: Oliver Kurth Date: Tue Mar 6 10:38:42 2018 -0800 Add timestamp information to each deploypkg log message. * Modified deployPkgLog.c file to prepend UTC timestamp information to each log message coming from 'deploypkg' module in 'VMware Tools'. * Used bunch of glib functions to get the current UTC time. As per the glib manual, these glib functions are available since 2.26. 2.26 was released around 8 years ago which is kind of very old. Having the glib dependency on 2.26 is OK. * Did some minor code refactoring. In DeployPkg.c file, at all call sites for DeployPkgLog_Log, replaced the hard coded values with the proper LogLevel enums. commit 73a21a057dc23cf428b5fa1799eb0c5945732fee Author: Oliver Kurth Date: Tue Mar 6 10:38:42 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 3eb8434aebde9a2eebc65d57044d8ea6367d685f Author: Oliver Kurth Date: Tue Mar 6 10:38:42 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 24e9d211752210abb94bd1e76bec8be20d8abef8 Author: Oliver Kurth Date: Tue Mar 6 10:38:42 2018 -0800 vm_basic_types.h: enable stdint.h for c99 C99 mode (a.k.a. __STDC_VERSION__ >= 199901L) guarantees the stdint.h header will be present, which means we can use it for standard types instead of rolling our own. commit b4016c210e7cb6c0407d40dba5edfa64d550bef3 Author: Oliver Kurth Date: Tue Mar 6 10:38:41 2018 -0800 Don't lose errno/lastError when logging guestOps need to see errno/lastError in order to return the proper error to VIX/guestOps APIs. Logging (at any layer) can cause these to be overwritten, so make sure they're preserved. commit 14a0ffe23be6437c9ee656ccf2d516ead6265dfd Author: Oliver Kurth Date: Mon Feb 26 19:23:18 2018 -0800 Enhancing CAF listener preconfigured check logic to update the preconfigured flag at runtime 1. Preconfigure listener and start listener upon tunnel enabled logic are invoked in two different threads. 2. There is a case where preconfigure logic is performed after the pre-configured flag is computed in the enable-listener thread. The current patch invalidates the flag in the start listener thread and should guarantee the preconfigured status is up-to-date. commit 60f7afc97264435e1c04c2e70fe39397261b52b4 Author: Oliver Kurth Date: Mon Feb 26 19:22:04 2018 -0800 CAF MA Performance Issues CAF MA Performance Issues Vmware CAF ManagementAgentHost service was polling every 5 secs to check if Guest Network "Tunnel(port 6672)" was enabled to preconfigure & bring up Vmware CAF CommAmqpListener service. This resulted in more CPU Utilization as opposed to previous release in CAF & caused regression in vmtools 10.2.0. We are increasing the Poll rate to 5 mins, which fixed the issue & is giving us the same CPU/memory utilizations as in vmtools 10.1.0. We were checking for the different stages of listener preconfiguration status from the listenerpreConfigure.txt files in the polling time interval, which caused increased IO operations. To fix that we have stored the value of listener preconfiguration status from the files into a variable locally & using the same at all places instead of file access. commit 872baeed3fd1e79f89143baa0b9c47077b655567 Author: Oliver Kurth Date: Mon Feb 26 12:29:08 2018 -0800 lib/file: add File_MakeSafeTempSubdir File_MakeSafeTempDir and File_GetSafeTmpDir are typically used to create "safe" temp dirs on Windows and Linux. These are dirs in a known-secure location with known-secure security attributes that only allow access to the current user. These APIs work fine. However, on Windows if one creates a subdir inside the safe dir, the subdir may be given an unexpected (and overly restrictive) set of default DACLs on it in unusual situations. The solution is to introduce a new API specifically to allow a caller to create a subdir within an existing safe dir that ensures the DACLs are exactly what are needed. commit bdbab22ec42544dbfff657b811d695e5b5a6d429 Author: Oliver Kurth Date: Mon Feb 26 12:29:08 2018 -0800 Remove the header file safetime.h This removes the file itself. commit 047f05f379eb73530ac943d35cda5c162e045fa2 Author: Oliver Kurth Date: Mon Feb 26 12:29:08 2018 -0800 Common source file change; not applicable to open-vm-tools. commit 2c927bb65029cb89ba0c4b7ba9b341890166823d Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 Skip specified file systems when doing a quiesced snapshot on Linux Add a tools.conf setting "excludedFileSystems" that specifies one or more file system mount points to be skipped over when performing a quiesced snapshot on Linux guests. The value of excludedFileSystems is a comma-separated list of glob-style patterns as recognized by the glib routines described here: https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html With this change, when performing a quiesced snapshot, the sync driver freeze routine removes from the list of mount points it is to process any path that matches a pattern in the excludedFileSystems list. In the course of testing the change, a bug was found in SyncDriverFreeze in which it returned SD_ERROR rather than FALSE when the path list is empty. This change also includes some whitespace cleanup in syncDriverWin32.c. commit 9fb904dbdbd12952f2743d1463cda56a72c50c90 Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 lib/file: Paranoid clear of old cached values Rare, but an app might toggle addPid; cover this. Also optimize the cache update. commit d244dac08f07cbbcba3f66eab7d78c16150edfba Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 lib/file: File_GetSafeTmpDir is not aware of credentials changes Some applications may masquerade their use (change their EUID). Futhermore, each thread in an application can have a separate EUID. Anytime a application or thread asked for its safe temporary directory, it needs to get the same result regardless of how many times it asks. Change File_GetSafeTmpDir to cache the EUID associated with the cached values. If there is an EUID change, invalidate the existing cache entries and recompute them. The recomputation process is stable, in that it will obtain the same return any time it is called. This way we get the benefit of the cache (performance), ensured correctness (for applications that do not masquerade), and correctness for those applications that do masquerade. commit f9177b133f7f683fcc0f85770712d8069ec52421 Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 4da56779c42a55ce1b872748f9d6fd90bd10d281 Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 lib/file: Clean up POSIX File_GetSafeTempDir() in fileTempPosix.c Make things clearer. commit f608f63948520ab2088870a800bcc62c67a416ab Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 5d98c8b5183e236dc8fb548647574f4b24e87d23 Author: Oliver Kurth Date: Mon Feb 26 12:29:07 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 65a35ec640223e4455e016c883261f514eb21492 Author: Oliver Kurth Date: Mon Feb 26 12:29:06 2018 -0800 Common header file change; not applicable to open-vm-tools. commit aefcbec68487e14de8938fafbf0606a9ce37b2b9 Author: Oliver Kurth Date: Mon Feb 26 12:29:06 2018 -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. commit f459a325c4eec2e31eddc7f74901623b30ea0525 Author: Oliver Kurth Date: Mon Feb 26 12:29:06 2018 -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(). commit 3af8139cfcb4578dd9d7cd9a85301ed808775eb4 Author: Oliver Kurth Date: Mon Feb 26 12:29:06 2018 -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. commit 442683ac70f1f1c8665feb347be40cac5c8edd65 Author: Oliver Kurth Date: Mon Feb 26 12:29:06 2018 -0800 amazonlinux2-64 should use OVT only, not tar tools linux.iso. commit b4e66d7ac1f29b4d81877741c0dc85b8eeb68365 Author: Oliver Kurth Date: Mon Feb 26 12:29:06 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 16e63100ba9aeb419d22d8ade3af1eda2e3f02c0 Author: Oliver Kurth Date: Mon Feb 26 12:29:05 2018 -0800 Changes to common header files; not applicable to open-vm-tools. commit f5b05ca724708bd54b5c5b7dc3f9d0d959134773 Author: Oliver Kurth Date: Mon Feb 26 12:29:05 2018 -0800 Common header file change; not applicable to open-vm-tools. commit 783e87e2a465d28db5233e7d1e284fa9410ffec4 Author: Oliver Kurth Date: Mon Feb 26 12:29:05 2018 -0800 Remove uses of header file safetime.h - (many places) replace "safetime.h" with and/or , occasionally re-ordering this header to top of file - (many places) remove "safetime.h" as no time functions are used commit bf31e9478b99b5713f2c330e48d2e40c5091d3bc Author: Oliver Kurth Date: Mon Feb 26 12:29:04 2018 -0800 Common header file change; not applicable to open-vm-tools. commit cbdbeef4b6c3454f58e9733079140edcc30fdb2a Author: Oliver Kurth Date: Mon Feb 26 12:29:03 2018 -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). commit eec6e2798def2e9ff6da5e73b092cfe92e60b763 Author: Oliver Kurth Date: Wed Feb 7 16:39:26 2018 -0800 Common header file change not applicable to open-vm-tools. commit 5170db44c1c7b814d0d2bd4131e1895dbd999db7 Author: Oliver Kurth Date: Wed Feb 7 16:39:26 2018 -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-. 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-_-nnnnnn VMware Tools commands and plugins are being updated to use this random temp directory. commit 9bc56af5d0cb7dcc6f079ff4ab4d3456535365b2 Author: Oliver Kurth Date: Wed Feb 7 16:39:26 2018 -0800 Changes to common header files not applicable to open-vm-tools. commit 3e4091698461c0a5c36f9025410941f189c5af69 Author: Oliver Kurth Date: Wed Feb 7 16:39:26 2018 -0800 Fix two comment typos in hostinfoPosix.c. commit cf4f582e5b3c2df25aa775d77d458a15583a05ad Author: Oliver Kurth Date: Wed Feb 7 16:39:26 2018 -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 . commit 0a099c6f4949a05d1400dc147ab68ad15ebf152a Author: Oliver Kurth Date: Wed Feb 7 16:39:26 2018 -0800 Common header file change not applicable to open-vm-tools. commit 7be0019e01c7d473deffb8b8646fce1dff22e11a Author: Oliver Kurth Date: Wed Feb 7 16:39:25 2018 -0800 Common header file changes not applicable to open-vm-tools. commit f838807d08b9c4e72d4887642d4181dea25b6c35 Author: Oliver Kurth Date: Wed Feb 7 16:39:25 2018 -0800 Common header file change not applicable to open-vm-tools. commit 25d00050c8009dd74e3bbcf1883fdd408411a693 Author: Oliver Kurth Date: Wed Feb 7 16:39:25 2018 -0800 Common header file change not applicable to open-vm-tools. commit 6b6038522ed24ea134eb4e4a2752288f6f42fcd5 Author: Oliver Kurth Date: Wed Feb 7 16:39:25 2018 -0800 Header file change not applicable to open-vm-tools. commit ee4bd450c4449f8905dbca2e4759660fda5c58dc Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -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. commit 13df0e2fc2f68aeab0380761eb0c5ab129730710 Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -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. commit 3a8221c7e4b149efacf87658ac239d815c56adba Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -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 . commit ff754c8a99bffe92b07c933898c7d9d20c02873f Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -0800 Refinement for memory corruption bug fix in StdIO_ReadNextLine commit 7b45a62730624c711fb4eb63a0bfd125a2befa57 Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -0800 lib/file: Style clean up in the public file.h commit 3a7dc2f92e6cb61c9ca8e57c367c972683355278 Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -0800 Common header file changes not applicable to open-vm-tools. commit c52bb302a181d4bdd0b2b61d6e901339b61d2dab Author: Oliver Kurth Date: Tue Feb 6 16:32:40 2018 -0800 Common header file change not applicable to open-vm-tools. commit 035765d487f8ab9b2222ad239b278e4725aa5a22 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Changes to common header files; not applicable to open-vm-tools. commit 3011466e0f59471292a58ba5124238898d18945a Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -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 commit 9da6562e0c04fa79fad726513508a628f29f4812 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Common header file change not applicable to open-vm-tools. commit 6ccc073a58e1822dc4eb8c20e10dc89791643e9c Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Fix memory corruption bug in StdIO_ReadNextLine commit 4f729b61b908c82318b8dcfc16264c15b58817c8 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Common header file changes not applicable to open-vm-tools. commit 9fa726051f7efe1b7e0bab745b7bad85d1fb3efb Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Common header file changes not applicable to open-vm-tools. commit 378c193d4a57cfed14045ffed6ea641957ed18c7 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Common header file change not applicable to open-vm-tools. commit ba83dcff6214190f8ed545401f2bfa27650bbf07 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Common header file change not directly applicable to open-vm-tools. commit fc922804318de417578fd08fab2e07c1d58e8de8 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Update copyright year to 2018. commit ca39511ceb8e88254cad71e98cba5cbfff08a99d Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 UUID: Clean up UUID_PackText Use size_t, not int. commit c358e5e181b95d872da9ffcc943cc147ae0584f8 Author: Oliver Kurth Date: Tue Feb 6 16:32:39 2018 -0800 Changes to common header files; not applicable to open-vm-tools. commit 0ccc8b1a79bf76b9826c37b2133e5dbd4b9904dc Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 Common header file change not applicable to open-vm-tools. commit 5c6f7b09d6865496036653360301092b8672675f Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -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. commit 2516f528e47722faa38868d99939c825f13c2bdb Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 Restore "ufs" to the list of known filesystems Removing extraneous #ifdef VMX86_TOOLS - #endif commit 3c453912325ead3f19b84fced65217608069ddfa Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -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. commit aa6502a057aec571a72b971cb13cf0e9d713cddc Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 Update tools copyright to 2018 commit 5af33281a66ebf0c30ad15074f931f33bda0bc9d Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 Common header file change not applicable to open-vm-tools. commit dc028e7bbb63865e1ae1c6262872e74c47c80d61 Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 Common header file change that is not applicable to open-vm-tools. commit d55cc529267b0b385fc9d4453075d023c789e46f Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -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. commit ccdef7096a4782dd00b6f55695aff9c3f01cf4b5 Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 hostinfoPosix.c: Change a warning to a log message. commit 2321ff31fa671658ad0af3af22eef27e5d9af050 Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -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. commit d9f7c825cfbe075c3b643632419ff26a72628e41 Author: Oliver Kurth Date: Tue Feb 6 16:32:38 2018 -0800 lib/file: Clean up a few things. commit b4ee6678c9dd8cdf4e144056545dd41ba0636085 Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -0800 hostinfoPosix.c: Pick up some review comments commit ce060ca498defdf08da4fac899dc623328d47a5d Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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". commit 6bd88d82e943d691c4312e3f2e7cef1038af7a9c Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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). commit de9b602664d91c54288b91a81f6a01d7cb927fce Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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(). commit 17e9209aeb4f6d3a3535b7064916f3a25b985395 Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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. commit 076b7201b61af9f3dcb36050ff37a8145a05d404 Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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. commit 7a58576e98e5bdb47fbe101c43b106ba77f2e811 Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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. commit 13c49b85cebacea847d30c4e5a0b92fa7ea9dba8 Author: Oliver Kurth Date: Tue Feb 6 16:32:37 2018 -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. commit c5bc784da611ee929e0da7c20a410e03e6540613 Author: Oliver Kurth Date: Fri Jan 26 15:04:36 2018 -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. commit 98e0ab52c86b3a1d4fd38cec6913b1f5ba0f336c Author: Oliver Kurth Date: Fri Jan 26 15:04:36 2018 -0800 hostinfo: More cleanup Continue the prep for Amazon Linux. commit ce769ae4aa3a14810b418c044629f2d9dcb72a37 Author: Oliver Kurth Date: Fri Jan 26 15:04:36 2018 -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. commit 7fce1b8f9ec60c27865717f536a4e440587500ad Author: Oliver Kurth Date: Fri Jan 26 15:04:36 2018 -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. commit b2b71c7995f4389cd7a9899dca8aa29bd9fa9c6a Author: Oliver Kurth Date: Fri Jan 26 15:04:36 2018 -0800 Common header file change not applicable to open-vm-tools. commit 40bcee40c892cc7de92825cce1226576d6eab66c Author: Oliver Kurth Date: Fri Jan 26 15:04:35 2018 -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. commit 757833d601541e9bde24571fa22e669900e98a7e Author: Oliver Kurth Date: Fri Jan 26 15:04:35 2018 -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. commit 75825dcc7548d779f23c4c93429736d690d86a45 Author: Oliver Kurth Date: Fri Jan 26 15:04:35 2018 -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. commit 09b6621863ece170e4fc6b617f0bc1e3d17867f2 Author: Oliver Kurth Date: Fri Jan 26 15:04:35 2018 -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. commit fb3630fb0d7846b9f06f0c506c38eadf0cfbfa81 Author: Oliver Kurth Date: Fri Jan 26 15:04:35 2018 -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. commit f7c551253400e7f153cc696b5b121cd6e0d4ebd8 Author: Oliver Kurth Date: Fri Jan 26 15:04:35 2018 -0800 GOSTable: Amazon Linux 2 Add the basic support for Amazon Linux 2. The distro identification code will follow in a separate change. commit c8f7c09d106884c19100077fdffe8f11b80d6bdb Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -0800 Changes to common header files not applicable to open-vm-tools commit 5939eaefbad529e811c64b46d93ddcce56615db8 Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -0800 Common header file change not applicable to open-vm-tools commit 55f323265bb7aee605a40f289f9c1a8ba7be56c6 Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -0800 Common header file change not applicable to open-vm-tools commit d42e5bf76689c820dfb84d681c007c96197f6182 Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -0800 Common header file change not applicable to open-vm-tools. commit 90819beef53238ba108be35cba93329b9d160de7 Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -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. commit e5e478d46f047aa8f22b427b9d4505581af9915a Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -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. commit 8a9c43698ebcc858314ec1c041d24b8e8d1372cf Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -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 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). commit 2674b02449875b04889be00400f52351105ab25f Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -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 commit bd018012a08579e89209e23b69963937210e5182 Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -0800 Common header file change not applicable to open-vm-tools commit 36929119b9e28df8e267c49b5661354253439215 Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -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) commit 6b1ef0ef99f34011da3f5383414eeedf81c59d3b Author: Oliver Kurth Date: Fri Jan 5 14:47:15 2018 -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. commit df18c2c2c3e7dde4478ee68a5f4a96600a3d07a2 Author: Oliver Kurth Date: Fri Jan 5 14:47:14 2018 -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. commit a678f3ea9f6de366b3b3de2f99956d93d2216b08 Author: Oliver Kurth Date: Fri Jan 5 14:47:14 2018 -0800 Correction to previous change for Solaris11_64 GOS. commit 74eb0c942f78f775c9de2bfd0e4f9970a8cded51 Author: Oliver Kurth Date: Fri Jan 5 14:47:14 2018 -0800 Properly classify Solaris 11-64 as 64-bit commit 47e604c2dba131c13300fe15bf4ad69d5b996674 Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit 584aa9f307c85b07fa8adaf113e87cc3c200cca9 Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit 976e505b4ad5233f4eb97c7e09be63f6b0662fc7 Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit 96f90f19e87cfb9b1dd62d30f4b88333d973bb90 Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 open-vm-tools: add missing copyright headers commit 124c6437b0fcac3e65a7748f336e8b47d9528767 Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit 11ff20501da5a4a4a6bcc05797b0129462cafc95 Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit 3dc2785d95c6b6ca42161c270fc9b3f17764ff2d Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit 525f5824a48d8856ec30250d73a99da9fea2c39f Author: Oliver Kurth Date: Mon Dec 4 16:27:21 2017 -0800 Common header file change; not applicable to open-vm-tools. commit fe6997afdc10d3bd7396c7dea7417523851166d6 Author: Oliver Kurth Date: Mon Dec 4 16:27:20 2017 -0800 Update the Tools-10.2.0 GA Open Source License Files. commit 9ac30cc60efd96556df21e87d5e8a42c7057fc95 Author: Oliver Kurth Date: Mon Dec 4 16:27:20 2017 -0800 RpcVMX: Report driver name and driver version to vmx to store the key-value in GuestVars, and write a log in vmware.log using RpcVMX_Log. commit 1667bc143164a6709debca423e4be0241e3275db Author: Oliver Kurth Date: Mon Dec 4 16:27:20 2017 -0800 GuestInfo: skip check for shrinkable disk when gathering disk info Some Linux OSes may have a non-existing device mounted to a filesystem, for example Photon OS has the root file system mounted from /dev/root, which does not exist. The wiper library does a check for a shrinkable disk, and this fails. This change skips the check when gathering data for diskinfo, but leaves it intact for other disk wiper purposes. Information from read-only flesystems will also be reported. commit 35b115033acb5c65e22bd4e44b90d6d69a6815c6 Author: Oliver Kurth Date: Mon Dec 4 16:27:20 2017 -0800 FileIO: Add customizable privileged file opener for Apple. The change is not applicable to open-vm-tools. commit eb8456de3ddb41ecc7155c447e4bac17ca440a5d Author: Oliver Kurth Date: Mon Dec 4 16:27:20 2017 -0800 Make AutoCPtr's constructor explicit to make it more obvious when pointer ownership is transferred. (This also matches std::auto_ptr.) commit 29c40dee7848e52437b5dab2ed466771a15df13b Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Make logfiles readable only by admin/root. commit 989d96498a370034423515d3818fd02749677097 Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Common header file change not applicable to open-vm-tools. commit c4387fa58c21a0174a9cd6b053e565aea2c4870f Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Common header file change not applicable to open-vm-tools. commit e2f15a777d241f468f5ca2bc0b608f3ecb71fc6a Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Common header files change not applicable to open-vm-tools. commit d3c3a4d3e9d97e09b07018df2dccb4b4b2c4dd1b Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Common header file change that is not applicable to open-vm-tools. commit 9a08115f6b111445f57302651f7fcb1e4f11e907 Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Changes to common header files not directly applicable to open-vm-tools. commit a8f4c5ada9852dfdb251715f3785b1fee45b8f67 Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Change to common header file; not applicable to open-vm-tools. commit 443f07aab7c60df74e1731127921b92447c86d61 Author: Oliver Kurth Date: Thu Nov 30 15:38:04 2017 -0800 Typo correction in common header file comment. commit a5d480e471fe4e0e73f6be28ab65f6ecde64f775 Author: Oliver Kurth Date: Thu Nov 30 15:38:03 2017 -0800 Improve diskinfo debug output Add more debug information so that it is easier to figure out why some partitions are not being found. commit 08abcfc9cc08c758a8189e69e7f99ab270a2e553 Author: Oliver Kurth Date: Thu Nov 30 15:38:03 2017 -0800 Make VigorPollImpl FD-based callbacks non-periodic (take 3) The previous attempt reveals another pre-existing issue. An fd that is closed by AsyncSocket may be reused right away. The SharedStream for that fd may still have an outstanding callback that needs to fire before it would be destroyed. If the destruction happens after the fd is re-used and the new owner is using boost asio stream, the Release() call would cancel the async read/write operation for the new owner. One simple fix is to dup the fd when creating a SharedStream. This means hostd would need 2 fds for each running VM. The hostd fd limit is currently 4096 and I was able to power on 1K VMs. If necessary, the fd limit can be increased (the system limit is 32K). Previous description: The original change has an issue on Linux that is not observed in ESX. When the read and write callbacks fire in parallel, both would release the reference to the SharedStream, triggering its destructor. Later when the read callback tries to re-register itself, it would hit a boost exception. To avoid that, I delayed the reset of CallbackFD::stream to the end of Invoke so that the SharedStream object woudl not be destroyed as long as the callback is re-registered. Original description: The hard-to-reproduce AsyncSocket leak turns out to be a variation of PR 1530561. The fix for that bug only plugs the leak when the race is between a VigorPollImpl callback that fires with an CanceledException (which can be triggered by another callback registered on the same fd -- this is the boost behavior) and a thread trying to unregister the same callback (e.g. upon detection of a disconnect). There is still a potential reference leak when the read and write callbacks run in parallel, if a disconnection happens between the two asyncsocket callbacks (the asyncsocket callbacks take the asyncsocket lock, so they are mostly serialized). The second asyncsocket callback handling the disconnect error would unregister the first callback while the first callback would be attempting to re-register itself at the VigorPollImpl level (to provide the periodic behavior exposed by IVmdbPoll). If the unregister wins the race, it would return false because the callback cannot be cancelled (it is running). Then ReRegister would not find the callback in the hash table, so the callback would not fire again, which means the reference taken when registering the callback is leaked. Applying the fix for PR 1530561 in the above scenario would not work because an AsycnSocket callback may unregister itself and in that case the reference is appropriately released. Unless we save the thread ID in Unregister, we would not be able to distinguish when the callback needs to run in order to release the reference. After considering various options, I believe trying to support periodic fd-based callbacks on top of a multi-threaded poll API is troublesome. This change adds a poll flag for one-shot callbacks and used that in AsyncSocket with IVmdbPoll. VigorPollImpl only support the one-shot behavior. In the long term I would like to retire IVmdbPoll and create a new poll interface. For now I would like to minimize churn while fixing the memory leak. commit 595f5add83e8fbf1ffcabd7537d294c1c9c4edfe Author: Oliver Kurth Date: Thu Nov 30 15:38:03 2017 -0800 Fix memory leak in vmtoolsd. commit 884aa32f9c9f773957275e09cd6620598185718a Author: Oliver Kurth Date: Thu Nov 30 15:38:03 2017 -0800 Tools: GuestInfo: ESX: dynamically load libvmkmemstats.so The new version of the vmware tools will be installed on older version of ESX. But these older versions do not come with libvmkmemstats.so and a dynamic linking error occurs. This patch changes the code to deal with the case where the lib is not available. Instead of relying on the linker to dynamically link with libvmkmemstats.so, g_module_open() is used to open the library, if available, and gracefully handle any eventual errors. Before the patch, the whole libguestinfo would stop working and after the patch only the memory stats are unavailable. commit 6151fbafe8714c15614dd254ff8816cd28620f3c Author: Oliver Kurth Date: Thu Nov 30 15:38:03 2017 -0800 Correcting the few copyright notice added to a few CAF related files bundled in Open-VM-Tools. commit 23cfd0c0fc03c36b83c47614037f85ff98806b86 Author: Oliver Kurth Date: Thu Nov 30 15:38:03 2017 -0800 Adding copyright notice to a few CAF related files bundled in Open-VM-Tools. commit 6056c840a4a5593a3f4a87acc175b5eac3ce23dc Author: Oliver Kurth Date: Tue Oct 24 14:07:36 2017 -0700 DragNDrop plugin change for VMware Tools on Windows; not applicable to open-vm-tools. commit 965dbcad8680e32a8b093715b29656505a8eaf44 Author: Oliver Kurth Date: Tue Oct 24 14:07:36 2017 -0700 GuestInfo: add primary-nics and low-priority-nics options Add the options 'primary-nics' and 'low-priority-nics' for GuestInfo. The options accept a list of comma separated patterns for interface names which can be considered as 'primary' or 'low priority' network interfaces. This will cause the NicInfo to be put on top of the list for primary interfaces, and to the bottom for low priority interfaces. Example: primary-nics=eth1 will make sure that the IP address(es) for eth1 will be sorted on top of the list of IP addresses. primary-nics=eth* will make sure that any one of the addresses of all interfaces matching eth* will be sorted on top of the list of IP addresses, but won't guarantee which one if there is more than one. low-priority-nics=eth* will work analogously, but interfaces will be sorted to the bottom. In case the limit of the number of interfaces to be reported is reached, low priority interfaces are the first to be skipped. commit b5c64af227b2eea0f23f2c8f3cf40c5d24c8548f Author: Oliver Kurth Date: Tue Oct 24 14:07:35 2017 -0700 VGAuth changes: - add calling LoadUserProfile()/UnloadUserProfile() in VGAuth impersonation/unimpersonation code paths - VMTools side code change to use the new VGAuth SDK. commit cc18f0829bbf9d61b36f6c292a2f4fb9b9618812 Author: Oliver Kurth Date: Tue Oct 24 14:07:35 2017 -0700 VGAuth changes: - add calling LoadUserProfile()/UnloadUserProfile() in VGAuth impersonation/unimpersonation code paths - VGAuth part of code change plus tools vix plugin make file. commit 4b0af4d8b889eccd0fbc18d63698c95f83be1ca3 Author: Oliver Kurth Date: Tue Oct 24 14:07:35 2017 -0700 [Tools] Fix crash issue when stopping vmtoolsd(vmuser) When stopping vmtoolsd, the code tries to unload all plugins. The signal TOOLS_CORE_SIG_CAPABILITIES is emitted before really starting to unload plugins. If the plugin should try to call RpcChannel_Send while processing the signal and the RPC channel has been shutdown, an ASSERT is triggered. The fix is to check whether rpc exists and if unavailable, avoid sending the TOOLS_CORE_SIG_CAPABILITIES signal. commit 13438dc9ab2af20587e003bc7f8ba088dc2d3ed8 Author: Oliver Kurth Date: Tue Oct 24 14:07:35 2017 -0700 Update copyright year to 2017 for open-vm-tools 10.2.0. commit a94ed0b8af8afc7d446312c3b391f336421bd4c3 Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 Add SUSE Server for SAP Applications to hostinfoPosix.c On SLES-SP1-SAP the "lsb_release -sd" command returns the string "SUSE Linux Enterprise Server for SAP Applications 12 SP1". Parsing in HostinfoGetOSShortName() detects the sub-strings "suse" and "enterprise" but not "server 12". STR_OS_SLES is returned resulting in displaying of "SUSE Linux Enterprise 8/9" in the summary screen of the vSphere client. This is wrong. Instead, search for the sub-string "server for sap applications 12" and return STR_OS_SLES_12. SLES11-SAP is not affected. Please see: github.com/vmware/open-vm-tools/pull/123 commit 2aba22668d4f61ddad7dff2a3e872458bf64e67a Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 lib/file: Enhance File_EnsureDirectoryEx to do more checking When creating a directory, distinguish whether an EEXIST error is because the directory already exists or because there is a file with that path name. Return the appropriate error. commit c579e664050ddd35e975b4a7fa18beb74f2decdc Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 VMware Tools 10.2.0 L10n changes for VGAuth. commit 07973b8c75feafba8c5ea400a87d0f03cdea744d Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 Common header file changed; not applicable to open-vm-tools. commit b88ff280ea0ea778ef9a4e422129bbf66291be73 Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 lib/file: Reduce the create directory spam The lib/file primitives (e.g. create file, create directory) may fail - but they also return errno/GetLastError. The caller should inspect a failure and decide what to do (or log). The lib/file primitives should not log. The client should do that. The primitives are the high performance path and failure isn't necessarily a failure, only the client can decide. The lib/file primitives (e.g. create file, create directory) may fail - but they also return errno/GetLastError. The caller should inspect a failure and decide what to do (or log). The lib/file primitives should not log. The client should do that. The primitives are the high performance path and failure isn't necessarily a failure, only the client can decide. commit 8bdee4f53760e3a63a890653a0960c09b9258db9 Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 Misc GuestOS ID fixes. - Centos8 64bit guest will have linux 4.x. Moved Centos8-64 guest id from all3xlinux64 to all4xlinux64 guest list. - oracle8_64 is missing in the list. Added it to all4xlinux64 guest list. - Photon has linux 4.x. Moved photon from all3xlinux64 to all4xlinux64 guest list. - Changed the HostinfoOSData() function to return other4xlinux for the distros where the version cannot be determined. commit 2ca8abc426c42e3ad7c05fd22e38ca04d6cc5e86 Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 Bump imgcust version to 8.4.0.xxxx commit 921f05729bdbcb83a98ab1a28641baabd095af97 Author: Oliver Kurth Date: Tue Oct 24 14:07:33 2017 -0700 Back out commit d2c18c44...: Make VigorPollImpl FD-based callbacks non-periodic Yet another issue is exposed by the change. This is a clean backout but keeping the cleanupOnError fix in SharedStreamFactory::Get. commit e373c1ca328f78581d915940bd7e98abdb76a089 Author: Oliver Kurth Date: Tue Oct 24 14:07:32 2017 -0700 open-vm-tools: make building with gtk3 the default This makes building with gtk3 the default, and sets sane defaults when building with/without gtk2/gtk3. commit 3455478483a6f8e810c00519b6611020e25fee83 Author: Oliver Kurth Date: Tue Oct 24 14:07:32 2017 -0700 Common header file change; not applicable to open-vm-tools. commit a62edfbf695ea5ad4bf8f8d91bac1740e428158f Author: Oliver Kurth Date: Tue Oct 24 14:07:32 2017 -0700 Common header file change; not directly applicable to open-vm-tools commit 009def580b00040fa6e6c07cb5743e60973973f5 Author: Oliver Kurth Date: Mon Oct 23 14:21:23 2017 -0700 GuestInfo: enable nic/iproute information for Linux without libdnet Linux glibc (since 2.3) fully supports getting ip addresses using getifaddrs() for both IPv4 and IPv6. Use of getifaddrs() was already implemented in nicInfoPosix.c for tools for ESXi. This change enables that code also for Linux, if libdnet is not used. The change also enables the iproute information, which does not depend on libdnet, except by the use of addr_stob(), which can be replaced easily with the existing function CountNetmaskBits(). commit 7643a1eddcc2cdc0b8a42af821ae92ca076ee37a Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 Make disk free space reporting consistent with Linux 'df' command. On Linux, statfs syscall reports free space in two fields. From http://man7.org/linux/man-pages/man2/statfs.2.html: 1. f_bfree => Free blocks in filesystem 2. f_bavail => Free blocks available to unprivileged user For file systems that maintain reserved space for system activities f_bfree > f_bavail because f_bfree includes the reserved space in the file system. The reserved space is typically 5% for 'ext4' file systems. Newer distros like RHEL 7.x use 'xfs' by default and report same value for both the fields. The Linux 'df' command uses f_bavail in its reporting. Tools reports, conditionally, f_bfree for root and f_bavail for non-root. However, since vmtoolsd runs as root, Tools always reports f_bfree, which is more free space than 'df' would report (depending on amount of reserved space). In order to be consistent with Linux 'df' command, report f_bavail as the disk free space by default. This does change the behavior a little bit in that Tools will report less disk free space than before, the difference being the same as the reserved space on the file system, typically 5%. This should be OK in general because it makes the space reporting a bit conservative. If this change in behavior is not desired for some use cases, the old behavior can be restored by setting the following newly added configuration in this change: [guestinfo] diskinfo-include-reserved=true The existing callers that are outside the guestInfo plugin will continue to include reserved space in their space accounting as before. Also fixed a few minor stuff/touchups in vmtoolsConfig.c. commit ff6daf51be641a805f94fa11415e032bad3ef48a Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 Porting some common code to another architecture; not applicable to open-vm-tools. commit a1d4afc447091d9fbccf89be6561accfc1e33aa9 Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 Add support to tools timeSync to issue w32tm resync in Windows guests. This change adds support to issue a w32tm resync command from within VMware tools timeSync in order to reconfigure w32time configuration parameters. This forces guest time to be resynchronized to external time server. commit d2c18c44df3fbc410e04b2f1b2595a326a52afec Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 Add a poll flag for one-shot callbacks in AsyncSocket The original change had an issue. When the read and write callbacks fire in parallel, both would release the reference to the SharedStream, triggering its destructor. Later when the read callback tried to re-register itself, it would hit a boost exception. To avoid that, delay the reset of CallbackFD::stream to the end of Invoke so that the SharedStream object will not be destroyed as long as the callback is re-registered. commit 485dc67e56ad68e05d4106059594279f67dd119b Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 9719f528b4ca3d91952e8feaca49d005f7944097 Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 HostDiskMacos: Migrate macOS host disk functions from file and user to hostDisk. commit c81c16581af70d6242dceccf3b9cdfd0dd3a88f4 Author: Oliver Kurth Date: Mon Oct 23 14:21:22 2017 -0700 Revert - HostDiskMacos: Migrate macOS host disk functions from file and user to hostDisk. commit d9fa89c015f72f233f46c8dd73640bbd3006d901 Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 HostDiskMacos: Migrate macOS host disk functions from file and user to hostDisk. commit 02d088e2603a292375f5d8db73b431ce30ddbf9c Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 Fix a segfault when log file isn't set and conf is reloaded. When vmsvc.handler=file, but vmsvc.data isn't set, vmtoolsd crashed on reloading the config file. This was caused by using a NULL value as an argument to a strcmp(). This change fixes this by using g_strcmp0 which handles NULL pointers gracefully, and setting confData to a default value before calling g_strcmp0(). This also fixes a case where a change in the log file would be ignored. commit 60179f0b8a4faaa66b490ba7b3f927664e634d6f Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 Revert - HostDiskMacos: Migrate macOS host disk functions from file and user to hostDisk. commit a01a01b881672f41e827ea50b9e4501b1cc09fc6 Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 Changes to header files vmnet_defs.h and vmxnet3_defs.h needed to integrate ENS capabilities into existing Uplink capabilities. The changes are not directly applicable to open-vm-tools. commit 6d86d11a0d1715e80417380c4565d2141cd39c15 Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 HostDiskMacos: Migrate macOS host disk functions from file and user to hostDisk. commit 2e95b4a100dff023d0e88315829c988c063228d5 Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 Update file version for imgcust deliverables commit 6288ac9749b21a5eb791b080c20e1028eaab5173 Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 Revert change to add a poll flag for one-shot callbacks. commit 39d8a762211ed0d599cc9834f4eaf15c9fa41dfa Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 strutil.c: Add a case-insensitive version of StrUtil_EndsWith. Common header file change; not applicable to open-vm-tools. commit a0741150a070825f22b35d7e1642c0c88f29673d Author: Oliver Kurth Date: Mon Oct 23 14:21:21 2017 -0700 Update of a product version in a shared header file; not applicable to open-vm-tools. commit 7b8e29217723040cfeec1f1db09afc2560237439 Author: Oliver Kurth Date: Mon Oct 23 14:21:20 2017 -0700 AsyncSocket: Fix DoOneMsg's inBlockingRecv bookkeeping For the I[Vmdb]Poll support in AsyncTCPSocket, inBlockingRecv has been used to avoid conflict with AsyncSocketDoOneMsg. There is an issue with where inBlocking Recv is decremented, which is right after poll, where the thread would drop the lock. The lock may also be dropped during AsyncTCPSocketFillRecvBuffer, and for that there is a separate inDoOneMsg flag. This change unifies the two flags and makes inBlockingRecv cover both functions that may drop the lock. This fixes the race that would allow AsyncTCPSocketRecvCallback to run when AsyncTCPSocketDoOneMsg is in progress. A couple places where we previously checked inBlockingRecv to report an error now have to also check inRecvLoop (TRUE during AsyncTCPSocketFillRecvBuffer) -- those checks cannot be enforced during FillRecvBuffer because the client callback is allowed to change the callback or cancel it. The lone usage of inDoOneMsg is switched to inBlockingRecv. commit ac699fac9d8030fe2c804ad8720d7fa7b5e72839 Author: Oliver Kurth Date: Mon Oct 23 14:21:20 2017 -0700 Set the Tools version to 10.3.0 commit 2fae8543aaeed65725575dac50c55ea554b349a1 Author: Oliver Kurth Date: Mon Oct 23 14:21:20 2017 -0700 guestOS: Uniquely run time identify Photon Currently VMware Photon 2 is identified at run time as a Linux 4.x kernel. This is correct, but the Photon distro has an LSB compliant identification file. Attempt to check the LSB compliant identification file for Photon. If present, identify the guest as "vmware-photon". commit 729acd5603c62d514d5e244faf9e508db2b9efd7 Author: Oliver Kurth Date: Mon Oct 23 14:21:20 2017 -0700 Add new GOS definitions in HWV=14 commit f9c76215aaed31a6210112df578ed9d6c3c25712 Author: Oliver Kurth Date: Mon Oct 23 14:21:20 2017 -0700 Fix ASSERT of registering the same callback twice (take 2) Re-check the condition of inBlockingRecv after the lock may have been dropped. commit a20022349089880cb43ccdef082f02de95476984 Author: Oliver Kurth Date: Mon Oct 23 14:21:20 2017 -0700 Fix ASSERT of registering the same callback twice The previous change for Poll introduced a bug in AsyncSocket. When re-registering the recv callback, it needs to check whether there is a concurrent blocking recv (which means the send callback has detected a disconnection and is draining the pipe). The recv callback should act like a no-op in that case (other than to release the reference). commit 396d5adb3aba9ab0e059a4b45ac2e3d68fb513f9 Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 3cb87c817b804e231b0d2aa4c007a61b83999750 Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 Hgfs Protocol: clean up the Hgfs protocol operation capabilities This change cleans up the operation capability and its flags which currently are not clearly associated with the type to which they refer. The name doesn't help in that regard either. The capability and flags are used in the Hgfs session creation by both the server and client to dictate the protocol operation versions to be used during the lifetime of that session. The flags denote which operations are currently used and how they are expected to be used. commit 14c579038de187e0bdbc952073524e4a0668548e Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 Update the Tools-10.2.0-Beta Open Source License Files. commit fa4c5b9eac9e2899aef8f6a831e121152adc075b Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 hosted file locking: An upper bound on creating the lock directory There is currently no upper bound on how long we wait to enter a hosted file lock (create lock directory and the direct entry (the "D")). Fix this. commit 2496fecbcd4c99bb3cc73df64b24982607f54227 Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 Add Str_Strncpy Add a Str_Strncpy function that, unlike strncpy, guarantees NUL-termination. commit 314d3ca4d1b2a6a28427fc19510f89c7d7df6234 Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 lib/file: Hosted file locking code robustness improvement The hosted file locking code tosses a random number generator and creates an directory name (D name) and member name (M name) that both use the random number. If the D name cannot be created we try again until we can create one. The assumption is other lockers are racing with the code. The random number generator makes the chance of collisons small and soon we get a D name. Once a D name can be created, we check if the M name exists. If it does, we remove the D name and try again until we get a unique D and M name. Once the M name is created, the D name is discarded. If we're unable to remove the D name, we could land up filling the locking directory with garbage that cannot be cleaned up. Fail if we're unable to remove the D entry. commit 824c7718031c6adbc02b7a60b61639bc029b9852 Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 Add a poll flag for one-shot callbacks in AsyncSocket. commit 7367296bebe4eed2bc5555f49fbaeea197be94ef Author: Oliver Kurth Date: Mon Oct 23 14:21:19 2017 -0700 Disable lib/string wprintf functions for non-Windows builds The lib/string wprintf functions currently are enabled only for Windows and Linux builds, but Windows is the only platform that uses them. Disable them for Linux, too. This also means HAS_BSD_WPRINTF can be removed. commit fcc96bf4c1123fb51d96fdbb935e83b91bd04765 Author: Oliver Kurth Date: Mon Oct 23 14:21:18 2017 -0700 Remove Str_Mbscpy and Str_Mbscat Since we assume that all non-wide-char strings are UTF-8, the implementations of Str_Mbscpy and Str_Mbscat are basically identical to those of Str_Strcpy and Str_Strcat. We thus do not need the Str_Mbs versions. commit c8f3f5164f277ee311543c153e6cf4d9a5c3b17c Author: Oliver Kurth Date: Mon Oct 23 14:21:18 2017 -0700 GOSTable: Linux 4.x kernel Add Linux 4.x entries to the Guest OS table. commit b7ee5608972cdb7a585fb7b1a13fb62f24f546e9 Author: Oliver Kurth Date: Mon Oct 23 14:21:18 2017 -0700 lib/file: FileIO_AtomicUpdateEx ASSERT ASSERT(File_IsSameFile(dirName, dstDirName)) fired when NFS went down at just the right moment. It was not obvious that the ASSERT fired due to an NFS failure. File_IsSameFile correctly returns errno upon failure. Check the errno value to properly detect and return an error. commit 631907ab8989ad07d3b8c03829f5700bb2e3ee1a Author: Oliver Kurth Date: Fri Sep 15 11:47:09 2017 -0700 copy README.md from master commit 962d4f21e2365e81d68ca2920175c0f1edbb6770 Author: Oliver Kurth Date: Fri Sep 15 11:32:25 2017 -0700 update version to 10.2.0 commit 1604e7c59f9491e0f98e39dc511a534ffea68879 Author: Oliver Kurth Date: Fri Sep 15 11:35:01 2017 -0700 sync libDeployPkg files commit 2ec91a3f67059cff2d47c662e2177714742a241f Author: Oliver Kurth Date: Fri Sep 15 11:23:58 2017 -0700 GuestStats: Report memNeeded on ESX as a guest commit f439d57482f7dd42e359fb0792269573c63c55a7 Author: Oliver Kurth Date: Fri Sep 15 11:23:58 2017 -0700 GOSTable: Add MacOS 10.14 and FreeBSD 12 commit 1d661a68fced6b91e6c5e757915cddf8b7c7eb15 Author: Oliver Kurth Date: Fri Sep 15 11:23:58 2017 -0700 Guest OS: Add CentOS 8, OracleLinux 8, and AsiaNux 8 commit 8b2369ac8512b1436dbe2de5617e0265b522ee3a Author: Oliver Kurth Date: Fri Sep 15 11:23:58 2017 -0700 lib/file: Remove long dead functions from file.h These routines no longer exist. Remove them from the header file. commit e2da656025ba8ddb8a8b223f9e73c0057a2eeeb9 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Revert part of the previous commit. Remove the VIM mapping for now. commit 6ca6d42820b0ae44b02187925ebce7d2d21ab5e0 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 guestOS: Add SLES 15 and RHEL 8 commit 31a6c06caeb75afd7d6a7e017c3b95b60ca9b6f0 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Change to common header file; not applicable to open-vm-tools. commit 1b9b067c39da8446cb28a66914ff61dabadc71e9 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 0c0f3e3c1fa82a1d63b75ccf6d8d775d915c66cf Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Changes to common header files; not applicable to open-vm-tools. commit c8811a844992cd610e0043998f8554989e843bd7 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 91cd3e4fcf02ac4d5ada8723e6e6b285768d351b Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 lib/file: Improve File_CreateDirectoryHierarchy error detection commit 84f5ee1d65982ced4f4e0dd847cfe7658e77b873 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Fix processing RPC data in TimeSync RPC handler RPC data is whitespace delimited string and any leading whitespaces need to be ignoreed before processing data. The data here indicates whether timeSync should do a backward sync on this RPC callback. commit 31f97a69bf993057f56ea16e2899c2f55c84f8d6 Author: Oliver Kurth Date: Fri Sep 15 11:23:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 9291087e5c01b0dab662bb61530d3ee5ce469a13 Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Adjust some logging levels Make some of the more common vgauth failure cases show up at default debug level. commit 0f94e2468307d13b9d70938e1ad817bceeb2e2b2 Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Add support for 64-bit inodes in FreeBSD 12 FreeBSD 12 is switching to 64-bit inodes which will cause some ABI breakage in user code. This fix modifies the getdirentries() syscall used in hgfsServerLinux.c for that FBSD 12 64-bit inodes. The fix was provided by Josh Paetzel in open-vm-tools pull request https://github.com/vmware/open-vm-tools/pull/190 commit b851f91268e947ab4e7aff8c6bc9e3c84f7d81f4 Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Enable bsd_vsnprintf for __ANDROID__ Remove the __ANDROID__ check from Str_Vsnprintf, et al. It's not supposed to be there anymore. commit 75c55bc6c01624884515b71af7e1a7a7843519e6 Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Add support to check if a native guest time sync service is running. This change adds support to VMware tools timesync to identify if a guest native time synchronization service is running. If a native sync service is running, then a resync command is issued. If native time sync service is not running, we fall back on legacy VMware tools onetime sync to do guest time correction. We also post a callback to do legacy VMware tools onetime sync after a timeout period. A timeout can be configured if guest native resync command fails to sync guest time. commit 695ab7662e4c9d25a5f86d298f04d777cd400cbf Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Fix some compatibility issues between bsd_vsnprintf and bsd_vsnwprintf Fix some compatibility issues between bsd_vsnprintf and bsd_vsnwprintf so that the lib/string unit tests can have consistent results. * bsd_vsnprintf used uppercase hexadecimal digits for %p but bsd_vsnwprintf used lowercase. vsnprintf has much more inertia, so use uppercase in both. * bsd_vsnprintf's floating point output was adjusted for bug 704706, but corresponding changes were not made to bsd_vsnwprintf. commit deb3feeefd8f653d1fe0e54e6708d8cacde5ab1d Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 lib/file: Continue simplifying and optimizing Since we're UTF8 only, there are simplifications and optimizations that can be done to lib/file, particularly in the routines that look for directory separators and ASCII characters like '.'. We don't need to use the unicode library to deal with these type of code points. This is the second in a sequence of changes to improve lib/file. commit a1290e66021b3d1e9d0f3c45edea80c5e7fb8488 Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 27d72451d479d96f1d1de901cb76820f5bdac38e Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e30c97abc0fb8f0f6034d56d93b63b629365e2cb Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 Fix lib/string unit tests Updates to lib/string.str.c and its unit tests. * On Linux, Str_Vsnwprintf uses vswprintf from glibc[1]. However, glibc's vswprintf implementation appears to be broken by not NUL-terminating the destination if truncation occurs. Make Str_Vsnwprintf explicitly NUL-terminate along this path. * The unit tests expected that Str_Vsnwprintf use %s for wchar_t* arguments (and %S for char* ones). That is a Microsoft-ism (necessary for TCHAR-based printf functions to use the same format strings with or without _UNICODE). Our bsd_vsnwprintf function instead uses %s for char* (and %S for wchar_t*). Existing callers to Str_...wprintf use use the BSD implementation and expect the BSD behavior (which is consistent with standard C in this regard), so go with the existing behavior and adjust the tests. * Some of the tests passed int arguments for floating-point format specifiers. This is undefined behavior. * Some of the tests had more format specifiers than arguments. More undefined behavior. * Finally, the existing Str_...printf tests are fundamentally flawed: they compare output against the system's printf functions. However, the whole point of having our own is to have consistent behavior across platforms and to work around bugs; the output therefore cannot be expected to consistently match. Instead rewrite the tests to compare Str_...printf output against fixed strings.[2] Additionally, enable these tests only if HAS_BSD_PRINTF/HAS_BSD_WPRINTF are enabled; I see no point in testing the system versions (which won't have consistent output), and IMO the BSD implementations are the only ones we should be supporting. [1] I do not understand why HAS_BSD_WPRINTF is enabled on Linux only for < gcc 2.96 (and not at all for macOS). This probably should be fixed, but not as part of this change. (I also don't know why HAS_BSD_WPRINTF is distinct from HAS_BSD_PRINTF.) [2] bsd_vsnwprintf is not consistent with bsd_vsnprintf for all format specifiers. I plan to deal with this later, but for now, make the expected strings match the actual output so we have a starting point where everything passes. commit d04babd5bc7de9015c0fe881652723498069e7fa Author: Oliver Kurth Date: Fri Sep 15 11:23:56 2017 -0700 lib/file: Cleanly handle directory separators We want to handle Windows allowance of "/" and "\" as directory separators. Let's have an easy way to check things and use it. This is first in a sequence of changes to improve our handling of directory separators in lib/file. commit f72d3ce3571f93e9dc8a404bece8264e8081e493 Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Add missing "const" to previous commit. commit a518cc08a6e6f77a665eefa0f29b19e5077a8445 Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 lib/file: Rework File_ReplaceExtension and File_RemoveExtension Fix a bug and simplify the code. commit 24de06bc3d445d68ebee9b55efd5393520ef8dab Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit a53bde7ecfdd3c544010559f1b84c11396fa9f7d Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit d840729ea449e19f9f2b6d5105c053c09085c364 Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Rename some parameters The generic parameter names for Posix_Symlink/Posix_Link are rather confusing. Rename them. commit 1917d98e6b002670095cec13b363f5894ab8cc0f Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Revert previous commit. commit fbc7387c1edb0bc619cc05fecb84030809c38867 Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 lib/file: File_ReplaceExtension fails in the root directory On Linux, File_ReplaceExtension returns an incorrect path name for a file in the root directory. The code, as written, doesn't differentiate "test.txt" from "/test.txt". Fix this. commit 0f386a32789574bb73f75f0e8e82e80f0511416c Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Update AUTHORS with pull request for fixing gcc6 build issues. The issue in linuxDeployment.c has been fixed. This change is to udpate the AUTHORS file. - https://github.com/vmware/open-vm-tools/pull/107 - https://github.com/vmware/open-vm-tools/pull/107/files#diff-ffeb9f9be2f25b5b92ecf9101fa3aae5 commit 2ad25b6bfe88e47dc9b2b995eba5af1a317aacd0 Author: Oliver Kurth Date: Fri Sep 15 11:23:55 2017 -0700 Update __IS_FREE_BSD__ macro in vm_basic_defs.h The __IS_FREEBSD__ macro in vm_basic_defs.h uses "defined" in the definition. That is undefined behavior and the FreeBSD default compiler, clang (LLVM), warns about this pervasively misused construct. With all warnings equivalent to an error, builds fail. The object-like macro __IS_FREEBSD__ has been rewritten in a manner acceptable to the current C standard. Open-vm-tools pull request: https://github.com/vmware/open-vm-tools/pull/136 commit c1c9b66c580bdda09d0c1e41d3d01e2803a9221f Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 39b3a708936a663d24a5ab8c6f4c45cd44dc12bb Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 Include new CAF PMT files in open-vm-tools Add new CAF PMT files CmonitorListener.cpp, CMonitorListener.h, and preconfigure-Listener.sh to open-vm-tools. commit fcee9fe84ab642d88230a0cb7b8db6fe6e2207d2 Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 Re-instate ASSERTS in circList.h commit 136eab69cc5fcd9e4bdb2766810f5cb0a791c0ad Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 services/plugins/dndcp/dnd/dndCPMsgV4.c: - Rework DnDCP v4 message validation. commit aa18cc61e5f1233cafff489be63b5660d9b8458b Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 deployPkg: Fix duplicate log message issue Use linebuffer to prevent duplicate log message for forked off processes during customization. commit 321eaaafc80bc4d7e7c07b779d8021ff7adb27fc Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 Make TimeUtil_GetTimeFormat avoid a null pointer dereference if ctime_r fails ctime_r potentially could return NULL on failure. Instead of blindly dereferencing the result, TimeUtil_GetTimeFormat should check for that and also return NULL (which callers should already expect on failure). commit 74fab8557791b3b546c39a0a833ff9b5d9914d40 Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c4b6c83951aef605686f6313be4d0e18fb5abf9f Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 resolutionSet: Should not free RandR12Info when RandR12GetInfo failed If for some reason RandR12GetInfo failed to return RandR12Info, it should not follow the cleanup path to free it. Instead it should return FALSE. commit ff8a4800edf33a887efcce487efd763f9343c71f Author: Oliver Kurth Date: Fri Sep 15 11:23:54 2017 -0700 Export and call a valist version of Msg_Append This change exports a valist version of Msg_Append. commit e43c3c193057843232471bb7c427781c22774832 Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 Common header file change: not applicable to open-vm-tools. commit e28fabf2876cd256b80ad863a0d610d103fd121e Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 VThreadID: change to uintptr_t commit 2c2426bd2120546d93f0b7b49a22e9b3689556c0 Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 Add 10.1.15 update release to vm_tools_version.h commit a02ecfdc12e18aa9aa1b4f9e1d6c61fa3eb9cdd3 Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 182df3e67dcd21f143aa5e1741ba4381067a21ee Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 lib/file: Posix FileLock_Lock pathName handling Locking "/tmp" should create a lock "/tmp.lck". Locking "tmp" should create a lock "./tmp.lck". commit 06c0cf16d765c4718825cc28ad9997476b5b0423 Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 Add vmx config options for guest time service resync. VMware tools timeSync can be enabled in a guest that also has a native time service running. This can lead to race conditions when both the time services are trying to correct system time. Particularly, when both of these services tries to do a step correction on certain events, guest time behaves in an undesirable manner that could cause guest applications to fail. This change introduces a couple of vmx config options that can be used to eliminate or atleast reduce the chance of race condition between VMware tools timeSync and guest native time service (like w32time or NTP). The basic idea is to utilize native time service to resynchronize and recalibrate its parameters and force to do a step correction if necessary. VMware tools timeSync would send a service request to native guest time service when it needs to do a step correction, rather than correcting system time itself. This helps in having a single service responsible for correcting guest system time and eliminates/reduces race condition. "time.synchronize.guest.resync"= controls whether this new method of guest time synchronization is enabled or not. There might be situations where native guest time service resync request is not successful. This could happen if the native time service is not configured correctly or if there is an intermittent network outage, etc. We would like to fall back to using legacy way of VMware tool timeSync onetime correction in such failure scenarios. "time.synchronize.guest.resync.timeout>=0" vmx option allows us to achieve that. Tools timeSync would initiate a resync request, then wait for 'timeout' period of time and would fall back of legacy timeSync onetime sync behavior. This allows us to correct guest time even in case of native guest time service failure. commit bb819650082a6714d0435831bf2bbf31c66718c5 Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 Common source file change; not directly applicable to open-vm-tools. commit 433f1f2b4db1e55e9576ab5bb0bf02a4e040a299 Author: Oliver Kurth Date: Fri Sep 15 11:23:53 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 63e4a016d5bba58121cbbebb8f7711a0bf70436c Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 VThread: factor out common thread-name assignment commit 4a08aedc1a3bfbe666896d13380265f3948684ac Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Hgfs OSX Server: Create and use server callback table for change notifications There are now three different callbacks into the Hgfs server from the file change notification component. So we now pass these in a table to the nofify module when it is initialized instead of ad hoc. Previously, the same callback is passed for every subscriber watch event and therefore duplicated and stored in each subscriber. Note that the feature is currently switched off by default until these changes are complete. A user will explicitly have to enable the VMX file setting and would cause a VMX assert to be triggered. Details: - The server now creates a table for its notification callbacks and passes it to the notify initialization function. - The server now includes the async thread registration callbacks previously ifdef'd out. - The Notify_Init function APIs are updated to reflect the new argument for callbacks. - The HgfsNotify_AddSubscriber argument does not include the callback as it is now passed once at the initialization time. - The HgfsNotifyEventReceiveCb type has been modified now it is an entry in the callback table. - The subscriber callback function call is now validated to be non-NULL before calling. - The Mac notify module adds the server callback table to its FS event context which is passed to the event generating submodule for the Mac implementation. - The Mac notify module adds its own FS event callbacks for thread register and unregister called from the FS event module when registering and unregistering its FS event thread. commit 3633fa4ab2b5cbd97bfed0cdc14cda842675bd9e Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 CAF - Preconfigure the listener + follow guest proxy Listener is auto configured during the install upon MA being started. Listener is started/stopped automatically when tunnel is enabled/disabled. commit 1f72b0f9878355ea2263d57b16dd35682b2720f9 Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e854fc4e547c5f7f4c989e38e233e6567d588386 Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Add error logging to lib/file/file.c create folder functions commit 7e5f9a8025926b56e77d63f11cff70b606dfd0be Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Re-gen rabbitproxy key if its perms are bad Make sure nothing has played with our keyfile permissions. The old (9.10) VB script that generated the key left it world-readable, and it's also possible someone could mess up the perms. This change checks the perms, and if they're wrong, regenerates the cert & key. commit ad4f5db55d031ce7d1b75ddc64c3f046c24469de Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 GuestInfo: Add option to exclude network interfaces VMs running docker can have hundred of virtual network interfaces. Also, docker creates one virtual network interface 'docker0' with an IPv4 address. This address is useless outside the VM, and should not be propagated via GuestInfo, or even as the primary network address. This change adds on option for tools.conf to exclude specific network interface names using patterns with wildcards. This makes it easy to exclude virtual docker interface names with the option exclude-nics=docker*,veth* For convenience, the option is set to docker*,veth* by default, except for Windows, where it is "vEthernet*". To send information of all interfaces, including docker* and veth*, the option needs to be set to an empty value: exclude-nics= commit 6a74858200ae2fb5908b74676da56124d83a8285 Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Fix vm_basic_types.h broken in previous commit. commit 6cc7edaf4294f47d6210af45c1ba64d967a031a2 Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 8b50e2372fbf110a1e41225c9e67fb6720344f8b Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit d36368429913b21291917e4b00bc2ba92e2d3c0a Author: Oliver Kurth Date: Fri Sep 15 11:23:52 2017 -0700 Remove VThread_WaitThread commit cd7b6d0c9575f9728f425d3043fc87639bc2cab0 Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 VThreadBase: Final cleanups commit a10c8df8b9f9609e025d231fe596e2fce6b8e750 Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 Tools Hgfs Plugin: Refresh Hgfs drives on client start In order to get Explorer to see that VMware Shared Fodlers drives are available when the feature is enabled, we touch each drive that is mapped as a VMware Shared Folder. This is to prevent users being confused when they have the feature enabled but Explorer creates the user's drive mappings before the tools service has initialized the Hgfs plugin and started the Hgfs client. In this situation the drives are marked as red (disconnected) until the user clicks on the mapped drive when Explorer will refresh the connction and set it to green (connected). Details: - Main service will usually create otheriwse open a named event to synchronize with the user service. - Main service will start the HGFS client redirector (as before this is not new). - Main service will set the synchronization event to signalled. - User service will usually open the named event (or create it if first). - User service will enumerate all the mapped network drives and, if they are provided by the VMware Shared Folder redirector, reconnect them. - The named event will be created with Administrators group all access and Everyone with modify state to signal it and synchronize to wait on it. commit d4a5693af649e7c8f87667c60b7e6575b15faa0e Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 Emphatically close virtual disk. Sometimes I/O stack modules return EBUSY during teardown. This may be due to an external process opening files at inopportune moments. The workaround is to retry the affected operations. commit 04d01f93f26b748d0fbb6bc1ea571e90fbc005d7 Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 lib/file/filePosix.c: Implement File_GetMountPath() for POSIX - The change implements File_GetMountPath() for POSIX, using realpath(3) and readlink(2). Changes to common header files; not applicable to open-vm-tools. commit 47ffaf37a9f604ffc1099d249dba21857dd426d3 Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 VThreadBase: Switch to "stable" thread IDs Now that lib/thread no longer has a dependency on small-numbered VThreadIDs, and now that lib/thread has ceeded control of assigning VThreadIDs to threads, we can make VThreadBase really simple. commit c6f360fc8e9b25d9478864903886895cedeff4e0 Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 lib/lock: Clarify comments commit d98582711a87185657cd9f125d58f3fdd48dbc0a Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 Clear vmusr as resolution_server when resolutionKMS is enabled Whenever resolutionKMS is enabled, send "tools.capability.resolution_server toolbox-dnd 0" to clear resolutionSet as resolution server. commit 22c3f23f55153f08e788db6c4ae7a96d555ed8ca Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 Changes to common source files; not applicable to open-vm-tools. commit eecfdd625b3e134830a7c012fc8aadda36bfd4da Author: Oliver Kurth Date: Fri Sep 15 11:23:51 2017 -0700 Use correct osname for FreeBSD 11. For FreeBSD 11 and later the correct osname is "freeBSD11". Without the correct osname, guestInfo ends up with the wrong guestId and guestFullName. Also cleaned up some unused code. commit 0ca5c37c17a9631533de41eba1f770ca833c07e9 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit fbead2824b81be34cb2a61e1310da9188adc383f Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit fbd04d3227be7adeb307b508d7994236161927f5 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 74e48b8fc16e6cfe765a32568e437a98d3ad1548 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 00b13522c0f12774b2d39e999855216f53648c1a Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 407459a2ceee1d845a5055a856b5947ca00836f4 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 VSOCK: Add getsockopt to determine stream socket disconnect cause This is the vSocket part of adding support for getting the disconnect cause of a vSocket stream socket. This adds a getsockopt option to determine stream socket disconnect cause as registered by the underlying VMCI queue pair. commit ad5c63faa35f3b3e8e6a035e76ba1c043ae8c756 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Convert Util_GetCurrentThreadId to VThreadBase_GetKernelID This code now "lives" in VThreadBase since it is thread-related. The two functions behave (very) similarly. Some locations should use VThreadIDs instead of KernelIDs. Convert them. Remove the util.h and lib/misc bits. commit 55a1aa0c2917bf69c919bd6b202464d8b3febee3 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Remove Util_GetCurrentThreadId from VIX Some cleanup now that VThreadBase_GetKernelID() is available in VIX code, we log the thread which made certain API calls. The thread name is already logged in our Log() implementation, so having the thread ID merely wastes bytes. Remove it. (Thread IDs like this are useful for correlating with kernel logs. Which in practice does not apply to VIX). commit b8912055edb714afd8c0b1124a64502c712f0f6c Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Add some tweaks to make it easier to test old tokens At times its useful to be able to play with SAML tokens which have expired assertions but we still care about signing or aliasStore configuration issues. This change makes it easy to tweak the code and run these old tokens through. commit 241fd29fa3352d17aacc13754de3304538d0a3d4 Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 Enable XML manifest by default. Enable Tools enableXmlManifest by default for quiesced snapshots on Linux. commit 3b80a0df4bac2f5de52117096a482ab3f490f52a Author: Oliver Kurth Date: Fri Sep 15 11:23:50 2017 -0700 lib/file: Must be errno safe lib/file is documented to be safe about returning errno. This is true on Window and Posix platforms. We've had a bug where free can change errno. We created Posix_Free to protect errno but haven't used it consistently. Make lib/file use Posix_Free universally. commit 0dd222a31a10c0591a95009e7ca7c60046b6e6b3 Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Changes to common header files; not applicable to open-vm-tools. commit 94e8e7478d2528466d0eecbd29aa441f748a4235 Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Hgfs Server: Fix the tools build Make the HgfsServerAsyncInfoIncCount to be VMX code only as the current usage is not in the tools implementation. commit 3466376924a5338b3b596d8f960942e30b0ecef7 Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Hgfs Server: Move async request globals into the Hgfs session This change moves the async request globals into the Hgfs session. They are only applicable to a session and only used during a session's lifetime, so making them global is not necessary and means that they take up resources when not used. Details: - Move the previous globals into a structure for async requests. - Add the async requests structure to the HgfsSessionInfo object. - Create a set of helper functions to init, exit and manipulate the async requests structure. - Remove the calls to init and teardown the globals now they don't exist. - Add the helper calls to the session creation and destruction. - Add the helper calls to replace adding a new async request, removing an async request, and waiting for all async requests to complete. commit 93f1036f2d69c6c50780a536eb6b2a15b198c03a Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Remove dead FileMacos_IsOnExternalDevice function. FileMacos_IsOnExternalDevice does not have any callers. commit 0db66edd78699e10f069476998cb3469c42da316 Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 10eed7e90059f666e50a0ca4df1de2f4947bd62b Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Add MacOS 10.13 to guest os tables commit dec55c31e7dcdbb747647123ad60cc2cde4e0635 Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Avoid loading resolutionSet when support for resolutionKMS available Loading resolutionSet with display NULL will cause a segmentation fault in vmtoolsd user process. This change only avoids the SEG fault. Still need to channel the resolution/topology request to correct channel presenting the capabilities. commit 4fe253f4e6234f3bb78b270c371d8fdba967ff0d Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 3a9fa9be672b582088c3219420b2dfcb37b60376 Author: Oliver Kurth Date: Fri Sep 15 11:23:49 2017 -0700 Formalize VThreadBase "Stable" and "Kernel" IDs Unrelated to open-vm-tools. commit 932781290802e9c152b219c656d18ca03bf4df43 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 lib/file: Less variation on file lock waits The wait time are large enough that less variance will prevent too frequent polling. This is important due to the randomized waiting now. commit ffc043963f8da7e83bc091262301876ce7016a76 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 Remove definition for "solaris12-64" commit 964e7623701cd03bd4b8529abab0a083b94e8570 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 24a6ab223b139fdc191b913d8d551ed61ca07e01 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit a6ce51f170a2073b5b39680c2526de9e4de865b2 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 Fix Atomic_SetBit64 being miscompiled when the bit argument is a constant. commit d7a7fca30e47414827528163a4c96145dcd6043e Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 lib/include/sha1.h: - Clean up - change unnamed struct to "struct SHA1-CTX" in SHA1_CTX typedef. commit 22b146ef9a291b9c4cd8a604de3e042cec886eda Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 lib/thread: Prune a little more Remove automatic VThread_SetName for unmanaged threads. Other minor removals and tweaks: - modify "safe" name in VThreadBase to use gettid or pthread_threadid_np if available - Move lib/thread name computation to child thread to remove dependency on VThreadID in parent. - Convert VThreadFreeID to VThreadFree (and avoid a lookup) - Move VThreadBase_ForgetSelf to VThreadDestroyThread to make VThreadHostDestroyThread straightforward. - The 'priority' field had become write-only after earlier cleanups to replace AdjustThreadPriority with SetThreadPriority. Remove it, and some dead comments mentioning it. - Remove unused 'signalNestCount' atomic. - Remove two unimplemented VThreadInt prototypes. - Remove a vacuously-true ASSERT in VThreadHostExitThread() commit b1c4f77f80b8ecfe3c97bd8d14b42e8543b12303 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 564668d513a4fdb595fd4440f4e640c752c24e12 Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 lib/file: Add a comment on why sleeps for file locks are randomized The randomization prevents lock cadence issues (thundering herds). commit 087e74c292fcad86afa08d6a21b88cb57ab3bc7e Author: Oliver Kurth Date: Fri Sep 15 11:23:48 2017 -0700 Hgfs OSX Server: Reinstate checkpoint synchronization and process session First reinstate the server checkpoint synchronization routine by adding it into the table the HGFS server session callback table which is returned to the transports upon initialization. These transports will then call into the HGFS server when asked by the HGFS server manager which receives the check point synchronization calls. When processing the synchronization request for the operation type - freeze or thaw we must pass through the session information to the activation and deactivation calls into the file system change notification subsystem. These calls will require the session for register-unregister any active threads generating events. This change just plumbs through the session as the argument. Follow on changes will make use of the session argument passing it on to the event generating component. Bonus here is that we can delete an unwarranted global from the HGFS server. A to do comment is added to move the async globals into the HGFS server session object as they should be a per HGFS session and are useful only on a per session basis. No session then no need for them to be around and if the session does have asynchronous support then again will not be required. For example, if the transport does not support this behavior no need to check them. commit 774bfbf5d5752b22947dd975b14734c30aec6379 Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 Improve a comment commit a7c6fce7191365c07b1e70abee314e18295b49c9 Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 Clarify a comment. Spell out the units. commit 35683b97ced00c29b0e3f65ee50ec6740e143a8d Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 lib/file: Use MIN macro commit 9c13bf3fb45c4ce5711cedbde11272fd3dd39511 Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 lib/file: consistant usage of msec We now want msec to be at the end, to be consistant with our current usage. commit a2165e98d3edac4f0c395549bd12a905038f9e81 Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 lib/lock: msec consistancy We want the "msec" at the end of variables. This improves readability and is consistant with the usage elsewhere. commit 8da9461f220ed391f60a78c4f0a9509c474f4d12 Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 lib/file: FileLockSleeper issues While waiting for a contended file lock, FileLockSleeper was using fixed values for how long to sleep between attempts. This can lead to a "thundering herd" of waiters - several waiters all on the same cadence. Randomize waiting to avoid any cadence. Waiting for a lock should wait no longer than the specified time. Fix This. commit 174644096520c5cd6d26a4a9cf3d8e5a410af52a Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 Fixing the UTF-8 locale dependency in CAF. CAF currently has hard dependency on UTF-8 locale which is resulting in Tools and CAF failures in environments without UTF-8 support. Modify the existing code to fallback to ANSI C locale if UTF-8 is not found. commit d3491185377ec39e8031b1ffb806fe781f329c1f Author: Oliver Kurth Date: Fri Sep 15 11:23:47 2017 -0700 VThreadID: widen to uint64 Convert VThreadID to uint64. commit de798a4a4ab0d09bb3c0366f383bf8a46bf7d194 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 TimeUtil_GetTimeOfDay reports incorrect time on Windows The conversion from FILETIME to Unix time was off. commit 8ba9c76d322b24dc56b9bf51b018a0925f9f6d1d Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Unify mapping tables between VMX and VIM guest OS keys There are multiple places that maintain their own tables mapping VMX guest OS keys to or from VIM guest OS keys. Unify them to make the situation a bit less cumbersome. Put the mapping table into guest_os_tables.h. The different sites use the mappings in different ways (some code wants the VIM guest OS keys as strings, whereas other code wants them as enum identifiers), so use preprocessor macros to extract the data. commit 211e99aad3da1a9c755e30bf4cf02667ff5480c4 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Save errno after kill() fails, restore the saved errno after logging the error. commit e1d6a45ccceb058eb428baca7d0b1a72c29c9fe5 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Fix error introduced in strutil.c commit 3c12e7db4c252e67a1f9a8e758408a0af387850c Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 timeutil.c code cleanup. commit 324bec1a2057ceb7d37469709ed2b8db2ca6348e Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 The check for overflow in StrUtil_SafeStrcat needs work. Might as well avoid protential overflow while also checking for "insane" string lengths. commit 9363088bda0da2ff1798fb0ac39117054cc83421 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Common source file changes that are not applicable to open-vm-tools. commit 7f80d52ddbe15f33b666eb429e64852becff1696 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Remove obsolete product version definitions commit 3b63e7702a0c945bd9a87b24ef5cfd54574227a2 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Don't call FreeLibrary with NULL. According to the documentation and annotations of FreeLibrary, NULL is not a legal value to pass. All other calls to FreeLibrary are correctly handled. commit d8c55cda2442b948d12de3c542c3c30c2daa9926 Author: Oliver Kurth Date: Fri Sep 15 11:23:46 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 765d498b9aadd37a72cd3a0f79f67dd6a878ef90 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Common header file change; not applicable to open-vm-tools. commit e5fd332b6ce8e712dffa7d8e828e3e4a47a3f063 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Common header file change: not applicable to open-vm-tools. commit 84cf06912d4060ce29fd7a3b765eb34917dd1501 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Remove logic for unsupported versions of macOS. We no longer support macOS 10.4-10.7. Remove the old logic that supported these versions. commit bccd28961d9c23271126fee1a2b45c9acd698107 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Create symlink for vmware-user When the vmtoolsd user daemon receives a SIGUSR2, it restarts itself by executing 'vmware-user' and terminates. This is used on upgrades, to make sure the current version of vmtoolsd is running. In the tar installer, /usr/bin/vmware-user is a symlink to vmware-user-suid-wrapper. Unfortunately, that symlink was not installed by open-vm-tools. Package maintainers should send this signal to the vmtoolsd user process when open-vm-tools is updated. commit 4e7e626ceef413b02c3831cc25f70be970bc9829 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 AsyncSocket: - Fix issue where the listening socket becomes bad and the callback function is invoked unexpectedly. - Change not directly applicable to open-vm-tools. commit c85fe685b518311d3fa1f2ce44b6c7ba38500d2d Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 err.h: Add missing include err.h is missing any include that would provide a definition for DWORD. Fix by including vm_basic_defs.h (which includes windows.h) commit 05d0f730fb032f80de169318d90fb973012a9d93 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Common source file change: lib/include/strutil.[ch] - Add function StrUtil_GetLastItem() and static functions StrUtilStrcmp(), StrUtilStrncmp(), StrUtilStrcasecmp(), StrUtilStrncasecmp(), StrUtilHasListItem() and StrUtilRemoveListItem(). commit 836575d370458bd2c34324f921d561c551a6b0d1 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Remove N_PLAT_NLM (NetWare) Long ago, we supported NetWare. That's long since gone, but a few of the macros have managed to survive fumigation since. This removes all such macros. commit 237cb3a758d23355f559756ce159f59f6dea8c5c Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Update the open source license files for Tools. commit b51fee38c87ecccd7774107e22b85f0eea1a7309 Author: Oliver Kurth Date: Fri Sep 15 11:23:45 2017 -0700 Revert previous commit. commit f68ecb12ebc92592463c0cdcd97f50bc5abb8ea2 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 lib/misc: StrUtil_SafeStrcat length overflow checking The check for overflow in StrUtil_SafeStrcat needs work. Might as well avoid protential overflow while also checking for "insane" string lengths. commit ecdc55d43ab00c0a0454af1bc15a8b215f086c55 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 lib/thread: Change VThread_CreateThread prototype Change the VThread_CreateThread prototype from this: VThreadID VThread_CreateThread(void (*fn)(void *), void *data, VThread tid, const char *name); to this: Bool VThread_CreateThread(void (*fn)(void *), void *data, const char *name, VThread *tid); The new prototype returns essentially the same information, with one important advancement: we can contractually guarantee the 'tid' field is populated BEFORE the child thread starts. This neatly avoids all sorts of interesting race conditions where the child starts running before the CreateThread function passes back its return value. This style of design is preferred by operating systems (see Posix pthread_create, Win32 CreateThread). commit 998f79aaf08b7d1f94693441a71c7f8dba4be34c Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 Don't try to use broken RPC channel Make sure RPC channel exists before trying to use it. commit 5c3e95565dc086143e1311e53f0b5cacacca8233 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 Check for Xen, VirtualPC etc., only if VMware not detected This is a workaround to avoid random vmtoolsd crashes when running on a VMware VM. This fix ensures that we check for Xen and VirtualPC only if we haven't already detected a VMware hypervisor. commit 8dac3e7b85c8c19168c89ddae32d2e99c2b693c5 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 5799596b11f1a907a35549952812bd20c48a84d5 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 strutil.c: code clean up commit d2321f07f86157886bbfa96c05c5bf4598151696 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 Atomic_CMPXCHG64: pass by value and remove gcc-2.96-isms commit e2247e5ba1830c5ed70153027df4834285cd1041 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 Revert the previous commit. commit 42ac2a1eca59453870d8f09b83948f3c04c559c3 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 Get rid of convertutf and bsd_printf for all non-Windows Tools Eliminate the use of convertutf8.c for all non-Windows 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. commit 8484528eef9106be5a58885b29083a8622bcdc76 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 fileIO.h: Clean up some comments Make the comment style consistent commit 9fbb5a9c0eb6aa1571689c1b960ab7acf7cb7b19 Author: Oliver Kurth Date: Fri Sep 15 11:23:44 2017 -0700 lib/file: support POSIX O_CLOEXEC On POSIX systems add support for O_CLOEXEC - close the file descriptor if the program does a variant of the exec system call. commit f5f0d2872ff77a586a24a8959a74e85cbf30654e Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Hgfs Server: Fix snapshot synchronization callback Currently when snapshots occur, the VMX calls the HGFS server manager synchronization callback to notify the Hgfs server to freeze or thaw the Hgfs file IO activity. First, this Hgfs server synchronization callback is called regardless of the Hgfs Shared folders feature and server is enabled or not. Consequently, the Hgfs server callback lamely uses a global variable to track the server state just for this call and returns without doing anything if not initialized. Second, the HGFS server now requires the transport connection in order to extract the Hgfs session as the file notification component requires the session to allow its event generating thread to callback to the server to register and unregister through the transport which uses the PhysMem APIs. This change fixes: - call the Hgfs server only if Shared Folders and the server are enabled - call through the channel manager and channel transport to the Hgfs server - Hgfs server session callback table is extehded with a server quiesce callback. - HgfsServerSessionQuiesce callback now replaces the old HgfsServer_Quiesce exported API. - Make the quiesce callback use an enum to the thaw-freeze op instead of a bool - remove the Hgfs server initialized global now it is not required The tools implementation of the Hgfs server code does not use this API and thus the guest Hgfs manager and transport channel do not implement any code which will use the session quiesce callback. commit 4dbe96f4970bd8878bfe3da2b2ed46c9c4ccf099 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 FreeBSD: Use the "dhclient" command to renew a DHCP IP address. On FreeBSD, "/etc/rc.d/netif" is sufficient to stop a network interface when suspending a VM. When resuming a VM, DHCP configured interfaces must be restarted with "/etc/rc.d/dhclient". This fix is courtesy of Steve Wills, maintainer of open-vm-tools on FreeBSD, and Shuai Wang. Pull request: https://github.com/vmware/open-vm-tools/pull/142 commit 27a9808452e78dfb76234c8c8c983ec3ccd04dc0 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Add utilZero.h to open-vm-tools commit 7bffaf26f46a28893e07df2a46bfdb612b8a15c2 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Remove memory zero related functions from util.h Add a new header utilZero.h commit 88358a74766f2302f85d4e614a07fd07dbed9a37 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Log xmlsec1 version details For better debugging of open-vm-tools, log the xmlsec1 version info. commit 21dc0516201085e760d831d187b5232acf3a17d0 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Hgfs Server: Fix a memory leak on server exit not destroying the shares This change fixes a memory leak on server exit not destroying the shares. The list of shares is not destroyed and left. Fix this at the Hgfs server tear down by calling the shares reset with an empty list which will cause all shares to be treated as stale and so deleted. commit cec1221e1a48db9e127ad271d6e7ddfc7fe27dce Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit a11b7dda01aaefa63f57cbe2f15352c06f2c55eb Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 CnP formatted text doesn't keep text format in Fedora 25 In Fedora24, the selection target name for rtf is text/richtext. In Fedora25, the selection target name for rtf is changed to text/rtf, which Tools did not support. Add support for the new selection target name "text/rtf". commit 99ee155b5923cc036c7412b494c36e7d7dd38f50 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Support building open-vm-tools only for FreeBSD 10 and later. Implemented a check for FreeBSD version and abort if the detected version is less than 10. commit 6091407c4a7e191925bb1b668a99df4ca7e2fab5 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Stop building open-vm-tools for LINUX systems with glibc < 2.12. Implemented a check for glibc version and abort if the detected version is lesser than 2.12 (This affects RHEL5 and older generations). Implemented a config switch '--disable-glibc-check', which when specified, will skip checking for compatible glibc version. Modified the tools-pkg.make file to specify --disable-glibc-check while executing "./configure" for open-vm-tools. Note: glibc check is done only for Linux systems. commit 94509955865e6bef7818675761d6dbb9d83df6e5 Author: Oliver Kurth Date: Fri Sep 15 11:23:43 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 888d4a7a8394e4391b9abb09b3884f7e1d5971b9 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Hgfs Server: Remove the register share callback and usage part 2 Now the function is not being called at all it is time to remove it along with the callback table entry for it. commit ec6c1f40fb15ffb0d8d6658b9a99c21c706ccb59 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Dynamic socket options API for async sockets lib/asyncsocket/asyncsocket.c: lib/asyncsocket/asyncSocketInterface.c: lib/asyncsocket/asyncSocketVTable.h: lib/include/asyncsocket.h: - Add AsyncTCPSocketSetOption(), AsyncTCPSocketGetOption() and AsyncSocket_EstablishMinBufferSizes functions. - Remove/deprecate specific option set functions to be subsumed by ->setOption(). - ->useNodelay() (TCP_NODELAY), ->setTCPTimeouts (3x TCP_... options), ->setBufferSize (SO_{SND|RCV}BUF), ->setSendLowLatencyMode() (non-native option regarding buffering/callback behavior). lib/rpcIn/rpcin.c: services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c: - replace AsyncSocket_SetBufferSizes() calls with AsyncSocket_EstablishMinBufferSizes() calls. Common header file change: not applicable to open-vm-tools. commit 63b5e3c8138c8d8561f2be8391ac3dc062e6afa1 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Remove BDOOR_CMD_FAS_GET_NVDIMM_FMT_CODE Now that our guest FW can read the NVDIMM format interface code (FIC) from the NVDIMM controllers MMIO space we have no need for a backdoor call to do the same thing. This change removes the backdoor call for reading the FIC and makes it's callers read the FIC from the NVDIMM controllers MMIO space instead. commit 028854fd377698d261aad7787723e4d3db1069b9 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Hgfs Server: Remove the register share callback and usage Remove the register share callback and usage which is an HGFS server libray function passed back to the VMX Hgfs server manager and policy manager. This tracked shares as they were individually added and removed. It carried with it VMDB behavior which was erroneous for the HGFS server share tracking. This API has been replaced by piggybacking on the Hgfs server InvalidateObjects callback which informs the Hgfs server when the VMDB has finished updating the Hgfs policy manager with shares and the Policy manager's list is complete. At this point the Hgfs server can close any open handles on stale shares and remove those stale shares and add new shares. commit f8d262a1dd1467b097b55f646ac3302531e4aef0 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 lib/misc/strutil.[ch]: New functions added; not applicable to open-vm-tools - Added functions StrUtil_GetNextItem, StrUtil_HasListItem, StrUtil_HasListItemCase, StrUtil_AppendListItem, StrUtil_RemoveListItem, StrUtil_RemoveListItemCase commit 2edd97267f299ec18b9c60cf613bef99497729b3 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Hgfs Server: Fix shares update for change notification This change fixes UI updates of the shares which currently update by a poorly designed algorithm which causes change notification subscriptions to be deleted and not restored and also unnecessary deactivation and activation of the events generation. Currently, the UI updates the HGFS shares in the HGFS server via the RegisterShare callback. This is done from HGFS VMX policy code which handles updates from the UI and maintains the HGFS shares. The UI calls the policy code for each share to remove it until the list of shares is empty. It then calls back for each share to add the existing shares back to the list. Currently, the policy code calls the HGFS server RegisterShare callback to delete the share as it removes them and then again to add each one back in that added to the policy shares list. Unfortunately, as the shares are removed any existing subscribers for change notifications on the deleted share are also destroyed. Furthermore, when the shares list is empty, the count of subscribers will also be zero at this point causing a deactivation of the file change event generator. Once, the shares are added back in via the RegisterShare callback no event subscribers will be restored as they are not tracked and the event generation will also not be activated due to that reason. The fix is to make the shares tracking be handled in the same manner as the HGFS server does for open handles on shares. The HGFS policy waits until the shares list updates are complete as the UI is done updating the shares. The HGFS policy then calls the HGFS server InvalidateObjects callback with the new complete list of shares which may or may not be different from the previous list. The HGFS server InvalidateObjects goes through its current list of shares and searches for each share in the new list of shares and if it fails to locate it, then closes all open handles on that share. Once the list has been exhausted, all open handles remaining will be on shares that still exist. The same callback is now used for resetting the list of shares for the current subscribers of change events and not the RegisterShare callback which should be removed altogether. We now make sure that the reset of file change event shares only removes shares not found on the new list thereby only removing subscribers on those stale shares. All subscribers for shares remaining on the lists are not deleted, remain intact and unaffected. Furthermore, file system event generation will also not be deactivated unless all subscribers happen to be for shares that were deleted. This change is the first part which as code to piggyback on the HGFS server InvalidateObjects callback to compare any shares in its list with the new list and delete shares not found. The RegisterSharecallback function code is deleted and temporarily is an empty callback. This will be deleted along with the callback code from the HGFS policy manager in a subsequent change. Details: HgfsServerRegisterShare - is gutted and just an empty function just logging that it is called. HgfsServerCleanupDeletedFolders is effectively renamed to HgfsServerSharesDeleteStale w/o the lock acquistion/release. HgfsServerSharesDeleteStale now free the share name as well as the share object to stop memory leak. HgfsServerShareAddInternal is extracted from the old defunct HgfsServerRegisterShare w/o the lock acquisition/release. HgfsServerShareAdd acquires and releases the lock and calls HgfsServerShareAddInternal HgfsServerSharesReset is created and called from the HgfsServerInvalidateObjects HgfsServerEnumerateSharedFolders now calls the new HgfsServerShareAdd for all shares which is used to initialize the shares on HGFS server start. HgfsServerGetLocalNameInfo now does not get the Shared Folder handle from the VMX policy host, instead getting it from the existing HgfsServerGetShareHandle (the server maintained list of shares). This is only used for setting subscribers from the client when using handles and not path names. HgfsServerSetDirWatchByName now uses the handle returned by the HgfsServerGetLocalNameInfo call. markedForDeletion is now removed as holding stale state is not needed since stale shares are deleted and resources freed immediately. commit 357f5304834d40ce8a1e97838766f34cc6d89ddd Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 2ca4b125656100d69c9f7868bccbb55d0547e852 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 94028b39e929b162ebc320f455fb2f5b3af53f04 Author: Oliver Kurth Date: Fri Sep 15 11:23:42 2017 -0700 Check timeout setting for scsi device before setting The rule to set the timeout value for SCSI devices was too generic, and caused error messages, when the timeout field was set when it didn't exist. This is not harmful, but generates unnecessary noise. This change adds a check if the timeout field exists. commit 5c77f471ccb8b87dd80f3928b313480aeb8edf0a Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit dc81979e78e1b8f42639aeb7aaec69f7ea49eb79 Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Remove convertutf and bsd_printf The license for convertutf.c and convertutf.h does not explicitly permit, or prohibit, modification of the files, and restricts use to "products supporting the Unicode Standard". This is a problem for distribution with Debian, which complies to strict guidelines. See details at https://github.com/vmware/open-vm-tools/issues/148 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823100 The code is not essential for open-vm-tools. It's needed by code in bsd_printf.c and related code, which in turn is needed by msgfmt.c and msgList.c. The latter code is not needed for open-vm-tools, and can therefore be eliminated from the open-vm-tools package. When HAS_BSD_PRINTF isn't set, Str_Snprintf() and Str_Vsnprintf will fall back to vsnprintf(), and Str_Asprintf()/Str_Vasprintf() will fall back to vasprintf(). Under Linux and FreeBSD these functions are properly implemented, and support %ls and %S. commit 131e4a60fa2d2db0c30920d826d23aec44d8ab09 Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Remove Linux kernel modules Remove Linux kernel modules from open-vm-tools. commit 5034ce882ff4ab49fc4a874009ce638b377bcdaa Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 optimize clamped uadd functions For unsigned adds, if there's no overflow, the result will be larger or equal than either source operand. Consequently, if there's an overflow, the result will be smaller than both, and checking against one source operand is sufficient. Found accidentally... (With just one comparison, gcc is in fact able to figure out the comparison is really the same as the add overflowing and will omit the comparison. But it won't do this with two comparisons.) commit ce18b4a333b1d0e757ba3e9b3f650f5d860f35c9 Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 VThread_Init: remove VThreadID parameter With the removal of static VThreadIDs, there is no longer any need to specify a specific VThreadID when initializing the VThread library. We can simply auto-assign an ID instead. Remove the VThreadID parameter from all callsites. Remove all VTHREAD_xxx_ID macros (except VTHREAD_INVALID_ID). Slightly adjust vthreadBase.c to "know" that VThreadIDs now start at 1, not 5. commit 92259d4832396c82d50b7a678ab294dceca34907 Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Changes to guest_os.h for Solaris 11 commit 45212bdaa54e336f53327f571b0aad48b89c787d Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Replace ASSERT_DEVEL(p) with DEVEL_ONLY(ASSERT(p)) It wasn't clear when ASSERT_DEVEL was enabled: was it for all VMX86_DEVEL builds or for the intersection of VMX86_DEVEL and VMX86_DEBUG? Replace ASSERT_DEVEL(p) with DEVEL_ONLY(ASSERT(p)) to make it clear that it's the latter. commit 3bf9c558ae09cb518d654643ee1d435de5b3a93f Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Include syncManifest.c in open-vm-tools only on Linux The VMTools build includes syncManifest.c only on Linux and not on other OSes such as FreeBSD. The open-vm-tools build needs to do the same. commit 1183d2b3ab8a75cb42272caacec8cc7f193e4651 Author: Oliver Kurth Date: Fri Sep 15 11:23:41 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 3ff49cad5bced6a1a2806a4791d42c33adfa8d25 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Common header file change; not applicable to open-vm-tools. commit b78434e97e937eb74c373c870d9c5b9e0b8296e8 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 VMCI: Reset datagram buffer pointer on dealloc A customer was seeing a guest crash when unloading the VMCI driver - but only when upgrading to a specific version of UEK. It turns out, that a BH may run during module unload, and attempt to deliver datagrams to the datagram buffer after it has been deallocated. It turns out that the tasklet may not have been scheduled yet, so add a tasklet_disable to guard against this. Also, reset the datagram buffer pointer when the buffer is deallocated to indicate that it is no longer there. commit e146ddb85e0f620faff25decc716ad406b4486e8 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Hgfs Server: Fix a memory leak of the transport connection This change fixes a memory leak of the transport connection object which was not being released on the final reference removal when the HGFS server is being torn down. This separates the initialization and destruction of the transport object into their own transport init and exit functions. Added the lock destruct and free call of the transport object to the exit function that were previously missing. Corrected or added some missing logging for debugging. Additionally, fixed the VMCI interface to correct its tear down order of functions which relied on the transport not being deleted. This involved moving the draining of out of band HGFS server requests or replies to the guest from being called after the HGFS server transport has been destroyed. Now it is moved to the correct place, where the sequence is now: - disconnect the HGFS server (i.e., stop generating any new request/replies out of band, - drain the existing out of band HGFS requests/replies - close the VMCI transport and shared memory callbacks - close and teardown the HGFS server session and transport - teardown the VMCI channel itself commit 7e50fb73f7920a305f7c29bf957eef3ef0b4cd72 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit b7512d420ef13408426928df08d0505c46c6522a Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 45c2246c6c84ff1923ac3f33d884b124530db8e6 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Port X11 resolutionSet off gtk Replaced gtk calls with XOpenDisplay to obtain X Display. Also moved getting the display logic (XOpenDisplay) from ResolutionToolkitInit to ResolutionBackendInit and corresponding XCloseDisplay in ResolutionBackendCleanup. ResolutionInfoX11Type is used as back-end specific handle and canUseResolutionKMS bool variable to communicate to loader about resolutionCheckForKMS. Removed gtk header from ResolutionX11.c and ResolutionRandR12.c. commit a61a342fd48b248fc794d639c6690e42a4ebc7fb Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 resolutionSet/resolutionKMS: Force load the vmwgfx kernel module When testing for resolutionKMS system support, make sure the vmwgfx kernel module is loaded before trying to obtain an open file descriptor to it. Otherwise both the resolutionKMS- and resolutionSet tests might fail. commit 38f7adb5e37a49b6696f467efa5183d906538eee Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Changes to common source files; not applicable to open-vm-tools. commit 5949be840ee39f0853e98741bcae30e559914f00 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 9f3c5f179ed252f31c15e71ca45c83ae33a4dc62 Author: Oliver Kurth Date: Fri Sep 15 11:23:40 2017 -0700 Generate backup manifest files for quiesced snapshots on Linux. After a successful quiesced snapshot of a Linux guest, the snapshot is reported as not quiesced. The underlying cause is: - a snapshot is identified as quiesced if and only if a backup manifest file was provided for the snapshot; and - backup manifest files are not provided for quiesced snapshots on Linux. To fix the problem, VMTools will generate backup manifest files for quiesced snaphots taken on Linux, and VMX will accept and store such files. This change is for the VMTools side of the change. The VMX change defines a new VMBACKUP_EVENT value relied on by the VMTools change. Changes in this commit include: - new source files syncManifest.h and syncManifest.c with code to generate the manifest file, and updates to syncDriverOps.c to invoke that code. - a new "SyncDriver_GetAttr" interface in the syncDriver code, used by the SyncManifest code to obtain the name of the backend provider and whether or not it is capable of quiescing. - makefile and configure boiler plate to add the two new source files to open-vm-tools and tools-for-linux. - a new tools.conf setting enableXmlManifest that specifies whether VMTools generates backup manifests for Linux. For now, the default value of this setting will be false. commit 5bb569f29cd9780872eb212fc5a6dda9d85d2711 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Add a generic interface for accepting backup manifest files. The interface provided by VMX to allow VMTools to notify it that there is a backup manifest file to be transferred from the guest is specific to Windows guests. A more generic interface is being implemented to enable backup manifest files for Linux guests. A new vmbackup event is added for passing to vmx the guest's path for the manifest file, along with code for handling the event. commit 4a9834cedf0bc1c0303e2b078db87f8754c99564 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Spawn a new thread to handle deployPkg.deploy RPC Deploypkg takes some time to complete, so separating it to a new thread helps guarantee that the main tools thread can still respond to VMX ping/heartbeat messages. Before this change, the state changes on the vmx side are: ToolsDeployPkg_Begin ToolsDeployPkg begin finished ToolsDeployPkg finished copy deployPkg.deploy deployPkg.update.state 3 -- TOOLSDEPLOYPKG_DEPLOYING deployPkg.update.state 4 0 -- TOOLSDEPLOYPKG_RUNNING deployPkg.update.state 4 103 -- TOOLSDEPLOYPKG_RUNNING GUESTCUST_EVENT_ENABLE_NICS deployPkg.update.state 4 104 -- TOOLSDEPLOYPKG_RUNNING GUESTCUST_EVENT_QUERY_NICS ToolsDeployPkg finished deploy ToolsDeployPkg_Begin ToolsDeployPkg deploy state: 4 deployPkg.update.state 5 0 -- TOOLSDEPLOYPKG_DONE After this change, the state changes are: ToolsDeployPkg_Begin ToolsDeployPkg begin finished ToolsDeployPkg finished copy deployPkg.deploy deployPkg.update.state 3 ToolsDeployPkg finished deploy deployPkg.update.state 4 0 deployPkg.update.state 4 103 deployPkg.update.state 4 104 ToolsDeployPkg_Begin ToolsDeployPkg deploy state: 4 deployPkg.update.state 5 0 There are no specific changes on vmx side. commit 32df9c92ce5e9df85cabb7e488c5ed18faa41914 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit aabfe8a76e82644caac0d026bff2357be943ce6e Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit db1c14fb0e23d0d400567ac1a90b5c4fb08b6665 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Common source file changes; not directly applicable to open-vm-tools. commit c68f83bfc9dad7ac2e46780b84255bf102fdc977 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Log output from network script Log all output from the network script to help debugging. commit 32c82dc60b2963924ef9f407916e17880ae20b04 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Report version data via guestinfo vars Set up some guestVars to report Tools version info (version, build number, etc). commit f01a8f551cfd6c82ae2d851d51dcf4173493e674 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 Rename VThread_IsXxx() to VMX_IsXxxThread() Unrelated to open-vm-tools. commit 5617d9a776d51fa56f46e56e3484070cf704f8cb Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 AsyncSocket: Fix lock rank violation introduced by WaitForReadMultiple There's a lock call that should be an unlock. commit 17de351b6300c16aa91ea609bfae22c71ac8fc39 Author: Oliver Kurth Date: Fri Sep 15 11:23:39 2017 -0700 ARM: Better decode CPU Model Name Instead of always returning "ARM64", the CPU model name will now be the CPU vendor followed by the core name and revisio, eg. ARM Limited Cortex-A57 r1p2 hostinfoPosix arm64 hack to always return "armv8 unknown" is removed, and will forward the CPU Model Name. commit ef1e7f13ccd5878fb57f394cf709874e3dc11990 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 6c72a0e9670327ed2060ae8ca3d529f69de0a385 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 file: Report correct error message when file is locked. commit 7397d21db121bb3b5498a44027f990381974e1f1 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Check for gdk_pixbuf_xlib-2.0 in configure script gdk_pixbuf_xlib-2.0 is no longer part of gdk-pixbuf2 in newer distributions (for example Fedora 26), so it's no longer pulled in as a dependency from the gtk devel packages. Therefore we need an extra check for it. commit d50f3e6ba1e35020bcf7450701f492ba0ffb75a3 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Clean up overflow NIC issues If we hit the max number of IPs, we just keep going and try to add the next one. This makes for extra work and produces lots of log spew. commit c85ace8f7e180929f179dea9e21097c70e2e7e82 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Common header file change; not applicable to open-vm-tools. commit e5bf6e89f1f634f00a403c9e1ae3be96534a9d5a Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 MKS Thread: make VThreadID dynamic Unrelated to open-vm-tools. commit c2b6423692888f1f0534131c03c5aacc5d1632f2 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Smarter handling of large numbers of disk mounts Instead of just giving up if we find more than 255 mounts, expose what we can. commit 5965ba1d8ad2803f83771b25dc13b499a8a6c9e8 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Log DRM version in the debug message. The additional version in the message proved very useful while debugging resolutionKMS functionality. commit 834787e0887697286e63b61c643771de2de6656a Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 Remove ufs code There is currently no use case for it. commit efcc77506932a563951908c5c0f9087cc0432c31 Author: Oliver Kurth Date: Fri Sep 15 11:23:38 2017 -0700 modules/shared/vmxnet/vmxnet3_defs.h: - Code restructure of some MACROS. commit 04cf8f685846a7c817072f9fcfac6f6d9618b8c5 Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Downgrading 10.2.0 Tools to 10.0.9 fails to start CAF. Create the cafenv.config file required by 10.0.9 Tools from cafenv.appconfig of 10.2.0 Tools. Clean up CAF files after Tools uninstall. commit 3091d0b0e1143b49ba6f33d3bb2e4900c6b4c12b Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e5f98a856b27e39c06b9d9244adf9e4f195f28b8 Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Add new AsyncSocket API to wait on multiple sockets at once Currently, there is no way to poll/select on multiple sockets through the asyncsocket library. VRDMA is encountering a use case for such functionality, so add such an API to asyncsocket. It is only defined for AsyncTCPSocket, and is mostly just a wrapper around AsyncTCPSocketPoll. commit d49040684aa60e696d615ec330ea8329c134ed0e Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 4c3c80df2b8c246e1441a9f34fb11b25dc344e97 Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Avoid name strings other than vmusr/vmsvc in vmtoolsd command line. Add name checking when parsing command line. commit 699f7e7403fa3010a382d804806a9c5b50a38239 Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Changes to common header files; not applicable to open-vm-tools. commit c6422b6c922a88a47e9c8121d9f45d2bb250c0b1 Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Change defined(linux) to defined(__linux__) in open-vm-tools files. Reported by open source developer on GitHub, see github.com/vmware/open-vm-tools/pull/81. commit dbce6217a9ba2e33bf536437393cf6fc4bb4eaa9 Author: Oliver Kurth Date: Fri Sep 15 11:23:37 2017 -0700 Stop using deprecated glib APIs in vgauth Replace some static mutexes with the modern versions. commit 9367d3e3cf8819b198dd52cd4e1f19872efcfefe Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Fix HostinfoGetCmdOutput to return NULL on failure HostinfoGetCmdOutput unconditionally calls DynBuf_DetachString along its success path. DynBuf_DetachString never returns NULL, so that broke callers expecting a NULL return value if the command had no output (which can happen if HostinfoGetCmdOutput attempts to run a non-existent executable; note that this does not trigger any of the failure paths). Restore the old code that checked if the DynBuf is non-empty before retrieving its contents. Bonus: * Fix incorrect documentation to Posix_Popen. * Adjust the StdIO_ReadNextLine documentation to clarify its behavior. commit 15626c9d3a81d4d629902504ed7fd21d04f5e4b6 Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Changes to common source files; not applicable to open-vm-tools. services/plugins/dndcp/stringxx/string.cc: services/plugins/dndcp/stringxx/string.hh: - Change utf::string::toUpper() and related functions to default the locale argument to a NULL pointer. commit bea370f7deb0e216206223301dfe1db974e0ffee Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Update vm_tools_version.h with Tools 10.1.x update and patch versions. Updating the VMware Tools version information for the known vmtools 10.1.x updates and patches. 10.1.6 - vmtools_prod-cpd-ep3: CLN 4984516 10.1.10 - vmtools-prod-cpd: CLN 5016060 commit f6d5355574b0342ad7ad471fbc2fbcb75bdb25dc Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Check alignment in Atomic_* functions for the VMKernel Unrelated to open-vm-tools. commit 47c77211f47644e1e999621d3974ebd09af84312 Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Fix i18n symbol violations Fix some of the illegal symbols that are flagged. Also changed the wrapper for unsetenv to return an int to match the glibc-2.2.2 and later version. Tools build for FreeBSD appears to be using an older libc so it always reports success in that case. commit e9c2208a3240e36e590b0be9bda8b2a7510aae2c Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 8e0b9513236e4494f089cdaee641af5e80adc5c8 Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit a4ba5b7e40c384c76cf35209bdd421f97d70e142 Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 5be59c7691509e30ffc44b67f8a6eba66e141d3d Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Revert the previous commit. commit 94702b2a09cdbad725f6e536203c4bab1bdcf9c0 Author: Oliver Kurth Date: Fri Sep 15 11:23:36 2017 -0700 Check alignment in Atomic_* functions for the VMKernel Unrelated to open-vm-tools. commit f424d59444ae7718f5e47ebcd5b417df8acea456 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Re-enable ASAN for DynBuf_Append() The problem is incorrectly instrumented callers. commit 5f94953bafbbb2348ae2abe6d958828b311d1f6b Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Common header file change: not applicable to open-vm-tools. commit f0df01ce187c5bfca5d361f45a6ca2f38a4bd934 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 3525fd7385f6c8185305d20d149fa59d5ebf9c5e Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 New common header file: lib/include/product.h. Move public product types enum from lib/include/productState.h to product.h Common header file change; not applicable to open-vm-tools. commit afb42f5edc9502a877d48aabaa1f8af31a959619 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit a71c02a67c6a78179449d3153751584873452016 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Revert previous commit. commit 6320d542cb1eb9cd1fed41ff22b4b2d42cd179c9 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Interpose dlopen() to only allow root-owned library Only allow dlopen() on library that meets the following: - the library file is root-owened - the directory is root-owned, and not others-writable. commit 5fe82108703e3c0448e9243f2b58fada8f790d2a Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Restrict panic's int3 assembly to x86(_64). Panic could also be used for iOS. commit 7e2a13784c6d3cc7ef4d57957608e1bd9e8b4b59 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Delete unused COMPILER_FORCED_LOAD_AND_MEM_BARRIER Delete the macro definition. commit d484f11a6b14d41ee202c3378a2c6174aa3d4784 Author: Oliver Kurth Date: Fri Sep 15 11:23:35 2017 -0700 Memory barriers: LD_LD_MEM_BARRIER -> SMP_R_BARRIER_R Delete the now unused, old macro name. commit 93c968d5034cbc6f6948caa5129fd5fcfb18619c Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: LD_ST_MEM_BARRIER -> SMP_R_BARRIER_W Delete the now unused, old macro name. commit ba6870484de7e795b394c3bf7674f5e28c17960f Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: LD_LDST_MEM_BARRIER -> SMP_R_BARRIER_RW Delete the now unused, old macro name. commit 79a815083e2ba1b2f6c03b5aa4ae5275e0416a95 Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: ST_LD_MEM_BARRIER -> SMP_W_BARRIER_R Remove the now unused old macro name. commit b89f4124fd5476dbba5a9f18d9c246c5a3f3543b Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: ST_ST_MEM_BARRIER -> SMP_W_BARRIER_W Remove the now unused old name. commit 996d7bdf489f968c9c49adace1c1ac0a525a4c77 Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: ST_LDST_MEM_BARRIER -> SMP_W_BARRIER_RW Delete the now unused macro. commit 8e417a5ea04edece3bcd88a9a03feb822b26646e Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: LDST_LD_MEM_BARRIER -> SMP_RW_BARRIER_R Deleted the old macro name. commit 8d3de0c6acc829d3f9c283abf4f107b506e95d20 Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: LDST_ST_MEM_BARRIER -> SMP_RW_BARRIER_W Delete the now unused old macro. commit 1cdb544b9962def25bfacd329c8850a0c45d199d Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers: LDST_LDST_MEM_BARRIER -> SMP_RW_BARRIER_RW Delete the old macro that is now unused. commit b3bf1f137b45232e7e9b2474127ba2d3e1411162 Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Memory barriers Unrelated to open-vm-tools. Previously added new barriers for arm64 and x86_common, but forgot to handle arm32. This change does that, and fixes a mangled comment. commit 7c1f57a6f005d299b4254a295f6794f3e41a09b4 Author: Oliver Kurth Date: Fri Sep 15 11:23:34 2017 -0700 Common header file change; not applicable to open-vm-tools. commit c024d866ac746474487fea646f4787875e2dacdd Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Remove NOT_TESTED() from EINTR handling in lib/file When FileIO_Read() & friends receive EINTR, they log NOT_TESTED, and retry read. It seems innocent - until you provide your own function to handle logging. Now imagine that you create bidirectional communication protocol, and run it over the pipe. And you do logging over this very same pipe. Application is waiting for message, so it invoked FileIO_Read(), and is blocked on read(). Now you attach strace to the process. That will interrupt pending read() with EINTR and log NOT_TESTED(). This logging performs FileIO_Write() on this very same pipe, and then performs FileIO_Read() to retrieve status of logging request. If it receives status of logging request, all is good. Code returns from logging, and reexecutes read(), waiting for request from server. But if logging function receives anything else (f.e. other side sends request at same time strace was attached), it gets queued into internal data structures of the app for processing once code returns to main application loop. Problem is that FileIO_Read() will reenter read() without returning to the caller. And that read() will block forever: other end already send request that is now pending in the request list, and so won't send anything until it sees we processed that pending request. Hang. There are two possible fixes: 1. Return EINTR from FileIO_Read(), or 2. Do not do any logging from FileIO_Read() Approach #2 is much easier, as API semantic does not change, and currently it is broken. So there is no need for NOT_TESTED() anymore... commit ba915c1445124f6369a49788b9be2e8c2886bc10 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c8200f190cffb6cf91db9d3660bc2736f66fb448 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 In DnD transport V3 check packet and payload size to prevent OOB read or write. commit 11094b0656ea13eff9b88cc207a4826f6ecd47b4 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Better Panic_BreakOnPanic implementation on macOS. There's actually a documented way to check whether a process is being debugged on macOS. This change updates panic lib to use it. commit 1fedc4083703a4438bb33617e9a56bacda41fd39 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Hgfs Server: Very minor clean up of server callback table Another very minor clean up for final part for making the Hgfs server callback table constant. commit 42494944951a72057279afb58deddfc72674a889 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 lib/include/vm_assert.h: - Remove unused ASSERT_* macros. modules/shared/vmxnet/vmnet_def.h: - Fix definition mismatch of VMNET_CAP_RX_LRO and VMK_PORT_CLIENT_CAP_HW_DCB. commit c20933cea62e27e30f75e8e68251627bc06a1dee Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Fix tools build dynbuf.c and sigPosix.c are consumed by tools. commit 4752c44c3bd6406b9b4d829ca99c0044555face9 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Changes for userspace ASAN This is mostly disabling ASAN for some functions and adjusting overheads. Code, touching the guest memory, currently cannot be instrumented. commit 861ad9d03153c9428f21b8a8af9762230ade2ca3 Author: Oliver Kurth Date: Fri Sep 15 11:23:33 2017 -0700 Make CAF consume the same version of GLIB (and dependencies) used by Tools. Summary of changes- 1. Linux: Make the following libraries point to their Tools counterparts by updating the LD_LIBRARY path in CAF makefile: -libglib-2.0.so.0 -libiconv.so.2 -libpcre.so.1 -libz.so.1 -libffi.so.6 -libgthread-2.0.so.0 -libstdc++.so.6 -libgcc_s.so.1 2. Linux: Add a new environmental variable INSTALL_MODE = tools/standalone in makefile, setting it to "tools" by default, to handle copying of the required GLIB (and dependencies) for CAF "standalone" installation. 3. Linux: Update setupCafConfig function to add the INSTALL_MODE property if not present already to handle build2build upgrade case. commit ae05d32a9303f27ff642ab39bb49abc46e3ba78b Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Add constants for macOS os major versions. MacOS versions can get a bit confusing because there are two parallel versioning schemes. There is the marketing version (e.g. 10.6, 10.7.5, etc.) which is what everybody uses when discussing the OS but is very hard to get at via code, and there is the kernel version (e.g. 10.0.0, 11.4.2) which is what is returned by POSIX syscalls like uname. The confusion sets in because in comments we tend to use the marketing version, but then the code actually checks for the kernel version. This change adds constants for the marketing version for comparisons with HostInfo_OSVersion(0) (the major version), which makes checking for 10.6 vs 10.7 vs 10.8 etc. much more readable. commit 03b89a4c99f257e724d90eff5c15560a4f9f2919 Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Add vgauth smoketest Provide the vgauth smoketest so open-vm-tools builders can validate VGAUthservice. commit 57aac16fc9054bd20ccf004dfd09e02bdd127795 Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c1ef635e08ecd4c4aafc48a480ccd651935ce1e5 Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Remove BDOOR_CMD_HOSTCOPY backdoor handler. The BDOOR_CMD_HOSTCOPY command has been under VMX86_DEVEL and is no longer used. Remove it. commit 7ca594dc06fc0b129265d19c51bb367333b01358 Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Fix building without ICU Building vgauth failed when building without ICU (with the --without-icu option). This was caused by not using cxx link options which are needed by xml-security, but only enabled when using ICU. Also fix the warning "invalid suffix on literal;". commit d77b6c7ba1dc5a38e38c35c321eabe7ccbc801c1 Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Tools Hgfs Transport: Make the server callback table constant Simple change to make the Hgfs tools transport use the server table of callbacks as a constant. commit 880750417a7af90ad9b510524285e2d628d9a25d Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Common header file change: not applicable to oprn-vm-tools. commit e02005e5b01e6335b233a2ab9d15f294a46a11e5 Author: Oliver Kurth Date: Fri Sep 15 11:23:32 2017 -0700 Fix tools build For open-vm-tools there is code that strips off the "VMware Confidential" part of the msgfmt.c header. When the copyright years were updated in msgfmt.c, it broke the pattern matcher. commit 4a61bffe80e57aeab0400813403c47a94e2acd1c Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 Replace Atomic_MFence with architecture-independent barrier primitives Atomic_MFence was used to implement a full memory barrier on x86 architectures. In an effort to clean up duplicate code, this change removes Atomic_MFence and replaces all previous uses with the most conservative architecture-independent barrier primitive (LDST_LDST_MEM_BARRIER). Since LDST_LDST_MEM_BARRIER is also a full memory barrier, this change does not affect any existing ordering semantics. commit 34ff407a2ff5cbc0095fb95b30b1ba4e66f0f0c7 Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 Fix timesync state to be uncalibrated when adjustment is large (>60ms). VMtools has timesync plugin to adjust guest time to match host time. Timesync relies on a state machine (Uncalibrated, calibrating and PLL states) to adjust the amount of guest time to match host time. If the guest and host time differ by more than 60ms, state machine should reset to uncalibrated state. There is a bug currently that would leave the state in PLL mode even if the guest and host times differ by more than 60ms since absolute value of adjustment is not considered. This causes the time sync to happen slower than expected. commit 488aea219340e6821b25fb4240791fa9e7903023 Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 Specify the proper size while sending deploypkg.update.state RPC message. Due to a recent change, the VMX handler for 'deployPkg.update.state' RPC ignores the message if the specified argument size doesn't match with the string size. In the current code, in a certain error code path, deploypkg plugin specifies one extra byte in the size for 'deploypkg.update.size' RPC message. This results in an error at the VMX layer. Fixed the code to specify the proper string length while sending the RPC. commit 40ac04d8f3df4ea7eff9b890055fa565b368f4e3 Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 Implement ST_LD_MEM_BARRIER on x86 with a locked xor Microbenchmarks on modern Intel architectures show that a memory barrier implemented with locked xor operation performs about 30% better when compared to a barrier implemented with mfence, while providing the same memory ordering guarantees. This patch changes the implementation of ST_LD_MEM_BARRIER on x86 architectures to use the faster, locked xor operation. Additionally, support for Microsoft's compiler is added. commit dda3fcee5a7382cdbd47e2eb5cb0af3f72b9b8e3 Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 atomic asm snippets: Remove unnecessary uses of "clrex" In our atomic asm snippets, we do not need to use "clrex". commit 81fec44ea5303efa27fb0f04ba06f162ffdfb2df Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 atomic asm snippets: Replace "memory" clobber with "Q" constraint In our atomic asm snippets, using the "Q" constraint, (https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html tells gcc which exact memory is modified i.e. the bytes covered by the atomic variable), is better than using the "memory" clobber (tells gcc that all memory is modified, effectively a compiler memory barrier which prevents compiler optimizations). commit 24bb7361bb1ed63201030841282369e571490f8b Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 resolutionSet/resolutionKMS: Work around DRM control node removal DRM control nodes were removed in linux 4.10. Work with an updated version of the vmwgfx kernel module and target render- or primary nodes instead. commit a7c41d1f862473b1fcde3c4fcb552ff5a648d022 Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit dc91538f50ff7d3f3ccc8f2310f7ce79266c6153 Author: Oliver Kurth Date: Fri Sep 15 11:23:31 2017 -0700 vm_{atomic,uninterruptible}.h: Flip the polarity of the 32-bit function names Initially, we only had 32-bit atomic functions, so their names did not have a "32" suffix. Then, we added 64-bit functions. So, 1) We used a "64" suffix for them. 2) We provided additional names with a "32" suffix for the 32-bit functions, for consistency. The hope was that, over time, references to unsuffixed names would disappear. This change sends a stronger signal to developpers that the suffixed names are the ones to use, and that the unsuffixed names are the undesirable legacy ones to avoid. commit d1721610e10cd7cc5f1009f608d7a2b12e5bfb54 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 vm_{atomic,uninterruptible}.h: Consistency cleanup This change brings a few dissidents back in line with the rest of the code. Also deleted Uninterruptible_FetchAndAdd64(): o It was unused. o It provided the same functionality as Uninterruptible_ReadAdd64(), with a worse name and implementation. commit 9cb35ce39ee24ea40fca08a0913dac79c662cf2d Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Add an error return to asyncsocket Change asyncsocket to return a ASOCKERR_REMOTE_DISCONNECT when a disconnection is detected during a send attempt. commit 69b7e1f9423fe565b2cbe2ec784068b7f55a8247 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Include sysmacros.h directly as mandated by glibc-2.25. glibc-2.25 generates a deprecation warning for using 'major' macro without including sysmacros.h. https://sourceware.org/glibc/wiki/Release/2.25 This is breaking Fedora builds of open-vm-tools because Fedora 26 is switching to glibc-2.25. commit b379074c3c635f684ef1630ea156eb2eefb04973 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 8afe56f5d1d33593d29b0247b0be5e2eba65d0a4 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Remove FileIO_GetVolumeSectorSize commit a7886e7a44582fbc019e995afa2147eb0efd6710 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Fixed invalid class pointer access if VSS provider not installed Some customers may disable VSS support by not installing VMware snapshot provider, which may lead to the VSS provider not being able to be initialized, which in turn could lead to a invalid class pointer access during complete initialization. This change checks provider initialization status before initialize completer to fix the issue. commit c02d20001fbfd06558891fe5cf87c9aae33765cb Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Tools Hgfs Transport Logging: Migrate the to common tools conf logging Migrate the tools implementations of the HGFS policy, server manager and transport channels to use the common tools conf logging with the "hgfsd" domain setting. This allows the HGFS server core and the server managerand transport components to be independently logged. Changes are: - Move the logging definitions into the server manager lib common header - Add some log statements into the server manager public APIs - Redefine the policy manager (share handling) logging to the general tools logging. commit 5034d1fb0aef6455a79d719c2f97ccf7f44c831a Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 vm_atomic.h: Build Atomic_uint128 upon uint128 instead of __int128 Atomic_{8,16,32,64} are built upon uint{8,16,32,64}. Atomic_uint128 is built upon __int128, which is inconsistent. This change builds it upon uint128 instead. commit 20a42400e5ab98c4a2a6da254968c29d748d5d58 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 vm_atomic.h: Implement Atomic_Bool operations on top of Atomic_uint8 operations The atomic code was inconsistent: o On one hand we had Atomic_uint{16,32,64,128} basic types, on top of which we auto-generated more elaborate types such as Atomic_Ptr and Atomic_Int. o On the other hand we had no Atomic_uint8, we had Atomic_Bool implemented as a basic type, and we had CMPXCHG1B (based on uint8, defined for vmkernel and vmm only, with an x86-specific name) that was implemented similarly to Atomic_ReadIfEqualWriteBool (based on Atomic_Bool, defined for everybody, with an architecture-neutral name). This change brings a little bit of consistency: o It defines Atomic_uint8 as a basic type. o It auto-generates Atomic_Bool on top of it. o It deletes CMPXCHG1B. Also added a void * argument to AtomicUndefined(), which is used to "consume" function parameters to prevent some compilers from warning about unused parameters. commit 92a2f1e908e7e132eea2beba57926ac2fee34902 Author: Oliver Kurth Date: Fri Sep 15 11:23:30 2017 -0700 Revert the previous commit. commit 3e732d788ef472bdf07dc53a32bc2c3b271a1ee5 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 vm_atomic.h: Implement Atomic_Bool operations on top of Atomic_uint8 operations The atomic code was inconsistent: o On one hand we had Atomic_uint{16,32,64,128} basic types, on top of which we auto-generated more elaborate types such as Atomic_Ptr and Atomic_Int. o On the other hand we had no Atomic_uint8, we had Atomic_Bool implemented as a basic type, and we had CMPXCHG1B (based on uint8, defined for vmkernel and vmm only, with an x86-specific name) that was implemented similarly to Atomic_ReadIfEqualWriteBool (based on Atomic_Bool, defined for everybody, with an architecture-neutral name). This change brings a little bit of consistency: o It defines Atomic_uint8 as a basic type. o It auto-generates Atomic_Bool on top of it. o It deletes CMPXCHG1B. Also added a void * argument to AtomicUndefined(), which is used to "consume" function parameters to prevent some compilers from warning about unused parameters. commit 93efbb2335349fda6587cda662a389b8b99724b4 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 Accelerate some Atomic_* operations Unrelated to open-vm-tools. commit 04af878bf5b1c56a9513b606895c41c46def687c Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 Hgfs VMCI Transport: Part I fix the shared memory interface to not assert THe HGFS VMCI transport uses the shared memory access functions to extract HGFS protocol packets for the HGFS server processing and for returning results. This interface recently changed to add thread tracking for these operations with the addition of register and unregister functions. The HGFS transport interface was missed on the initial change and hence now triggers an assert as the register function call has not been made. This is the first part of a change which addresses the assertion failure by adding the register and unregister calls for the HGFS VMCI transport interface which uses this shared memory. The calls are part of a set of callbacks provided by the supported transports to the HGFS server code for the VMX and tools. Since the backdoor transport does not make use of the shared memory and access calls it just sets the function callbacks to NULL. This is done for both the VMX backdoor channel and tools backdoor channel for packets routed into the HGFS server. This change does the following: - Adds the register and unregister callbacks to the channel callback table. - Modified the VMX VMCI channel to add the register and unregister callbacks and initialize the callback table with these new functions which are then passed to the HGFS server. - Modified the VMX and tools backdoor channels to NULL out the function pointers for the register and unregister callback functions. - Add the Hgfs server directory notification callbacks for register and unregister which are termporarily protected by ifdef statements as they are not yet called from the directory notification component. These simply callback to the channel register and unregister functions to do the real work if present for the channel in use. (Only VMCI will use this.) commit 3393f1082b454052a37e33f241e6ceb20fcb29f2 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 Hgfs Server: Clean up logging macros and enable Hgfs Server tools logging The HGFS server logging macros are scattered throughout and repeated in each source file. This makes it difficult to modify between the VMX implementation and the tools. The tools side suffers currently and is thus hard to debug. This is the first in a couple of small changes to clean up the logging. First the cleanup by moving the server logging statements for LOG to a centralized private header file for the server code and not repeated in every source file. Second, move the HgfsServer LOG from hgfs to its own HgfsServer setting. New VMX file setting is: Loglevel.hgfsServer = "10" The current existing setting of "hgfs" will capture logging for the VMX such as the HGFS manager, policy and transport interfaces (VMCI/Backdoor). Third, the HgfsServer LOG statements for the tools builds (which go into both instances of the vmtoolsd sevice/daemon) and the upgrader application are now mapped to g_debug and Debug function calls respectively. This now allows the tools configuration logging to set the following which will capture all the Hgfs server logging: hgfsServer.level = "debug" Follow up changes will be made to check the tools backdoor transport interface log setting which currently uses something like: hgfsd.level = "debug" commit 1cb088a145faa1db071fd71f82a46f8398e04682 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 Remove LISP in vm_{atomic,uninterruptible}.h Unrelated to open-vm-tools. commit c04c7f646558a39445d2348dd99beec90ad587a6 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 Add Util_Memdup(); replace DynBuf_AllocGet() calls with Util_Memdup(). Remove Util_CombineStrings() and Util_SeparateStrings(). - lib/dynxdr/dynxdr.c - lib/include/dynbuf.h - lib/include/util.h - lib/misc/dynbuf.c - lib/misc/utilMem.c - lib/user/util.c commit 166ec44767193a5f2c6430effe56ac83fccc9c74 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 vm_{atomic,uninterruptible}.h: De-duplicate asm snippets Unrelated to open-vm-tools. commit e2ac716f06f7343f69b2313f2c2b07d03fda7bd1 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 Revert previous commit. commit a22be75ad0fe2426dec3edcf77397b35e1aa4255 Author: Oliver Kurth Date: Fri Sep 15 11:23:29 2017 -0700 vm_{atomic,uninterruptible}.h: De-duplicate asm snippets Unrelated to open-vm-tools. commit 549d415899e788f110b4b591240166feac5ef148 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 3787bcd2f4a9855e4776d772b82a86e8b389bc34 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 lib/log: Remove GuestLog_* declarations from log.h commit 4d65be46b0eab5641bdad4ee3b50ff9cdd35e4ce Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 11c8e52f1f4032eff096cc0ba6aadfacae2ed0d3 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 lib/uuid: UUID routines can fail If a UUID routine can fail, make this so. Document this and make it clear what the failure indicator is. This is the first step to having the UUID routine caller handle an error. The next steps require visiting the callers and plumb error detection. commit 8d7ff7f20313100863e48f4e4ceaf6af020076a6 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c94d3ba624d5f3911977b028148357c178c68d8b Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 lib/lock: Make MXUser_CreateSingleton* an inline This will speed up the common case nicely, protects type safety, and provides data encapsulation. commit a418e3a9bf2bdb32cc86b295319024e3d6f3a128 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 Revert previous commit. commit 881b9938c8d89d2fa15911aa34cf512393ec92a1 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 lib/lock: Make MXUser_CreateSingleton* an inline This will speed up the common case nicely, protects type safety, and provides data encapsulation. commit 181f8877e93ec215cfb24a2c23041371e5e5da89 Author: Oliver Kurth Date: Fri Sep 15 11:23:28 2017 -0700 Map certain PAM errors to VGAUTH_E_AUTHENTICATION_DENIED. VGAuth maps most PAM errors to VGAUTH_E_FAIL. As a result, some authentication failures result in error messages reporting general failure rather than authentication failure. To provide more useful error reporting, this change maps most PAM errors to VGAUTH_E_AUTHENTICATION_DENIED instead. commit 025158629d36851a1a190abd3427747e41842aa2 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 3446664945da9e57031fad8892b43b2b5a6ab76f Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 lib/asyncsocket/asyncSocketBase.c: - Avoid infinite recursion with ASOCKLOG() and DecRef. lib/asyncsocket/asynsocket.c: lib/include/asyncsocket.h: - Fix race between AsyncSocket_DoOneMsg and the read callbac.k Changes to common header files: not applicable to open-vm-tools. commit d014389df605a45b282bb2cc55334c7eecb487c0 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Exclude non-directory and non-existing paths during quiescing. A stale mount point or a special path that can't be opened could break quiescing operation in the Linux guest. We need to tolerate such cases by skipping such paths. commit 1285fffabe27c98ab90012c5d89fd2d17bd48606 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Make AsyncSocket_Close() idempotent; move dec-ref out of AsyncSocket_Close(). Changes to common source files; not applicable to open-vm-tools. commit 8cf4ff17a7f7f687a55075f67f8988bd45950704 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Stop defining Atomic_MFence() in cross platform code No functional change to open-vm-tools. commit 8bc03fbb6c41be9f501b409a8391af5d63ecebdb Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit d8f465ade3ffd332017dc367fea8df806348f2d0 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit a77e97df5b8145f29cb097bced90f7d91e2ff548 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 Add Posix_Free and try harder to avoid clearing errno free() can clear errno. Apparently POSIX will prohibit that in a future version of the standard; in the meantime, add a Posix_Free function that guarantees errno preservation and start using it. Similarly, make Util_ZeroFree, Util_FreeList, etc. also preserve errno. commit 4ce5f44e0bd0789f65fe4710df5293e71eb6d1c0 Author: Oliver Kurth Date: Fri Sep 15 11:23:27 2017 -0700 ProductState: fix indent commit 1aaa5e267bb500a77a2d3771e780ffb09134fc10 Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Allow enabling or disabling timesync multiple times. Toolbox cmd sends a presumed old value for timesync GuestRpc when enabling or disabling timesync. VMX side expects the guest side to be aware of old value and therefore errors out whenever guest repeats the operation. Previously the implementation was silently ignoring the error. Avoid sending the guestRpc to enable or disable timesync when it is already in the desired state (enabled or disabled respectively). It is optimal and also avoids the unnecessary error. commit 77c47a809b27a6b15d7c5bec739fd33983ceacd1 Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Fix whitespace in localization file commit 7cbc6d60863ef0b02f15814178ef2f318fcf697c Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Fix build breakage introduced in hostinfo hypervisor detection changes. ARM builds are breaking because Hostinfo_HypervisorPresent is defined but not used [-Werror=unused-function]. This change defines Hostinfo_HypervisorPresent only for i386 and x86_64 architectures. commit 2bf0056a956888da2aeb07f62b4ae05f5cb5427e Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Hostinfo hypervisor detection changes. commit f639109e1e33718f9ed6eddb614aa6fc018ded99 Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 More cleanup of productState.h commit 71d4840904ff0cb97f6bfb38a7b7295aa11dba73 Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Clean up productState.h commit da6d3a5187e285bebcb2c7dbe2e5902e0b1c49b9 Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit b5c16034cf33adda41d4b970dbf72ee25581db4a Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 HgfsServer: Rename the directory change notify callback to be more consistent. When setting a directory notification request we pass a callback for receiving directory change events which is currently poorly named. This simply renames the callback to be HgfsServerNotifyReceiveEventCb. This is being done for consistency and clarity when called by the notification component. commit 5188c85f06c061a657809eb5a705a8da771ced0a Author: Oliver Kurth Date: Fri Sep 15 11:23:26 2017 -0700 Disable building VGAuth, deployPkg, grabbitmqProxy by default on non-Linux. VGAuth, deployPkg and grabbitmqProxy are not supported/tested for non-Linux guests. Tar installer does not even install these components on these guests. In order to avoid having non-Linux open-vm-tools users (like FreeBSD) go through disabling these manually, use the correct default in configure script. commit c1eb3bb5e7fbff13156d05a037bf652cf2bdc384 Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 Fixes for VThread change Two fixes for build issues - numVCPU.c: Windows compiler apparently doesn't like empty initalizer lists. Fill in with a value. - vthreadBase.c: when VTHREAD_INVALID_ID went from -1 to 0, missed some adjustment code in VThreadBaseSetLocal and VThreadBaseGetLocal which "adjusted" the value by +1/-1 so default-zero would work correctly. The value no longer needs adjustment. This did not impact Linux because Linux uses have a thread-local cache which returned before this slow path. commit 2263933eb6569de38dd523ffab0786d237039502 Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 VThread: change VTHREAD_INVALID_ID, move VTHREAD_MAX_THREADS Two tiny but wide-ranging changes. - Now that there are no remaining users of VTHREAD_MAX_THREADS outside the lib/thread library itself, reduce the scope of that declaration to vthreadInt.h. - Change VTHREAD_INVALID_ID to a value of 0 instead of a value of ~0. (And correspondingly, bump the ~4 hard-coded VThreadIDs that remain). This reflects that the ID may now be default-initialized. commit d218f7a6c23c1c88b4f92ddaf1f6fbfb554cc115 Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 VThreadBase: move TLS macro to header Detecting thread-local storage support would be helpful in lib/lock. Move the detection logic from vthreadBase.c to vthreadBase.h. Bonus cleanup: inline VThreadBaseSetNameRaw commit ecc7259e47548e13189a79544fc66324d87e00e2 Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 Move VThread_CurName() entirely to thread-local storage A previous change switched VThreadBase to store thread names in thread-local storage on most platforms (all except mobile). This change is the follow-up: removing the old storage location for thread names. Briefly, this change removes the "name" field from VThreadBaseData and handles all the fallout. That's mostly straightforward, though lib/thread ended up storing a thread name in the "reserved" thread structures - this is mostly so the name passed to VThread_ReserveID would be preserved until VThread_CreateThread is called. After this, vthreadBase.c complexity only remains for VThreadIDs, which is the next step of this effort. commit d17b458c340f76112707ede1e277b575e6e4301b Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 Check the RPC return value in timesync enable/disable commands. toolbox-cmd timesync enable/disable commands always return success even when the command failed. Added a check for the return value of the RPC call and also print the error message using a generic message which required renaming existing "disk.wiper.error" key. commit 58279b25999003b34eed8553732ea6239c1b819a Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 VThread: put thread names in thread-local storage Next step in the "stop allocating per-thread memory" effort. This change moves thread name storage to thread-local storage. (VThreadIDs are the hardest and will come last). This is also only half the work; a it adds new storage but does not remove the old storage, which was left out to keep this change simpler. For platforms that have thread-local storage, the implementation is pretty straightforward, though initialization is inherently lazy. For platforms lacking thread-local storage (at this point: iOS and Android, see comment in vthreadBase.c), life is much harder. Added a very large comment contemplating different solutions and ultimately concluding that unnamed threads on such a platform will get a best-effort (read: racy) name from a global buffer. Note that threads which are explicitly named WILL get a (non-racy) name, but it requires an explicit naming attempt. commit ff41cba8ec3e90f7c1367f524defeaeb3bce2bff Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 hange to shared header file unrelated to open-vm-tools. commit 8828236506e107831d6456d39f60f36b5e02632b Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 fileLock.h: fix comments commit a391909df76d7e94e7ec768b5946d448dc4ce55b Author: Oliver Kurth Date: Fri Sep 15 11:23:25 2017 -0700 Multiple changes: lib/file/file.c: - Add new function File_ContainSymLink(). lib/file/filePosix.c: - Add new function File_GetMountPath() lib/include/file.h: - Add new function declarations. lib/include/dynbuf.h: - Clean up documentation. - Rename DynBuf_ConcatString() to DynBuf_Strcat(). - New inline static function DynBuf_GetString(). lib/misc/dynbuf.c: - Clean up documentation comments. - New function DynBuf_DetachString(). lib/misc/hostinfoPosix.c: - Utilize new DynBuf functions. lib/misc/strutil.c: - Clarify documentaion comments based on DynBuf changes. lib/misc/utilMem.c: - Adjustment to comments. Common source file changeis; not applicable to open-vm-tools. commit 5beba526e988e6c8605509343df2c58b50b45cd0 Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Update copyright year for recently modified files. commit 009d683ad725f34a0d7e497e6fa7d406af428847 Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Bump the VMware Tools update release to version 10.1.5 commit ccd1627ba7e4581a4066c99e6a76aa295b8fd7ba Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 566c7114a43b73431ca9fca31658d38884e0b316 Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 vmci changes to enhance void functions to return errors commit 7cf255f467e45b1613c89e489ca85d26d80e956a Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit da695443ecee6103552d44a0b174f00d24881372 Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 vm_basic_types.h: rename macro IsBool to IS_BOOL, remove IsBool2. commit 577ebaddbcfed70548c5bea89ff74f40d9a9d1cf Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Update tools copyright to 2017 commit 545b02d45b27c392f9c4046f3043d19b5da82fe0 Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Change ISO mapping for centos and oraclelinux from frozen ISO to linux.iso in gos table commit 64c3d03340e7ef1d2694b7dac36d4f5b7179ad91 Author: Oliver Kurth Date: Fri Sep 15 11:23:24 2017 -0700 Tools Daemon: Do not use kernel client mount HGFS when FUSE unavailable When FUSE is not installed in new OS versions that are kernel 4.0 and newer the vmhgfs-fuse client is unavailable to use. Previously, the mount RPC handler would fall back to mounting Shared Folders using the kernel client. This really should not be done as it would entail the user running with an untested vmhgfs kernel driver client or worse the driver fails to build. Instead the RPC should really fail to mount. The RPC Mount Shared Folders should only mount the Shared Folders using the kernel client when FUSE is not supported by our HGFS FUSE client i.e., when the Linux kernel version is older than 4.0. To check for these conditions the vmhgfs-fuse component is run with the enabled option which returns with success for enabled, 1 for not enabled (older OS kernel) and 2 for newer kernel but FUSE is missing. These return values should be checked and only if value 1 is returned then the mount using the kernel client should be attempted. Not as currently done with an unsuccessful result of 1 or 2. This matches the installer which does the same check. This fix is related to a bug which came about due to a user custom building and installing a newer kernel 4.0+ on top of a 3.x kernel with tools, and without FUSE. When the VM was rebooted using the 4.0+ kernel and running tools config script the script will to try and use the HGFS kernel client. The tools daemon RPC handler to mount the Shared Folders will also use the kernel client, too, in this scenario. This is bad as the HGFS kernel client is running untested by VMware. Both issues need to be closed, this change addresses the tools daemon RPC handler only. commit fa7d640c18bb421159d6749c83eba8e8372a6519 Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 disklib change unrelated to open-vm-tools On NFS, provide a way to revert to direct-write method for descriptor updates. commit e1f94428ec7fd468b7f316bd5a09bd839428bf2d Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit f543bb5ed11b393065d9449f7f5a34653cd0faf0 Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 Common source file change; not directly applicable to open-vm-tools. commit c2d88806b6c12fd074d5eeb8c3b5be6282774d4e Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 Remove TICKS_TO_USECS and USECS_TO_TICKS from poll.h Back before tickless kernels (which we now always require on Linux), there was a 50Hz-200Hz kernel "tick" for timekeeping. It is no longer used in our code. commit f7ada47b69f78b665325d633e7e45fa25bdc1232 Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e8b47cd8ea1af1f30a1a2fdfc45d41e7a0a3b992 Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 pollInt.h Mac compiler is picky about an int->enum conversion, and requires a typecast. commit 4a8aecf2d148ce11afbad939beb7b629a8970263 Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 lib/poll: Trim PollClassSet We no longer need per-VCPU poll classes, trim PollClassSet down to a non-array size. Tweak a few pollInt.h algorithms so that compile-time-constant PollClass values can be constant-folded. commit 73fe327f66448de81c324093a5d6fabd431f567e Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit d6b169cc5ec51fef82127cd64aa155faf6dd695e Author: Oliver Kurth Date: Fri Sep 15 11:23:23 2017 -0700 VThread: some thread-local storage doc updates '0' is a safe default for pthread_key_t for all platforms which still use pthread_getspecific() instead of using __thread. This change updates the documentation in vthreadBase.c, and slightly simplifies the pthread_key_t initialization logic. commit 124f09fedf4ea14b1c9817ddd3a72823c79eea50 Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c00e009050f59d450eebcadf4db7f8d4f93d8533 Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Update guest OS strings in guest_os.h: - Update "Other Linux 3.x kernel" to "Other Linux 3.x or later kernel". Add checks to services/plugins/dndcp/dnd/dndCPMsgV4.c to validate packet and payload size to prevent out-of-bounds read and writes. Correct the requestNextCmd parameter used when asking for the next piece of a big binary transfer in RpcV4Util::RequestNextPacket(). Common header file change; not applicable to open-vm-tools. commit ac62637033af811fb3c9ac433ecc83ab1c9b03ff Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Fix the recursive inclusion for vmtools_version.h Fix the recursive include file complication for 'vmtools_version.h' when the new tools component is consumed. Add necessary macros to check and include the tools header file only if it was not already included. commit 472477d674909ac24767dc1441187f790ce8d31b Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Consume VMware Tools Header files from Tools build. The 'tools' build component publishes the VMware Tools header file as 'vmtools_version.h'. All products / components which consume 'tools' should be built with the header file published by the 'tools' build instead of the one archived in the include directory. commit eb1375c6212d49f1d35bf5895b235b4a56dca851 Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Changes to common header files; not applicable to open-vm-tools. commit 8e9a9eb20b70820f5c5d091db37a7d93c0653932 Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 3b84457bab61db9402404bcc3eff6fced9339dc6 Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 02575ca8d15904552aa3e836978a59a124b862e7 Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c5732c9b32f53d29b64a8b4b20620788a9fa6e3d Author: Oliver Kurth Date: Fri Sep 15 11:23:22 2017 -0700 Add VMware Tools version 10.1.1 to the version history. commit 47a8b6dce4f39c822c5371225adc7d8017a2918f Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 847f522f678d7ae4a894eed5dcaee0504ff2044c Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Fix comment. commit 87f0f71f9929b29fb0c9b4643d92622b1a58a69c Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Add alias for 'verbose' for vgauth logging People keep using 'debug' instead of 'verbose'; make both work. commit 5d4fb852891e7fc0944d49dc11b4ec3b7fc4b1d1 Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Improve debugging Clarify some debugging messages. commit 981cdc84c1903c259b2cf791b5c3903354f9bc5e Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Add -h support to hgfsclient commit 63fb12f0d7fc5e0d22c9c6b9a8185367e7a8247d Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Improve usage for rpctool commit 5dfef556fa4220a87c67177c3d3a82c1cd74bc5f Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 add -h/--help for xferlogs commit 39ebc8c154c54e4d467e267ce08f8ddbfdabd4b6 Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Common source file change; not directly applicable to open-vm-tools. commit 79fa1cd8c12b7ecee95785aecd141f5cd57267ee Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Common header file change; not applicable to open-vm-tools. commit c3d4bcc3ddb52b0c5875f7bf429c996ebe8921e5 Author: Oliver Kurth Date: Fri Sep 15 11:23:21 2017 -0700 Enhanced log messages and a few new log messages. commit 7a32f21bb655be311de1eaac658f332245a9c5a0 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Thaw filesystems if the snapshot commit message to VMX fails If it takes a long time to freeze filesystems, vmx may timeout the snapshot operation so the commit fails. After this happens we should thaw the frozen filesystems. commit 2bb835b72b2e9071a8ad9547deff0515d015849f Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Don't try indefinitely to kill a process Some processes just can't be killed, and if guestOps try, Tools will just get stuck forever. commit 09e467656e1faa49034f314878548bec870894f5 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e958a883452adff46d788bdd51518d859c48d556 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit afff26f7e749a416483c59431f17f09d311bac2d Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit af8cf1d9864d41617dc1e53cc1106c71dfbcd8d5 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Add an ASSERT The issue is classified as "Intentional" since the value in question will never be negative in practice. Add an ASSERT to make this clear. While here, add two missing function entry g_debug statements. commit 5a6248591c5c7b02c0d32efe117814a680db4d06 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Remove several LoadLibrary calls All the callsites in this change use LoadLibrary to work around functions not being present in Win2K or WinXP. We no longer support those platforms, so can link directly to the correct functions w/o dynamic loading. commit 5eadbaf0b029c4ba7b60ae2f06e80dc9a2f3346f Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e0addb1131dc3ce9ec3aa6c32c29285893b3eec3 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit dc70c048c4006741b4878b4e8c61276ad3490f35 Author: Oliver Kurth Date: Fri Sep 15 11:23:20 2017 -0700 GOSTable: Add basic support for Solaris 12 Add support for Solaris 12. Split out Solaris 10, 11, and 12 explicitly. commit 751a92ec8f2781caa5e9da96ab11e5b28d9ae142 Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 lib/file: consistent ASSERT policy ASSERTs on pointers are against NULL commit 5ad8a6869b293d8c8fb6276d227e12dbb5563d32 Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 lib/file: Unable to perform file rotation in the root directory This was caused by improper detection of the root file system. commit 2b7bbda895a221e26424fe3a09147cd3fcccb8ab Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 lib/file: some cleanup Line things up; style made common commit d3bf42683a887081fca903a70666685a581c76ef Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 Change to util_misc.c to delete unused variable. commit 903d5ddf13cf3feab01a80c37d0681985b0162ca Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 Fix the help message for --disable-xml-security-c option. The help message printed for '--disable-xml-security-c' option is wrong. The existing help message is best suited for '--enable-xml-security-c'. 1. Modified the help message to show the option as '--enable-xmlsecurity' 2. Modified the option name from --xx-xml-security-c to --xx-xmlsecurity in order to maintain consistency between --disable/enable and --with/without options. commit 794d2d4626115a23aa7d1ff6436d6de6abb86b26 Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 Add Atomic_ReadIfEqualWrite128 This enables atomic CAS of a 128 bit entity. As gcc >= 4.6 already provides intristics for it, the funciton is just a simple wrapper, and built only for those compliers. commit 57612be42c1e13a178e4fcf4581246b8420aa192 Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 Revert previous commit. commit 934252b4d48eb69c3466fac8fe49305308c7f228 Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 Add Atomic_ReadIfEqualWrite128 It enables atomic CAS of a 128 bit entity. As gcc >= 4.6 already provides intristics for it, the funciton is just a simple wrapper, and built only for those compliers. commit 416e2c5a0d4459ef63d05eb23e514e18532a6baf Author: Oliver Kurth Date: Fri Sep 15 11:23:19 2017 -0700 Changes in file.c File_GetSizeEx() to be 64 bit compatible and treat the size of temporary file that disappears between the File_ListDirectory() and File_GetSize() calls as size 0. Common header file change; not applicable to open-vm-tools. commit 15e43152056346d3490d22d9a13e5018bea4f4b0 Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Hgfs Linux: Fix mounter versioning constants Currently, to allow for the mount information structure, which is passed from the user mode mounter application to the Linux and OSX HGFS kernel mode drivers, to be modified and support backwards compatibility, the structure is versioned. However, the version field uses a badly named constant implying it is the HGFS protocol version. This now clashes with a new enum for the HGFS protocol version added for tracking and reporting the protocol version in use. The mount information structure version should have the version constants named for their intended purpose e.g. HGFS_MOUNTINFO_VERSION. This change modifies the contant and uses an enum. This effects the mounter and HGFS kernel and OSX kernel mode components. commit 8fc9d9d5b8308134115665168355f82ef4536a68 Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Remove SAML bypass from vixTools.c. commit 76c0d8f2f48560d74f11ae6fdb37a5ff535dba6b Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Build resolutionCommon when KMS is enabled When ./configure is called with the '--without-x' option, the resolutionKMS plugin failed to build because disabling X disabled resolutionCommon as well. This changes enables resolutionCommon when either X or KMS are enabled, or both. commit f36f5da9f0a1134325495872f8853e01cadf51ad Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Fix help messages related to xerces and xmlsecurity libraries. When configuring open-vm-tools, if the system doesn't have xmlsecurity and xerces libraries, the 'configure' step stops and gives a hint that the user should try with '--without-xerces-c' and '--without-xml-security-c' options. Those options are wrong and the right ones are '--without-xmlsecurity' and '--without-xerces'. Fixed the configure.ac script to print the proper '--without-xxxx' messages in the warnings. commit 9a29c78975c870a2bf2bd12213c4f7e3acbbd23a Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Reset gGuestInfoLastGatherTime on channel reset. Reset gGuestInfoLastGatherTime on a channel reset to avoid unnecessary warning during resume and snapshot restore. Also rename global variables vmResumed -> gVMResumed and guestInfoLastGatherTime -> gGuestInfoLastGatherTime. commit bcd6bdc0c64ee3ea306598d2be9bfaf468e69100 Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 uuid.h: style changes commit 907a656a708c8730f3a98d5c34ea7f1bab6fd187 Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Common header file change; not applicable to open-vm-tools. commit f20c79b5f779cd0910c57aaa744b9a5823173f00 Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 01292c6c69dc514ada450a8decc3b1aa733e7903 Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Hgfs Protocol: remove unused constants for version Create a new protocol version enum for subsequent use and remove the unused constants and one misnamed clashing constant. The misnamed one for MountInfo will be fixed in a subsequent change. commit 614afdd309e71ddfcbab349c3c135822cb048cdb Author: Oliver Kurth Date: Fri Sep 15 11:23:18 2017 -0700 Remove extern "C" commit 48cc781074c88ed5347ee0a809f2e1d22c9fee7d Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 lib/file: consistent style commit f119378a1b745873c8ae0d3183d47ff65fad9f6b Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c8497284a62807fc69955681f24ca1d16bb82ffa Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Bump Tools version to 10.2.0 Bump the Tools version to 10.2.0 for the next feature release. commit c713911ec2d41e845e18293d73b059f0f7190008 Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Extern "C" commit 9e4713f300302650581ae6223e9fc06e556d7996 Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Minor cleanup in public/backdoor_def.h commit f8f76e2237254d56775fcc99f27542a93e1b005a Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Fix build error in message.c commit e29770d0d0cac4abc65b35102abadece597d04cd Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Remove extern "C" commit 805301a3caf702b2b6e57cb790565f2872934808 Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Remove extern "C" commit 29052188e4874e3cbb035a59d7027a4304af49c3 Author: Oliver Kurth Date: Fri Sep 15 11:23:17 2017 -0700 Remove extern "C" commit 1213229802046c9f1cc57811546f6b512e4759e8 Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Revert previous commit. commit 5e9ecc4923fb6043c9e1ca94b87cf2fca1788c7f Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit 92e764dc82ee0195e0a4fa2a3d5e2d0dbe252b6f Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 lib/file, lib/misc: style commonization commit 63237e872772c61299c423123cb41373c35a76ea Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 lib/file: style commonization commit bdf4795f81c2f17b9918917b39dbe11363059bcb Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit da40ed7745a5173953a3be5d939825e4b105db88 Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit a315228823edb6391294f8e55b27d42c8cd17fa0 Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit d82b1ff5363b81a66575fbc92db07839aa31d22f Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit 6d2db8c281212a4ae0e55bde487d0ad7f8bed969 Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit 73e7e44715c615c56c28589642ec579ca063297f Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Hgfs FUSE Client: Improve write error log message A simple improvement to provide a more complete error message when an error occurs writing data to the HGFS server. commit 1b4051b027a2b4c7743f8d81b92dd04676182c0a Author: Oliver Kurth Date: Fri Sep 15 11:23:16 2017 -0700 Remove extern "C" commit e4e0670e746b892da52ae7446e7fc526caf8be61 Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 lib/file: style fixes Some changes were against the style of lib/file. Fix this. commit aa84e68d0b85662725f54108efb77addfc2b1afd Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Revert previous commit. commit 602a113ec5931fb806d7831336d8f62bdcec1c8e Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Uninline CodeSet_Utf8FindCodePointBoundary It's a bit too big... commit 31162d6d147a2a2c3cd58f70c29a4a4c88c724a4 Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Hgfs FUSE client: fix broken attribute caching on writes The FUSE write implementation incorrectly invalidated the cache of file attributes. The return code for the write operation checked for only invalidating attribute cache if the result was zero. However, this result is negative for an error (in which case the cached attributes should not be invalidated) and anything else is the number of bytes written. The fix for the broken attribute caching on writes is made to check the result for greater than zero so any success. If no bytes were actually written we take the conservative approach of still invalidating the cache as so all the files attributes for that file will be reset in the FUSE client. This should be rare at best. commit 2f852bc476c65815244016ce379c46127977a98d Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Fix typo in open-vm-tools OSL. commit edf9be0fa0c0037292daebba2b79b625b68f42c2 Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Set up pid/socket directory earlier /var/run/vmware is used for both the sockets and the pid file. In fresh open-vm-tools scenarios, it tends not to exist when we need it for the pid file. Refactor the code and make sure it exists soon enough to be used for the pid file. commit 6c1f7f329400177030f0b9e1ac2554da72dde242 Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Use realloc_n instead of realloc Now that we have a modern glib, use g_realloc_n() since its a bit safer. commit 5979cbda3b735737eab3569403bb21dea84ecb61 Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 Update the Open Source License Files for Tools-10.1.0 and open-vm-tools. commit 4d9a7c52d11c4f99c589fdb286d1d745d7a3e02c Author: Oliver Kurth Date: Fri Sep 15 11:23:15 2017 -0700 codesetBase.c should have no dependencies These are routines that can be used anywhere without being tied to the rest of codeset. commit aba2e60151d5711fb49df32c638687c8c7d085c1 Author: Oliver Kurth Date: Fri Sep 15 11:23:14 2017 -0700 Add some missing debug logs in vixTools.c. Add log messages corresponding to VIX error VIX_E_FILE_NAME_INVALID (=22). commit 3cf3bc33a1b4f698d67e0cc5506645f149f4b025 Author: Oliver Kurth Date: Fri Sep 15 11:23:14 2017 -0700 Remove extern "C" commit 2cdfa5027a8693ed19f8a94193c471a287158971 Author: Oliver Kurth Date: Fri Sep 15 11:23:14 2017 -0700 Copyright changes commit 2a4d7a289dec5a8287d9508caacdff2fa1e1624c Author: Oliver Kurth Date: Fri Sep 15 11:23:14 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit dcc99f692159012ca146a9dab59a2d2b671d45f8 Author: Oliver Kurth Date: Fri Sep 15 11:23:14 2017 -0700 Remove extern "C" commit 20379cb590d604eeaa51e6c60af07bd671a7c67c Author: Oliver Kurth Date: Fri Sep 15 11:23:14 2017 -0700 Copyright changes commit 03e61194c29732e96c7b9d82f6c4adc5c034df05 Author: Oliver Kurth Date: Fri Sep 15 11:23:13 2017 -0700 Copyright changes commit 46bde5bb2157dd58cc8f6e0953e7097526262974 Author: Oliver Kurth Date: Fri Sep 15 11:23:13 2017 -0700 Copyright changes commit 44b43b144395b583b50c3dda37605b886e700ac9 Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 Copyright changes commit e22ce95e059d9bec1a9904c6cb98c8f0d51a1af9 Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 Changes to common header files; not directly applicable to open-vm-tools. commit 238deba5cfb44f5b314c99ec58812d29043a1ac8 Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 Log level change in CAF - Changing default log level to ERROR commit 5fe94065d513b826c74aa362f9d6de548c33e945 Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 1bc9ee62e989da0af468fc8e14046f08e63d289a Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 vm_atomic needs to have an internal extern "C". commit 289f6ae5a8c6e543d32010a17efc4c7f646d4c2f Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 C++ extern clean up issue commit c93385a40bba7acf5eee7188da9e93fa590f3018 Author: Oliver Kurth Date: Fri Sep 15 11:23:12 2017 -0700 Remove extern "C" commit 240fdbc396a364025e2ec1105252b71b99aaf161 Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Remove unnecessary extern "C" commit 756b771290c3b1b303252ca42142e8e9874c4b1b Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Formatting/indentation fixes to lib/file. commit 1beeea1f0b3467735579d1d2c58585a80afdd52b Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Formatting/indentation fixes to lib/file. commit 013c3d530d203baa3ec02ad767d641cd495923a6 Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Revert previous commit. commit e86169d49c461e3e5ce2fa8de3d03586cff1656b Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e5b0240bd6036a600603abd6ceb81476756baad8 Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Consistent #ifdef style in err.h commit c4c8e1819a4de4dd7a269b1d0fe6d27b519fed09 Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Revert previous change commit af4b0fdb43083c297d08c2c6a88f3c7c470eed25 Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 strerror is not thread safe Replace with Err_Errno2String. commit 783c4a9e62dc83edc5707232e0e2d0dafa89a83c Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Switch to Err_Errno2String for thread safety Start cleaning up strerror usage. commit 64ccb7fc149dc786503d0b0e1eab9d84ed65228f Author: Oliver Kurth Date: Fri Sep 15 11:23:11 2017 -0700 Remove Hostinfo_OSIsSMP commit adf3be560d65d0d910d4d4b2988aef152a797720 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 make System_GetTimeMonotonic() really monotonic Solaris has an issue where times() can return a lower value than it returned earlier, making it non-monotonic. This change works around this by saving the last returned value and returning that if the times() function return a lower value. commit 3f2da0682aa201132449eb73fda0f0272c09d5e1 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit fbad4c6ddd25e8af9c7bd7c6c9879c03b4542a54 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Properly configure xmlsec1 for CentOS Some distros build xmlsec1 with dynamic crypto, so do things slightly differently. Also work around an issue with the way Redhat & SuSE package xmlsec1. They built it with -DXMLSEC_NO_SIZE_T, but that flag isn't properly exposed by xmlsec1-config. This results in a bunch of xmlsec1 data structures (anything with an xmlSecSize in it) being different between the lib and our code, and it tends not to work when our code references fields in the data structure. This change always sets -DXMLSEC_NO_SIZE_T. commit 69700e93427aaca77897e66cad3a8ab6ab526a9b Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Backout asyncSocket change to not exit recv loop early when SSL_Pending is zero Change being reverted: After reading some bytes with SSL_Read() and firing any callbacks, we would make a call to SSL_Pending() and, if that returned zero, we would break out of the read loop and return. We would only make a second call to SSL_Read() if Pending() returned a non-zero value. There are several problems with this. Firstly, having bytes buffered up within SSL is a reason to continue performing SSL_read()s, but not having bytes buffered is not a reason to stop. If the socket does not have SSL enabled, for instance, Pending() always returned zero, so non-SSL sockets would never actually loop here and every read would bounce back through Poll. Even in the case where SSL is enabled, this function returns only the number of bytes buffered inside the SSL context and provides no information about whether the socket itself has bytes available for immediate read. So, again, if SSL_Pending() is non-zero, we want to keep on reading data with SSL_Read(), and if it is zero, we *still* want to keep on reading data the socket itself may have more data immediately available. commit 9ab704e9061cccd6eb6fe9a962a0a9c11ba5be27 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Use /etc as default dir for pam instead of sysconfdir sysconfdir evaluates to $(prefix)/etc by default, which evaluates to /usr/local/etc by default. This is (almost?) never a correct path for pam config files except for FreeBSD, so set the default to /etc, with the exception of FreeBSD. commit 4597af473e063e5ef13484d3a22298746fc3b0c9 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 18fe499f9dac3a4fc0538ee2280fd47cde6df3b4 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 97369f9f83795eecf186ce3e360e06faa53d0da9 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Additional AsyncSocket API clean-up. - Convert void-returning asyncsocket entrypoints to have an integer return type, returning ASOCKERR_*/ - Do not exit recv loop early when SSL_Pending is zero; the socket itself may have more data immediately available. - Allow a small number of recursives uses of the send callback. Common header file change; not applicable to open-vm-tools. commit 89212bfbe833d06db94e642676b6b4e7c35219e2 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Bump tools version to 10.0.10 commit e6da3bd40f8c83eba18fd8f1f05d9e06a3e56006 Author: Oliver Kurth Date: Fri Sep 15 11:23:10 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c1cd45f716b974925a12e7c59f89eb5bf6731d20 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Hgfs Linux Kernel Client: Fix RHEL 7 system backports RHEL 7.3 introduced some backport changes for the Linux kernel which broke some of the assumptions about wait_on_bit function arguments. This fixes the test of wait_on_bit compile which accidentally tests the function in kernel 3.17.0 which will always fail instead of intentionally failing with the pragma. commit 4d2fef98fd292552466757c65671c095667580f8 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Hgfs Linux Kernel Client: fix RHEL 7 system backports RHEL 7.3 introduced some backport changes for the Linux kernel which broke some of the assumptions about wait_on_bit function arguments. commit 811233a972be67259dacc4c005afabde78739831 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 4da8e30cc2fdaccd4e2c21eb71345046d0c0e944 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Move include of rateconv.h in hostinfoPosix rateconv.h is only needed for the Mac system timer conversion. Move the include. commit 4faccaf54449ecb7b553bcf6c02a6e046aa43292 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 26374b47147b1fa4c9c8a5f7ded23a34f407475d Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Improve network recovery for Linux Virtual Desktop Infrastructure. Client needs to react to an unexpected disconnect and reconnect with a saved session id and path. Common header file change; not applicable to open-vm-tools. commit cfc624cc948674e1ddc53121194f84f08db1ba89 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Hostinfo_SystemTimerNS On Apple, switch from using floating-point to fixed-point for nanosecond time conversions on iOS. (Note: x86 is 1:1 so never used floating point). Fixed point is easily faster, plus uses a 128-bit multiply that avoids overflow. Added some comments to point out "interesting" cases that show why we do not use Apple's documented method. commit c0b2e65062e4107c9812b33b7a9df2f7ed177304 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Fix localization code The code that loads a message catalog attempted to handle continuation lines. However, it ended up dropping anything it decided wasn't a continuation line. The end result is that any message catalog that had multiple valid entries without any empty lines between them would lose valid data. commit 2f4fda1ef463fca0b990580e4f3fbbb02edc5f15 Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Changes to common header files; not applicable to open-vm-tools. commit a6856e53eded0b6dbae606b9713fd2286115baad Author: Oliver Kurth Date: Fri Sep 15 11:23:09 2017 -0700 Revert the change to add DarwinPre15 to the guest os table. commit 4d0e744ebb69ef6b4d9d6d4884d1d35bad8b6b1b Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Hostinfo_SystemTimerNS: Inlining Now that we require glibc-2.5+, we can also require the glibc-2.4 clock_gettime() call be implemented. CLOCK_MONOTONIC is required for all clock_gettime() implementations (per POSIX), so the implementation here just became Really Easy. This is intended as a code simplification / standardization; there is no expected performance impact. commit 258e66b6a4e8cade7d3f3a9464958d9063cd286c Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Add linuxDeploymentUtilities to libDeployPkg commit 50a89b5ff8e3787f77f1c6122099d2eac89bbfde Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Revert previous change. commit f7d38d24e357f2738aadd0e2fbf68e884d9a288a Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Hostinfo_SystemTimerNS: Inlining Now that we require glibc-2.5+, we can also require the glibc-2.4 clock_gettime() call be implemented. CLOCK_MONOTONIC is required for all clock_gettime() implementations (per POSIX), so the implementation here just became Really Easy. This is intended as a code simplification / standardization; there is no expected performance impact. commit b110d03125ff8d6a558427625196664b9337b07f Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 8e2cca63b4b8ed5d399e647291af6b405c3e188e Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Hostinfo_SystemTimerNS: Update Tools build files The tools build files need some light touch-ups to make librt.so mandatory (Linux and Solaris only). - configure.ac: Linux already required librt, add a Solaris requirement - vmtoolslib.make: add a Solaris requirement commit ad9206ea40608d32f07af5548430a57575caf8d4 Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Update glib and pcre for FreeBSD and Solaris Update glib, pcre, and additional libraries they require for FreeBSD and Solaris. With this change, a release note will be needed to advise users to add the following lines to /etc/libmap.conf before installing vmtools on FreeBSD 6.x: [/usr/local/lib/vmware-tools/] libpthread.so.2 libthr.so.2 libpthread.so libthr.so The presence of these lines will cause the run-time linker to use libthr.so.2 whenever it encounter a dependency on libpthread.so.2 in an executable whose path starts with /usr/local/lib/vmware-tools. The reason for the release note is as follows. FreeBSD provides a threads library called libthr.so.2. In FreeBSD 6.x, this library is separate from and incompatible with libpthread.so.2. In FreeBSD 7 or later, libpthread.so.2 is a symlink to libthr.so.2. vmtoolslib is linked against libthr.so.2, while libgthread-2.0.so.0 and libglib-2.0.so.0 are linked against libpthread.so.2. On FreeBSD 7 or later, this works fine since libpthread.so.2 is a symlink to libthr.so.2, as noted above. However, on FreeBSD 6.x, vmtoolsd core dumps because libthr.so.2 and libpthread.so.2 are separate libraries, hence both are loaded and their incomatibility results in a core dump. Adding the above lines in /etc/libmap.conf will keep libpthread.so.2 from being loaded, thereby allowing vmtoolsd to run. commit 43e4a3d6309d9f84332042fdec902ac5c3d6a28e Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 Update the guest OS table for darwinPre15 if the GOS is 10.10 and earlier. commit d88042ca14d20f10319498b5b249363e1cc4ed9d Author: Oliver Kurth Date: Fri Sep 15 11:23:08 2017 -0700 More AsyncSocket changes. In AsyncTCPSocketBlockingWork(), do not block necessary. Reverse the order of the read/write and poll/select opterations. This reduces latency when the socket is ready for the I/O operation. This low latency option is "off" be default. Changes to common header files; not directly applicable to open-vm-tools. commit a0e7e23614c69c61e81b6241add014f0df92ef01 Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 Update glib and pcre for Tools for Windows, Linux and ESXi. This change adds a new glib.mk whose scope is local to the tools build. The new version of glib depends upon libpcre, libiconv and libffi. commit 71142cf3a04cf0adeaec94a3a73de9e5185b4490 Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit c706325151147b62532bc3c437741492c4ecd952 Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 Update VGAuth source for compilation with OpenSSL 1.0.x or 1.1.0 OpenSSL 1.1.0 is about to released. With that release comes a number of changes that include making several types opaque. Along with this, new or renamed setter/getter functions appear. The API changes and the impact on open-source products is discussed at: https://wiki.openssl.org/index.php/1.1_API_Changes. Updated man pages are available at: https://www.openssl.org/docs/manmaster/ The impact to open-vm-tools is that the message digest type MD_CTX has become opague. Local (stack) MD_CTX objects are not supported. The required change is to dynamically allocate MD_CTX objects as needed using the 1.1.0 API xxx_new() and xxx_free() or the pre-1.1.0 functions xxx_create() and xxx_destroy(). commit e24ce91afc3b275933e7e300002c5b8734f81cc7 Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 Add string concatenation function to DynBuf The DynBuf code operates on both strings and non-strings. To add a string at the end of a DynBuf is easy: DynBuf_AppendString() appends a copy of the input string, including its NULL-termination. Sometimes strings are repeatedly concatenated, such that a version of this function without NULL-termination is needed. This change implements DynBuf_ConcatString() which explicitly does not copy the NULL at the end of a string. commit c7b05cadcce82aadafcff985c51ae348c906a675 Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 Remove AsyncSocket_ConnectProxySocket() declaration from asyncsocket.h. commit 95882ca05e584ffa43ecf1edbe5431b0faa431fd Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 POSIX FileIOErrno2Result should not log when it is called POSIX FileIOErrno2Result logs when an errno doesn't map well. This can cause callers to have unexpected logging. In fact, the Log Facility got caught by this. Log write errors generated more logs! This has, at times, lead to spew in the logs. Logging could occur on each I/O failure! If an error needs to be logged, the caller should check the error status and react accordingly. They can use Err_Errno to get the native error in a platform independent way. Remove the logging in FileIOErrno2Result; Add logging for open failures that are from "unusual" errors; remove logging from I/O errors. commit 54a8a3c29be94d6cfb155041221c7ead6f21522c Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 lib/file: Explcitly catch EIO in fileIOPosix.c No need to log as EIO is a known possibility. commit 89ad718885b0141d3a0a46d34f164cb933830a1f Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 More remove extern "C" commit f001a9ed146c86a8ef7cafd20b6403343406d166 Author: Oliver Kurth Date: Fri Sep 15 11:23:07 2017 -0700 Change to shared header file unrelated to open-vm-tools commit a30a9c33ed858c1e201c7e74ca0434273d111dfb Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 VThreadBase: missing typecast on mac Seems the mac tools compiler is a wee bit picker, and needs an implicit typecast instead of implicit. Obvious fix. commit 96791075ee5594e81551cc78b2e5d0e3e3e09b5e Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 VThreadBase signal counting: remove malloc This is the easy first half of rewriting VThreadBase to not malloc within signal handlers. The second half is still under construction. The core problem is that malloc() inside a signal handler can deadlock; consider especially the case of malloc() detecting heap corruption -> SEGV -> signal handler -> malloc() and self-deadlocking. Thus, the overall plan is to stop malloc()ing and instead use TLS variables ... as the new comment points out, we can now count on good TLS behavior since Linux and Windows minimum OS versions bumped. In the signal handler case this is easy: if __thread is available we can just use that as a counter. Life is a little more tricky without __thread (see: macOS and Android), where we need to use pthread_{get,set}specific() calls. Use a constructor/destructor to manage the TLS keys, which is a strategy dependent on the TLS destructor being NULL. (Specifically, on library unload the destructor function can remove the TLS key but cannot fire the TLS destructor on all threads, which would leak). One small note, the use of an atomic is not needed here because only the current thread can set the value and, if interrupted by a signal, the stack preserves the correct value. Two other minor things deserve mention: first, remove the TID parameter from VThreadBase_SetIsInSignal(); it was only used for self. Second, re-ordered setting is-in-signal and the first VThread_CurID() in the signal handler; this means the VThread_CurID() implementation can check whether we are in a signal handler, a feature that will matter in a future change. Net result: the signal counting part can now run without any memory allocations whatsoever. Memory allocation is thus needed only for the thread ID and name. Stay tuned for TID/name in a future change. commit 8d9d99705dd43679a5da913131345c8bd470a8a9 Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 Reorganization of the AsyncSocket API layer into an interface dispatch layer and separate disjoint socket implementations. Common header file change; not applicable to open-vm-tools. commit c9b9e6a0bd6719f6577b9bc263e9c525b402397b Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 Final cleanup of xmlsec1 work Do a final cleanup pass commit de6822facfd0b3a61cdc5982397fd15020ec1c72 Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 Restore AC_VMW_DEFAULT_FLAGS([XERCES]) The command AC_VMW_DEFAULT_FLAGS([XERCES]) was lost with a prior change. Restore it. commit 82503bb34195d02cff666c4774e35b6056858439 Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 Change to shared header file unrelated to open-vm-tools commit 35d5500e8711708860efe1988fab226c435a89cf Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 Change to shared header file unrelated to open-vm-tools commit 61eb3825719ee883c5c4b275993dc21c84f3a8a4 Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 link resolution plugins with -ldl commit 69470031736260c62f09ba1b52a85b800b639399 Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -0700 Minor dead code removal Hostinfo_GetPCFrequency: function has no callsites. And now that Windows Hostinfo_SystemTimerNS is Really Fast(tm), amortizing ticks-to-nanosecond conversions doesn't make sense. Util_TokenHasInteractPriv: has only one callsite, used in a log message. Delete. commit af6cb15dc6f0e4f95b3381848b0b59d7138d0d0a Author: Oliver Kurth Date: Fri Sep 15 11:23:06 2017 -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. commit 08cc58799f16f32276b90c0d7862917553dd5edd Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -0700 Change to shared header file unrelated to open-vm-tools commit d1ec74708ae1ad1cfb84eada2e6eb70624637c6b Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -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. commit 03e97029b0e2a84e2179a32dbb5d756ecf47e88f Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -0700 Updating glib and dependent libraries for CAF to latest version Update glib libiconv, pcre, zlib and libffi. commit ed2e2348dd6af823f9458c5959c89acf2f13a952 Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -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. commit 124c3e19891fa71123f9ddea9d6053b8503841bd Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -0700 Make headers C++-friendly Add `extern "C"` blocks to various header files. commit 410285953a2afab963cfabb6f389cf515d9f08f4 Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -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. commit df26946e952539a2f90fcf983dbd0a4f7d3304ee Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -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. commit 6daa2753d394391ce9c319581d200ce5f1cc4fea Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -0700 More C++ goodness err.h: Includes before C++ Fix this file. commit c23472eab7d7ec8b24f52d8ecb69c027e0ee4a1b Author: Oliver Kurth Date: Fri Sep 15 11:23:05 2017 -0700 More C++ goodness C++ after the includes commit 76f7e0f43e95edb6cffe3dd5294ce2d4a65ff1cf Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 More C++ goodness commit da66defc097e7b88cc94a7080e00bc5fb108443f Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 Backout update of glib and dependent libraries for CAF to latest version commit ba8d985127f1f7c8852fe06e3c7cdb5c6482daac Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 More C++ goodness Messed up a file, fix the build. commit 6db382eb3d5ccc8044a6fcf9f6b8cab217f882b6 Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 C++ goodness continues commit 2549e58a4ac0025100c03232169e57ead8ca57f5 Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 More C++ goodness Add extern "C" to header files. commit d9f7cd4aae81fef9fbcaf72c1b8c45c1e4ef084d Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 More C++ happiness Add extern "C" to header files. commit a8c9491f7a29b6c015b0787ff288c3489efcf10b Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 Update guest_os_tables.h for darwinPre15.iso for Mac OS < 10.11. commit 447bbf0118b88937728805164ef9313fb7e4dd50 Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 Update bsdfmt.h license 2016 now commit 4e1edd1a3b60c6aa4c585c788796b15959275eab Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -0700 Do schema validation with xmlsec1 in vgauth Add schema validation for xmlsec1 based SAML verification. commit cfc2ee979176d914c17e7e84be54cbf2cbf48e38 Author: Oliver Kurth Date: Fri Sep 15 11:23:04 2017 -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. commit aeff7f0b8d14d5a23fe4037e6dccc4de8c189295 Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -0700 Change to shared header file unrelated to open-vm-tools commit 2ef6e3dc02e0238184a814d978d733bd2b5a540c Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -0700 Tools 10.1 translations commit bb446f9e8b7cc88271e6553db0f800eea944b39e Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -0700 Update glib and dependent libraries for CAF to latest version commit af2a149d77694fc680a6719ec221746e2dd7e7ed Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -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(). commit 4ccfee744d5e4001c5adb8f91860c38433983b34 Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -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. commit d8a9f44d31bf970367f7dc80dc95730b097ab2c0 Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -0700 Dynbuf: Improve documentation InitWithMemory is a better name. Improve the init function descriptions. commit 19405c3edf186cb2278ce0698480022c837f9775 Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -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. commit aa3e981b9def57c605948bbfbf0df3e28354269a Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -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. commit 3263360ef1965a230ba800aa3835782845d85c0e Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -0700 DynBuf: Start smaller DynBuf operations are mostly concerned with strings - and most strings are less than 128 bytes long. Shorten the initial allocation. commit cd84020ca36953893771a208f03826d155905c5b Author: Oliver Kurth Date: Fri Sep 15 11:23:03 2017 -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. commit 5d51154ddc74340652317f3b3ff1537b80375cbf Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -0700 Split FreeBSD in the GOSTable Split FreeBSD into freeBSD (old) and freeBSD11 (going forward). This is to cover driver differences. commit f25e6759cf0d274a87d740cd418c49eb306a1fe2 Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -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. commit 12890cf51047a0d5837a93a6c38d8eaf0adf02ab Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit bd4f98a472370c8d840d3ba949b0c5656e6b1fd4 Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -0700 Changes to shared header file unrelated to open-vm-tools commit 245bcf456f0376344eb71c0edbbfbba4c2e7e3b3 Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -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. commit 19fe2c9f63be291c7ab215e244c93ea179e48cde Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -0700 Fix some memory leaks in vgauth commit c00cbf53a1477211b6413bcf561d0f2a8267dc52 Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -0700 Change to shared header file unrelated to open-vm-tools commit 578cb08c2ebae1a376aad7f6a3e41b9f145314b0 Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -0700 Update tools version to 10.0.12 on the frozen tools branch. commit 70e8dbab91f28238c3c8bd06d12b5370d47497bb Author: Oliver Kurth Date: Fri Sep 15 11:23:02 2017 -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. commit af27acff59f7ec8193fdad6ca717eac9bb2bd153 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 Revert previous change. commit 8f68cd2b71d87c612d8a5aa8b8bee8158d048d13 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 Changes to shared headers files unrelated to open-vm-tools. commit c930424d027864df22d5052f31951570a00fb50b Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 Guest DNDCP: Remove unused private variables. Updating the mac tools to build with clang found some unused private variables in the DNDCP classes. commit 540b899ea0b0c946fca0d303093e35c760e6b4af Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -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. commit b0d2f41dcacd2181b36855fa5b2a2b43def8e216 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 CAF changes to prevent NamespaceDB frequent polling. commit f969faf20c307a9da02f2a3ba200ecb138d07b47 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -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. commit 357d2011d6221c5ade35d6b4a71c63192df1ce68 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -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. commit fe067916d63a1aafbf82cdaef756c414dbf9c984 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 Require rabbitmq >= 0.8 when building with caf enabled caf requires rabbitmq >= 0.8, so check for this version in the configure script. commit 87c2e132c57114bf20dfe877cd69101f1001060b Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 XP cleanout: remove pre-Vista code. We now require Vista or later. The CondVar APIs are unconditionally available. commit b521f51b5f7225017499611a20a3cc640204e606 Author: Oliver Kurth Date: Fri Sep 15 11:23:01 2017 -0700 File rename to prep for new xmlsecurity Rename the xml-security-c version of saml verification as a step towards also supporting xmlsec1. commit e7ea6167d184015266a33ba47997819bf676a490 Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -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. commit 393e900846e401dc70aee68dad87f805e924edcc Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 Revert previous change. Missed updating the OVT build. commit fae37aaf9dc1514345a25b18740bfda925e6f76a Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 File rename to prep for new xmlsecurity Rename the xml-security-c version of saml verification as a step towards also supporting xmlsec1. commit 01217f4b0e858df5f3465240df2896c013491fa0 Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 Hgfs Server: more minor clean up of write operations More clean up in preparation for write operation security fixes. commit 05dcd02c81bef7a49f15c9c1645bf2bf15e83e3b Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -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. commit f23de806de72d3ef992b565c8841c8c789cb2530 Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 Update vm_tools_version.h with tools versions 10.0.8 and 10.0.9 commit 03542fe6cfdb9a7a601792714b048b073356876d Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 Common header file change; not directly applicable to open-vm-tools. commit ce83118368eb727ef332e436b18ca667f194e5ce Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -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. commit cf015ea15ad08bd5863c78b3a2cd270f152ce723 Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 Change "OS X" to "macOS" in the GOSTable. Apple rebranded, so react accordingly. Also fix a misspelled message. commit 77dc61498c64972abccd149dc7e55600dc9a0b61 Author: Oliver Kurth Date: Fri Sep 15 11:23:00 2017 -0700 Fix indentation in lib/misc commit 1be7624511bd7767a2fa6e5788051d494594dc6b Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -0700 TLS 1.2 changes for common-agent commit 71cb61c333d8813cf7ef22cfb09bb61c095fc328 Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 9bdc9393e630f6a7d9cf4ab22a881ea6f7ddcc25 Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -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. commit cdf0864f5dfa55c535f362bd66c5e00f8725a936 Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -0700 Reapply ICU change. Atomic_Bool isn't implemented for ARM32, but Atomic_Int is, so use that instead. commit 64f8760c1915e224d3d905cabb76a63f897296dc Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -0700 Revert previous change. commit fb66ea0adcb4dceca686cb7cefb7f857ccf6e74b Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -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. commit 608a7e966c88b37265f062e9b02b30fe65b24b2d Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 58c1585e5aa76dde81e578444bc769caa4cb00bd Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -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. commit b99cd226533c04d90397815a4c49848212d95424 Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit efd6c9ad4d0ea0198de7107afeb72d2bc8a2b8f2 Author: Oliver Kurth Date: Fri Sep 15 11:22:59 2017 -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. commit 6dbe90a0c7231c3f48a24d94dc6c410db2109cf8 Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -0700 Change to header file unrelated to open-vm-tools. commit 188c60b0e0d69c76e73a0d1de7d3dbd24a3b2daf Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -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. commit a5c07080a4e7e38f2520ea8c5bba86d82328cbcf Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -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. commit a9f545e1ebb6d5486f0d44a87e9c436156165277 Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -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. commit d3c08cf36fffaa8b235375b880fa89a6f2440b46 Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -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. commit 8781e18ba29ad01fdf9ebdf4bb46ee0ea08b1f39 Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -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. commit 8d607518c494947102ef30b47afc90ba0c973bec Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -0700 Change to header file unrelated to open-vm-tools. commit 460d38a44a56b279e21014fc8550e80c9acd4751 Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -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 commit 379cf86f2b71c0040acf66e763ca416ef1bc8c8a Author: Oliver Kurth Date: Fri Sep 15 11:22:58 2017 -0700 Change to header file unrelated to open-vm-tools. commit 018e3832fcafe9393f799217ff981759b3df0b03 Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 80a6e3944ba3a75c63b8e4a05fc8941663ab8b3f Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 6d72467feb2416ae8198c6a880d5f993132ab79d Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -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. commit 159ff344d17fb4605aa7d4c5934360719e190f24 Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -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. commit 23606612dd1711e21d7683639be2da1f8ea5a2ee Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -0700 Common header file change; no applicable to open-vm-tools. commit 3c23abdb53cf3edf8ca07cecfaf927a4dac44aa3 Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e78b0cafb4ca3c3a79ded9a6e4b66f13129e3d0f Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit e36a8fa9478734a06c7a63b086d5476e69e24757 Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -0700 Revert previous change. commit 04feecbd07b946e4aab0c642f6c9363775bd7f5c Author: Oliver Kurth Date: Fri Sep 15 11:22:57 2017 -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. commit d3b7ba4897934eff9a2e79f783b195a40cd58356 Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -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. commit 4ca9fd8b08aec527c83941909015f846bbae634a Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -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. commit df8d0e4561bfd07b4f2a4ee13d14c7cd5de67e76 Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -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. commit 21ee819ff7b6f83943c4cfedad62939a89d0b4e3 Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -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. commit 528d091623208cb6e9780289ae8949de3d1f5704 Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 104a965a37d9347ebf87301093b88e220fedc52d Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit 0d057132ad3494f730ee94b69d66aefaeac6dce7 Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -0700 Hgfs Fuse Client: increment version for connection unavailable fix Increment version for connection unavailable fix from 1.6.3 to 1.6.4 commit 675c07bb089fb4cfd07932563da21b251d12c70b Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -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". commit 795be8ba52f52c49c10dd948d79fd401ba524c12 Author: Oliver Kurth Date: Fri Sep 15 11:22:56 2017 -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. commit e16b8bda77ce238dff5b51c228a24d933f39452e Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -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. commit a8ea36fdc44d110bf8a0257782aa91d6f3555876 Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 vthreadBase.c: Update copyright and cleanup tabs and trailing whitespace. commit fbb9ff847ec87e6cddc399627ce4c651a7cdbe11 Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -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. commit 23bcb7e2cc001f83886cf61244f56f987cdb2ecc Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 Change to shared header file unrelated to open-vm-tools. commit f9446a65854c575d660315d6473a878bbf6f48ed Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 Common header file change; not applicable to open-vm-tools. commit 622e55c0101f13c8f8da41fa18b7a25c0a05d61e Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 Allow SAML authn to bypass impersonation if the user is unchanged vmwsu can't create an impersonation token for SYSTEM since its not a 'real' account. So bypass the impersonation phase since toolsd is already running as SYSTEM. commit 7c68f9f81bf0a438702585fe82861124f1c68c06 Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 Remove an assert and save vSock family reference in vmsvc only. VMCISock_GetAFValueFd API does not open a vsock device if kernel has upstreamed drivers. So, the ASSERT for vsock fd is not valid in such cases and has to go. Instead, save the reference only when family as well as fd are valid, because there is no need to save the reference in case of upstreamed drivers case anyway. If 'vmusr' holds a reference to vSock address family, it could come in the way of upgrade because 'vmusr' keeps running during upgrade. To avoid that issue and given that we just need one reference, we limit the reference to main service only. Also fix the VMCISock_GetAFValueFd API to initialize outFd in case of upstreamed drivers. commit bb680f5b3f1f6b079ec214cf214738c99f4716c4 Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 Changes to support valgrind with Tools Allow Tools to be built with valgrind support. With these changes, adding "export USE_VALGRIND=1" in Local.mk will build a version of Tools that works with valgrind. Also includes a change to turn off appLoader for vmtoosld and toolbox-cmd. commit 5d1554e30aaa31f18978eedcb06dda1c659c18af Author: Oliver Kurth Date: Fri Sep 15 11:22:55 2017 -0700 add toolbox-cmd for tools.conf config entries Add a generic tools.conf set/get mechanism that can be used for any config entry. The first specific use case is to enable/disable the allowLocalSystem pref for SRM. commit 6e07974b38f94cd27aafe8c23a213c47acc51521 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Common header file changes; not applicable to open-vm-tools. commit ec256d66c638dae94a15d9ebcee8f5c0f29472fb Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Make sure the Windows version of namespacetool logs to stdio Make sure the Windows version of namespacetool logs to stdio instead of logging to debugger. The Windows version of namespacetool didn't print the warning messages under the verbose option. commit a8e4830a0d27ee0dd528c4b8c310a1c2929e9d30 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Rename IsPowerOfTwo() to IsZeroOrPowerOfTwo() The function accepts 0. Make the behavior explicit in the name. commit a82237f35a142b025f1a3b7ab3333b325106b5c5 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 vmhgfs-fuse: remove unused label An unsused label caused an error when building on FreeBSD. It is not used, so remove it. commit fc251c97d74439a81feb6f5cb60f592a4d4b38bb Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Replace RpcOut_sendOne with RpcChannel_SendOne in vmtoolsd commandline. "vmtoolsd --cmd=" uses RpcOut_sendOne which is a backdoor only implementation. It should try vSocket before falling back to backdoor. commit d730ed8efc710f9187be5214c89d5db151a60432 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Don't auto-retry RpcChannel_Send when error is final. RpcChannel_Send retries in case of any error. However, retry makes sense only when there is a transport error. When there is a failure returned from VMware in handling the RPC command, the error is final and retrying does not make any sense. We need to avoid retry when it is not a transport error. In order to differentiate between the two types of errors the internal function signatures required changes. As there are not many direct consumers for RpcOut_send, fix all of its callers to check rpcStatus along with the return value of the function. New API behavior also allows removal of some string comparisons on "reply". There are no other behavioral changes intended in RpcChannel_Send, so all the callers of this function remain untouched. commit 280f7726ff8fc72df9554f411146e02c54842209 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 open-vm-tools: use $(srcdir) in Makefile.am for udev rule Building in a separate directory was broken for installing the udev rule. We need to use $(srcdir) in Makefile.am, otherwise 'make install' will fail. commit d5555e64369cb5a00be7d41da220c29f914d25c6 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Fix the namespace tool verbose option. Fix the the namespace tool verbose option to print out the debug and warning messages of the vm libs to stdio. Introduce a new function that console apps can call to log to stdio. commit ed3f6f7b096dd54f4f0545d360b4f997781de7f0 Author: Oliver Kurth Date: Fri Sep 15 11:22:54 2017 -0700 Fix guestproxycerttool to properly handle non-ASCII filenames Filenames are being passed as UTF-8, but file opens (both CreateFile and fopen()) were assuming ASCII. Switch to a conversion & CreateFielW and g_fopen(), which handles full UTF-8 filenames. Also tweak the error logging to dump the error code for easier debugging on non-english OSes. commit 0006b0091758a229469c4e92fda186227c8525fb Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Fix a namespace tool crash. The namespace tool core-dumps when running the following command vmware-namespace-cmd -V get-value name -k key This is because glib options parser removed the -V from the argv, and passed the ValidateNsCommands() check. However, the later RunNamespacecommand shall ASSERT() on the NULL nscmd. commit 8a5e316cd54edfcc06b00f74bba4b7b30e2de293 Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Changes to shared header file unrelated to open-vm-tools commit 0a92586c6ab3cbb18571b0cf99958a97a97198d7 Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Coding standard updates Fix a few things to conform to the coding standard. commit f069fff44c6d0b7e210cb13aa7de9b6d1003c17b Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 open-vm-tools: add udev rules to set scsi timeout To avoid volumes going read-only of offline, a longer timeout is needed, see bug #271286. This is already done for tar tools and OSPs using udev rules, but not yet for open-vm-tools. This change adds a udev rule for open-vm-tools. A static file is used, and it will be installed for Linux always and only. There used to be a different format for udev rules, but that is very old (before 2010 at least), and used for RHEL up until RHEL 5 and SLE until SLE 10. It is not thought that we need to support these old udev versions for open-vm-tools. commit 09681d7ce54f556fd5929b9c196a625369a4eb5b Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Make NullProvider race-free to be thread-safe. NullProvider start function was sending 'prov.snapshotCommit' message to VMX which was being done on the worker thread. This led to a race condition where VMX state machine advanced faster than guest side state machine. Later, when VMX state machine sent 'vmbackup.snapshotDone' to vmbackup plugin it did not like it because it was not ready for that message. In order to fix this issue, we need to split the code that sends 'prov.snapshotCommit' message into a separate callback that gets called by the main thread instead of the worker thread. To do that, we needed to create a VmBackupOp for NullProvider so that it can be monitored by the top level state machine. While there also fixed a subtle race found by Victor in VmBackupAsyncCallback. Basically, it can prematurely release an op if the op was set by worker thread between QueryStatus and Release calls (i.e. line 483-488). This is possible due the initial value of status. Fixed the initial value of status to make it impossible. commit 95a253cdcdad9a3f31cb38d7ede79c25587fd8d3 Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit 4ef4b195cad27835b8a5fa98fc7e2313e809e812 Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit f986bdbaebdb6937f2c26606dcdbd12e73ca1d8a Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 ToolsCore_InitVsockFamily() must tolerate the lack of an RPC channel when the backdoor has been disabled. commit 8a9529e714141ab425b09ea9e0a4bf702f9cae1b Author: Oliver Kurth Date: Fri Sep 15 11:22:53 2017 -0700 Bulk updates to the common-agent (CAF) source. commit c745e998dd05438e1713e53e7a847e2ab14f44e6 Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Changes to common header file; not applicable to open-vm-tools. commit a74bd9604cdb98b1f0aa8c88557f14c006daff32 Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit 4389d0b1092a59307527b2b83f4daa42e991a797 Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 [Tools GuestInfo] Return proper osname for Centos 6 / 7 (again) Updated the code to detect Centos 6 and Centos Linux 7 and return proper osname acocrdingly. commit 73124d51a3ef2db737bf9313d93dd206851bec99 Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 [Tools GuestInfo] Return proper osname for Oracle Linux 6 / 7 Updated the code to detect Oracle Linux 6 and Oracle Linux 7 and return proper osname acocrdingly. commit 7ea377da1d85f0d3f691fa8d17d7650117f57351 Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit 7b8be4232011660d2fda9964815cfa2fed2f1978 Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Hold a reference to vSocket address family in vmtoolsd. On old hosts that do not support secure guestRpc vmtoolsd falls back to use backdoor. However, there could be vmci and vsocket drivers loaded in the guest that make vSocket consumers (e.g. guestLib and namespace-cmd) try vSocket all the time before falling back to backdoor. On old Linux guests like RHEL 5, 6 (kernels below 3.9 that do not have upstreamed vmci and vsocket drivers) this causes log spew in guest system logs because of vSocket address family being registered and unregistered on each RPC call (RpcChannel_SendOne). This could be solved in multiple ways involving some work from user. In order to solve this problem in a user friendly way, we hold a reference to vSocket device in vmtoolsd service, so that the reference goes away during Tools upgrade. commit f9ca53c4a687a98d59252da4ef01f7aeca567c6c Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Check for bad length fields for input byte buffers in dataMap code. commit 2e8e7ad263ea50e654daf0059bbc9848bc07777d Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Change to common header file that is not applicable to open-vm-tools. commit 2d1e452455547c53440376f11beafb5a2353d4ad Author: Oliver Kurth Date: Fri Sep 15 11:22:52 2017 -0700 Common header file change that is not relevant for open-vm-tools. commit 25c80a2d761895fa0e5d1ed81b57d3beb0013de4 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Common header file change that is not relevant for open-vm-tools. commit 9d8ec66013825637450a45545e43856edef1d31f Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 open-vm-tools: fix build error in Ubuntu 16.04 The -std=c++11 causes an error when used with the GNU C compiler, but it is in GTKMM_CPPFLAGS. So this change moves GTKMM_CPPFLAGS from libdndcp_la_CPPFLAGS to libdndcp_la_CXXFLAGS in services/plugins/dndcp/Makefile.am. This also fixes building for current Debian sid. commit 21f3c28eb8313b438eba527d8682facdb38ffbe3 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Hgfs Linux Client: fix editor prompts for file changes When using some editors such as gedit to modify files on the HGFS shares the editor can become confused thinking that the file has been modified remotely and therefore needs to refresh the contents. This occurs due to the file's modify and change times being updated after the last writes from the editor and the modify/change times in the inode not being updated immediately. commit 540e28c3bc64036544ec6ad4fd699c9e0ac042aa Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Fix a couple more Coverity-reported issues in tools. commit ff25bb230a11fc2ffdfe083c431954431aec8f5b Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Common header file change associated with adding Misc. debug messages for the toolsversion module. Change is not directly applicable to open-vm-tools. commit ad5594513039ccef144f50bebef5a92e959336b2 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Change to common header file that is not relevant to open-vm-tools. commit 81b7df238e07f9751d5c4c7708ef6798eab0ff91 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Changes to common header file that are not relevant to open-vm-tools. commit 2657d8b086c690c907ee9d081b2d9180d5a00400 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Fix additional Coverity issues in tools and hgfs. commit 92efdf7562187cb1d165b2b91850663c013dedc4 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 CAF does not synchronize correctly with Namespace DB. commit 0b509208ad839e448f0edd6ccb8432933ca72e01 Author: Oliver Kurth Date: Fri Sep 15 11:22:51 2017 -0700 Detect slow running systems in guestInfo. - Added a new function in guestInfo. The new function checks the last time when the guest info was captured and prints a warning and sends a RPC message to the VMX if the elapsed interval was more than the expected poll interval. commit 95729ef369d7ca470ecb725e7174aaddbcfc0ac9 Author: Oliver Kurth Date: Fri Sep 15 11:22:50 2017 -0700 Improving CAF build time, especially for open-vm-tools. commit 47f51db7077ed034ab4b9a39814deb47fc7d36dc Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Improving CAF build time, especially for open-vm-tools with additional files. commit 1224c7aecd5e803ce687f3c7595285e532eeb89f Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit ec268d17c45a056493dde0166351a5cff5bc56d3 Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit 16d2e8adc837c29dded94b2c29c3b176c92f8342 Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit dc95efcb7d4bb7d865b7d37f9aaafe6fb8009e59 Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Tools: Implement resolutionKMS for linux tools: Enable the use of the PKG_CHECK_MODULES macro for open-vm-tools Adds a path to the pkg-config utility and sets up the open-vm-tools test build environment to be aware of its m4 macros. Also sets up a local directory for .pc files and adds the libdrm and libudev pc files to that directory (during open-vm-tools configure time) to prepare for resolutionKMS testing. tools: Prepare resolutionSet for resolutionKMS on Linux - Add a set of utilities for detecting the DRM version, the Xorg driver version and to dlopen libudev and libdrm if they are not available at build time. The utilities also include opening and closing a DRM file descriptor from a given type of device node. - Change the check for Xorg driver version in resolutionX11 to use the new utility - Pass a ToolsAppCtx to the resolutionSet backend for access to the configuration database. - Finally, detect if there is system and / or configuration support for resolutionKMS and in that case back off resolutionSet - Added some license information to resolutionDL.h - Added an include to resolutionDL.h - Fixed some ifdefs around HAVE_RESOLUTIONKMS - Modified other backends for the new resolutionToolkitInit() interface. tools: Add the resolutionKMS plugin What's resolutionKMS ResolutionKMS is a plugin that takes over the resolutionSet functionality, but as a vmsvc plugin rather than a vmusr plugin. Instead of talking to the X server it talks to the Kernel Mode Setting (KMS) functionality of the vmwgfx kernel module. This enables the following functionality. - Resolution / Topology switching at the login screen - Resolution / Topology switching when multiple users have launched multiple X servers as part of fast user-switching. - Resolution / Topology switching for new native compositors that support the KMS way of communicating resolution / topology (as preferred mode and connector properties) As far as I know, only gnome-shell / Wayland can do the topology switching today, since I implemented the missing support for it. We need to address this issue also with Mir and other Wayland implementations. New dependencies. The new code requires libudev and libdrm. For open-vm-tools, I've opted to require those libraries at configure time. There's no option to build linux open-vm-tools without resolutionKMS support, although that should be easy to add if needed. For vmware-tools, there is code to enable resolutionKMS iff libudev.so.1 and libdrm.so.2 are present at load time and can be dlopened. For vmware tools there are no new build dependencies introduced at load time AFAIK. (dlopen?) Enablement ResolutionKMS requires vmwgfx 2.10.0+ and xf86-video-vmware 13.2.0+ to guarantee that we don't lose functionality compared to old resolutionSet. The vmwgfx kernel module has a way to check version at runtime. For the xorg driver the situation is different since resolutionKMS is typically launched before Xorg. Therefore we fall back to the hackish way previously implemented in resolutionX11.c to find the driver file and scan it for version info. Oh well. In any case, there is also an option to override this and enable or disable resolutionKMS in the tools.conf file. If resolutionKMS is disable either by lacking system support or by configuration, the old resolutionSet functionality kicks in. Extensive debugging info will be present in the tools daemon logs. commit a52a972596c8224b9a3c21b5e724b3b7bb1dbda0 Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit 256d7b2ef23dcb8b5eda287f353a877b2bea17ce Author: Oliver Kurth Date: Fri Sep 15 11:22:49 2017 -0700 Fix unused function errors thrown by clang 3.4 commit 94d23bfaea56d6a81a09ea821fca8be3b62e50e3 Author: Oliver Kurth Date: Fri Sep 15 11:22:48 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit 4ab6be4b1e100995f32f6b02499f573a64af96a1 Author: Oliver Kurth Date: Fri Sep 15 11:22:48 2017 -0700 Common header file change that is not relevant to open-vm-tools. commit e0d6775f32940f4d0b04eaf7d71c0496567cbb33 Author: Oliver Kurth Date: Fri Sep 15 11:22:48 2017 -0700 Common header file change; not relevant to openb-vm-tools. commit 9556561f31678cec6c6fd5c77c29a38ae7938768 Author: Oliver Kurth Date: Fri Sep 15 11:22:48 2017 -0700 Fix additional tools issues reported by Coverity. Fix some issues found by the latest Coverity scan of tools 10.1, plus a few related nits. commit 30af262e97092bb4f53e59e78f9ab251fbd84980 Author: Oliver Kurth Date: Fri Sep 15 11:22:48 2017 -0700 Change to common header file; change is not relevant to open-vm-tools. commit f07c2501fbc0d5e590b248861abefbad048d7bde Author: Oliver Kurth Date: Fri Sep 15 11:22:48 2017 -0700 Bulk changes for the common-agent service. commit 0ecb4e2697efaeb96e864653182371ba137cb504 Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Common-agent Framework Makefile additions. commit e6398247d4ba37df3755a18c86585bc7c83d873f Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Backout previous change to common header file; change is not relevant to open-vm-tools. commit aff5db3088785e5b2f3f472d40fec8562c172d67 Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Hgfs Fuse Client: increment the client version to 1.6.3 commit 0bacc86a825cd6844edf97c9780b70539e79c649 Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Hgfs Fuse Client: fix symlinks Symlinks were not being handled correctly for some cases. The symlink creation call tried to make the target an absolute path which it should not do. Only the source is passed as the absolute path which is created and links to the target which can be relative or absolute but is dependent on what the user passes. The readlink was broken and incorrectly creating a target name to pass to the FUSE library. This was obvious when alternative mount points are used e.g. .host:/Users -> /Users instead of .host:/ /mnt/hgfs This was discovered when used in the containers environment with docker. However, it is a standard option for HGFS client usage in any hosted product. commit 8468f4d9c6e1aa445e518fe9843bb93582fad614 Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 vmxnet3_defs.h: Common header file changes; not directly relevant to open-vm-tools. - Fix Rx Ring2 max size - Add Tx Data Ring Desc Size config support commit 071fb8f0322461caeec876cb24a67be94c7916a3 Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 syncDriverLinux.c: Revert of "fdCnt" from ssize_t back to size_t. commit 0408b14f7ba45c4b5e03555e13c2051d9e1c07eb Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Common header file change; not relevant to open-vm-tools. commit b9382f4cbb636d9663e878a416b5b9727ab42d6f Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Correct the freeze and thaw ordering for mount points There were two issues with the way we were doing quiescing on Linux: 1. Thaw was following the same order as freeze, actually it should follow the reverse order of freeze. Fixed the thaw order. 2. Freeze was following the order provided by getmntent API which is the order in which system created the mount points. This could be problematic when a mount point depends on other mount point, e.g. loopback mount point. In order to honor the dependency among mount points, we need to reverse the order of mount points listed by getmntent API. While reviewing this change it was found that the interface used for passing the mount points around was not very clean. It was a ':' separated string of mount points. There were multiple problems with it. We were converting a list of strings into one string and then tokenizing it later. As part of this change, we fix that interface too by replacing the string with single-linked list, GSList. Using GSList brings glib dependency to lib/syncDriver. commit a9fee8fc8c7fc7f4062815aa97141b7572c0638e Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Changes tp common header file; not relevant to open-vm-tools. commit 66b06a4658db665c902745bfe830ed23d25a9257 Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Common header file changes; not relevant to open-vm-tools. commit 421ed81330addabc27288df3e029c42fb679d1dd Author: Oliver Kurth Date: Fri Sep 15 11:22:47 2017 -0700 Changes to common files. - lib/file/fileIO.c: Make Fil3_SwapFilesi() path more robust wrt resource contentions. - Common header file change; not relevant to open-vm-tools. commit 02846fb1238894d196ba60540b09631b64027bbf Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Change to common header file; not applicable to open-vm-tools. commit b8937cc84b75be2c53d693448b74853c88f49508 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Change to common header file; not applicable to open-vm-tools. commit ebc26216ee0db2c7d80215ffc0b930a5560f2696 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Remove unreferenced functions for common header file; not applicable to open-vm-tools. commit 3f41e75df9c7a3f19f1ed98e35607e8c463dd543 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 lib/file/file.c: minor cleanup to File_GetSizeEx() - Make the code consistent with the rest of lib/file. commit 6d9a970fe99f6f9deeb4adcb742ee9a16a8a2072 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Bulk updates to the common-agent (CAF) code. commit e5e137c279c3e69a509610b16e57548a04b4b9c0 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Hgfs Win Client: fix PFD issues part II - Header file changes related to PREfast analysis which centers around buffers and locks. commit 98e46fc11a1f396e17de54955714d09d485b0bd3 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Change to common header file; not applicable to open-vm-tools. commit 69586aa7734f05532020036bf5d4941466b272d4 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Update the COPYRIGHT_YEARS macro definition. Other common header file changes that are not applicable to open-vm-tools. commit 3138663e346e46edbb2dbb3f6d3da6c53f6db5d6 Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 lib/string: Str_Strncat boundary check improvement to prevent buffer overflow. commit f90b4ba957c5882a42e16866c664561f83ed012a Author: Oliver Kurth Date: Fri Sep 15 11:22:46 2017 -0700 Reversal of common header file change; not relevant to open-vm-tools. commit c0cb8c0fa80e51922e1884c7b96af1ea124df286 Author: Oliver Kurth Date: Fri Sep 15 11:22:45 2017 -0700 Change to common header file; not relevant to open-vm-tools. commit 5d49218af0bf446a53634326210b7d975fa60e15 Author: Oliver Kurth Date: Fri Sep 15 11:22:45 2017 -0700 Bulk update (merge) of common-agent Communications, Framework, InternalProviders, and ManagementAgent source code. commit 40e2d2aecc77978d9fdcf45222d965b14909e0ab Author: Oliver Kurth Date: Fri Sep 15 11:22:45 2017 -0700 Fix buffer overflow in Str_Strncat() found by Coverity. commit a2ebd45dba6f81f18095c4ec4fb37570e16ad889 Author: Oliver Kurth Date: Fri Sep 15 11:22:45 2017 -0700 Common header file change; not relevant to open-vm-tools. commit 73e51edb60bba741d4596e4050ecca017aa2f428 Author: Oliver Kurth Date: Fri Sep 15 11:22:45 2017 -0700 Reversal of common header file change; not relevant to open-vm-tools. commit 6728bf7f0a6eeb1fd57259222d54d0fc02bb0af5 Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Update the Copyright Year to 2016 in all files released to open-vm-tools. commit 73cc2517fd13410fe425d9f311dbe7d99f480a7a Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Implemented StrUtil_ReplaceAll() function in lib/misc/strutil.c. commit 54cd36c00ecde5a4695f87cf6685bcdb051503fc Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Common header file change; not relevant to open-vm-tools. commit 08c8209dfb01ff07d82ba1e1cdbe26ead51ba5d9 Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Fix some leaks found by valgrind. - leaking the 'data' pref value for a log handler. - leaking an rpc message response if the caller doesn't want it. - leaking username/password for every guestOp commit de63075c8db55b9f2c56a33fcb6bdb7022442f4a Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Updated license file for open-vm-tools 10.0.7 release. commit ea43b765eae7ecd90c9de235d603ae0a67c233f1 Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Adding CPUID leaves to common header x86cpuid.h. Change not relevant to open-vm-tools. commit 459de87474e55edbaf41045203dafec281a3a25c Author: Oliver Kurth Date: Fri Sep 15 11:22:44 2017 -0700 Fix setlocale() usage to address valgrind diagnostics. On Linux, the return value points to static memory, so we have to make a a local copy. commit 36c02b436573532aca9d4122457b6e2166447a09 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Update copyright year in two open-vm-tools files. commit ec39982bf2441c6d018f5b586ecd0db541634738 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Update vm_assert.h header file to avoid false positive diagnostics from Coverity. Make Panic_NoSave a NORETURN function. commit ddf410de23d33737d2ce92673ee0c0e8ad95cc2c Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Common header file update; not applicable to open-vm-tools. commit ec88ceddf4df201a75e026ed70acd34a7ffbc9a0 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 lib/hashMap: Remove unused HasMap_Store() and _Retrieve() functions. CheckSanity() should only be compiled if VMX86_DEBUG is set to avoid an unused function warning from clang 3.4. commit e566d0b0b46f97368f9337f5edf1683e29d96bd6 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 lib/log: make the default log level accessible - and use it The default log level is known interally to the Log Facility. It needs to be available "everywhere". Do that and deploy it to all places that should use it. commit 1c6c46cbbde90641cf576232aa057c5143eb9bd2 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Revise dtoa() to use ecvt_r/fcvt_r on Linux/ESX an thus avoid using a pthread_mutex_lock. commit 693447e4cb16520c5e3e30912bb6627f7da5bd12 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 vmci/vsock driver changes for Windows; not applicale to open-vm-tools. commit 125541c04a7aeac6e152fb5a622ba9052bfca294 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Multiple fixes for common source code. - File_FullPath() revised to return the canonical path of a file or directory that exists or is about to be created as a child of an existing directory. - Common header file updates; not related to open-vm-tools commit 82b8208469fe93a6ebd38fa2fc2f01b1c8285ba6 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Shared header file update; no impact on open-vm-tools. commit ba4c8e31b7399c973018dfb78c22de83b7a5e2a3 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Shared header file update; no impact on open-vm-tools. commit 2e2da21bc35ee3f549fdeb3bfd2d603e1ad4975b Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 The Linux network script has been updated to prefer 'ip' command over the 'ifconfig' command for gathering network information. commit 61f75b64bff213d2684a3c605a769a4ac1bb4571 Author: Oliver Kurth Date: Fri Sep 15 11:22:43 2017 -0700 Shared header files update; no impact on open-vm-tools. commit 287e43342dc28d3f9025473e426ed0546778b653 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header files update; no impact on open-vm-tools. commit 5c08abe5acffa318c13c202c0e460865ab5b0af8 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header file update; no impact on open-vm-tools. commit 64ae3e26c53a068239d4cfba6bccce8dc727dc40 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header file update; no impact on open-vm-tools. commit e2586abb3ddd050f994e1cfd8c9409ff22d0a4c4 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Update vmtools version history for the 10.0.7 update release. commit 6d79bbad4cc9d240435eef81976c47cd87c73d46 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Update vmtools version history for the 10.0.6 update release. commit ab4f4e18d5113d417b9bf71bc025c13754fa033b Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header file update; no impact on open-vm-tools. commit 7fd1a75c6c9bd5a13a4d6edc46bc788b45477b8b Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header file update; no impact on open-vm-tools. commit c542715b609f97bc7edf8f0f7cc93432ce38e768 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header files update; no impact on open-vm-tools. commit 918ceee2070d734719522f08316fe51a5fc1dd06 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Shared header file update; no impact on open-vm-tools. commit 8784dbd4a5de1407e1e46bb3027c02cc7f3c3c60 Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Korean messages for the toolbox-cmd have been updated. commit 58bb1478d18e9f46e92c65b2336f4c274073e98e Author: Oliver Kurth Date: Fri Sep 15 11:22:42 2017 -0700 Bulk updates to the common-agent (CAF) code. commit af47b4c8c2a5afc12bb026ba5206a6788977ac16 Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 The Posix_GetAddrInfo and Posix_GetNameInfo wrapper functions are modified to convert between UTF-8 and UTF-16 encodings. commit 1a037dfaf1fba399bd69bf16f3dba0c679c79e03 Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Updates to CAF accessory files. commit 55aec4b1557853abac4a66e76a1d70ddf82d9735 Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 The namespacetool links with the vmtools lib which has implemented the functions "Debug" and "Panic". The locale definitions of these functions in the namespacetool source has been removed. commit 5114233485a7d1da81b265515c584dfce21a056d Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 open-vm-tools: Fixes to build with FreeBSD - amd64 in host_cpu means 64bit, add that to configure.ac - use 'z' for FMTSZ in FreeBSD, just like Linux commit 94fb4c14aaa3e58047f66ba7a8f075611be1a7df Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Update copyright years for CAF Makefiles commit 62136174788796a89f8c38b74eaf7aeea6b059a8 Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Default shared-secret authentication to unsupported (disabled). commit 2b654ed9f3285f5e31b55babc0e51b73f72fb501 Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Make VSS BackupComplete as final steps of the vmbackup process. VSS process break up to two steps when CreateSnapshotEx(WindowsQuiesceSpec) & App-quiescing is applicable: 1) VSS quiesce and DoSnapshotSet (perform backup and commit snapshot) 2) VSS SetBackupSucceeded/BackupComplete (VSS notify app BackupCompleted) Add a new operator to wait for VMX snapshot complete notification. commit a63f28583c1b2cef40884a5593181f7f439ef066 Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Common header file update; not needed by open-vm-tools. commit 5a7dff47d34af440679a4681dced79fa2438a0ca Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Some source code clean up in vmcisockets 1. Remove a typedef that didn't def a type (newer compilers warn). 2. Rename a local that had the same name as a var in a higher scope. (note: there is no confusion or lost error case luckily here) commit 25d7c89552c6761dab6eb182f475e8825a38aa3f Author: Oliver Kurth Date: Fri Sep 15 11:22:41 2017 -0700 Remove wmemchr() from bsd_output_shared.c since it is no longer required. commit fddbf299e58ed60705188c8b1ea90eaefeb40d57 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 Updated shared header files, not relevant to open-vm-tools commit 6c61db33226c0d5a47be3a9a2e91ec736d6213a4 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 GuestRPC vmbackup.h header file update. A new RPC messages has been added: VMBACKUP_PROTOCOL_SNAPSHOT_COMPLETED commit 0066453d3d86095b22c5450ee7362b08ad9bfcd6 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 CAF changes to support release in open-vm-tools. commit 37ca884eaa72248dce6d20bbd960663a8c482d42 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 Update of the common-agent (CAF) service source from the development team. commit c7b7fc7386900037169e4c17999f4c63ac9d65b3 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 L10n messages updates for toolbox commit 5fdc593389e1ad5a593aad36cbddbb646ed98dc6 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 VGAuth cmdline parser improvements Restore support for '=' between option and value. commit e64c2a0782218c06c6e8b24d59795e7ba99b466d Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 Use the primary connection remote IP for the secondary UDP connection. commit 409e01197d45e88ef9b1a1591963b19b44fee479 Author: Oliver Kurth Date: Fri Sep 15 11:22:40 2017 -0700 Improve VGAuth logging Make the default logging more useful by converting a number of Debug() calls into Log() calls. Request basics and errors are dumped. Tokens are hidden for security concerns and certs are hidden to reduce the noise level. commit dc23a48e0ea22921099ea8af8693f553a1ade5f1 Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 Common source code merge - Update poll timer callback's to use 64bit integers for delay. - Avoid creating substrs if unnecessary in Unicode_CompareRange. - Vmxnet3: Add Receive Data Ring Support. - Comment cleanup. commit 3184e983998b9cafbcf8e5f719fccd0200e5900b Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 Fix the CAF upgrade script to handle upgrades from an "old" (pre cafenv-appconfig) version of CAF. commit 80bab95be93b4e26aaaa118086f009528f410bab Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 Build change; not related to open-vm-tools. commit 1108b3852688839e7aeb15d25d830929f027e6a1 Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 lib/poll: Attempt to use IPv6 sockets first for Windows socket pair We should always use IPv6 sockets even for loopbacks if IPv6 is supported so that we can work properly in IPv6-only environments where IPv4 has been disabled. If the IPv6 socket fails to create then we can fallback to IPv4. commit 01974d9d73fb20f50ecd7dfc47ffaff672e1c8de Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 Update the Copyright year to 2016. commit 71aedd8d535ebeaf29a2ffa780176f8bb72cb87c Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 Add a stolen time interface for guests This change adds a cheap stolen time interface for guests. Guests must use the backdoor port to register a per-VCPU object in memory called the "stealclock" with the monitor. From then on, until the clock is disabled, the monitor publishes clock values whenever stolen time is accumulated. A complete specification of the interface is included in this change, as a text document: bora/doc/stealclock.txt. Pending clock updates are represented by an idempotent monitor action, posted whenever stolen time is accumulated. In the current implementation, this is whenever we update stolen time on transit from host to vmm. In the future, it may an action posted by the vmkernel, whenever stolen time is updated. commit 3ac9ac2858f67652f296013e263c6ea1da9f4887 Author: Oliver Kurth Date: Fri Sep 15 11:22:39 2017 -0700 VMkernel build change; not related to open-vm-tools. commit 07cf66aba6d36407896a519c4f4f229702ed8b0a Author: Oliver Kurth Date: Wed Sep 13 16:46:38 2017 -0700 except common-agent/etc/config from .gitignore commit 2953dedddaf479d00661c4a0c64e7708492a4a22 Author: Dyno Hongjun Fu Date: Mon Nov 23 22:00:25 2015 -0800 add .gitignore commit ef9ffadbdee99fce285bd0af5a8c9799c0aa8a10 Author: Oliver Kurth Date: Fri Sep 15 11:06:34 2017 -0700 reset buildNumber.h to 10.0.5 version commit 5a00e4e76c6deb863cfba4adb6aeca4608fafaac Author: Oliver Kurth Date: Wed Sep 13 16:24:53 2017 -0700 clobber to create a starting point for the development branch commit 538ea037a1549b6fd4e57529f7448a3fd2aa47af Author: Dyno Hongjun Fu Date: Mon Nov 23 22:59:42 2015 -0800 changelog for 10.0.5 commit b75dbce79523a0145345f97afcdc06bed11dc46f Author: Dyno Hongjun Fu Date: Mon Nov 23 22:33:40 2015 -0800 version bump to 10.0.5 commit ae82fa65627575567ead1b0d30eff1777b567ff1 Author: Dyno Hongjun Fu Date: Mon Nov 23 22:28:27 2015 -0800 [Bug 1526360] fix timestamp check commit b510107055b144bc28c7e03a17176211860df6f8 Author: Dyno Hongjun Fu Date: Mon Nov 23 22:27:40 2015 -0800 [Bug 1531545] Add an error handler to X11 resolutionSet commit adab9c550cd86f759c85294aa53b1870ec58affa Author: Dyno Hongjun Fu Date: Mon Nov 23 22:26:38 2015 -0800 [Bug 1503195] Kill tasklet when unloading vmci module commit 35bcc69ef81bbae1a21187d1e8e8a572169a5abe Author: Dyno Hongjun Fu Date: Mon Nov 23 22:19:34 2015 -0800 [Bug 1519223] Avoid warning message when logging group is missing. commit 581f2d0e93a3aacd7bbf252963d2fbd1720bab15 Author: Dyno Hongjun Fu Date: Mon Nov 23 22:17:59 2015 -0800 [Bug 1473600] Skip freezing autofs mounts. commit 8184e9291c7db41781c127d8541cc75ff243902a Author: Dyno Hongjun Fu Date: Mon Nov 23 22:17:12 2015 -0800 [Bug 1507819] Workaround fix to avoid rpc warning messages flooding by changing log level to debug. commit eb47321942fccebe76344ade5b52d8f95bcbbbbf Author: Dyno Hongjun Fu Date: Mon Nov 23 22:10:33 2015 -0800 [Bug 1526327] make vmhgfs compatible with Linux kernel 4.2 commit 54c10e813bf2a7b60b075d3bfe9204670e1aec4c Author: Dyno Hongjun Fu Date: Mon Nov 23 22:01:24 2015 -0800 remove cache files commit aa0790cd582e3dcf7c665c6f1dedf11117442ed2 Author: Dyno Hongjun Fu Date: Mon Nov 23 22:00:25 2015 -0800 add .gitignore commit 85a99f4253dddf7e47e873fec4c43c15b7d8c2bc Author: dsouders Date: Tue Sep 1 17:04:28 2015 -0400 Update ReleaseNotes.md commit 6994576b2b44d2301daa736b893feb9828b0b816 Author: Douglas Souders Date: Tue Sep 1 08:56:05 2015 -0400 Adding Release Notes commit ebed1074323950b03d25b31c54741eaa128c3e0c Author: Douglas Souders Date: Fri Aug 28 09:56:56 2015 -0400 release 10.0.0 from build 3000743 commit 39228f1efb8b4070d1ca2636e4f552c106346f46 Author: Sankar A Tanguturi Date: Fri Aug 21 18:00:04 2015 -0700 Update README.md commit 5fce57c2e30069a2ba14356827743e7f575b5168 Author: Ravindra Kumar Date: Fri Aug 21 12:01:29 2015 -0700 Corrected URL for automake commit 7bac35f4e8787553f68972feae7966b0236c06ac Author: Douglas Souders Date: Tue Jun 16 17:49:24 2015 -0400 release 9.10.2 from build 2822639 commit 0696234c3905bf91cfba2cf909dbf92fc30ee6fc Merge: b23378e aaa2085 Author: Oliver Kurth Date: Thu Mar 19 11:11:07 2015 -0700 Fix README.md Merge commit 'aaa20859c29247ca89a68f47c1a7b1a3b15bae09' into stable-9.10.x commit aaa20859c29247ca89a68f47c1a7b1a3b15bae09 Author: Oliver Kurth Date: Wed Mar 18 17:25:02 2015 -0700 Update README.md commit b23378e336a7b0ecc7a4584c9a5f185b40e1ef5a Author: Oliver Kurth Date: Wed Mar 18 15:52:50 2015 -0700 release 9.10.0 from build 2476743 commit 08d7040ebfe99f74478f7282d9bb98cfcadf4a4a Author: Oliver Kurth Date: Wed Mar 18 17:07:24 2015 -0700 Update README.md commit 5568d3e1d0bd4b4297111a67e75d820c54a17124 Author: Dyno Hongjun Fu Date: Tue Jul 1 16:12:29 2014 -0700 Update README.md commit 8b89d5b01f0b6d97e306648236869ce10b056293 Author: Dyno Hongjun Fu Date: Tue Jul 1 16:10:59 2014 -0700 Update README.md commit 9188c775bedccd3975c001cf6100124225918d53 Author: Dyno Hongjun Fu Date: Tue Jul 1 16:08:29 2014 -0700 Update README.md commit 86c542caae41b54f297be910c9b92f6f38b32164 Author: Dyno Hongjun Fu Date: Tue Jul 1 16:04:48 2014 -0700 Update README.md try markdown commit ba9118e19d98c8ded12791869d9d1166631ae985 Author: Dyno Hongjun Fu Date: Tue Jul 1 15:56:12 2014 -0700 Create README.md this is the README file inside open-vm-tools/ commit f815ec597079716da64d51465f2a33c65427053b Author: VMware, Inc <> Date: Sun Sep 22 22:56:07 2013 -0700 Updating open-vm-tools version for release 2013.09.16-1328054. Signed-off-by: Dmitry Torokhov commit 112e1dfdd1884f189363ce5692c991170b0791fb Author: VMware, Inc <> Date: Tue Sep 17 20:43:28 2013 -0700 AsyncSocket: Update AsyncSocket_GetRemoteIPAddress for IPv6 support. AsyncSocket_GetRemoteIPAddress offered the return of the IP in integer and string formats, none of the callers cared for the integer return so remove it. Update name appropriately AsyncSocket_GetRemoteIPAddress->AsyncSocket_GetRemoteIPStr. AsyncSocket_GetRemoteIPAddress only supported the returning of a IPv4 string, utilize Posix_GetNameInfo that uses getnameinfo which is IPv6 compliant. Signed-off-by: Dmitry Torokhov commit 76713ae5c4d5f7a4616d3005137c276535d654fa Author: VMware, Inc <> Date: Tue Sep 17 20:43:03 2013 -0700 AsyncSocket: Removed unused AsyncSocket_BindUDP. AsyncSocket_BindUDP is unused, and looking at it I am not sure if it ever worked as described, since it did not actually bind to the port specified, just a UDP listener. Signed-off-by: Dmitry Torokhov commit adead816acb768fb9c4a91942c93f464894902f9 Author: VMware, Inc <> Date: Tue Sep 17 20:42:40 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 06b51461bb1a2e01282d0244ff0f47b8d5ae8bea Author: VMware, Inc <> Date: Tue Sep 17 20:42:24 2013 -0700 Allow for future use of AF_UNSPEC in AsyncSocket library Create a socketFamily switch in AsyncSocket_Connect and AsyncSocket_ConnectWebSocket for future IPv6 integration. Allow for future use of AF_UNSPEC when a connection does not care if it is AF_INET or AF_INET6. Since AsyncSocket does not fully support AF_INET6 yet and our AF_INET6 test bed is not yet completed, hard code all callers to AF_INET. Signed-off-by: Dmitry Torokhov commit b81233bd0375e5358a55b387e638e9f569a0cc53 Author: VMware, Inc <> Date: Tue Sep 17 20:42:16 2013 -0700 Provide a kill-switch for using vsocket in RpcChannel. Adding "void RpcChannel_SetBackdoorOnly(void)" API to allow to disable vsocket if needed. Signed-off-by: Dmitry Torokhov commit c634402c98c2eb419d111797c39e4907aa35a8eb Author: VMware, Inc <> Date: Tue Sep 17 20:42:05 2013 -0700 Update AsyncSocketResolveAddr to allow AF_UNSPEC and AF_INET6 ai_family. AsyncSocketResolveAddr currently only accepts searches for AF_INET. Update it to search for AF_INET6 or both with AF_UNSPEC. Since we no longer need to return sockaddr_in for AsyncSocket_SendTo, only populate sockaddr. Also add a convenient IP string generation after resolve so all callers do not need to do the same operation tp log the IP string with port number. Signed-off-by: Dmitry Torokhov commit 9644250ed9110aa38d5a8f467499b3d9678f7a05 Author: VMware, Inc <> Date: Tue Sep 17 20:41:58 2013 -0700 VMCI/VSOCK: Bump version 9.5 => 9.6 for next release We shipped 2013 with 9.5, so the next release will have 9.6. Signed-off-by: Dmitry Torokhov commit 6d6386468f1189621245bc99d0b4a55b4253a97b Author: VMware, Inc <> Date: Tue Sep 17 20:41:38 2013 -0700 Remove AsyncSocket_SendTo Nobody is using it anymore. Signed-off-by: Dmitry Torokhov commit bf72ff33d02e9c1b0d6d2d3ab0a9b13c7a2747a9 Author: VMware, Inc <> Date: Tue Sep 17 20:41:16 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 5eadb43a7d115dfb9e93875b0308d6f88c2c330f Author: VMware, Inc <> Date: Tue Sep 17 20:41:27 2013 -0700 desktopEvents: Leave libICE rug firmly under libSM. While the libICE spec's section on error handling suggests applications close libICE connections in response to I/O errors, libSM (which sits atop libICE) continues to refer to such deceased libICE connections, and doing so during shutdown leads to an app crash. (libSM should've registered an I/O error handler of its own which would run before the application's, but it doesn't. Oh well.) To work around this, we'll detach the ICE connection from our application event loop but leave its handle alone. Signed-off-by: Dmitry Torokhov commit c9200b341b7612be273c4402a3381e507766e526 Author: VMware, Inc <> Date: Tue Sep 17 20:41:07 2013 -0700 Remove ASSERT_OR_IN_PANIC() from public/vm_assert.h Signed-off-by: Dmitry Torokhov commit c297a757b88435ca43bfe0dcf71b97c5d8a3e41a Author: VMware, Inc <> Date: Tue Sep 17 20:40:51 2013 -0700 Get rid of ASSERT_LENGTH. It was used way back in ancient times in the binary translator but today no more uses remain. So let us remove this global Signed-off-by: Dmitry Torokhov commit b102cb180bc724f3656a7d3a27af954b2ebe7e20 Author: VMware, Inc <> Date: Tue Sep 17 20:40:45 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit c093dcb7a99a32aaf76fad143ff4a276f8d4bc22 Author: VMware, Inc <> Date: Tue Sep 17 20:40:38 2013 -0700 Get rid of ASSERT_ALWAYS_AVAILABLE Signed-off-by: Dmitry Torokhov commit 163a622e1fc4c4a68849a09448ee2aae662713ae Author: VMware, Inc <> Date: Tue Sep 17 20:40:17 2013 -0700 Fix AsyncSocket reference leak when using IVmdbPoll A reference is taken when an AsyncSocket callback is registered in IVmdbPoll to protect the AsyncSocket from being freed while the callback has been scheduled to run. That reference is released when the callback is unregistered if the callback is not going to run, or from the callback itself if it is already scheduled. The current code does not correctly handle the case when the callback unregister itself, as it needs to explicitly release the reference in that case. This change also adds a Bool to AsyncSocket so we can distinguish between send callback that is registered as a timer callback so that we know which type of callback to remove, which is necessary to keep the reference count correct. Signed-off-by: Dmitry Torokhov commit 1b62c3e36a56980733f7aaacb1c6b741f5c8670d Author: VMware, Inc <> Date: Tue Sep 17 20:39:53 2013 -0700 Report correct OS name for ESXi guests Prior to this change, vi client would say that the Guest OS was "Other (32 bit)" whenever Tools were running in an ESXi guest. Now, the Guest OS is reported as "VMware ESXi 5.x." Note that Tools do not run in ESXi 4.x guests. Signed-off-by: Dmitry Torokhov commit a9635c0923caeef61b51afc5580b51ccb65fd7f5 Author: VMware, Inc <> Date: Tue Sep 17 20:39:48 2013 -0700 Implement VMware Tools for ESXi 6.0 guests. This change provides limited VMware Tools support for ESXi 6.0 guests. The powerOps and guestInfo plugins are supported. Only IPv4 addresses are reported, since those are the only ones we can get through the vmkuser library. VMware Tools for ESXi 6.0 are packed as two VIBs on a single ISO image. One VIB contains the glib libraries that are missing from the standard ESX distribution, and the other VIB contains the tools themselves. Signed-off-by: Dmitry Torokhov commit 3a9f2297a82b9c109e894b5f8ea17753e68830ac Author: VMware, Inc <> Date: Tue Sep 17 20:39:34 2013 -0700 Harden HostinfoOSData against $PATH attacks. We are doing a popen("lsb_release... ") when attempting to determine host details in hostinfoPosix.c. Using popen means that $PATH is walked when looking for the lsb_release binary, and that may give an attacker the ability to run a malicious version of lsb_release. This change does two things, a) Hard code the path to lsb_release. I've searched around the web and I believe the path is always "/usr/bin/lsb_release" so let's not leave this up to chance. b) Stop running HostinfoGetCmdOutput with elevated privileges. Drop to non-root when possible. If someone sneaks in a new call to HostinfoGetCmdOutput and doesn't use a full path, then we will hopefully avoid a firedrill. I'm only applying this to Linux because the Fusion build barfed when I tried to compile with without the vmx86_linux. I think either (a) or (b) would be enough but I'm doing both, because each individually is correct. Also note that in the blog post by Tavis Ormandy calls out doing (a) as not enough, http://blog.cmpxchg8b.com/2013/08/security-debianisms.html His example uses a bash feature that allows functions to be exported. I haven't been able to get that to work on my Ubuntu machine. To test I'm manually run Linux WS and Fusion and verified that the logs look correct. Signed-off-by: Dmitry Torokhov commit 3869012deb7658b9aab10ab028d71b32b89a2a85 Author: VMware, Inc <> Date: Tue Sep 17 20:39:28 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit cb790dbad75717d0ffb99bc268ee9ed6214c93ba Author: VMware, Inc <> Date: Tue Sep 17 20:39:21 2013 -0700 Fix nested logging for VmxLogger with vsocket channel. Signed-off-by: Dmitry Torokhov commit 155eb8d6615c947b71167fabe44b2fbca70a1e39 Author: VMware, Inc <> Date: Tue Sep 17 20:39:10 2013 -0700 HGFS: Clean up HGFS server unpack file name V3 arguments The HGFS server unpack file name argument for V3 packets generates coverity warnings as it stands. It is also just plain dubious in its usage using the out argument even when not initialized in the failure case. Signed-off-by: Dmitry Torokhov commit 63b4fa8d551de8e90101b6de4646d8573f764329 Author: VMware, Inc <> Date: Tue Sep 17 20:38:49 2013 -0700 Internal branch sync. Included in this change: . Support Linux Quiescing for vSphere Replication . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit ac4e72c01eec5565d3ac8d0c84cb4072d9e3e08e Author: VMware, Inc <> Date: Tue Sep 17 20:38:24 2013 -0700 Change glib logging in RpcChannel to use Debug/Warning/Panic. Change glib logging in RpcChannel to use Debug/Warning/Panic so RpcChannel logging can be controlled by different logging stubs in different applications(rpctool/vgauth/toolsd etc). Signed-off-by: Dmitry Torokhov commit 4335f533c88d45fc05fb31b040d42eb0e3db3274 Author: VMware, Inc <> Date: Tue Sep 17 20:37:35 2013 -0700 Add a new SetDisplayScaling RPC to the list of capabilities. Signed-off-by: Dmitry Torokhov commit 5ccfbb3cc3da0f026ed8628dbdb07bc187c3bc16 Author: VMware, Inc <> Date: Tue Sep 17 20:36:27 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4a527c999422eaba9795b18e89b69fbeefda8583 Author: VMware, Inc <> Date: Tue Sep 17 20:36:04 2013 -0700 HGFS: Make Linux client compile on kernels 3.11 HgfsReaddir has been replaced with HgfsIterate for the newer releases of the kernel 3.11 and newer. Signed-off-by: Dmitry Torokhov commit 2946894f1783f7a735d2e3d3770853b9b29f95ea Author: VMware, Inc <> Date: Tue Sep 17 20:35:50 2013 -0700 HGFS: Partial fix for corruption when using different file handles to the same file File is corrupted while our customer using two threads to read or write a file via Linux HGFS client. This is because the read handle interferes with the writes by causing a revalidation of the inode's file attributes. These were mishandled wrt to flushing out the cached pages. If the new attributes were different for modification time or file size then the pages in the cache were invalidated. This causes pages of valid data to be thrown away and the writes lost. Therefore resulting in a file with gaps of blocks of zero bytes where writes were not sent to the HGFS server. This is fixed by replicating what NFS does in this regard, which is only invalidate the cache if the HGFS server returned file size only differs from the cached inode value and only then if the new size is greater. Cleaned up the write begin and end which was initially causing problems due to very buggy code. Have now based this on simplicity from fs/libfs.c and the simple_write_begin/simple_write_end which shows what the minimal settings should do handling writes to pages and partial page writes. These can be viewed under you favorite linux source cross-reference website. Signed-off-by: Dmitry Torokhov commit 1a3eb34dd0ad5aa3e51d586cf1fcf310c1f4350e Author: VMware, Inc <> Date: Tue Sep 17 20:35:40 2013 -0700 Fix AssertOnCompileFailed for GCC 4.8 (kernel 3.10+) GCC 4.8 now includes -Wunused-local-typedefs as part of -Wall. This causes it to spew a gazillion warnings when compiling our modules on 3.10+ kernels. Because it's a typedef we can't use the (void) cast trick, so we need to use attributes. This change introduces UNUSED_TYPE to vm_basic_types.h and uses it where appropriate to make the compiler happy when building our modules. Signed-off-by: Dmitry Torokhov commit 1dd5464914032fe986710bddaa2359c70a0e2c82 Author: VMware, Inc <> Date: Tue Sep 17 20:35:32 2013 -0700 Change FileIO_AtomicUpdate to not close files prior to rename on Posix. Windows rename fails if the target files are open. Posix does not have that restriction. Signed-off-by: Dmitry Torokhov commit 23f95ad9ba8896d1b3a2215ceaf336a0d776d449 Author: VMware, Inc <> Date: Tue Sep 17 20:35:16 2013 -0700 VMCI: make guest driver work with virtual IOMMU Right now we use vmalloc()/alloc_page() for our guest queuepair pages (and bitmap page) and then do a virt_to_phys() before passing them down to the device. That's not going to work if DMA remapping is enabled, since the IOMMU has no idea about the mappings. Switch to pci_alloc_consistent() instead. We still allocate each page individually, since there's no guarantee that we'll get a contiguous block of physical for an entire queuepair (especially since we allow up to 128 MiB!). Also made split between guest and host in the kernelIf struct much clearer. Now it's obvious which fields are which. Finally, drop the PINNED flag from Linux. That was only ever used by vVol-Filter, and that's been moved over vPageChannel, which doesn't use queuepairs but has custom rings. Once this is in I'll port it to upstream. I considered doing upstream only, but that would mean pre-3.9 guests would be unable to use IOMMU support. We should really freeze the in-house driver after this... Signed-off-by: Dmitry Torokhov commit c6f49a9aa54be295fb2a8537a0924a8c806cbb19 Author: VMware, Inc <> Date: Tue Sep 17 20:35:10 2013 -0700 Internal branch sync. Included in this change: . turn on vgauth for authn checks . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 1722668cba1cad69bc537ec836f479d1c05e8cc7 Author: VMware, Inc <> Date: Tue Sep 17 20:34:44 2013 -0700 HGFS: Linux client logging improvements Add more logging for tracing file IO calls. Signed-off-by: Dmitry Torokhov commit c0a9de0c3cc97503bb65a53bb391343232160cc0 Author: VMware, Inc <> Date: Tue Sep 17 20:34:33 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 074d772ec4b0f2afcba169c2b6da3ed5a2baeb2f Author: VMware, Inc <> Date: Tue Sep 17 20:34:28 2013 -0700 Bump up tools version to 9.6.0 for WS 10 RTM. Signed-off-by: Dmitry Torokhov commit d8fe065a8fb1e13ebb2ed980b8460d2d6c4c2ce9 Author: VMware, Inc <> Date: Tue Sep 17 20:34:19 2013 -0700 HGFS: Clean up and improve Linux client logging Enhancing existing log statements to be useful, moving open flags utility function into the utility file as in the future it should be used by open and create entry points. Signed-off-by: Dmitry Torokhov commit c1bebef1add802f897e3fc120afb66833343359e Author: VMware, Inc <> Date: Tue Sep 17 20:34:03 2013 -0700 HGFS: Improve Linux client logging Minor improvements to improve the logging of messages during debugging. Remove the less than helpful messages that are extremely chatty. Signed-off-by: Dmitry Torokhov commit 6b07756ed5974aaed6dec4fc14ae52fe031ae00d Author: VMware, Inc <> Date: Tue Sep 17 20:33:46 2013 -0700 Fix stringxx to call Unicode_Free() instead of free() Signed-off-by: Dmitry Torokhov commit 61276a6bde5fa8931c9f4ae142611a296b0cf0c0 Author: VMware, Inc <> Date: Tue Sep 17 20:33:35 2013 -0700 Housecleaning: VMIROM is dead VMI was gone a long time ago. There are a few remnants still present. - includeCheck has a VMIROM macro that can go, plus all locations it was copy-n-pasted into - vmcore/public/paravirtualInterface.h was totally unreferenced. Signed-off-by: Dmitry Torokhov commit 119645bbb27989ddae45926a8918bc31d9ae34d2 Author: VMware, Inc <> Date: Tue Sep 17 20:33:20 2013 -0700 VIX: add opcode for RemoveAliasByCert Trying to be tricky and sharing an opcode doesn't work when it comes to tools-side disabling. So add an opcode for it and plumb it through. Signed-off-by: Dmitry Torokhov commit 1ed1ec7e22d20401b388ebb08e09ac2b74326c45 Author: VMware, Inc <> Date: Tue Sep 17 20:33:01 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 339f41660410a6928c6c657f35b20d8623989fdd Author: VMware, Inc <> Date: Tue Sep 17 20:32:57 2013 -0700 HGFS: Fix Linux client inode 512B block count The Linux HGFS client miscalculated the number of 512 byte blocks to set in the inode for the file size. It was incorrectly using the HGFS hardcoded block size instead of 512, which was 1024. This causes the block count to be half the correct number and so du on a file reports the incorrect size. fstat also retrieves this block count in the stat structure so it is likely more applications will break. Signed-off-by: Dmitry Torokhov commit edffc5fad3c601e1ee3e391532fbc623f8b19519 Author: VMware, Inc <> Date: Tue Sep 17 20:32:52 2013 -0700 Change GuestLIB SDK to use new RpcChannel API. Change GuestLIB SDK to use new RpcChannel API. 1) Change RpcOut_* calls to RpcChanneel_* calls. 2) guestlib SDK now has extra dependency on GLIB and vmtoolslib as secure guestRPC brings a lot new dependencies (rpcin, asyncsocket, ssl, datamap, hashmap etc). 3) ship new glib and vmtoolslib for linux and windows packages. 4) merge logging functions (Debug(), Warning()) in vmtools and guestlib into one to avoid having same function names defined in two libs. 5) update build in open vm tools. 6) app monitor needs to do similar thing, which will be handled by HA team. Signed-off-by: Dmitry Torokhov commit e55039cb8452777c2024ce3a13cd3439f36fd554 Author: VMware, Inc <> Date: Tue Sep 17 20:32:40 2013 -0700 HGFS: Fix Linux client symlinks The kernel buffer holding the symlink name was being freed incorrectly when it was used by the VFS layer. This resulted in corruption and invalid names being used when trying to lookup the symlink's target. The HgfsFollowlink should not be calling vfs_follow_link but calling nd_set_link to save the link target name that HGFS allocated. To deal with the release of the name, HgfsPutlink has now been added which the VFS layer will call as needed and this function retrieves the name from the name structure using nd_get_link and releases the buffer. Then for completeness calls nd_set_link with NULL to clear it from the name structure. The VFS layer internally calls vfs_follow_link after the HgfsFollowlink call passing the link target name from the name object that HGFS stored. Hence, why HGFS should not call it directly. Signed-off-by: Dmitry Torokhov commit 0d5581ae35aaca0a1e645d8ffccaae77c0e39d4a Author: VMware, Inc <> Date: Tue Sep 17 20:32:28 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 81536c78e78200c58825b65cb5d188704b70c15f Author: VMware, Inc <> Date: Tue Sep 17 20:32:18 2013 -0700 HGFS: Fix a Linux client memory corruption When doing partial page writes the Linux HGFS client would trash the initial part of the page leading up to the start of the write and also trash the remaining part of the page after the written segment of the page. This trashing of the initial part of the page was incorrect and overwrites earlier partial page writes to that page. This was also incorrect as the arguments for the offsets into the page were miscalculated. Signed-off-by: Dmitry Torokhov commit a4f7f191d0cb1d260f1b13e2545340109be4631d Author: VMware, Inc <> Date: Tue Sep 17 20:32:13 2013 -0700 Add 4 new guestRPC commands for namespace manager. Signed-off-by: Dmitry Torokhov commit 79b0afe51c9fe9002ad1613ad8eb1437ef5eafd0 Author: VMware, Inc <> Date: Tue Sep 17 20:32:06 2013 -0700 Internal branch sync. Included in this change: . Fix FileIO_CloseAndUnlink() to handle unlink failures. . Add Debuan 7,1 to the list of known OSes . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 159e1ec4d24ca2e3b41f13c5f0976a1ecd1fb8b8 Author: VMware, Inc <> Date: Tue Sep 17 20:31:40 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 518fab531f95c6a31f15f3fb7ae8a43d0eab4064 Author: VMware, Inc <> Date: Tue Sep 17 20:31:31 2013 -0700 Fix parsing logic in guestInfo to parse vlan configured NICs The regular expression used to parse routes /proc/net/route and /proc/net/ipv6_route fail when the device names contain "." eg: eth0.80 which is how the interface names appear when we have VLANs configured. This fix modifies the regex to handle this case by parsing until a whitespace character is encountered. Signed-off-by: Dmitry Torokhov commit b086090409081a4efdad46f6fba27df1b94f916a Author: VMware, Inc <> Date: Tue Sep 17 20:31:22 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit e6117c29424490908f1abbbe135cbdaef66258af Author: VMware, Inc <> Date: Tue Sep 17 20:31:10 2013 -0700 HGFS: Improve the Linux kernel client logging Add more logging to make tracking requests and their respective arguments to aid debugging. Signed-off-by: Dmitry Torokhov commit a302d14e247c3acd0ce83fa5455f9e759730778c Author: VMware, Inc <> Date: Tue Sep 17 20:30:58 2013 -0700 Use g_debug instead of g_warning in RpcChannel_Error With esx5.1GA Tools, when there are more two Terminal Sessions connect to a Windows VM, each TS sould have one vmtoolsd running but actually only max two vmtoolsd run. The Windowds Application Event log fills up with the warning messages of "[vmusr:vmusr] Error in the RPC receive loop: RpcIn: Unable to send." repeatly until close some TS' to have max two TS connected. Some customers had vmtoolsd crashed but some didn't. This message is from RpcChannel_Error. After replace g_warning() by g_debug(), the problem is resolved. This is a workaround for esx5.1x. Signed-off-by: Dmitry Torokhov commit 566b7aa41af9f0c40b2c53f8a19f1e718c8bb3d5 Author: VMware, Inc <> Date: Tue Sep 17 20:30:52 2013 -0700 Re-enable vsocket guestrpc in tools. 1) Fix some assertion for reconnect. 2) Call VMCISock_GetAFValueFd so we do not hold vsock usage all the time. 2) Cut off the dependency of SIGUSR1 with dndcp plugin. 3) Change function name vmware_unblock_vmware_user to send_vmware_user_sigusr1. Signed-off-by: Dmitry Torokhov commit c1a77415dc90d322b8ffddd93c2f820bfab76a09 Author: VMware, Inc <> Date: Tue Sep 17 20:30:43 2013 -0700 Avoid logging non-fatal messages without logging system initialization. Logs that come before logging system intialization spam the console output. Therefore, we make the logging a no-op for non-fatal messages until logging system has been initialized. Usually, we initialize the logging system when process starts up, so we will swallow only those non-fatal log messages that are generated during very early stages of process initialization. Signed-off-by: Dmitry Torokhov commit 1c9c43caa766bfd6222ee994e9d97f0fefeeedf9 Author: VMware, Inc <> Date: Tue Sep 17 20:30:26 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 88c5964db6aaf5437872c1f553b27c07453dd12f Author: VMware, Inc <> Date: Tue Sep 17 20:30:00 2013 -0700 HGFS: clean up of server Send packet part II Now remove the two unused reply and reply size arguments that are in the HgfsPacket object from the server internal send function. Signed-off-by: Dmitry Torokhov commit cdfb73d3f965ceb791a4ba18d044ad90f29bf645 Author: VMware, Inc <> Date: Tue Sep 17 20:29:52 2013 -0700 Fix lspci command in vm-support. Change runcmd "lspci -t -v -nn -F /tmp/lspci1.$$.txt" "/tmp/lspci2.$$.txt" to runcmd "lspci -t -v -nn -F ${OUTPUT_DIR}/tmp/lspci1.$$.txt" "/tmp/lspci2.$$.txt" because previous command: runcmd "lspci -M -vvv -nn -xxxx" "/tmp/lspci1.$$.txt" would remove /tmp/lspci1.$$.txt in the last step. Signed-off-by: Dmitry Torokhov commit 8e8095e66632b9a29c89add36ec469d00a8ba6bf Author: VMware, Inc <> Date: Tue Sep 17 20:29:44 2013 -0700 HGFS: Clean up server send packet callback While cleaning up the usage of the HGFS packet abstraction it meant that the arguments to the HGFS server packet send callback could be cleaned up. The arguments for the packet buffer and size are now unused as this too arguments are extracted from the HGFS packet object. Therefore, remove the unused arguments from the send callback. Signed-off-by: Dmitry Torokhov commit f51b4f5725fa0df44c200e1c33e17d28c07ea7e5 Author: VMware, Inc <> Date: Tue Sep 17 20:29:34 2013 -0700 nternal branch sync. Included in this change: . Tools,DND,X11: Constrain detection window to desktop work area . dndcpx11: Adjust style to match Hosted UI guidelines . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 1e7a9a273f62a53d0c9046499cf24b421aa2528b Author: VMware, Inc <> Date: Tue Sep 17 20:29:02 2013 -0700 Bump up the tools version to 9.4.0 for RTM. Its time to bump up the tools version from 9.3.3 to 9.4.0 for RTM. Added new macros and new version for tools in bora/public/vm_tools_version.h file. Signed-off-by: Dmitry Torokhov commit 05f41deaeb8e129915cb501b6a1ce18b46f1c902 Author: VMware, Inc <> Date: Tue Sep 17 20:28:39 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit d7debe58f9ebeffc21193c56286ca36266d05142 Author: VMware, Inc <> Date: Tue Sep 17 20:28:22 2013 -0700 Internal branch sync. Included in this change: . Untangle Util_Backtrace and friends so they don't pull in lib/file . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 9f3ea592f1651fc43c715bf2c74499bf63b47ab7 Author: VMware, Inc <> Date: Tue Sep 17 20:27:51 2013 -0700 HGFS: Server packet abstraction part XI Deal with the broken reply packet part of the abstraction. Fix the get reply packet function call to separate out the reply data size passed in and the reply packet buffer size which is returned. Add the reply data size field in the HgfsPacket object so that the reply data size and reply buffer size can be separated out and not overloaded. This allows the transport channel send routines to extract the reply details from the packet object and not need the buffer and size arguments. The send function channel callback API will be cleaned up in a separate change. The get reply function for the packet now sets the meta packet data size too when it is used for the reply packet. This is used by the VMCI channel which now only maps and copies the correct amount of reply data into the guest VM shared memory. The reply packet size is randomly overwritten from the total packet size available for the reply to hold the amount of written data in the reply. This however, does not have any effect, since, the reply data size is passed to the send function which then knows how much data to send, and for VMCI, the meta part of the packet is used to transfer data to the guest shared memory so the reply part is essentially unused. This is now deleted. Signed-off-by: Dmitry Torokhov commit 8fcfef8b4b65a34d9d24686ee9d378b724d56744 Author: VMware, Inc <> Date: Tue Sep 17 20:27:44 2013 -0700 MPN to MPN 64 conversion for Hosted. This change is supporting a 64bit MPN for hosted products. Assumptions taken: 1. Kindly note that currently we do not have systems supporting 64bit memory. So hosted vmmon 64 bit MPN is a container to store whatever monitor passes to it. The underlying assumption is that the higher 32bits will be zero. 2. Physmem tracker still does page walk using 32 bit values and we have put checks to make sure that MPN64 is just a container with actually 32 bit values. This was a design decision taken after talking to kevinc and jpool. 3. The CrossPage code is still 32 bit and I typecast MPN64 to accept 32 bit values for the crosspage code. 4. Vmkernel already has another definition of MPN64 and I have retained their definition for vmkernel specific code. typedef uint8 * MPN64; typedef uint64 MPN64; 5. Additional changes were required in bora-vmsoft vmballoon module which earlier used MPN and called functions expecting MPN64 as an input. I have however *NOT* changed the PageHandle code of Vmballoon. I have typecasted to MPN64 where common MacOS page handling functions which require MPN64 are used. Signed-off-by: Dmitry Torokhov commit 946a1fed90796096501f5650ca0344f2223d8140 Author: VMware, Inc <> Date: Tue Sep 17 20:27:32 2013 -0700 Disable vsocket connection temporarily to work around a bug. Signed-off-by: Dmitry Torokhov commit 66f441a5673d90fc18c084afeb02a8e8e703a555 Author: VMware, Inc <> Date: Tue Sep 17 20:27:19 2013 -0700 Pass RPCI channel info to guestrpc command hanlders. Since now we have secure guestRpc, some commands like namespace manager needs to handle vsocket/backdoor connections differently. main changes are in guest_rpc.c, guest_rpc.h, and namespaceMgr.c. Changes in other files just function sinature changes. Signed-off-by: Dmitry Torokhov commit 659dde93cfc12789309b42278892667e75914ca4 Author: VMware, Inc <> Date: Tue Sep 17 20:27:07 2013 -0700 Tools/DnD X11: Logging improvements and cosmetic touchups. ===== Logging ===== A large chunk of the Tools DND code included function call tracing via log entries at the debug level. However, it had some problems, such as generating a lot of noise in all buildtypes. (Remember that Tools only has 3-4 log levels: debug, info, warning, and error.) There was also a problem with inconsistency w/r/t logging when a function went out of scope. To address this, I whipped up a dummy tracing object and shove it in bora-vmsoft/lib/public. By including tracer.hh, one just inserts TRACE_CALL(); at the beginning of a function to log entry/exit. Additionally, it works only in developer builds; it's a ifdef'd out everywhere else. Another thing I did was centralize logging of GuestCopyPasteMgr's session ID and state updates. We now long old/new values upon update. More of the DND code has been fixed to log to the dndcp GLib log domain, making it easier for folks to isolate dndcp logs. (This explains the switch from Debug to g_debug.) ===== Readability ==== There was a list of some 10+ sigc signals that, due to indentation and such, was kinda hard to read & easily skim. I replaced this with a macro which reduces each signal hookup to one line. Signed-off-by: Dmitry Torokhov commit 3ef9ccaea708f123f020fe592cb3883ad54034ab Author: VMware, Inc <> Date: Tue Sep 17 20:26:35 2013 -0700 Fix send retry on vsocket channel. Signed-off-by: Dmitry Torokhov commit cbfdc1a390497f46bc15d1bff0dd91f9775a3780 Author: VMware, Inc <> Date: Tue Sep 17 20:26:30 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 26c693664f4424ce0cf090b9c85df210c8e47467 Author: VMware, Inc <> Date: Tue Sep 17 20:26:17 2013 -0700 Switch utf::string from g_utf8_validate to Unicode_IsBufferValid. In the version of glib we currently use g_utf8_validate rejects strings containing the non-characters U+FFFE and U+FFFF. This was marked as a bug and resolved (see https://bugzilla.gnome.org/show_bug.cgi?id=694669) but until that is released we need a workaround. Our internal UTF-8 validation routine accepts these characters as valid so use that instead. Signed-off-by: Dmitry Torokhov commit eb245cb3633d0f4078ea61c8f8ece54bacc4d855 Author: VMware, Inc <> Date: Tue Sep 17 20:26:09 2013 -0700 HGFS: Clean up of server packet send Make packet the send function local to the only file where it is used. Signed-off-by: Dmitry Torokhov commit 3d814b1c8ea9b6c5249c064e47326f37026ff2d6 Author: VMware, Inc <> Date: Tue Sep 17 20:25:21 2013 -0700 Fix VMHSUtilFileMove and clarify comments of File_Replace VMHSUtilFileMove has been broken since 2008 and no one has noticed, so I would be happy to remove the entire mv command from VMHS if no one would miss it. Signed-off-by: Dmitry Torokhov commit 48a12d8ff6d89e2e06f094cdf0c34e29fe338cbc Author: VMware, Inc <> Date: Tue Sep 17 20:25:16 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 811ceb8315512c3146c9f30b926e86538f7734d3 Author: VMware, Inc <> Date: Tue Sep 17 20:25:06 2013 -0700 Change the lspci parameters to avoid crash dangerous and offer more readable information. Currently our WS `vm-support` runs: lspci -H1 -M lspci -H1 -M -vn The -H parameter is dangerous. In better case it will crash your server, in worse case it will corrupt your data. So change them to: runcmd "lspci -M -vvv -nn -xxxx" "/tmp/lspci1.$$.txt" runcmd "lspci -t -v -nn -F /tmp/lspci1.$$.txt" "/tmp/lspci2.$$.txt" runcmd "lspci -vvv -nn" "/tmp/lspci3.$$.txt" Signed-off-by: Dmitry Torokhov commit c2676c087a208e8bca090c741ef34d6ff1a8cc6b Author: VMware, Inc <> Date: Tue Sep 17 20:24:59 2013 -0700 Replace some RpcOut_* API using new RpcChannel API. Signed-off-by: Dmitry Torokhov commit 0bc8730194cd723c32010053a93a580eb336e54c Author: VMware, Inc <> Date: Tue Sep 17 20:24:08 2013 -0700 HGFS: Server packet abstraction part IX Adding in the new fields to indicate the size of the valid data, not the size of the buffer. Previously, the two were combined which meant that the buffer size was ultimately used instead making the data copies very inefficient. Another transitional change to get this stuff moved over to handle the total pack size and valid data sizes separately. Currently, VMCI has to use the total packet sizes only and so maps in 16 pages and copies all the data back and forth because it can't tell how much is actually valid. When I switch the VMCI transport header to support V2 it will have the correct data size and packet ID - asynchronous will then work too. Signed-off-by: Dmitry Torokhov commit 54baff91bb4ee3f1d4bd31e23b1f79ed513a9c81 Author: VMware, Inc <> Date: Tue Sep 17 20:23:19 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 7f20a2f72a0a2314a448fc38a6d76623d0744ce7 Author: VMware, Inc <> Date: Tue Sep 17 20:22:43 2013 -0700 Linux kernel modules: remove pre 2.6 support from makefiles Since pre 2.6.9 support was moved off to legacy branch we do not need it here. Signed-off-by: Dmitry Torokhov commit fd70a7c37fa26eedfa6760606ead6c4bc43a56f6 Author: VMware, Inc <> Date: Tue Sep 17 20:22:25 2013 -0700 Changed a warning log message to debug message. If a tools service is running inside a non-VMware environment, we should not be filling the system logs with our warning messages. Signed-off-by: Dmitry Torokhov commit 2b1a8355548e3d82ad1f3a311dad1c3c8f731c4a Author: VMware, Inc <> Date: Tue Sep 17 20:22:09 2013 -0700 Mac OS Tools: Make system-wide services launchd-compliant Since day 1, the way we have started the tools services has been: at boot, launchd executed the process "services.sh --start", which: 1) Loaded kexts. 2) Started the long-lived vmsvc as a daemon. 3) Exited. According to http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html , launchd sends it a SIGTERM. See "SIGTERM". This change fixes the above two issues, by turning things upside down: since vmsvc is already a long-lived process, let's: o Have launchd start vmsvc directly, without daemonizing it, just like launchd already does with the vmusr process. o Modify vmsvc so that the first thing it does is load the kexts. I kept the "services.sh --stop" interface (I just re-implemented it differently), because it is useful to testers, but more importantly because it is called from two places: The tools preinstall package script (possibly in a tools package older than this change). The tools uninstallation script. Signed-off-by: Dmitry Torokhov commit 4111a70f4527aca6442162e0481cd39abeaa3efe Author: VMware, Inc <> Date: Tue Sep 17 20:21:40 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit d6873aa9d43c6b807057fcd165f2a8547b5ed5a2 Author: VMware, Inc <> Date: Tue Sep 17 20:21:32 2013 -0700 Ignore SIGPIPE for tools. Otherwise tools exits upon socket write error. Found this in guest rabbitmq proxy testing. Signed-off-by: Dmitry Torokhov commit 6f8769f85cf842590867c6ca021cc7d148a59962 Author: VMware, Inc <> Date: Tue Sep 17 20:20:35 2013 -0700 Reactivate guestRpc polling reduction code on the guest side. Reactivate guestRpc polling reduction code on the guest side. The code was disabled completely due to an issue that has been fixed. Signed-off-by: Dmitry Torokhov commit 52cac5493686e9f6da1bc9f67c13e2f656af83a3 Author: VMware, Inc <> Date: Tue Sep 17 20:21:26 2013 -0700 Fix a segfault in RpcChannel_SendOutRaw. Fix a segfault due to null pointer reference in debug code. Signed-off-by: Dmitry Torokhov commit 38756b5b32ca5c8c3b1a17bfc2216c59c6bcf7dc Author: VMware, Inc <> Date: Tue Sep 17 20:20:27 2013 -0700 Use __thread on Linux (and ESX) in vthreadBase.c. This change makes use of __thread on Linux for storing the vthread base pointer and the thread ID. We still also store the value with pthreads_setspecific so that we have consistent behavior on thread destruction (using the pthreads destructor). But this allows the VThread_CurID path to skip loading the pthread key, skip checking if the key is initialized, and skip the call into pthread_getspecific. (With VThread_CurID taking its own fast path, it's not clear there's much benefit at all from optimizing the path for the base pointer, but I did so for consistency's sake.) I tried using my USB bandwidth test to measure the performance impact of this on a Linux host. Unfortunately I found the test to be much more noisy under Linux. The results claimed 1.6% faster overall, but I have almost no faith in that number. Still, having inspected the new code and looked at the contents of pthread_getspecific, I think it's safe to claim that this should be better overall even if its difficult to quantify how much. And though it makes the code slightly more crufty, such ugliness is confined to two functions. Signed-off-by: Dmitry Torokhov commit e996a35e60280a8dd73bb78f9a9ddde06fec7b77 Author: VMware, Inc <> Date: Tue Sep 17 20:20:14 2013 -0700 Internal branch sync. Included in this change: . dnd plugin: various cleanups . asyncsocket: Fix for race conditions with sync operations on a 2nd thread Signed-off-by: Dmitry Torokhov commit c7fbb99626b9ee8e20cc8e12691805d013826fbd Author: VMware, Inc <> Date: Tue Sep 17 20:20:02 2013 -0700 Remove some whitespace from x86cpuid.h. Sometimes when we make preprocessor tables we have to blow past 80 columns. But in x86cpuid.h we had a table with plenty of internal whitespace which was 81 columns long. No reason to have to suffer with that. Signed-off-by: Dmitry Torokhov commit bb80b3337a94be4668be732967ca453ca1b97359 Author: VMware, Inc <> Date: Tue Sep 17 20:19:54 2013 -0700 HGFS: Server packet abstraction part IX The HGFS server sets the packet's ID field as the HGFS protocol request ID. This should not occur and it overloads that the packet ID which should be private to the transport channel which has nothing to do with the HGFS request ID. The HGFS request ID has it's own field in the HGFS header used by the request and reply. Remove the HGFS server modifying the packet ID. This is currently safe, as the clients do not receive any asynchronous replies from any HGFS server where the packet ID in the reply is used. Signed-off-by: Dmitry Torokhov commit 4f860433a9a51fd978f51ed6c9fa1db167909419 Author: VMware, Inc <> Date: Tue Sep 17 20:19:48 2013 -0700 VMCI: Remove VM2VM We're never going to ship it, so let's yank it out. This isn't a straight backout for the following reasons: o Some of the files have diverged so far that backout fails. o Petr added some nice log messages in his original change that we want to retain. So this was mostly manual. I did do a side-by-side with the pre-VM2VM version and it looks good. Note that our 128-bit QP tag code will re-appear in vm_atomic.h at some point. Signed-off-by: Dmitry Torokhov commit ed57ff3cc7d3725cd6ef6ba482608108faa587c6 Author: VMware, Inc <> Date: Tue Sep 17 20:19:40 2013 -0700 Tools: prepare for gcc upgrade Had a few spare cycles, so tried compiling Tools with gcc-4.4.3. This change fixes all compilation errors. (It does NOT do the compiler upgrade, hence the minimal testing.) All changes are mechanical / should be correct at compile-time. appUtilFileTypes.h: hash_map was never a standard, use the standardized (std::tr1) unordered_map. Which removes ifdefs too. most other files: character strings are "const" in C++. Signed-off-by: Dmitry Torokhov commit 7f89ef424c41687763e8a976337fea1a43ed299b Author: VMware, Inc <> Date: Tue Sep 17 20:19:34 2013 -0700 Add Clamped_UAdd64 Signed-off-by: Dmitry Torokhov commit 0910f4ac428e00cad83893f6fbe68e928666466e Author: VMware, Inc <> Date: Tue Sep 17 20:19:27 2013 -0700 Flip the kill-switch on VM2VM VMCI VM2VM VMCI made a reappearance in 5.5 because vHadoop was planning to use it, but it was eventually rejected. We left the code in so as not to disturb stability, and simply disabled it in the UI. But let's make doubly sure by flipping the kill-switch, so that our customers don't accidentally enable it and then complain about it being removed from 5.1, coming back in 5.5 and then disappearing again. Signed-off-by: Dmitry Torokhov commit 3aea23905d5c28cc4e68011fe2e47f1354c66a4e Author: VMware, Inc <> Date: Tue Sep 17 20:19:21 2013 -0700 Bump up tools version to 9.7.0. Signed-off-by: Dmitry Torokhov commit 036172f0cb580ca370a94324f6a465bcb71f2076 Author: VMware, Inc <> Date: Tue Sep 17 20:19:13 2013 -0700 Fix a spurious warning. /dbc/pa-dbc1121/rrugina/rr-vmcore-dbc0/bora/public/vm_basic_defs.h:315:5: warning: "VMKERNEL" is not defined Signed-off-by: Dmitry Torokhov commit 7e6615de5c2f12ff5b1bb7b6ac47c50312fd1d15 Author: VMware, Inc <> Date: Tue Sep 17 20:19:06 2013 -0700 HGFS: Clean up server packet abstraction part VIII Simply make the pointer checks more consistent. Signed-off-by: Dmitry Torokhov commit 0add24c598aa8c863917eda4da97c14f10380671 Author: VMware, Inc <> Date: Tue Sep 17 20:19:00 2013 -0700 HGFS: Clean up server packet abstraction part VI This cleans up some of the inflexibility and inconsistencies in the use of the mappings of the packet buffers for the meta data (Hgfs header and commmand arguments) and the data component. This splits out hanlding the iov mappings into two smaller utility functions (map and unmap) since the code is replicated in multiple places. The copy from and too an allocated buffer into and from an iov array is split out from the map and unmap functionality and also a second routine is created to copy from the iov array to a buffer which was previously missing. To achieve this I have also added a mapped iov count for the meta and data iov components of the HgfsPacket object. This helps track the state of when mappings are available and not. Previously, this was coded by assumption of what the GetBuf call did. In follow up changes the data will have a total buffer size and a data size for each of the meta and data components. This will allow for optimal movement of data between buffer and iov array. Signed-off-by: Dmitry Torokhov commit fb4b3833080ba2ebd1dbafc8334f0cb10e181197 Author: VMware, Inc <> Date: Tue Sep 17 20:18:47 2013 -0700 Avoid a memory dereference when getting the current thread ID. As part of some recent benchmarking and ensuing discussions a couple of overheads in VThread_CurID have been identified. (1) VThread_CurID ultimately gets a pointer to a per thread structure that contains various bits of state including the thread ID. After getting that pointer it must read the thread ID out of memory. This could be avoided if the thread local value we stored was the thread ID itself. (2) Before calling into the host's API for thread local storage, vthreadBase.c must get the host key, check if it is initialized and initialize it if necessary. Then once it gets the thread local value from the host API it must check if that has been initialized. These checks could be avoided if we forced clients to initialize the thread before calling functions like VThread_CurID. (3) On some (all?) Linux pthread implementations pthread_getspecific itself can be heavyweight. Both Windows and Linux offer alternatives to make thread local storage cheaper. (OS X on the other hand provides a very fast implementation of pthread_getspecific: pretty much one instruction plus the function call overhead.) The first two overheads came up in my profiling of USB workloads on OS X while Kevin raised the third issue in the following discussions. This change attempts to eliminate the first overhead, but to do so in a way that helps set up the code for attacking the remaining two. In particular it introduces a second thread local variable to store the thread ID. For the time I left the thread ID in the other structure as well and verify that they stay in sync. We could get rid of it, but it's low cost and I suspect (though I have no proof) that it could be useful in debugging. As part of this I've rearranged some of the initialization code both for the TLS keys as well as for initializing the TLS data. This is useful because I wanted both pieces of state to get set together (and mutated together -- yes our threads change IDs during their life). And, with respect to the pthread keys, it's important to make sure the base key gets allocated before the thread ID key. This ensures it gets destroyed first which allows us to keep an ASSERT to make sure that the two thread IDs stay in sync. This does run into one wrinkle because of the lazy thread initialization. The default value for uninitialized state is NULL which, inconveniently, is a valid vthread ID. So instead of actually storing the thread ID, we store the thread ID incremented by one. This means the default/uninitialized value will show up as -1. We can avoid this after addressing (2) from above, but in the meantime trading a memory read for an ALU operation is still a nice win. Signed-off-by: Dmitry Torokhov commit 447758846b1a1caa09c2aa0dad5757897ad79bc0 Author: VMware, Inc <> Date: Tue Sep 17 20:18:23 2013 -0700 Internal branch sync. Included in this change: . lib/file - add File_MakeSafeTempDir() . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 0758f4374dedac711fd674ec6f0c4ebc346cdb60 Author: VMware, Inc <> Date: Tue Sep 17 20:17:55 2013 -0700 Internationalize disk shrink progress string Disk shrink is a long running operation with progress reporting. The "progress" string is visible to users and therefore needs to be internationalized. Signed-off-by: Dmitry Torokhov commit d0acf1b782efc1477ae216979a6984531f13ce52 Author: VMware, Inc <> Date: Tue Sep 17 20:17:44 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit ffb568be68fae5f318b09fdf4b60da84a180f20e Author: VMware, Inc <> Date: Tue Sep 17 20:17:19 2013 -0700 HGFS: Clean up server packet abstraction part VII Consolidate the HgfsPacket bool fields into a flags field. Make the names of the bool fields more accurate too in some cases. Signed-off-by: Dmitry Torokhov commit 7230cb3017b18946be3e056d47a3a5e3293b8f09 Author: VMware, Inc <> Date: Tue Sep 17 20:17:02 2013 -0700 HGFS: Clean up server transport session usage The transport session is only ever used in the common HGFS server code. The scope should be constrained to that file and beyond that treated as an opaque type. Make some of the transport session functions static to the common HGFS server file and remove the declarations from the common header file. Signed-off-by: Dmitry Torokhov commit 227a637742a06ce2155ed14a60d2d31ce772bc90 Author: VMware, Inc <> Date: Tue Sep 17 20:16:56 2013 -0700 Remove fake pthreads A while ago, we decided to always compile with pthreads; optimizing for single-threaded programs no longer makes sense. Which means vthreadBase.c can get cleaned up. (Notice that this implements the "best thing to do" comment on lines 195-6). Signed-off-by: Dmitry Torokhov commit 039bc01a6547c7306ac9c62c8f62ecd055443e9d Author: VMware, Inc <> Date: Tue Sep 17 20:16:49 2013 -0700 HGFS: Clean up server packet abstraction part V Clean up the packet utility routines to only pass the arguments that are required. This means we only need to use the HGFS server channel callbacks and not the whole HGFS server transport session object. Signed-off-by: Dmitry Torokhov commit df7a9a235364cd9c2f28c72ef1c54f857d0894b9 Author: VMware, Inc <> Date: Tue Sep 17 20:16:10 2013 -0700 HGFS: Fix build on Linux 3.10-rc1 The kernel changes broke the asynchronous read and write HGFS client code which picks out the dentry from within the kiocb struct. Include the header file directly now for newer kernel versions. Signed-off-by: Dmitry Torokhov commit 8e5da80487fa58c637bfe01426383164754283db Author: VMware, Inc <> Date: Tue Sep 17 20:15:46 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit b7ef7d7bc15c8c9a5336f77f96ac4d28dc4c2f68 Author: VMware, Inc <> Date: Tue Sep 17 20:15:38 2013 -0700 HGFS: Make server use of const more consistent In particular we see const void * and void const * intermixed and so now make the server code consisten in its use and stick with the const void * format. Signed-off-by: Dmitry Torokhov commit e8c800081d0339e10641e216e78ad9b47e4d5afa Author: VMware, Inc <> Date: Tue Sep 17 20:15:31 2013 -0700 HGFS: Clean up server packet abstraction part IV Complete some tidy up of the input params created from the HgfsPacket. This can be contained to only the HgfsServer code and not required to be exposed beyond that. So this removes the one usage from the parameter pack and unpack code which was in the unpack write request. As I was modifying up the HGFS server write request I correct a couple of const char * to const void * for the write data. I removed a HSPU_PutPacket declaration as the function did not exist. Signed-off-by: Dmitry Torokhov commit 61bd632f8cac230d9fb06bda67ebd0bfa33b13ff Author: VMware, Inc <> Date: Tue Sep 17 20:15:12 2013 -0700 HGFS: Fix server check for minimum sizes of session requests The HGFS server check for the minimum protocol request sizes for create and destroy session was incorrect. The full request including the reserved fields must be sent by the clients. Currently they all do that, including any shipping versions. Signed-off-by: Dmitry Torokhov commit 5dc550ca73d22d7d3bca6a095c2193b0f98184bd Author: VMware, Inc <> Date: Tue Sep 17 20:15:05 2013 -0700 HGFS: Clean up server packet abstraction part III Now the HGFS server packet abstraction has moved from an invalid const char * pointer for the input parameters set from the HgfsPacket abstraction we make the pack functions correct too. This fixes the packet header which can be of two different types to be a const void * now and not the incorrect const char *. Signed-off-by: Dmitry Torokhov commit 202788ac7df7a74b4f243dd3a6856b0547f7167d Author: VMware, Inc <> Date: Tue Sep 17 20:14:59 2013 -0700 HGFS: Clean up HGFS server packet abstraction part II Clean up the input params object which reuses the packet abstraction field names which are generic because they are opaque outside of the HGFS server. Since the input params are wholly contained within the HGFS server and have specific meaning in the HGFS server context, we give the fields the HGFS meaningful names. Signed-off-by: Dmitry Torokhov commit 147847abf45b67bc20483d1a8a83bff3f039bcfa Author: VMware, Inc <> Date: Tue Sep 17 20:14:46 2013 -0700 HGFS: Clean up server packet abstraction part I The HGFS packet object passed between the transport channel and the HGFS server is in need of some clean up so that it can be made much more efficient. This just closes out some unnecessary public functions and makes them static. Signed-off-by: Dmitry Torokhov commit 65d11e664ca3e3905f2afe102efa52a6122753d4 Author: VMware, Inc <> Date: Tue Sep 17 20:14:19 2013 -0700 HGFS: Fix the server to close sessions being invalidated When the HGFS server running in the tools is left with any sessions open due to the clients not terminating them cleanly they will be marked inactive. The HGFS server callback to invalidate them will periodically be called and after a brief period will terminate those sessions. These sessions are not closed first, thus triggering the assert in the session exit function which checks the session's state. Fix is to close the inactive sessions being terminated in the HGFS server invalidate callback. Signed-off-by: Dmitry Torokhov commit 0c899a265608805ce9962f85e3eb8636ec135b9c Author: VMware, Inc <> Date: Tue Sep 17 20:14:08 2013 -0700 Internal branch sync. Included in this change: . Solaris vmxnet3: log over-fragmented condition only when retry fails . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 4d268b0fff1d7075fc3e17a5c34d194e1809a5da Author: VMware, Inc <> Date: Tue Sep 17 20:13:54 2013 -0700 Replace BackdoorChannel_New with RpcChannel_New. Signed-off-by: Dmitry Torokhov commit f05250e1c8fe0fe64c5497507fa7a7790f41b496 Author: VMware, Inc <> Date: Tue Sep 17 20:13:42 2013 -0700 Fix for not starting RpcIn during fallback on backdoor channel. Signed-off-by: Dmitry Torokhov commit 6068b80208fe0e7b11bd506524cea5e2d73022cb Author: VMware, Inc <> Date: Tue Sep 17 20:13:35 2013 -0700 Bump up the tools version to 9.3.3 for RC 1. Signed-off-by: Dmitry Torokhov commit e6b0b955c2e4e6fc6a53bd1cb32f74bb70ab582c Author: VMware, Inc <> Date: Tue Sep 17 20:13:28 2013 -0700 HGFS: Fix Linux client to work with Perforce versioning The problem is that perforce client uses rename operation upon a temp file which has read-only attributes. The operation then fails with permission denied. The fix removes the read only attribute and retries the rename operation again as per the delete operation. This occurs on Windows HGFS servers as the target of the rename operation to be replaced has the read only attribute set. The prevents a rename even if they want to overwrite the target if it exists. So removing the read only flag is required. Signed-off-by: Dmitry Torokhov commit b34fff0c862b0ba8c6f93fc96a335d3a8e243f9c Author: VMware, Inc <> Date: Tue Sep 17 20:13:16 2013 -0700 Internal branch sync. Included in this change: . Scrub sensitive data in VIX before freeing it . Fix memory leak in VMCISock_GetAFValueFd() . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 35453dc666791c5fa87dbcc442839f0491e31d17 Author: VMware, Inc <> Date: Tue Sep 17 20:13:02 2013 -0700 Secure GuestRPC channels Use VMCI/Vsocket instead of backdoor for GuestRPC RPCI channels. For privileged channels, the guest side can bind port to less than 1024, VMX can then verify the binding and enforce privileged commands can only be ran by privileged users. Signed-off-by: Dmitry Torokhov commit 653df5dffb2ea5f9249dcb097a75f707bb578415 Author: VMware, Inc <> Date: Tue Sep 17 20:12:44 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 737ced1b4fab413f56ac4aa1532191de87a552d8 Author: VMware, Inc <> Date: Tue Sep 17 20:12:08 2013 -0700 Internal branch sync. Included in this change: . Properly handle timezone in TimeUtil_SecondsSinceEpoch() . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 1e9f5c94d0bcc807ac552b19bd5c9a60d96f301a Author: VMware, Inc <> Date: Tue Sep 17 20:11:56 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4f174540292f0f158543cc0b315cdcaee72e875c Author: VMware, Inc <> Date: Tue Sep 17 20:11:40 2013 -0700 Plumb in a new VIX error code Signed-off-by: Dmitry Torokhov commit 065f236104ab12a89cd4b2e73597aeba203e0e0b Author: VMware, Inc <> Date: Tue Sep 17 20:11:25 2013 -0700 HGFS: Clean up the VMCI transport request and reply headers part I This is the first part of cleaning up the HGFS VMCI transport request and reply headers. This deals with the reply header only which is almost identical to the client request VMCI header but not quite - frustratingly. It really is not ideal to use a reply header that is different from the request header and has fields that require corresponding information from the request header which are missing. Consequently, the request header is going to be ramped up to a version 2 which includes all the information for both request and reply and be extensible. Signed-off-by: Dmitry Torokhov commit 8df8396102ebfdcd71cffaa2d05bee4f286f86f3 Author: VMware, Inc <> Date: Tue Sep 17 20:11:08 2013 -0700 VMCI/VSOCK: Cleanup some files Remove extra whitespace, replace tabs with spaces, fix indentation. Also updated the copyright for any file that I touched. Signed-off-by: Dmitry Torokhov commit c6b8484ee1dd7b53846b5cad4f0d7575b6501517 Author: VMware, Inc <> Date: Tue Sep 17 20:10:58 2013 -0700 Add compiler barriers to Atomic_MFence The MFENCE instruction ensures that all loads and stores that preceed it are "globally visible" before any load or store that follow it. However, we don't have a compiler barrier in Atomic_MFence and so the compiler can move code and defeat this. While this bug has probably been around for quite a while, it only came up recently now that the AtomicEpilogue() is compiled out. That contains a compiler memory barrier, and while it's not technically sufficient (need barrier before the MFENCE too), it was apparently enough to discourage the code motion in practice. Signed-off-by: Dmitry Torokhov commit a29d9d534464b563bedda7b16c1c4863c15ccf00 Author: VMware, Inc <> Date: Tue Sep 17 20:10:54 2013 -0700 HGFS: Fix notification cleanup session tear down Previously, when a transport session was disconnected any notifications for the HGFS session were then removed if notification module was enabled. However, this is grossly inadequate, as an HGFS session can come and go driven by a client's protocol requests. The notifications are per HGFS session which is completely independent from the transport session. The only reason the transport session comes into play is whether it has the transport characteristics to support the bidirectional nature of the notification feature. When an HGFS session is destroyed whether it is from a tranport connection session disconnect or a destroy HGFS session protocol request any folder the outstanding notifications for the session should be removed. Since that currently does not happen, e.g. when an HGFS session is destroyed via the protocol requests from a client and goes on to create a new one, during a Windows VM reboot, then when host updates do occur on an HGFS share the notifications will be generated that hold pointers to invalid sessions. This causes the VMX to crash. The fix is simply to move the notification teardown for a session is at the session teardown function, from the transport session disconnect. Signed-off-by: Dmitry Torokhov commit 6a8d296cc68cf6687f9cb8084669aa585ec8da0a Author: VMware, Inc <> Date: Tue Sep 17 20:10:12 2013 -0700 Internal branch sync. Included in this change: . File locking: tolerate another race in FileUnlockIntrinsic . Add util function for getting the epoch from a TimeUtil_Date . Add LRO defines for VMXNET3 . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 203ba46d6469894f2e92af3eb2c4edc03f01be09 Author: VMware, Inc <> Date: Tue Sep 17 20:09:38 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 6a1997ee3179db62f8998f847291cfbaf19bf7c3 Author: VMware, Inc <> Date: Tue Sep 17 20:09:31 2013 -0700 HGFS: Fix Posix server from blocking on pipes The HGFS protocol function to get attributes of a file or folder does a Posix open without the O_NONBLOCK flag. This can cause the open to block if there isn't anyone on the other end of the pipe. Fix is to use the same flags we use for the protocol open to ensure the correct basic flags are used. Also, if the share is not allowed to follow symlinks we get this flag set correctly too now. Signed-off-by: Dmitry Torokhov commit ef2a0f5a022dac45b0e70007a23bce9b0b2a1741 Author: VMware, Inc <> Date: Tue Sep 17 20:09:08 2013 -0700 HGFS: Improve VMCI transport headers part I Begin to consolidate the client to server and server to client VMCI transport headers to be just one common header for both. Currently, there are two one for each direction and they are almost identical. Also the header for the client to the server does not have all information that is required for asynchronous packet sending and replies. Hence the motivation for improving this. The packet headers are poorly defined as they do not have any reserved fields for extending the current version and they are inconsistent with the packet types with each direction. This initial change pulls out the version and packet type into a header node that will be common to the version one and newer versions of the transport header. This involves modifying the server and client sides. The version 1 transport header will remain binary compatible with this change, it just moves the first two fields into a common substructure. Broke out the transport header to return the information from multiple versions of the header. Moved the validate datagram function call to the main receive message callback. Removed the transport header check from this function too, as it is not useful to have it there. It will be done by each of the specific header version handling routines. Signed-off-by: Dmitry Torokhov commit ee7f312e45adeec460f83b3de1ec0c44f88f6e82 Author: VMware, Inc <> Date: Wed Apr 17 14:42:21 2013 -0700 Updating open-vm-tools version for release 2013.04.16-1098359. Signed-off-by: Dmitry Torokhov commit 867ea989d5e6889abcac77b4c7dae7db2651df58 Author: VMware, Inc <> Date: Wed Apr 17 12:23:10 2013 -0700 OVT: require glib2 >= 2.14 and disable 'deprecated-declarations' warnings Internally we are using 2.14.2 on FreeBSD, 2.16.4 on Solaris, and 2.24.2 on Linux, so let's stop pretending that we work with earlier versions. RHEL5 with 2.12 hasn't been compiling for a while and even if it would it would have reduced functionality as glib_regexp would not be available. FreeBSD started packaging glib2 2.22 starting with 7.1. Also, mutex API in Glib2 is a mess, they keep changing and deprecating it, so for now simply add -Wnoerror=deprecated-declarations to avoid build errors. Signed-off-by: Dmitry Torokhov commit 67ba3f42b165ec1ecb16f3bd8375af84b6b5c391 Author: VMware, Inc <> Date: Wed Apr 17 12:22:46 2013 -0700 HGFS: more clean ups of Server packet handling Remove some stuff that made no sense. Get reply packet set the pointers for the reply and then called GetBuf which just returns the pointer passed in. So I removed the GetBuf call. Cleaned up more unused crap. Signed-off-by: Dmitry Torokhov commit 096ad5143bf9aad8aefec43ae023f11c35d89494 Author: VMware, Inc <> Date: Wed Apr 17 12:22:31 2013 -0700 Split /etc/passwd & /etc/group related methods from posixPosix.c It makes monitor linker a bit smaller, and it avoids warnings about linking program using get{pw,gr}* statically. It is mechanical change spliting posixPosix.c into two pieces. And simplifying includes in posixPwd.c... Signed-off-by: Dmitry Torokhov commit fb8de35d8d2266aa335070544ee21bef7218d04a Author: VMware, Inc <> Date: Wed Apr 17 12:22:13 2013 -0700 OVT: detect procps-ng Newer Linux distributions started packaging procps-ng, which supports pkg-config, so hopefully our days of chasing after new procps versions are over. Signed-off-by: Dmitry Torokhov commit 0c958d9c42d694f63e4d2745a2500f8dbcaa36ce Author: VMware, Inc <> Date: Wed Apr 17 12:21:51 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 801a2326a8f531990da0f791007c0fbb4c34cd93 Author: VMware, Inc <> Date: Fri Apr 12 12:58:20 2013 -0700 HGFS: clean up the transport channel callbacks from the HGFS server The transport channel callbacks for the HGFS packet request-reply to read, write and release the memory use badly defined arguments. It uses character pointer and calls it a token. The type is simply just wrong and should be treated as an opaque type owned and manipulated only by the channel transport. Secondly, it is really a context although it is a token, it could be anything the channel chooses and could change in the future. This change fixes these issues to be a void *context. This shows that the type and meaning are not to be exposed beyond the owner of object which is the channel in this case. Signed-off-by: Dmitry Torokhov commit cf2aba89fb68af09533b1708ff323141853b6ef9 Author: VMware, Inc <> Date: Fri Apr 12 12:57:30 2013 -0700 Open /dev/vsock with O_RDONLY. There is no reason to open the device node for writes because we only ever call ioctl(2) on it and none of the ioctls require write permissions. This allows our more security concious customers to restrict the permissions on the device without breaking functionality. Signed-off-by: Dmitry Torokhov commit 47ba080c7df1badb0a160df3bf10e241aef880aa Author: VMware, Inc <> Date: Fri Apr 12 12:57:08 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 048853925f9c921d030ee40f579084c6bdb8f08f Author: VMware, Inc <> Date: Fri Apr 12 12:56:51 2013 -0700 Enable HAS_BSD_PRINTF support in android platform Signed-off-by: Dmitry Torokhov commit 1f555cc25b719827942d92fecf37b39dc71bd146 Author: VMware, Inc <> Date: Fri Apr 12 12:56:43 2013 -0700 Allow vSockets to the VMX to survive a context ID change. On vMotion there is an (unlikely) possibility that the context ID of the virtual machine will conflict with a VM that is already running on the destination host. To prevent this from distrupting communication a few changes are necessary. - The entire VMCI queue pair handle must be checkpointed, allowing the queue pair to still be used. - The guest driver must assume that if the context ID it receives as the destination of a VMCI datagram is not the same as the one it was expecting then its context ID must have changed and it should update it. This assumption is valid because the hypervisor will never deliver a datagram with the wrong context ID. - To make the new test-vmx test work the range check in VMCI.SetID had to be removed. Vigor doesn't support unsigned integers so a negative value for the new context ID is valid. A new version of the ttylinux iso is included containing a proposed version of this patch for upstreaming. Signed-off-by: Dmitry Torokhov commit 032f106b5f2cff5b44dae1f4acf42cff3fb7dcd8 Author: VMware, Inc <> Date: Fri Apr 12 12:56:13 2013 -0700 Fill in local socket address for regular sockets. Call getsockname(2) once the connection has succeeded to record the local socket address in the AsyncSocket struct so that AsyncSocket_GetLocalVMCIAddress works for sockets using the kernel vsock driver as well. This allows me to print the local socket address in vsockTest, which is useful for debugging. Signed-off-by: Dmitry Torokhov commit 4b298fbcb188cdb99802d4102575e8b71a741871 Author: VMware, Inc <> Date: Fri Apr 12 12:55:42 2013 -0700 Add some Haswell definitions The latest SDM reveals the Haswell MSRs. Models 3C and 45 are revealed to be Haswell, though no more details are given. Signed-off-by: Dmitry Torokhov commit 513bf7bdbedcb1796d1378942b8d58c3cb8c14fe Author: VMware, Inc <> Date: Fri Apr 12 12:55:26 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4e5cd57b6be70b210dcb10e001be9e0d10f7c2e9 Author: VMware, Inc <> Date: Fri Apr 12 12:55:15 2013 -0700 Optimize send and receive on VMX vSockets. Skip a lot of extraneous logic in VSockSocket_Send and VSockSocket_Recv by using vmci_qpair_enqueue and vmci_qpair_dequeue directly. This is the same idea as what happens on Mac OS X when data is copied into the host pipe in VSockOS_HandleStreamRecv. This allows us to copy data out of the queue pair as quickly as possible and flush send buffers into the queue pair without waiting for a callback on the poll thread. Client callbacks must still be fired on the poll thread to preserve the AsyncSocket API. Signed-off-by: Dmitry Torokhov commit f5ad7b3e274f3f82691f94fd0d4a6a5d95ad0b3c Author: VMware, Inc <> Date: Fri Apr 12 12:54:50 2013 -0700 Bump up the tools version to 9.3.2. Its time to bump up the tools version from 9.3.1 to 9.3.2 Signed-off-by: Dmitry Torokhov commit 4af52d0e1e7d305d93d0f77ae01db41df0c87b6d Author: VMware, Inc <> Date: Fri Apr 12 12:54:44 2013 -0700 HGFS: clean up the VMCI mapping of transport status from the packet The mapping was a little messy and made some assumptions which we get away with but should be made more robust. The first IOV length was never correctly verified against the size of the transport status and if it was contained completely in the first page. There was an assumption that this was always the case but the Windows client would send pings containing IOVs of buffers on the stack and as such could easily break the VMX. The adjust of the packet IOVs by the VMCI code to skip over the VMCI transport status before passing to the HGFS server to process has also been cleaned up. As has the restoration of the packet IOVs on final processing to access the packet VMCI transport status to set complete. In order to simplify this the HgfsPacket structure now contains an IOV field for the transport channel to use which holds the start of the VMCI channel transport status IOVs. This is then used to restore once the HGFS server has completed processing and the transport channel is doing the final send processing. Signed-off-by: Dmitry Torokhov commit 3729c475fd7bef4ed27679b0e34c4ea790fbdc4e Author: VMware, Inc <> Date: Fri Apr 12 12:54:38 2013 -0700 Export local and remote VMCI address info from AsyncSocket. I need this information to look up vSocket IDs after a resume, but this will also be necessary to determine if the peer is a privileged socket (bound to a port less than 1024). Signed-off-by: Dmitry Torokhov commit ade049517513387712d4fc50c443ef569b555555 Author: VMware, Inc <> Date: Fri Apr 12 12:54:29 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 1e3db9a01eb79c1b55325b52f6c21c948f570805 Author: VMware, Inc <> Date: Fri Apr 12 12:53:45 2013 -0700 Remove the unused HGFS socket transport code Now there are not any users of the socket transport for HGFS we can rip out this dead code. Signed-off-by: Dmitry Torokhov commit 8e7d40cc3cd5dfa7e8cfe64d289691725ed82024 Author: VMware, Inc <> Date: Fri Apr 12 12:53:40 2013 -0700 HGFS: Remove socket and vsocket from Linux client The server side has removed the TCP socket and VSocket support for HGFS so now remove the code from the Linux client. Signed-off-by: Dmitry Torokhov commit 55dcd86cc2ac05fedca0098d1e3a767c49375d8b Author: VMware, Inc <> Date: Fri Apr 12 12:53:16 2013 -0700 Internal branch sync. Included in this change: . VIX: remove APIs to control FT . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 839a0d9ed5a1e4809bd6478f8562c38ac148219e Author: VMware, Inc <> Date: Fri Apr 12 12:52:54 2013 -0700 Checkpoint routines for AsyncSockets backed by VSockSocket. These checkpoint routines work a little differently than those for VSockSocket. While the vSocket infrastructure checkpoints all sockets which are open (because they are in the global VSockSocketStreamGlobal tables) each AsyncSocket must be checkpointed by its owner. This gives the owner the opportunity to reinstall all the necessary callbacks on resume. Signed-off-by: Dmitry Torokhov commit 1787d533b95dc89cb6f8c3f8de4a60075f83ba2e Author: VMware, Inc <> Date: Fri Apr 12 12:52:46 2013 -0700 HGFS: remove some unused server code Remove the HgfsVaIov and the unused HSPU_GetDataPacketIov that used it. If we needed it is not clear and what the rationale for any expected usage was not commented. So removed it. Signed-off-by: Dmitry Torokhov commit e1da491ed93c88dceb6a199a80c111a5c21aaf19 Author: VMware, Inc <> Date: Fri Apr 12 12:52:40 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit e5e7bee8a896912fa460e8d956ae23286b4fde4a Author: VMware, Inc <> Date: Fri Apr 12 12:52:31 2013 -0700 Completely disable guestRPC vmci usage. Dis alba VMCI socket call in guestRPC completely to avoid triggering unstable code. Even guestRPC vmci usage is disabled on VMX side, tools will still try to make a connection and then fall back to use backdoor if the connection fails. This triggers potential issues. Will do more testing and lift this. Signed-off-by: Dmitry Torokhov commit c83894fb2d7fda79f3136ffc5f08cecbfc8e521c Author: VMware, Inc <> Date: Fri Apr 12 12:52:17 2013 -0700 Add a vtable function to close a listening socket. Not all socket types install a periodic device callback for listening sockets. Signed-off-by: Dmitry Torokhov commit cfe67b229f5117f123b3daabe4818eeb0c53e5df Author: VMware, Inc <> Date: Fri Apr 12 12:52:08 2013 -0700 Make SSD-based backing stores visible to guests This change determines if the VM's virtual disk is on SSD and make this information available to guest. This is already implemented on ESX and Mac OS. This change implements it on Windows and Linux. On Linux rotational property of the disk and block device corresponding to logical volume can be read from /sys/block/dev-name/queue/rotational Signed-off-by: Dmitry Torokhov commit a110ca83f9dbb4595027ec2a88c4c0ce1fb24d5a Author: VMware, Inc <> Date: Fri Apr 12 12:52:01 2013 -0700 hanges in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 82862bba67655661610b45ac6c788e1238647f8c Author: VMware, Inc <> Date: Fri Apr 12 12:51:47 2013 -0700 Integration with VMCI CID 0 changes for polling reduction in guestRPC. Hookup changes to VMCI changes for polling reduction in guestRPC by calling new API to listen on VMX side. Without this change, we can only create one guestRPC listening socket per host, with this change, we can create one guestRPC listening socket per VM. Signed-off-by: Dmitry Torokhov commit 53a3aaa8c685085fa55f5f70510749540bce1fab Author: VMware, Inc <> Date: Fri Apr 12 12:51:36 2013 -0700 Internal branch sync. Included in this change: . turn vgauth on for Windows . changes in shared code that don't affect open-vm-tools functionality `Signed-off-by: Dmitry Torokhov commit b5b8b4622947b21300ed71a6a9f14b0b91105e08 Author: VMware, Inc <> Date: Fri Apr 12 12:51:19 2013 -0700 Reduce polling in guestRpc TCLO messaging. Reduce polling in guestRpc TCLO messaging. GuestRpc is using backdoor, the guest has to poll periodically to check request availability. Replacing backdoor using vsocket allows us to get rid of this polling completely. Signed-off-by: Dmitry Torokhov commit 13de4fc3fc2afc95333c4776117c1a4f1ef519fe Author: VMware, Inc <> Date: Fri Apr 12 12:51:06 2013 -0700 HGFS: Clean up server of the reply packet handling The reply packet handler was returning a bool when in fact it cannot fail. Fix this up and make it consistent with other calls for the reply packet handler when filling the header in the complete request common function. This is a lot of repeating the same change for all the opcodes of each supported request and version. Signed-off-by: Dmitry Torokhov commit 6e131999c80c7b9be69755d1e7d5e531136936d3 Author: VMware, Inc <> Date: Fri Apr 12 12:50:27 2013 -0700 Switch to upstreamed Linux VMCI API for internal users. vmci_device_get() and release() were removed from upstream, so let's make them NOPs in Tools too. Signed-off-by: Dmitry Torokhov commit 98320489176200e35036a5de03803acc91afa210 Author: VMware, Inc <> Date: Fri Apr 12 12:50:16 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 0b9ca9a31ca999851e33d4804e5cd78a8a39641e Author: VMware, Inc <> Date: Fri Apr 12 12:49:58 2013 -0700 HGFS: make Linux client work with Linux 3.9.0 kernel More kernel changes have broken the Linux HGFS client. Fix the hlist macro which now only uses 3 arguments. Signed-off-by: Dmitry Torokhov commit 47225408dd0171a0c855f40a67883aeececadf4d Author: VMware, Inc <> Date: Fri Apr 12 12:49:46 2013 -0700 Fixed a out-dated comment. A comment was left incorrect in a previous checkin. Fixing it now to match with the code. Signed-off-by: Dmitry Torokhov commit 7b1715d5e6bb95fbeae0d6fbdac9041d86fecf14 Author: VMware, Inc <> Date: Fri Apr 12 12:49:37 2013 -0700 HGFS: we shouldn't allow-open on blank hostPaths for shares by default Any user can edit the VMX file and set any host path of a shared folder to the empty string. For cases where the host path is an empty string it will cause every host drive to be shared with the guest VM. This should not be allowed to occur by default in case a user mistakenly sets or maliciously sets the string to empty. It should only be allowed when a user is intending that behavior and understands the potential issues. To fix this I have added an additional VMX config file setting that a user would have to explicitly set to enable this feature and set a shared folder to an empty string. Signed-off-by: Dmitry Torokhov commit 1875efcc128cbea02431c6bc827a8a993278dd44 Author: VMware, Inc <> Date: Fri Apr 12 12:49:31 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. `Signed-off-by: Dmitry Torokhov commit 41c32496d54217caa07e83d1febb8f520d633a9a Author: VMware, Inc <> Date: Fri Apr 12 12:49:19 2013 -0700 x11 dndcp: tidy up some commentary Signed-off-by: Dmitry Torokhov commit b1f02e907e9ab01c4a2db6ceeb132bf3a0c2a79d Author: VMware, Inc <> Date: Fri Apr 12 12:48:49 2013 -0700 VMCI: switch to upstreamed Linux VMCI API for internal users, pt 2 Second part of the change to switch to the upstreamed API. This one tweaks the API for Linux only so that it matches exactly the one that is upstreamed. Signed-off-by: Dmitry Torokhov commit 0412b65892bd9b2f056db818f83d0b550f67acc5 Author: VMware, Inc <> Date: Fri Apr 12 12:48:34 2013 -0700 Use Haswell HLE in our mutex locks This change uses Haswell HLE in our mutex locks. HLE is Hardware Lock Elision, which are hints to the processor to start/end a hardware transaction. It is enabled via: lock acquire REPNZ 0xf2 lock release REPZ 0xf3 On machines without HLE, these prefixes are ignored by the hardware. Signed-off-by: Dmitry Torokhov commit 143d82c15d0cbe1dc8f166e7f89fe14a15def724 Author: VMware, Inc <> Date: Fri Apr 12 12:48:26 2013 -0700 Fix VMCISock_GetAFValue() for upstream vsocket testing The Tools driver exposes an IOCTL to get the address family, since it's not fixed. The upstream driver was given a fixed address family, so it doesn't need this IOCTL. But our tests (and other apps) still try to use the IOCTL, which causes them to fail with the upstream driver. Fix our header (the Tools version) so that it can cope with both. Note: not very performant, so best to cache the result if possible. The test suite common code already caches it. Signed-off-by: Dmitry Torokhov commit 173a48f49ca383c2b5cd2c66bb17c7060e35c52c Author: VMware, Inc <> Date: Fri Apr 12 12:48:21 2013 -0700 VMCI: introduce compat_mod_param_bool Signed-off-by: Dmitry Torokhov commit bcfe7202fb211b61bd2b39e655357840e6326423 Author: VMware, Inc <> Date: Fri Apr 12 12:48:13 2013 -0700 Fix VMCI_EVENT_VALID macro. When VMCI_EVENT_VALID_VMX was changed to accept the QP_PEER_ATTACH and QP_PEER_DETACH events this broke the regular non-VMX version. This wasn't caught because I didn't rebuild my guest VMCI driver when testing. Signed-off-by: Dmitry Torokhov commit 8ac7215506b1d506648e2c8e277c44ad5cd45f40 Author: VMware, Inc <> Date: Fri Apr 12 12:48:02 2013 -0700 HGFS: clean up server packet information duplication Each packet sets a bool in the HgfsPacket object to state whether the packet can be processed asynchronously by this transport. This data is not required and doesn't make sense to duplicate this for every packet received by the transport. The same information is sent to the HGFS server at connect time from the transport. This information is part of the transport characteristics and the server already makes use of some of these flags, e.g. shared memory support for some operation requests like change notification. Replace the packet bool with the correct transport characteristics flag check for asynchronous packet handling capabilities. Signed-off-by: Dmitry Torokhov commit a5bd518defb8eb91b9436e9622625519cb6705cc Author: VMware, Inc <> Date: Fri Apr 12 12:47:50 2013 -0700 Send QP ATTACH and DETACH events in the VMX. Emit attach and detach events when a queue pair peered with the hypervisor context ID is alloced or detached by the guest. Now that I understand these events better I have restored the validity checks and made the attach and detach events valid in the VMX. The QP resumed event is still not relevant in the VMX so the vsock layer should not subscribe to it. Signed-off-by: Dmitry Torokhov commit d727aa9656ce2b37f3ffa3e6b434cc5596ccc4c0 Author: VMware, Inc <> Date: Fri Apr 12 12:47:45 2013 -0700 OVT: disable compiling VMCI/VSOCK on kernels 3.9 and above Starting with 3.9 our VMCI and VSOCK modules are in mainline kernel so we do not need to compile them as out-of-tree ones. Signed-off-by: Dmitry Torokhov commit 48feaf7111bb2b9578b4e9726ed4004f957f8897 Author: VMware, Inc <> Date: Fri Apr 12 12:47:38 2013 -0700 HGFS: add new flags to Hgfs create session request The Hgfs create session request assumes currently that the only flags required are on a per request type basis. This is simply not true. There are some features that trancend many operations and will require a general per session flag to denote support. Two examples that immediately come to mind: oplocks and short name support. For oplocks the server is going to need to know ahead of any requests that the client is going to be using this feature if supported by the server. Furthermore, oplocks affect the whole operation of requests as far as the server is concerned. The server should handle requests asynchronously if oplocks are in play to prevent deadlock. Also, oplocks are taken out a file open time but can be broken by many other requests not just concurrent opens. Also for short name support for the host, these can occur not just with directory listings and enumeration but for the client opens too. Currently, the client must know if the server does support short names so that it does not try and look up the short name itself. Signed-off-by: Dmitry Torokhov commit 6c73dd8a49beff25912c9bd2ee7e2ecf419c24d4 Author: VMware, Inc <> Date: Fri Apr 12 12:47:27 2013 -0700 Link the VMCI socket common code into the VMX. Use the common VMCI socket driver code in the VMX to provide access to raw VMCI sockets. This functionality has some limitations, for example blocking calls are not possible because blocking a VMX thread can prevent the guest from making the necessary progress and cause deadlock. A new lock parameter has been added to VSockSocket_Socket to allow the caller to provide a lock for use by the socket. This is similar to the lock provided to AsyncSocket and allows an AsyncSocket and VSockSocket to share the same lock. VMCI_DatagramSend requires a needsLock parameter. This is currently hardcoded to FALSE in all cases. This may not be correct and needs to be analyzed. Signed-off-by: Dmitry Torokhov commit 4cf2759fe1f0da982e1198c42d9a6564aa91baad Author: VMware, Inc <> Date: Fri Apr 12 12:47:07 2013 -0700 HGFS: cleanup server request and header unpacking part III The complete request processing which processes just packing the Hgfs header for the completing request needs cleaning up. It can be simplified and more processing done in a common pack header reply routine for both legacy (old header) and new header with session enabled requests. Also the input params teardown should be moved into its own specialized routine to complement the init routine in Part II of this mini series. Signed-off-by: Dmitry Torokhov commit cfc245a776e68e420cf74eb2d4511574fb52dd88 Author: VMware, Inc <> Date: Fri Apr 12 12:47:00 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 86bbca27096d2ef68ddb6aabc0e9a1673b716012 Author: VMware, Inc <> Date: Fri Apr 12 12:46:52 2013 -0700 HGFS: cleanup server request and header unpacking part II After the first cleanup and extracting the header details by individual routines and now we have the session information and routines separated. 1) Cleanup the unpack params routine: - Make it just do the unpacking of the headers and validate the fields. - Make any bad header sizes or incorrect values of the header fiels untrusted data and we drop the packet by returning internal error. It makes no sense to try and reply if the data in the header is not valid. - Move the transport/server Hgfs packet handling, the session info and the input params back to the hgfs server main file into a parent function of the unpack params. The new parent function HgfsServerGetRequest is called from the server receive message routine now instead. - Make the input request handling variables const as the input data is not modified. 2) Cleanup the processing a little more in the new HgfsServerGetRequest function by doing the can fail processing first: Hgfs Packet, and unpack packet params first. If we have valid data, determine the session and then allocate and set the input params. Saves a potential processing with the input params not initialized to anything but zero. 3) Remove the useless and duplicated function HgfsValidatePacket. 4) Move HgfsPackReplyHeaderV4 function declaration to the correct header file. Signed-off-by: Dmitry Torokhov commit 043f35a2c8eb9c186fceb61c1d9483a0aa6f145a Author: VMware, Inc <> Date: Fri Apr 12 12:46:43 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit b84f1e9b1d5045d563f1a986fd6d824247c0b240 Author: VMware, Inc <> Date: Fri Apr 12 12:46:23 2013 -0700 Internal branch sync. Included in this change: . lib/file: cap the max supported file size . use special call instead of slower statfs to get FS type; . product version changes . a small cleanup in DnD code . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 5549bf0b4fba47534d530b5473e9b10c08585546 Author: VMware, Inc <> Date: Fri Apr 12 12:46:00 2013 -0700 VSOCK: assign a new resource ID for hypervisor stream sockets. The resouce ID used for VMCI Socket control packets (0) is already used for the VMCI_GET_CONTEXT_ID hypercall so a new RID (15) must be used when the guest sends these datagrams to the hypervisor. This resource ID replaces VMCI_RPC_PRIVILEGED which is unused in shipping products. VMCI_RPC_UNPRIVILEGED is also removed. This change also enables VMCI Socket communication to the hypervisor by removing CID 0 from internal blacklists. Signed-off-by: Dmitry Torokhov commit a9b37628815a4749726b6b74bbdfd74fb19b777d Author: VMware, Inc <> Date: Fri Apr 12 12:45:49 2013 -0700 HGFS: cleanup server request and header unpacking part I The Hgfs server HgfsParseRequest routine to unpack packet header and validation is somewhat tangled and convoluted. This attempts to clean that up and make way for checking for the header flags if available and any other information that maybe passed from the client on a per request basis in the future. The changes include: - rename the HgfsParseRequest to HgfsUnpackPacketParams which is more correct and consistent with the naming scheme for HGFS unmarshalling of arguments. - Split out the unpacking of the different protocol versions of header and packet details into their respective subroutines thus simplifying the main routine itself. - Split out the HGFS session lookup and/or creation that occurs as part of this routine into a subroutine call. This cleans up some ordering issues of packet validation and data extraction from that packet. It helps clean up some of the session lookup which should be handled separately from this function which is server specific and not protocol packet definition. A later change set to deal with that. Signed-off-by: Dmitry Torokhov commit 41a8260565ab06655817b1f082c951f343036b42 Author: VMware, Inc <> Date: Fri Apr 12 12:45:41 2013 -0700 VMCI: Remove Guest vPageChannel v1 Followup from the previous change, which removed the v1 page channel from the VMK module. This part removes it from the guest driver. Signed-off-by: Dmitry Torokhov commit 0f591379ba1b81eabc35cfc28c68e09de1d77989 Author: VMware, Inc <> Date: Fri Apr 12 12:45:17 2013 -0700 VMCI/VSOCK: Pt1. Switch to upstreamed Linux API This is the first part of a change to switch to the upstreamed Linux API. This change just flips the API names to match the upstreamed versions. A subsequent change will take care of fixing up the parameters (we removed/changed some for upstreaming). This change updates: VMCI, vSockets, the VMCI kernel lib on Windows, the VMCI test driver, HGFS, dvFilter and vPageChannel. It does NOT affect the user-mode VMCI API: there's no point, and it'd be a waste of time changing all the tests. Signed-off-by: Dmitry Torokhov commit caf7b0270632ee0ceabe0b1fe181a712c458b679 Author: VMware, Inc <> Date: Fri Apr 12 12:44:46 2013 -0700 Internal branch sync. Included in this change: . lib/lock: improve some diagnostic messages . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 9709d6784b101c42ba7568d3d2c7e94d05907d5f Author: VMware, Inc <> Date: Fri Apr 12 12:44:23 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit ed4f677b599756dd0ef52214308085bca31df9ba Author: VMware, Inc <> Date: Fri Apr 12 12:44:18 2013 -0700 HGFS: fix up the Hgfs header flags and information fields Currently, the Hgfs server just blindly sets the header information field to the host platform's internal error value. This isn't very handy as it will involve determining whether it is Posix or Win32. Then mapping accordingly to the Windows client or Linux client internal kernel error values. It would be more suited to being used in conjunction with a flag to state what the field contains, so that it can be used for multiple things if required - albeit not simultaneously. This would also allow the client to know that the field is really valid, and not some host specific error value which is currently set. Also, since the clients only require one or two host error extended information, it probably is simpler to define a crossplatform value for that new error value and have the clients map it as they already do for the existing crossplatform errors. Also there was a flag for the flags field defined but never used. So it is being thrown away and redefined. The flag was previously defined to be a notification bug was intended to be more generic meaning host server initiated request and not a reply to a client initiated request. Fixed this. Signed-off-by: Dmitry Torokhov commit 82bd355d001e7417d932221faa23c4d4193db44d Author: VMware, Inc <> Date: Fri Apr 12 12:44:00 2013 -0700 HGFS: fix some server memory leaks. The platform scandir allocates a directory name but did not free before exit. Hgfs search open fails to free the directory baseDir created from the remote name. Hgfs create directory fails to free the directory baseDir created from the remote name. Signed-off-by: Dmitry Torokhov commit 3cdd4ebc8c63522c4b147f1127eec1afcab9ac30 Author: VMware, Inc <> Date: Fri Apr 12 12:43:53 2013 -0700 HGFS: cleanup of server request packets handlers, part III Pushing the const usage further along the call chain now into the platform specific handlers. Signed-off-by: Dmitry Torokhov commit 4207ec473e9eeb3c40f19b7ff540ead4f7cfb732 Author: VMware, Inc <> Date: Fri Apr 12 12:43:46 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 5216e264e6df11205fd99f2220b285fc3d5521ca Author: VMware, Inc <> Date: Fri Apr 12 12:43:32 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 6728aeab880482a8d9a0b8f0b9617f21aaa30216 Author: VMware, Inc <> Date: Fri Apr 12 12:43:13 2013 -0700 HGFS: Cleanup of server request packets handlers, part II Propagate the treatment of the input request data as constant. This means finish off the cpName usage to use const. Remove casts and make the open and directory info data structures use const too. Corrected the name of HgfsServerGetShareInfo to be more meaningful to what it really is doing, since the input name argument type to be const which is how it was used. Made the function static and removed the declaration from the header file. Signed-off-by: Dmitry Torokhov commit 11d5db54b7fe59c240de0a98bca8cad2dc5ade2d Author: VMware, Inc <> Date: Fri Apr 12 12:43:05 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4def911285504976d9c7bd0ae739fb90b2390d2e Author: VMware, Inc <> Date: Fri Apr 12 12:42:57 2013 -0700 HGFS: Fix performance issues for Linux client Revalidation of a file's attributes occurs way too often. Unfortunately the fix revolves around the host ID for the file in question which is incorrectly retrieved from Windows HGFS server. This results in the file ID for the file always being zero. Hence, it is repeatedly revalidated by getting the file attributes from the server. The file ID is never updated and set due to the wrong flag being tested. The file ID is always retrieved using the same common utility routine and so all the places that get a file or folders attributes use it. Hence, checking in the one place fixes about 4 different call sites - root dirent, regular dirent and files. Signed-off-by: Dmitry Torokhov commit bbac629bbdf66c652262c284952ad792c4b0b481 Author: VMware, Inc <> Date: Fri Apr 12 12:42:48 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit b82979b27012d26dc649c2089a19bcae7c216450 Author: VMware, Inc <> Date: Fri Apr 12 12:42:38 2013 -0700 HGFS: start cleanup of packet handlers and add oplock break acknowledge When the client receives a oplock break request from the HGFS server it must reply to the Hgfs server with an oplock break acknowledge or close the handle. The oplock break acknowlege reply is now defined more completely and it now has a packet handler. The packet handlers now stop overriding the input packet const and really do treat it as read only. This involved adding const to the request packet handlers for the unpacking of client requests. This is only the first part of dealing with this issue. There was some minor spillage into the HgfsServer mainline code, which will be additionally cleaned up later. Further changes will also include the platform specific request handlers too. This now means that the server will not modify the incoming request data and should be less prone to accidental overwrites, and also better document the fact that the file names returned are in fact, just pointers into the incoming packet and not duplicated strings. Hence, the mainline code does not attempt to free any of the cross-platform names that are extracted from incoming requests. Signed-off-by: Dmitry Torokhov commit aad82517fe6a5442c4b90b6e99d0c53cdbe81fce Author: VMware, Inc <> Date: Fri Apr 12 12:42:23 2013 -0700 One copy of lib/err globals It looks like we have multiple copies of errNumTable but only one errStrTable. Each new copy of errNumTable comes for each library that includes lib/err. Since errStrTable is not declared static, only one exists between all shared libraries. This change makes both errNumTable and errPtrTable non-static as well. The intention is that we'll have only one copy of the errno accounting across the entire binary. Generally sharing globals across a bunch of libraries sounds dangerous, but in this case it's an atomic hashtable so it works. Signed-off-by: Dmitry Torokhov commit 1ce846e92121549a7984ee25b207c2d9d18c6884 Author: VMware, Inc <> Date: Fri Apr 12 12:42:18 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 8a03d067cd508ea94fbcacf2def0e06fa0cc5d08 Author: VMware, Inc <> Date: Fri Apr 12 12:42:02 2013 -0700 Fix an overflow on 32bits windows balloon driver. On 32bits windows with PAE, the PPN_2_PA macro could overflow since a PPN is represented by a 32bits integer. This could lead to memory corruption since the ballooned page would be truncated ones. Signed-off-by: Dmitry Torokhov commit a4fc71ba12def509c756771b6692ca40b7084784 Author: VMware, Inc <> Date: Fri Apr 12 12:41:55 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit adb1fdebf76b5eac03f80b5146ac93e15808d044 Author: VMware, Inc <> Date: Fri Apr 12 12:41:43 2013 -0700 HGFS: Split out the hgfs parameters stuff into a separate header file Cleaning out the hgfsServerInt.h so we can modularize the stuff and reduce the dependency to be all on a single header file. This change simply moves the packing and unpacking of the HGFS request and reply exports into a separate header matching the code file. Signed-off-by: Dmitry Torokhov commit 31b71389cf67efc5ec3249771d894a836162dde9 Author: VMware, Inc <> Date: Fri Apr 12 12:41:36 2013 -0700 HGFS: add a vmx config setting for oplocks Added the vmx configuration setting for enabling or disabling the oplock feature in the HGFS server. I have currently set this to default to disabled. When the code gets to a sufficiently implemented and well tested point it will default to enabled. Signed-off-by: Dmitry Torokhov commit bdc6df3a7ab2be4f9134cf42c391349da9c50962 Author: VMware, Inc <> Date: Fri Apr 12 12:41:22 2013 -0700 Clean up the compat_vmtruncate As of kernel 3.8 the vmtruncate call was removed. Also it should be noted that tools for kernels prior to 2.6.9 have been frozen. Therefore, the compat_vmtruncate macro is now only defined for tools for kernels 2.6.9 and upto and including kernel 3.7. It is not expected to be used by any tools on kernel 3.8 and newer and if so they should use the memory manager calls directly that vmtruncate called. Signed-off-by: Dmitry Torokhov commit 40bce13f621285dd287922f4d4e7a2b911f56f0d Author: VMware, Inc <> Date: Fri Apr 12 12:41:16 2013 -0700 HGFS: make Linux client build on 3.8 kernels The vmtruncate system call was removed from the kernel in 3.8. This addresses that by making the call to the suggested system API instead. Fixed up HgfsPermission function which was generating some compiler warnings. Signed-off-by: Dmitry Torokhov commit 400e82b8a3a6022ed07eac57a3faba4fa32b4f72 Author: VMware, Inc <> Date: Fri Apr 12 12:41:07 2013 -0700 Get rid of ALLWIN_EXCEPT9XAND2000 This change gets rid of ALLWIN_EXCEPT9XAND2000 because this kind of definitions are hard to maintain, and so are bugs waiting to happen. Signed-off-by: Dmitry Torokhov commit c0f011f570caf7b49810ec68b3749702df9d0750 Author: VMware, Inc <> Date: Fri Apr 12 12:40:50 2013 -0700 Bump Tools version to 9.2.3 for WS9.0.2. Signed-off-by: Dmitry Torokhov commit 69ee5288f42650a1ccedcb37431bdfdc50fb8dda Author: VMware, Inc <> Date: Fri Apr 12 12:40:39 2013 -0700 HGFS: add the oplock break protocol request packet handler in the server When the HGFS server receives an oplock break from the file system callback it will send the HGFS protocol oplock break request on to the client to handle and send back an acknowledge. This code just adds the packet handling for the protocol oplock break request to the HGFS server. Since oplocks are not yet enabled this code is not yet used but will be with subsequent changes. Signed-off-by: Dmitry Torokhov commit e49e2059c803553373467b07dd4ddb5e2682550d Author: VMware, Inc <> Date: Fri Apr 12 12:40:27 2013 -0700 Internal branch sync. Included in this change: . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 02773db62a8cc44c2f6899276278412eaeb664b6 Author: VMware, Inc <> Date: Fri Apr 12 12:40:09 2013 -0700 Fix soft suspend problem when NetworkManager down Soft suspend will let tools run /etc/vmware-tools/scripts/vmware/network, if NetworkManager is down, the script will error out and fail the suspend operation. Signed-off-by: Dmitry Torokhov commit 10b5ddeefa2b82e86694b642f7781736e95947af Author: VMware, Inc <> Date: Fri Apr 12 12:40:02 2013 -0700 HGFS: Improve the Windows server directory reads The current implementation of the HGFS server directory read handling is not efficient and results in lots of system calls for each entry returned in the list. This will result in poor performance and in particular breaking open oplocks. Both of these are unnecessary if we use the Windows native API. So first instead of using the DirectoryEntry structure that makes no sense for Windows and only filling in the name from each Win32 FindFirst, FindNext call, we now use the same structure as the native API. Secondly, using the native API we make one call with a sufficiently large buffer to read a large number of entries per system call not just one at a time. Finally, the native API returns all the required information for any record returned to the client so we don't have to iterate through the entire list and do a GetFileAttributes on each. (Hence, no open and query, close - which will break any open oplocks.) Also now we get the directory entry record filled at the search open call when we scan the folder and get all the entries. Previously, this was only the name and the GetFileAttributes was returned for each at the search read time. This change is also done for the virtual folders e.g. the shares under "\\vmware-host\Shared Folders" and for any share where the host path is set to empty thus showing the UNC and DRIVE virtual folders. Signed-off-by: Dmitry Torokhov commit c159c211f210973a8ceb47cf5c01b3680b9f8466 Author: VMware, Inc <> Date: Fri Apr 12 12:39:40 2013 -0700 Internal branch sync. Included in this change: . add some more product versions . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 67c67ae93c50e7a4de22af3b5e635740c9c0b385 Author: VMware, Inc <> Date: Fri Apr 12 12:39:27 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit f8b53c3b4e013c29bb6718b0355a2520197aede6 Author: VMware, Inc <> Date: Fri Apr 12 12:39:20 2013 -0700 Remove __devblah from Linux drivers GregKH recently pulled __devblah() from 3.8-rc3, which means our drivers are now breaking. Since it's useless anyway, and always has been, just yank it completely. Signed-off-by: Dmitry Torokhov commit 9453a4dce427bca6003d15caab871e1b608df1a9 Author: VMware, Inc <> Date: Fri Apr 12 12:39:12 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit bb81c4b9c1e8e905679aad89e5745ef53bd49c05 Author: VMware, Inc <> Date: Fri Apr 12 12:39:05 2013 -0700 Remove keep alive timer on vmbackup error If an error occurs in VmBackupStartCommon, the keepAlive timer is not stopped. This can lead to a crash when the timer callback runs after gBackupState is NULL. Signed-off-by: Dmitry Torokhov commit 3097a09ec1c461ab247e705c78f219981d71a036 Author: VMware, Inc <> Date: Fri Apr 12 12:38:59 2013 -0700 Make Str_Snprintf_C_locale work again It looks like previous change has broken the C_locale friendly print function, namely it changes things back to using the localeconv() table. This seems to have been done in the name of making android work, however, it breaks our ability to correctly generate shaders on systems when the locale uses "," to denote a decimal point. This change reverts that bit of behaviour so that the bsd_vsnprintf function uses the provided decimal point unless we're on android. Signed-off-by: Dmitry Torokhov commit 10b8aecc4b482191efc02c911c444cee77559674 Author: VMware, Inc <> Date: Fri Apr 12 12:38:47 2013 -0700 Add some more INtel CPU definitions Intel has released a new SDM. The shadow VMCS is no longer a secret. Family 6 Model 3E has been declared an Ivy Bridge. FCS/FDS deprecation has been revealed. Virtualization exceptions have been introduced. Signed-off-by: Dmitry Torokhov commit 219e11dc5bdf156870f277f110eab4eb8d4c26d4 Author: VMware, Inc <> Date: Fri Apr 12 12:38:38 2013 -0700 HGFS: Server oplock code cleanup part I Move the oplock code into its own header files and out from the general dumping ground of usual headers. Split the public and private oplock functions into public oplock API header and a private API header file. Move the private oplock defines and data structures into the private header file. Signed-off-by: Dmitry Torokhov commit 05b9946ef5ba8933e777c7998d908b8ea659540e Author: VMware, Inc <> Date: Fri Apr 12 12:38:19 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit dba34ce4cc62c85e2fef9c7a7d3529af82082964 Author: VMware, Inc <> Date: Fri Apr 12 12:38:13 2013 -0700 Enable batched ballooning for linux and windows guest. Enough testing has been done to enable it by default. Signed-off-by: Dmitry Torokhov commit b168b8afa9efcd643fe0cf6a064c5bdffbad7fa5 Author: VMware, Inc <> Date: Fri Apr 12 12:38:06 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 3e37450e02b5f43153c43dc48ef85c7c584262c9 Author: VMware, Inc <> Date: Fri Apr 12 12:37:49 2013 -0700 HGFS: session creation server cleanup for channel characteristics The HGFS server now returns the correct packet size for the session protocol reply for the transport in use. This previously was always the VMCI setting. Now we need to allow the clients to differentiate the setting is valid for the transport and is not hardcoded to VMCI. In order to achieve this, the 64 bit reserved field is split into two 32 bit fields: flags and reserved. New clients will be able to detect if the server is using just a hard coded value or has indeed set it per transport characteristics. Older existing clients just ignore the packet size field. Made the session bool for change notification into a flag which is also returned to the client. This is an additional check that can be made that the server supports change notification other than are the individual HGFS opcode requests being supported. Fixed an issue that prevents an errant client sending remove watch opcodes to the server from being processed when notification is not active. Signed-off-by: Dmitry Torokhov commit 156e6829d8fe9455ce9a5deb48959975275b0c3a Author: VMware, Inc <> Date: Fri Apr 12 12:37:35 2013 -0700 Internal branch sync. Included in this change: . add utility function to retrieve IOPL on Linux and Windows . disambiguate HashTable types so GDB is less confused . DnD - don't use Hostinfo_GetTimeOfDay for timeouts Signed-off-by: Dmitry Torokhov commit b04809b5e14b7139976c8b42feb69d2e7e1ae1da Author: VMware, Inc <> Date: Fri Apr 12 12:37:24 2013 -0700 HGFS: Fix server channel characteristics for HGFS sessions Currently the HGFS session had hardcoded constants specific to VMCI set in the HGFS session object and which is returned to the client on a HGFS create session protocol request. The constant was not used by any client that was released but will be in the future releases. The HGFS session also can be used with the backdoor channel too, so this first change is to move the constant (maximum packet size) from the HGFS server into the channel specific code which passes it to the HGFS server on a connect call. The HGFS server connect call will create the HGFS server transport session object which will be used when creating the HGFS session object. Later changes will deal with the backward compatibility issues by updating the HGFS session protocol request to allow newer clients that use the session field for maximum packet size to determine the version of the server and correctness of the session reply field. Signed-off-by: Dmitry Torokhov commit 2911a7ee8ea739fd73e81595113d8f99a64c8de0 Author: VMware, Inc <> Date: Fri Apr 12 12:37:04 2013 -0700 Merge the monitor and userland tracking of in-panic state. We should not have a separate state for being "in panic" between monitor and userland. Let's make MX be the authoritative source. MXUser still needs a static variable to track whether we are in panic before MX state is initialized. Signed-off-by: Dmitry Torokhov commit 1d1ccf631cbc1bb357dfb1236d044c2bc3db4020 Author: VMware, Inc <> Date: Fri Apr 12 12:36:50 2013 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 999675872144d9c8f1850aba36871406105c3896 Author: VMware, Inc <> Date: Fri Apr 12 12:36:41 2013 -0700 Log the command line arguments for vmtoolsd. Added a debug log message for vmtoolsd command line arguments for better debugging. Signed-off-by: Dmitry Torokhov commit a363583074c9d561ac7e6bc240d5da82705fabd5 Author: VMware, Inc <> Date: Fri Apr 12 12:36:25 2013 -0700 Internal branch sync. Included in this change: . lib/file, lib/misc: improve readlink handling . added a kill switch for hashed shared secret in VIX Signed-off-by: Dmitry Torokhov commit 63be9626897c801ccafee8367e15d7ac1e1c4b6f Author: VMware, Inc <> Date: Thu Dec 27 13:02:10 2012 -0800 Updating open-vm-tools version for release 2012.12.26-958366. Signed-off-by: Dmitry Torokhov commit 530ef7f26ed041ab1b6655f2cdc79f3af97fc50b Author: VMware, Inc <> Date: Thu Dec 27 11:51:12 2012 -0800 OVT: do not build vmblock on Linux kernels 3.0+ The driver fails to build on newer kernels and we recommend using the FUSE-based solution (Vmware Tools use vmblock-fuse on kernels starting with 2.6.32), so let's stop building it. Signed-off-by: Dmitry Torokhov commit 54780b805622191bb1d8d270cac0e3d15883e1a9 Author: VMware, Inc <> Date: Thu Dec 27 11:51:02 2012 -0800 Debian guys want to play with FreeBSD kernels and Linux userland, let's recognize such systems when configuring. This change was contributed to OVT by Robin Elfrink. Signed-off-by: Dmitry Torokhov commit 3fd89fa76b058b58356a32d045e7575a5ad69a4a Author: VMware, Inc <> Date: Wed Dec 26 13:26:12 2012 -0800 HGFS: Cleanup the directory entry code to be really platform specific - part V Moving the platform dependent definitions to the platform specific files. They should be private types to each platform so each can define and use them as efficiently as makes sense for that platform. Now moving the structure types to the platform only code. Only a forward declaration is now public. Signed-off-by: Dmitry Torokhov commit 0a3f5e5669309b9b1c2f82bb4564c4a3e1be57f3 Author: VMware, Inc <> Date: Wed Dec 26 13:26:06 2012 -0800 HGFS: Posix server fix an incorrect size passed for name conversion The directory read records may contain directory entries with names that are of UTF8 form D and are converted to form C which the clients will expect (e.g. Windows). The name and size passed was assumed to be the whole name field of the directory entry structure. However, the record length is the value of the valid data in that record which can be a lot less than the total size of the name field. The copied records only have the requisite record valid data size allocated and not the whole complete structure. This should at least optimize that call and stop any possibility of the conversion routine going beyond the valid record. Signed-off-by: Dmitry Torokhov commit 231d310c28d10e3945c07f01ac186a88c1acae68 Author: VMware, Inc <> Date: Wed Dec 26 13:25:56 2012 -0800 Internal branch sync. Included in this change: . VMCI: Fix warnings when compiling with kernel 3.4 . lib/file: formatting fixes . Add a toggleStartUI RPC and an associated capability to Tools Signed-off-by: Dmitry Torokhov commit 665b714a1f35c2e55b67418c8e6b7f513cb01e8b Author: VMware, Inc <> Date: Wed Dec 26 13:25:33 2012 -0800 HGFS: Cleanup the directory entry code to be really platform specific - part IV Migrate over the remainining directory entry usage in the platform independent code over to the platform specific code. The remaining use is the debug only dump dents function. Signed-off-by: Dmitry Torokhov commit 9adbef2196b1532f7a3e4fd4521976fa6f6b927c Author: VMware, Inc <> Date: Wed Dec 26 13:25:20 2012 -0800 HGFS: Improve efficiency of volume queries on a virtual folder For some virtual folders like the one that contains all the shares, volume query size information necessitates an enumeration of all the shares. This allows the query to determine which particular volume information to return, since the shares can reside on many different volumes on the host. The algorithm will pick that largest or the smallest volume size to return depending on the configuration settings. When enumerating the logic currently gets and removes the first entry from shares list. This results in the table of shares being shuffled up for each removal. If there are a lot of shares this results in a lot of memmove calls and the larger the table the more memory is moved each time. Since the list of entries are stored in an array, it would be simpler to just remove the last entry each time not the first. The order of the enumeration is irrelevant. Signed-off-by: Dmitry Torokhov commit 8d50b646fa84749161ac6e7bb957d92514162bdd Author: VMware, Inc <> Date: Wed Dec 26 13:25:05 2012 -0800 Bump up the tools version for OP beta 1. Its time to bump up the tools version for OP Beta. Bumped up the tools version in vm_tools_version.h file. In the past, we have done this process for every milestone in the ESX Release cycle. Current plan: - Tools Version for OP Beta 1 : 9.3.1 - Tools Version for OP RC 1 : 9.3.2 - Tools Version for OP RTM : 9.4.0 Signed-off-by: Dmitry Torokhov commit db3f74e1b07dea7cb821b684fb072f8e7c3a8787 Author: VMware, Inc <> Date: Wed Dec 26 13:24:51 2012 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit a744a04a25ebd4408c8bbc915183c50171d9fb95 Author: VMware, Inc <> Date: Wed Dec 26 13:24:44 2012 -0800 Get rid of ALLOS_EXCEPTDARWINANDVMKERNEL Petr noted that maintaining ALLOS_EXCEPTDARWINANDVMKERNEL is a bug waiting to happen. Since it's only used in one place, we can set the value for ALLOS and then reset it to the default for DARWIN and VMKERNEL. Signed-off-by: Dmitry Torokhov commit 64e31066b0e2fb63f7e18807fcababf80fcf12dc Author: VMware, Inc <> Date: Wed Dec 26 13:24:23 2012 -0800 lib/string: remove nasty old stack peeking There is nasty old stack peeking code in lib/string. Remove it. The Panic code will capture the stack and parameters for debugging so simply removing the code looks fine. Signed-off-by: Dmitry Torokhov commit 02d93d534fc2f2602dd8d1ddfa11c92d5d0bce16 Author: VMware, Inc <> Date: Wed Dec 26 13:23:58 2012 -0800 Add guest OS definitions for Linux 3.X Originally I thought we could do this by aliasing Linux 3.x to Linux 2.6.x, but that only works inbound. Once the guest is identified and aliased to 2.6.x, outbound messages and buttons will incorrectly identify the guest as 2.6.x instead of 3.x, which is sloppy and will be confusing to customers. Instead, this change adds gos table entries for Linux 3.x, which uses the last two (of 64 max) entries in the table. Signed-off-by: Dmitry Torokhov commit 38488f1007cf486b85c05947542bf21a8d849c06 Author: VMware, Inc <> Date: Wed Dec 26 13:23:50 2012 -0800 HGFS: Cleanup the directory entry code to be really platform specific - part III Hgfs query volume handler code for iterating through the virtual folders to determine the correct volume size and space information to return to the client was moved to platform specific functions. Signed-off-by: Dmitry Torokhov commit 8adaba120ab40d160b5a5a027c8826c106ca845a Author: VMware, Inc <> Date: Wed Dec 26 13:23:23 2012 -0800 HGFS: Move server vmx configurable settings to the vmx Read the configurable settings for the HGFS server to the vmx only code and push them across to the HGFS server at init. This removes the needless ifdefs for tools builds which will just push the default values at init. Signed-off-by: Dmitry Torokhov commit 1f022c3f1041d27f758e4ad84062337aff14e2d9 Author: VMware, Inc <> Date: Wed Dec 26 13:23:16 2012 -0800 Internal branch sync. Included in this change: . fix potential buffer overflow in CodeSetGetModulePath() . handle link size growing between lstat and readlink in FileDeletion() Signed-off-by: Dmitry Torokhov commit 4b8805aa2cef59a157edbbb54b60377df3f0d9a2 Author: VMware, Inc <> Date: Wed Dec 26 13:23:01 2012 -0800 HGFS: Cleanup the directory entry code to be really platform specific - part II The directory entry work is very inefficient and will cause oplock issues. For Windows platforms the directory reads will change and thus the assumptions about the platform specific DirectoryEntry structure will not hold true. Therefore, the DirectoryEntry code is moving to the platform specific files and will allow the code to have complete control over the structure and contents. Initially, there will be some duplication of code but that will change in later work. There is already bugs with this code and places where ifdefs are added for platform specific cases not handled by some platforms. These should not be in platform independent code. The volume query is also broken and misses some of the Windows platform specific cases completely which should be handled and will be in the Windows only code. (Again, later change sets.) For now, this just simply moves two routines out of the common code into the platform specific code. The routines have some minimal cleanup to remove the ifdefs or remove the ifdefs and code not required for each of the platforms. More changes to follow for moving the volume query handler code and adding the missing virtual folder cases in Windows. Signed-off-by: Dmitry Torokhov commit 31fa1a3fc1db7d6db2373da3dc84e516a873f26d Author: VMware, Inc <> Date: Wed Dec 26 13:22:47 2012 -0800 Ignore preceding and trailing double quotes from log file path. A log file path could be specified within double quotes. As double quotes are handled in different ways by different file systems, we ignore all the preceding and trailing double quotes to simplify the specification for the log file path value. Signed-off-by: Dmitry Torokhov commit af327d008d0dd19ff192a060d302c50f706c62a8 Author: VMware, Inc <> Date: Wed Dec 26 13:22:08 2012 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 071c9ca91332cfd0da580247f69c5bc216f284d4 Author: VMware, Inc <> Date: Wed Dec 26 13:21:57 2012 -0800 Internal branch sync. Included in this change: . VSOCK: strip SOCK_SEQPACKET from the VMX/installer . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 791fe79b323f55fd01412021e5e81e8d72c113ff Author: VMware, Inc <> Date: Wed Dec 26 13:21:31 2012 -0800 Linux kernel modules: remove pre 2.3.11 cruft from pgtbl.h The cutoff for the non-legacy drivers in 2.6.9 so we do not need compat definitions for older kernels. Signed-off-by: Dmitry Torokhov commit 46d085d88503441e453492e8da4a9889f3e0eda5 Author: VMware, Inc <> Date: Wed Dec 26 13:21:41 2012 -0800 HGFS: Fix server directory notification stubs The stubs file is compiled for multiple platforms and should be crossplatform. Therefore using EINVAL as an error return is not correct. It should use the HGFS crossplatform error values explicitly. Signed-off-by: Dmitry Torokhov commit 54d2fb92f4d6ff41925bdcd2d01549e6c0cf7510 Author: VMware, Inc <> Date: Wed Dec 26 13:21:22 2012 -0800 HGFS: Cleanup the directory entry code to be really platform specific - part I The directory entry work is very inefficient and will cause oplock issues. For Windows platforms the directory reads will change and thus the assumptions about the platform specific DirectoryEntry structure will not hold true. Therefore, the DirectoryEntry code is moving to the platform specific files and will allow the code to have complete control over the structure and contents. Initially, there will be some duplication of code but that will change in later work. There is already bugs with this code and places where ifdefs are added for platform specific cases not handled by some platforms. These should not be in platform independent code. The volume query is also broken and misses some of the Windows platform specific cases completely which should be handled and will be in the Windows only code. (Again, later change sets.) For now, this just simply moves a routine out of the common code into the platform specific code. More changes to follow. Signed-off-by: Dmitry Torokhov commit 149a6514de9945e92d32e2be1c2a38ad277f931e Author: VMware, Inc <> Date: Wed Dec 26 13:21:16 2012 -0800 Clean up vm_version.h includes Signed-off-by: Dmitry Torokhov commit 2862cb78c1617d5709e683b7009a66e8570dfb24 Author: VMware, Inc <> Date: Wed Dec 26 13:20:54 2012 -0800 Internal branch sync. Included in this change: . fix crash in File_GetVMFSMountInfo() . fix crash in File_GetMountInfo with NFS4.1 . lib/file: restore atomic file updates on ESX NFS for descriptor writes . VMCI/VSOCK: find the context ID of a running VM given a UUID Signed-off-by: Dmitry Torokhov commit 5d434ecaf223ff0de7061b2e1ffae42b4c3a6284 Author: VMware, Inc <> Date: Wed Dec 26 13:20:31 2012 -0800 HGFS: Fix Windows server virtual folders For the UNC or DRIVE virtual folders enabled by setting the share's host path to an empty string, currently are not quite handled correctly. The shares with empty host names are listed in their Shared Folders virtual folder but have incorrect attriubtes. This is because the shares host paths are passed to the real get attributes function which fails when the path is an empty string. These entries should be defaulted to the HGFS virtual folder attributes. Signed-off-by: Dmitry Torokhov commit 8c2471ae33a1a1568204286befe4f5081f5e84c6 Author: VMware, Inc <> Date: Wed Dec 26 13:20:02 2012 -0800 Internal branch sync. Included in this change: . lib/file: Check for ENOTTY when IOCTLCMD_VMFS_SWAP_FILES fails . lib/file: Allow retrieving max supported file size Signed-off-by: Dmitry Torokhov commit ae0cd8d06e64a4d33a3921f3b298b73dcf6c6e9c Author: VMware, Inc <> Date: Wed Dec 26 13:19:44 2012 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit a095d3b48c072716d4a60e64efcd9240a4224717 Author: VMware, Inc <> Date: Wed Dec 26 13:19:38 2012 -0800 HGFS: Clean up Server scan virtual dir Make the common Hgfs server scan virtual directory routine consistent with the platform specific scan real directory routine. Signed-off-by: Dmitry Torokhov commit 7738ae187d857b8608bea385497e1b0617c2b402 Author: VMware, Inc <> Date: Wed Dec 26 13:19:28 2012 -0800 Fix Solaris image copy-paste Link vmtoolsd w/ -shared-libgcc, reenable plugin code. So, even though we had wrapped calls with proper try/catch blocks, exceptions thrown from gdkmm weren't being caught. This caused vmtoolsd crashes whenever a user entered a VM with image data on the clipboard. We worked around this in WS 9.0.1 by disabling image copy-paste in Solaris guests. Here's the problem w/ exceptions: • We're compiling using the GCC runtime. GNU libstdc++ relies on _Unwind_RaiseException and friends from libgcc_s.so.1. • When run on Solaris 11, the runtime linker is binding _Unwind_RaiseException to the version in /lib/64/libc.so.1. 0xfffffd7fff3b0e82 in elf_rtbndr () from /lib/amd64/ld.so.1 0xfffffd7fff28a250 in _Unwind_RaiseException () from /lib/64/libc.so.1 That looks startlingly similar to http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00791.html. Recompiling the host application using -shared-libgcc makes this go away. One last thing: So, the above change lets us catch exceptions from libgdkmm. Cool. Problem then is that the exception's type wouldn't match any of our exception handlers, because with all type declarations being hidden, libdndcp.so and libgdkmm-2.4.so had two different type definitions for Gdk::PixbufLoaderError. Lame. This is fixed by using GCC visibility pragmas when including gtkmm headers. (See http://gcc.gnu.org/wiki/Visibility#Problems_with_C.2B-.2B-_exceptions_.28please_read.21.29 for details.) Bonus: dndcp.make includes a directive to explicitly link against libgcc_s, but only on Linux. This _may_ already be implied by linking against libstdc++, but to play it safe, we'll instead use the '-shared-libgcc' link option here, too. Signed-off-by: Dmitry Torokhov commit c6a3e980fc801c879ca1907aef6cde6334424481 Author: VMware, Inc <> Date: Wed Dec 26 13:19:21 2012 -0800 Fix the HGFS server handle lookup failure cases When the HGFS server was passed a stale handle which caused an error, the wrong error code was returned. An internal error was previously returned to the client, which makes no sense, when instead the server could and should have returned invalid handle error. Signed-off-by: Dmitry Torokhov commit 76ae578cbc067ecf6016bfc25c093f2fc0e1c561 Author: VMware, Inc <> Date: Wed Dec 26 13:19:11 2012 -0800 Update NEWS/ChangeLog for open-vm-tools 2012.10.14. Signed-off-by: Dmitry Torokhov commit 6ee511737ec2c74223bcaf61ea22af65b38d8813 Author: VMware, Inc <> Date: Wed Dec 26 13:19:07 2012 -0800 OVT: stop building vmsync driver on kernels above 3.0.0 On newer kernels vmbackup plugin will use FIFREEZE/FITHAW ioctls to quiesce filesystems so vmsync is not needed and given that it does not even build on 3.6 it is easier to simply disable it. Signed-off-by: Dmitry Torokhov commit 418d24b66c5cef4b43ed751328c396f4f6fc0a16 Author: VMware, Inc <> Date: Wed Dec 26 13:19:02 2012 -0800 vixCommands.h does not need to include vm_version.h Signed-off-by: Dmitry Torokhov commit e6f5213ca52dc2fe9c5105afbf92bde0669d304d Author: VMware, Inc <> Date: Wed Dec 26 13:18:49 2012 -0800 HGFS: Fix server directory read hack for the virtual shares folder For some uncommented reason, the HGFS virtual shares folder was always refreshed on the first search read even if this was the first search read since the search open. This means that the initial scan of shares on the search open was always thrown away - making it a total waste of time even constructing the list of dents. Secondly, the was an incorrect assumption that the search type was always the shares folder if there was not a share path. This maybe true for Posix (Linux/OS X) hosts but certainly not true for Windows. Replace this crap. Fixed the function to call into the server platform specific function to handle refreshing directory listings and handle the search type appropriately according to what is supported on the platform. Track whether the directory listing has been already returned completely to the client and use that to determine whether a restart (and rescan of the contents) is required. This means we don't scan the virtual directory contents twice for the first read request from the client. Renamed HgfsServerGetDents to match more closely what it really does and make it consistent with the equivalent function name for operating on real folders. Signed-off-by: Dmitry Torokhov commit 82ec43213b359aea2bdfca7fd9167f4ce4f18d74 Author: VMware, Inc <> Date: Wed Dec 26 13:18:30 2012 -0800 auth: fix crashed in Posix backend Now that Auth_CloseToken is no longer a no-op on Posix, it crashes if called with the results of Posix_Getpwnam and Posix_Getpwuid, which return static buffers. Create and use wrappers. Signed-off-by: Dmitry Torokhov commit 6b57f29107cf3bff6419279ca4a26cd43259e8e2 Author: VMware, Inc <> Date: Wed Dec 26 13:17:39 2012 -0800 HGFS: Cleanup of server platform specific functions to follow convention The HgfsServerScandir function does not follow the naming convention of the HGFS server and platform specific code. Therefore, to prevent confusion about the implementation of the function being platform specific it is renamed to be HgfsPlatformScandir. Also the platform initialization and destruction names did not follow the convention so modified those too. Signed-off-by: Dmitry Torokhov commit d43ce9ec9aafbf25f45b71769f3828a223288d9b Author: VMware, Inc <> Date: Wed Dec 26 13:17:28 2012 -0800 HGFS: extract out the oplock specific code into their own files The main HGFS server code and file is cluttered and has been used as a general dumping ground for abosultely everything to do with the HGFS server. This has resulted in files that have become way too large and hard to navigate. This change is to help reduce that by moving the oplock code into their own set of files. This helps platforms that do not have support for this feature from having to code contain too much extra logic. Also for those platforms that do support this complex feature, they can hide all that complexity away. Signed-off-by: Dmitry Torokhov commit 662c84b8f5015a95823fcc64710933942365d19f Author: VMware, Inc <> Date: Wed Dec 26 13:17:17 2012 -0800 Internal branch sync. Included in this change: . VMCI: fix "NULL check after dereferencing" issue reported by Coverity . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit bed620e762b2e3ee1d6bcda73359a2e38c20cc1c Author: VMware, Inc <> Date: Wed Dec 26 13:16:57 2012 -0800 vm_version.h: Split the file for granularity Signed-off-by: Dmitry Torokhov commit ecb6edf6231e21a303184c9d91d45ad9413ed2e0 Author: VMware, Inc <> Date: Wed Dec 26 13:16:50 2012 -0800 Cleanup the balloon driver. This patch is mostly adding IN/OUT annotations to functions, and adding comments about the newly introduced "target" argument. Signed-off-by: Dmitry Torokhov commit cfd52e4f067542831db812b35695915b50ffd8ff Author: VMware, Inc <> Date: Wed Dec 26 13:16:15 2012 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 622aad4b1e06eb77cec8118a01309963f0ebaa9f Author: VMware, Inc <> Date: Wed Dec 26 13:16:03 2012 -0800 Update the guest balloon target after each LOCK and UNLOCK. Currently, the guest driver won't update the target, until the next GET_TARGET command, thus at maximum, the guest can try to reclaim 16k pages before updating the balloon target. Those 16k pages will be considered unneeded by the monitor, and so will be rejected. For every command, the monitor put the balloon target in %ebx. Use that value to dynamically update the balloon target after each LOCK and UNLOCK commands, that way, the guest driver can react much faster to change than before. As a consequence, there will be less "unneeded bpn" message in the vmware.log file. Only one per second in the unbatched path, and a maximum of 512 in the batched one. Signed-off-by: Dmitry Torokhov commit 882b79ef80e95d304b2ee371ebe57adcebd53676 Author: VMware, Inc <> Date: Wed Dec 26 13:15:39 2012 -0800 HGFS: Clean up Oplock redundant type - part II Duplication of types is not a good thing. This redundant type for Oplocks is already defined and so just ammend what is already there and to be used instead of redefining a second type to do the same thing. Signed-off-by: Dmitry Torokhov commit 789293b1a392724890fc14744a6f753fa3e9dc4a Author: VMware, Inc <> Date: Wed Dec 26 13:15:31 2012 -0800 Disable image copy-paste in Tools for Solaris. There's a combination of problems w/ Tools on Solaris 11: • Image copy-paste triggers Gdk::PixbufLoader to throw an exception. • We're unable to catch exceptions(!). It's as if the catch blocks aren't even there. With WS 9.0.1 due for imminent release, I'm just going to "ifndef sun" it out. Signed-off-by: Dmitry Torokhov commit f8ffb96779222e137c660145cab3c7b4d8371d86 Author: VMware, Inc <> Date: Wed Dec 26 13:15:15 2012 -0800 Remove the limit of 64 operating systems in the guest OS table The guest OS table is currently limited to 64 entries because each guest OS is stored as a bit in a uint64 and bitmask operations are used to determine whether a guest belongs to a particular set. This change moves to a list of OS ID's, so there is no limit on the total number of guest operating systems. There is still a limit of 64 on the total number of guests that can be a member of a set, such as ALLLINUX or ALLDARWIN, because the implementation requires a fixed size array for the list of guests in a set, but the limit is arbitrary. To get this all to work, the vmmovhds scheme script needed to change from bit checking to list processing, and the perl script that generates the scheme include file needed some help. Signed-off-by: Dmitry Torokhov commit 421cc54c16d7874803efc112f6109b86f329c375 Author: VMware, Inc <> Date: Wed Dec 26 13:15:09 2012 -0800 HGFS: clean up HGFS lock type The HGFS protocol has duplicated the lock types from previous versions with later implementations. This is the first of a couple of changes to tidy this part of the code up and later remove unncessary duplication of types. This change renames the previous one to better reflect what it represents. The previous type name indicated a lock not really its type. No HGFS server has shipped with the locking protocol implemented and so to maintain correctness for backwards compatibility there are two issues: - all lock fields should remain the same size - the default value indicating no lock retains its value of zero Signed-off-by: Dmitry Torokhov commit 32868cdaab7ed6feeb9c070a6f7d26c41fe5af76 Author: VMware, Inc <> Date: Wed Dec 26 13:14:59 2012 -0800 HGFS: Cleanup OS X client file node Some minor cleanup with the OS X client to move the file node locking routines to the correct location and rename the locking enum type. Signed-off-by: Dmitry Torokhov commit 6d2f9852b8d987820bf95465ce5903e62013a0fb Author: VMware, Inc <> Date: Wed Dec 26 13:14:49 2012 -0800 VSOCK: Remove SOCK_SEQPACKET from Linux This was a poor implementation of SOCK_SEQPACKET, let's rip it out. This mirrors the work done for the upstream Linux driver. A follow-up change will remove it from the other platforms. Signed-off-by: Dmitry Torokhov commit db425ac5b33bef2851696e3b56d43b09984a032a Author: VMware, Inc <> Date: Wed Dec 26 13:14:22 2012 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 6cd63e49c769424936dbe3b460142709458438f3 Author: VMware, Inc <> Date: Sun Oct 14 21:59:22 2012 -0700 Updating open-vm-tools version for release 2012.10.14-874563. Signed-off-by: Dmitry Torokhov commit d85408321c66c927bffdb05106a26581244edd4a Author: VMware, Inc <> Date: Sun Oct 14 21:58:12 2012 -0700 vm_version.h: cleanup & remove unnecessary inclusions This change removes unnecessary includes of 'vm_version.h'. Signed-off-by: Dmitry Torokhov commit 94618c2ac5a3781951f1be10570bc1843e281a77 Author: VMware, Inc <> Date: Sun Oct 14 21:58:03 2012 -0700 Fix directory listing of stale information in OS X guests The directory readdir uses the existing handle of the directory continually even if restarting the listing of entries. This leads to stale data and if the handle is kept open for long periods due to open handles of files within that folder (parental references) the user will never see uptodate information. This fix is the simplest fix for now. We simply refresh the folder handle on any new readdir query. This closes the existing handle and issues a new handle open. Signed-off-by: Dmitry Torokhov commit f58771bfb4bb93ebc1485d05ea5604a3600ee3f9 Author: VMware, Inc <> Date: Sun Oct 14 21:57:58 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 44dd179d2420862dc3b24d4cbad7ed84fc348daa Author: VMware, Inc <> Date: Sun Oct 14 21:57:46 2012 -0700 Bump up tools version for next hosted release The new tools version for hosted products is 9.2.2 Signed-off-by: Dmitry Torokhov commit 52f783284ec6a09e121dd3c747d19ca5da643562 Author: VMware, Inc <> Date: Sun Oct 14 21:56:50 2012 -0700 Internal branch sync. Included in this change: . VMCI cleanups . tools daemon(s) will emit a log message with version upon startup . reduce verbosity of get_capab log in vmxnet3 Solaris driver . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 58f4f198ddff058aadffb87a60b6e0d9251cac15 Author: VMware, Inc <> Date: Sun Oct 14 21:56:10 2012 -0700 Add new privileged RPC call to RPC out library Some tools require a privileged RPC out call for example the VGAuthImport for the namespace DB interface. This adds the RpcOUt_SendOneRawPriv call which will make a privileged RPC call with the same arguments as the pre-exisiting RpcOUt_SendOneRaw API. It is expected that the caller of the RpcOUt_SendOneRawPriv be running as root or Administrator. The intention here is to keep the same model as the RpcOUt_SendOneRaw where the caller can just make the standalone RPC call which internally handles the RPC creation of a connection and destroys it before returning. So the Posix RpcOUt_SendOneRawPriv expets the caller to raise and lower the IO privilege level (on Linux platforms only) until the RPC internally calls a kernel mode driver to do the real privileged call. On Windows, the RpcOUt_SendOneRawPriv opens a connection to the kernel mode driver and pass the RPC request to it to send and then close the driver connection before returning. Signed-off-by: Dmitry Torokhov commit d3ddadf25fbb1af2b4d9536abd158963b9ed7fe6 Author: VMware, Inc <> Date: Sun Oct 14 21:56:04 2012 -0700 Deal with conflict with Dell's Open Manage Software When dell open manage software and vmware tools uses the same libraries. There is a conflict as the versions of libraries are not the same. This does not really affect open-vm-tools as they use system libraries and do not ship their own. Signed-off-by: Dmitry Torokhov commit 6d830028b5dc4b0bb692c93ce68a122e1ead3b36 Author: VMware, Inc <> Date: Sun Oct 14 21:55:51 2012 -0700 CopyPaste: accept TIMESTAMP data type for selection timestamps The previous fix for copy and paste was pretty strict, and it turned out to break X selections w/ the rxvt-unicode terminal emulator. (rxvt-unicode returns selection data w/ data type TIMESTAMP instead of the ICCCM defined INTEGER.) Signed-off-by: Dmitry Torokhov commit 4062f916dcd6d603cd0f8fbf11abf2ff8f6c587c Author: VMware, Inc <> Date: Sun Oct 14 21:55:38 2012 -0700 vmmemctl: fix a typo in balloon driver On batched unlock, the guest was sending a BATCHED_LOCK to the monitor instead of the BATCHED_UNLOCK command. Signed-off-by: Dmitry Torokhov commit 694d4eef6f51d5ccb0df3d821811559461bbe7b3 Author: VMware, Inc <> Date: Sun Oct 14 21:55:26 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit c82b294579a791fa672f76abe34a882b1c87ee2c Author: VMware, Inc <> Date: Sun Oct 14 21:55:15 2012 -0700 Allow string code be more strict Signed-off-by: Dmitry Torokhov commit 0e8899b3af68b15a07e58a0496e32e873210ed43 Author: VMware, Inc <> Date: Sun Oct 14 21:55:07 2012 -0700 HGFS: fix to compile on kernels 3.6+ Can you spell "ugly"? U-G-L-Y. Ugly. Signed-off-by: Dmitry Torokhov commit dd1fd2c5d53ed3ed236ea953b137d2c9fcf8a25a Author: VMware, Inc <> Date: Sun Oct 14 21:55:00 2012 -0700 vmmemctl: refactor backdoor_balloon.c All the functions in backdoor_balloon.c were very similar, refactor those so that all the common code is on one function. Signed-off-by: Dmitry Torokhov commit 20a0df267524ef95704c99a3131443a82e7b7a95 Author: VMware, Inc <> Date: Sun Oct 14 21:54:51 2012 -0700 Internal branch sync. Included in this change: . VMCI update to support VM-to-VM communication . VIX updates . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 0c6a36174116bef0e934797da5bbd041f00a8ed6 Author: VMware, Inc <> Date: Sun Oct 14 21:54:23 2012 -0700 vmmemctl: fix a double free on linux balloon driver On unload when using the unbatched commands, b->pageHandle would be free two times. The first one when releasing all the pages of the balloon, and the second time when releasing the batch structures. This was causing OOPS and sometimes panic when rmmod the driver. The fix is to set b->pageHandle to PAGE_HANDLE_INVALID when it's added to the chunks or when the page is released. Signed-off-by: Dmitry Torokhov commit 9ec3b4526827fe5f052b8c9ed7d2440c9c39411d Author: VMware, Inc <> Date: Sun Oct 14 21:54:12 2012 -0700 vmmemctl: update the balloon size in the unlock path Previously, it wasn't updated so the balloon was not shrinkable. Signed-off-by: Dmitry Torokhov commit a14f6d1297696ae8f3fdc854bec3bec3ee7ef88a Author: VMware, Inc <> Date: Sun Oct 14 21:54:06 2012 -0700 Guestinfo: fix memory leak detected by valgrind Signed-off-by: Dmitry Torokhov commit 4501ea13d00453e8c2af6167d5a01c9dbb1d1361 Author: VMware, Inc <> Date: Sun Oct 14 21:53:52 2012 -0700 Add esx50 updates to vm_tools_version.h Signed-off-by: Dmitry Torokhov commit 1612fd02ecace0dd75222a55d1766bec3abc4f36 Author: VMware, Inc <> Date: Sun Oct 14 21:53:36 2012 -0700 SQUASH or remove both? Build breakage. Signed-off-by: Dmitry Torokhov commit 3c977e7f4387cc4d7d2a59e96b9ebec6c9895790 Author: VMware, Inc <> Date: Sun Oct 14 21:53:22 2012 -0700 GOSTABLE: 2008R2 x64 should be in the WIN64 list Got removed incorrectly in an earlier change... Signed-off-by: Dmitry Torokhov commit adf63a09d612ddebf402435bf6b1ee9ba6f693ba Author: VMware, Inc <> Date: Sun Oct 14 21:53:17 2012 -0700 vmmemctl: use capability based system to advertise balloon features Use a capability based system instead of versioning to advertise and negotiate balloon features. On START command, the guest is sending its capability and the monitor returns the masked capability. That way, the guest knows exactly what features are supported by the monitor. Currently the capability use two bits: if the bit 1 is set, then the unbatched lock and unlock are supported, and if the bit 2 is set, then the batched lock and unlock are supported. Bit 1 was chosen to be backward compatible with "protocol v2", and bit 0 is unused to avoid issue with the screwed "protocol v3". Signed-off-by: Dmitry Torokhov commit b83c18a2d45d19ce45d4f1e90dac079a0ee5e4c0 Author: VMware, Inc <> Date: Sun Oct 14 21:52:57 2012 -0700 Log_HexDump's second argument can/should be a const void *. Make it so. That way we don't have to cast things at the callsite. And remove some/most of the unnecessary typecasts while we're here. And also make the third argument a size_t. Signed-off-by: Dmitry Torokhov commit 53caa612da383b6858f0baeb471bce152775c619 Author: VMware, Inc <> Date: Sun Oct 14 21:52:51 2012 -0700 lib/lock: Clean up trailing whitespace Trivial elimination of trailing whitespace. Signed-off-by: Dmitry Torokhov commit 457f50015226612c3cb2be3c618ddd98aed16b8f Author: VMware, Inc <> Date: Sun Oct 14 21:52:16 2012 -0700 GosTable: Server 2008 R2 32-bit never existed According to Matt Delco Server 2008 R2 32-bit never existed. We can remove it. This frees up a hosted bit which is good as it gives us room to play in... until the don't use bits project is done (it's just getting started). Signed-off-by: Dmitry Torokhov commit 67b44bf4445050c62bba318823a45021110e61d9 Author: VMware, Inc <> Date: Sun Oct 14 21:52:06 2012 -0700 Gostable: minimal support for vmkernel6 and Mac OS 10.9 Implement then as aliases to their next earliest versions. We'll revisit these as developments warrant. The SHOW_IN_UI is not on, for now, so only in devel builds will they show up. Nor have I changed the default showing for the UIs - that comes later. Signed-off-by: Dmitry Torokhov commit aaaeb0b4d317c97242974bdc714de19acfe2f7bf Author: VMware, Inc <> Date: Sun Oct 14 21:52:01 2012 -0700 lib/misc: robustify Windows process checking It is possible for a process to prevent itself for even having it's name checked on Vista and later. We can use the denial of access to determine is a process is alive. Signed-off-by: Dmitry Torokhov commit 3db19df835b61a9f375d52326251520d160ef4bb Author: VMware, Inc <> Date: Sun Oct 14 21:51:48 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4aec62aced3d3e13f6e86f278e149d6bac170949 Author: VMware, Inc <> Date: Sun Oct 14 21:51:42 2012 -0700 EXTERN: remove more unnecessary extern Signed-off-by: Dmitry Torokhov commit 05dfa32a50a9915d64113496ba526a241adff429 Author: VMware, Inc <> Date: Sun Oct 14 21:51:29 2012 -0700 lib/lock: trivial line up Line shouldn't have been wrapped. Signed-off-by: Dmitry Torokhov commit 730a632939663b3e16eb160b8158a99ea73bca0e Author: VMware, Inc <> Date: Sun Oct 14 21:51:21 2012 -0700 Internal branch sync. Included in this change: . fixes in VIX plugin . define a new tools option "enableMessageBusTunnel" . formatting changes Signed-off-by: Dmitry Torokhov commit fca63d878ad4440accf663f39869d82878306805 Author: VMware, Inc <> Date: Sun Oct 14 21:51:02 2012 -0700 Fix HGFS server destroy session handler The HGFS server destroy session handler should return the reply packet to the client. Currently, it was deemed not warranted due to the reply only having reserved fields. However, now that has been done, all clients cannot validate the reply size correctly to include the full reply packet but only accept the header size as mandatory. If they receive more than that they can and should also validate the reply packet. Currently, only hgfilecopy uses the destroy session, which does not look at the reply packet at all and just uses the success or error returned. So these changes will not break any clients currently. Signed-off-by: Dmitry Torokhov commit 9a0cff4de9c0b59e12548da5ccaac28ea0306469 Author: VMware, Inc <> Date: Sun Oct 14 21:50:52 2012 -0700 Internal branch sync. Included in this change: . add StrUtil_IsASCII (not used by the OVT code). . other changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit c6e7bb67f706b6396bc3316d57ce49670dd9cf05 Author: VMware, Inc <> Date: Sun Oct 14 21:50:40 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit dd1dbc4e18b3cd4c06036b2cdf334bc0100c3bd7 Author: VMware, Inc <> Date: Sun Oct 14 21:50:29 2012 -0700 Guest OS table: add Debian 7 and SLES 12 These need to be added - and they are easy as they are aliases. No bits need to be allocated. Find any place Debian 6 or SLES 11 is used and add Debian 7 and SLES 12 respectively. Signed-off-by: Dmitry Torokhov commit 9ca9e30ac916920447f848cd44b6638b235ed4bb Author: VMware, Inc <> Date: Sun Oct 14 21:50:23 2012 -0700 Bump up tools version for Fusion 5.0.1 release The new version for hosted products is 9.2.1 Signed-off-by: Dmitry Torokhov commit b7d1358e6cd87ed9bc5d2f7793c1508f1bdc7c69 Author: VMware, Inc <> Date: Sun Oct 14 21:50:14 2012 -0700 Internal branch sync. Included in this change: . VIX config names cleanup . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit a9d7e0276e89658a9232f50b175f54cdf2cb7ede Author: VMware, Inc <> Date: Sun Oct 14 21:49:43 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit a5a6a543b78b1189185c9ff92807895b5045486c Author: VMware, Inc <> Date: Sun Oct 14 21:49:37 2012 -0700 VMCI/vSOCK: fix event soft lockup on Linux We make the silly mistake of assuming in our QP event CBs that we are in BH context, because we didn't ask for a delayed CB. But in this case, VMCI doesn't make any guarantees about what context we are in, it could be BH or process, we don't know. Fixed so that we don't make this silly assumption. Signed-off-by: Dmitry Torokhov commit c948f004910dbb871ce28f4716557bfe9d3e4c2f Author: VMware, Inc <> Date: Sun Oct 14 21:49:23 2012 -0700 VMCI: fix context locking. Seems like we're holding the context list lock here, when we should be holding the context lock (or possibly not holding any lock, but we'll start with this). Signed-off-by: Dmitry Torokhov commit d5df2bdfc81ef8b0c4ba6c0e47042b6316069e32 Author: VMware, Inc <> Date: Sun Oct 14 21:49:10 2012 -0700 vmmemctl: add batching to the balloon driver. Currently, we call the monitor for each reclaimed page. Batch those pages and do a monitor call when enough pages have been reclaimed. Ultimately, this should improve the performance by reducing the number of context switch. Signed-off-by: Dmitry Torokhov commit d70b102d4dcbda2af82d6084f124cac87288c8ac Author: VMware, Inc <> Date: Sun Oct 14 21:48:59 2012 -0700 Guestinfo: return an empty nicinfo if an error occurs. If an error occurs while retrieving the network information then, instead of ignoring error, guestinfon should return an empty nicinfo so that all corresponding entries in the MOB, VMDB, will be set to blank values and VI client will not show any stale data. This change also fixes another issue. If any error occurs while retrieving the primary 'ipaddress', guestinfo plugin now returns a blank string so that VI client and other clients show the blank value instead of stale data. Signed-off-by: Dmitry Torokhov commit 9869e4d75ff1199ed9d3379a081fd956ca588c6e Author: VMware, Inc <> Date: Sun Oct 14 21:48:50 2012 -0700 Pass kernel version to depmod when installing kernel modules When building Open VM Tools in chroot jail, jail kernel version could be different from the actual kernel version and compilation fails. Suggested fix is to use depmod -a $(KERNEL_RELEASE) Signed-off-by: Dmitry Torokhov commit fc53c3a3ebe574ce5ac5d6ad16284a7057117f07 Author: VMware, Inc <> Date: Sun Oct 14 21:48:20 2012 -0700 Return proper error for ChangeFileAttributesInGuest API. When a user executes ChangeFileAttributesInGuest(), the code calls File_Exists() to check if the file exists. If File_Exists() fails, then the code used to return a hard-coded error, but it is much better to convert the errno/GetLastError() into a more meaningful error. Signed-off-by: Dmitry Torokhov commit 4364f1ebf8771f6ae7dd86471f88560435129f46 Author: VMware, Inc <> Date: Sun Oct 14 21:48:11 2012 -0700 VMCI: changes in shared code that don't affect open-vm-tools Some VMCI header changes not affecting open-vm-tools. Signed-off-by: Dmitry Torokhov commit 5d785375b2a0271605b26e8f3210ea15bdb88c94 Author: VMware, Inc <> Date: Sun Oct 14 21:47:57 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 7f78af6d9dfabc8b8316cfdc9975730f696c52b2 Author: VMware, Inc <> Date: Sun Oct 14 21:47:48 2012 -0700 Internal branch sync. Included in this change: . removed SEQPACKET support from VMCI driver as we are not going to ship in in its current form. . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 9e6ee0b2240d41adcba0f686f4a61dc526064730 Author: VMware, Inc <> Date: Sun Oct 14 21:47:15 2012 -0700 vmmemctl: add the kernel stubs to the balloon driver This file is required in order to use ASSERT in the driver. Signed-off-by: Dmitry Torokhov commit 742067c90276c0e78e1d706ae658c461354edf3f Author: VMware, Inc <> Date: Sun Oct 14 21:46:48 2012 -0700 lib/file: make simple aio manager a little more thread safe. The simple aio manager used a separate seek() then readv()/writev() to do IO. This pattern is not thread safe with respect to multiple threads accessing the same file. In particular, this affects lazy checkpointing, since the IO to the mainmem file can come from either the vcpu threads or the background save thread. This change replaces these non-thread safe calls with preadv()/pwritev(). The simple aio manager needs FileIO_Preadv/Pwritev to return number of bytes processed on partial IO. Modified the fileIO functions to do so. Signed-off-by: Dmitry Torokhov commit da9be5b2c31b711bee30ca52c70a0e5e36de840b Author: VMware, Inc <> Date: Sun Oct 14 21:46:10 2012 -0700 Yank VMCF/AMQP completely from Tools. Signed-off-by: Dmitry Torokhov commit 100b9bed8ad79b3f4683c410731cab862ebff2ef Author: VMware, Inc <> Date: Sun Oct 14 21:46:00 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit e244f0ee8cfaee86c897867292f6f6116e6fa48e Author: VMware, Inc <> Date: Sun Oct 14 21:45:50 2012 -0700 HGFS: add hooks to control debug level on fly This is used by the hgfs sysctl interface available on OS X. Signed-off-by: Dmitry Torokhov commit ea510441e278f6c86ece2425d744799883e0116f Author: VMware, Inc <> Date: Wed Aug 1 23:57:41 2012 -0700 Internal branch sync. Included in this change: . lib/file: check for available free space before moving directory trees . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 123ca1c6fd671557634abdb363b73f331f3d19e1 Author: VMware, Inc <> Date: Wed Aug 1 23:57:12 2012 -0700 lib/misc: add some string concatenation helpes Signed-off-by: Dmitry Torokhov commit aaa80d4caf24de0961a3cc0355d4b81ea9c04e5c Author: VMware, Inc <> Date: Wed Aug 1 23:53:59 2012 -0700 lib/file: make File_Cwd() handle directories of any length In the I18n world the current working directory can be essentially unlimited in length. Using FILE_MAXPATH is outdated. Make File_Cwd handle a current working directory of any length. Signed-off-by: Dmitry Torokhov commit 9f6c55fd65810af61e0a3b6b9b949449ccbcb280 Author: VMware, Inc <> Date: Wed Aug 1 23:53:49 2012 -0700 Add a macro to check if glibc 2.12 is being used Signed-off-by: Dmitry Torokhov commit a7a12a614d5fa21549ac6a27b52e0b80a92cc068 Author: VMware, Inc <> Date: Wed Aug 1 23:53:30 2012 -0700 Handle special files in HGFileCopy library. Certain files like /proc/kallsyms can be copied from the guest only if the special 'sequential open' mode is specified. This changeset removes that constraint. Implemented the support in HGFilecopy library to specify the sequential mode flag automatically if it thinks the remote file is a special file. This is done by implementing the support in hgfsServer to specify the file as 'sequential only' if it thinks so. HGFSServer sets this bit when the attributes are queried for the file. Implemented a new HGFile copy option which a user can specify if he wants to automatically handle the special 'sequential only' files. If the new file copy option is set, then the HGFilecopy library automatically sets the 'sequential open' flag if it thinks the file being copied is a 'sequential only' file. Made changes to the vix library code to use the new HGFileCopy option as default for the file copy functions. Signed-off-by: Dmitry Torokhov commit 580d39badefe0510c844cfdd937bd4afde9ab636 Author: VMware, Inc <> Date: Wed Aug 1 23:52:40 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 488ef992c448b2d75bafd3237b566b3c44aaffc8 Author: VMware, Inc <> Date: Wed Aug 1 23:52:58 2012 -0700 lib/misc: fix handling of size 0 in FileIO_Preadv When file of size zero is used, we should return success. Signed-off-by: Dmitry Torokhov commit c0cfb6673ec7db9c0f89e6a4c2148d3be8a3237e Author: VMware, Inc <> Date: Wed Aug 1 23:52:32 2012 -0700 lib/misc: add MsgList_Present() Add MsgList_Present (which matches Msg_Present) as a convenience for ASSERTs. Signed-off-by: Dmitry Torokhov commit 96e1fa409db8ca89b320a9de3144d7cfdc014101 Author: VMware, Inc <> Date: Wed Aug 1 23:52:26 2012 -0700 Bump up the tools version for WS 9.0 Release This is the final tools change for WS 9.0 Release. Bump up the tools version to 9.2.0 for WS 9.0 Release. Signed-off-by: Dmitry Torokhov commit 2189f80e5c527daaada9ef4183d383a4d698124a Author: VMware, Inc <> Date: Wed Aug 1 23:52:15 2012 -0700 lib/file: use 64 bit offset to support large files Quick fix to call 64 bit offset version of preadv and pwritev. Signed-off-by: Dmitry Torokhov commit e27eae3623d28df517edc0030891e3ee9e7c63f2 Author: VMware, Inc <> Date: Wed Aug 1 23:52:07 2012 -0700 HGFS: OS X client logging improvements Making the logging more consistent and much more useful. Signed-off-by: Dmitry Torokhov commit 7dfb1faba612bba10a093687ef0f90bd66d2fe7b Author: VMware, Inc <> Date: Wed Aug 1 23:50:55 2012 -0700 vSock: only print warning if we could not register address family at all vSockets on Linux tries to claim an address family starting from the top of the valid range. If someone has already claimed an address, we will print a warning to the kernel log and then continue looping. This warning started appearing on Cent OS 5.4 in autoinstall tests, presumably because someone is grabbing the top family. Because the automation is screenshot-based, the presence of the warning is causing the test to fail. Fixed by moving the warning to the very end. Signed-off-by: Dmitry Torokhov commit 504ae598f31b69b2f0bdcf38f6454d00d8123a88 Author: VMware, Inc <> Date: Wed Aug 1 23:50:36 2012 -0700 Internal branch sync. Included in this change: . lib/misc - add a function to override home directory . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 5c8023e00ee3ec635e4581d3e72d8380c40c4a2e Author: VMware, Inc <> Date: Wed Aug 1 23:50:13 2012 -0700 lib/file: add support for preadv and pwritev Earlier we just coalesced the vectors and called a single pread/pwrite. This change checks if there is system support for these calls. In case there is no support, we simply fallback to the older unoptimized code. Performance tests showed promising results: Test suite: I ran tests with random 32k read/write IO access patterns.The number of outstanding IO requests was set to 64. This was done on opt build with and without my changes. The following vmx config changes were made to disable buffering: hard-disk.hostBuffer = "disabled" hard-disk.useUnbuffered = "FALSE" Results: ***************************** Optimized version: ***************************** Total Read IOps : 4882.38067 Total Read MBps : 152.574396 Read IO latency : 0.204818114 millisec Total Write IOps : 63.339208 Total Write MBps : 1.922736 Write IO latency : 15.788009222 millisec ******************************* Unoptimized version: ******************************* Total Read IOps : 4393.482149 Total Read MBps : 137.296317 Read IO latency : 0.227609893 millisec Total Write IOps : 50.473344 Total Write MBps : 1.577292 Write IO latency : 19.812438027 millisec ********************************* Improvement : ********************************* Read Improvement: 152.574396/137.296317 = 1.111278142 = ~ 11% Write Improvement : 1.922736/1.577292 = 1.219010811 = ~ 22% Signed-off-by: Dmitry Torokhov commit df2c0d4438878904db755c6d4bc5015b7129e64d Author: VMware, Inc <> Date: Wed Aug 1 23:50:06 2012 -0700 lib/file: fix potential crash in FileRotateBy*() The File_Rotate call may have a newFileName argument. If there is a failure, and this argument is present we should set it to NULL to prevent potential memory corruption or freeing garbage problems. Signed-off-by: Dmitry Torokhov commit af215f976bff262f8261a356fc1ec32c3fe3bb3e Author: VMware, Inc <> Date: Wed Aug 1 23:49:38 2012 -0700 Promote VIX_PROPERTY_HOST_SOFTWARE_VERSION property The property VIX_PROPERTY_HOST_SOFTWARE_VERSION returns useful info about the VIX build. Promote to the public vix.h. Signed-off-by: Dmitry Torokhov commit 1b622431be6344bd8d1a8b49208339cfa0cb032d Author: VMware, Inc <> Date: Wed Aug 1 23:49:18 2012 -0700 Internal branch sync. Included in this change: . turn VGauth support back on now that all name changes are pushed through . lib/misc - add StrUtil_CapacityToBytes() . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit bff63adf4f49c38c187072365724b1e7d2f3325d Author: VMware, Inc <> Date: Wed Aug 1 23:48:58 2012 -0700 Fix Linux HGFS client access failure error code Permissions checks return EPERM when they should be EACESS. Signed-off-by: Dmitry Torokhov commit da4068ac377ebf73ebe9ea7ffa68eec534cb493c Author: VMware, Inc <> Date: Wed Aug 1 23:48:48 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit e8d6ad9898a0cff1a86d153be22f84a59bbb0fd0 Author: VMware, Inc <> Date: Wed Aug 1 23:48:30 2012 -0700 vmballoon: cleanup and optimization * Instead of using a new command to report the protocol to be used by the guest, use the register ECX in the START command. * Instead of using the protocol v2 when RR FT can be enabled, detect that FT has been enabled and request a reset from the guest. Signed-off-by: Dmitry Torokhov commit e591ee426370f1f106798d093ffa03e8f5a2b284 Author: VMware, Inc <> Date: Wed Aug 1 23:48:14 2012 -0700 Add an entry for 'oracle linux' in distroArray. The 'guestinfo' plugin in VMware Tools is responsible for retrieving details about the guest (like guest family, guest id, guest fullname etc.). The 'guestinfo' plugin uses HostinfoOSData to retrieve the data about the guest OS. HostinfoOSData() uses 'lsb_release' package to reteive the details. If the 'lsb_release' command fails for some reason, then /etc/*-release files are parsed to retrieve the necessary information. There is a specific list of /etc/*-release files that are parsed. We don't have an entry for 'Oracle Linux'. We need to add an entry for '/etc/oracle-release' file in the list. In 'Oracle Linux' guests, both files '/etc/redhat_release' and /etc/oracle_release' exist. So, we need to add the new entry in the code before the 'redhat' entry. Otherwise, '/etc/redhat-release' is parsed first and improper information is retrieved. Signed-off-by: Dmitry Torokhov commit 543416c5031851b07791079a3bd52b11a15d5896 Author: VMware, Inc <> Date: Wed Aug 1 23:47:56 2012 -0700 Internal branch sync. Included in this change: . vmballoon balloon code. . small changes in string library used by DnD/CP plugin . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 26b4b238cbc87d6de345fd97430369494e8cad10 Author: VMware, Inc <> Date: Wed Aug 1 23:46:07 2012 -0700 Fix Lion guest and host files on shared folder show diff contents The OS X hgfs client reference counts file handles that are shared for accessing file data on the HGFS server. Unfortunately the implementor failed to actually verify if the reference counting worked by testing even the simplest sequence of file IO operations: opening a file, reading it, and close should result in the reference count being set to zero and the close request was sent to the HGFS server. This did not occur, as a result the open handle remainded forever open on the server until the HGFS server was forced to shutdown. This open handle was reused for any further accesses from the client until it was rebooted. The behavior of OS X (and Linux) file systems mean that the HGFS client will only receive the data that it has written to that file or the original data stored in the file which is now cached. If a host application modifies the contents of that file the HGFS client will not see it, until the old handle gets closed and a new one opened. The fix is for the reference count for the open handle to be correctly handled. This will mean that the matching close for an open handle will reduce the reference count to zero and therefore a closse request will be sent to the HGFS server. The next access to the file will get the latest file data on disk from the host. Signed-off-by: Dmitry Torokhov commit f5b6d94931f8c15a3823d59a3e17c3b9e6367de0 Author: VMware, Inc <> Date: Wed Aug 1 22:32:28 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit f70bee923bcb19c5ed9536f73c1f73114b27b9ee Author: VMware, Inc <> Date: Wed Aug 1 22:32:06 2012 -0700 Fix vmxnet failing to compile on Fedora 16 The kernel version check was wrong, the new stuff didn't make it in till 3.2, so 3.1 was hosed. Signed-off-by: Dmitry Torokhov commit faf1cc29a1c7924cee28b61153ae6cae3464dc27 Author: VMware, Inc <> Date: Wed Aug 1 22:31:59 2012 -0700 Fix HGFS file append on OS X File appends were incorrect on OS X as they appear to be handled differently by posix pwrite calls from Linux. On Linux if the handle is opened for append mode then pwrite will ignore the offset and append to the file. This is not correct for OS X, where the offset is still used. For OS X we now check if the handle is opened for append and use the write call instead. Signed-off-by: Dmitry Torokhov commit ce3a588b97e500a1538bce6d37bbd51a23b8c611 Author: VMware, Inc <> Date: Wed Aug 1 22:31:17 2012 -0700 Print warning messages before the wipe/shrink process During the wipe process, the toolbox cmd CLI first fills the guest's disk space with file filled with zeroes. During this step, user may notice few warning messages about the available free disk space in the guest operating system. We should print a message to disregard the disk space messages in the guest operating system. Signed-off-by: Dmitry Torokhov commit 9b3051a7d3d9fef86f48f9ade6cbac3b47ba95b9 Author: VMware, Inc <> Date: Wed Aug 1 22:30:57 2012 -0700 VMBLOCK: fix panic on unmounting on FreeBSD 9.0 FreeBSD added a new operation vop_advlockpurge that is called from vgonel() after an inode was released. We should not attempt to pass this operation down to the underlying filesystem and instead install vop_stdadvlockpurge() as our handler, exactly like nullfs does. Although there wasn't explicit bump of __FreeBSD_version for this change, 900013 is the closest one and we'll use it to detect when when we need to install vop_advlockpurge handler. Signed-off-by: Dmitry Torokhov commit cbe0640a708a9a67741fdbb87a2b714a605556c7 Author: VMware, Inc <> Date: Wed Aug 1 22:30:28 2012 -0700 lib/file: make FileSimpleRandom() thread safe The memory allocation and initialization is thread safe, the using of the context isn't. A simple lock will solve that. Signed-off-by: Dmitry Torokhov commit 05a459025aeef283954a907a4a3985820f8b88e5 Author: VMware, Inc <> Date: Wed Aug 1 22:30:10 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 5c4e42d19fc85c8bb33d4bc9c178988c468618fd Author: VMware, Inc <> Date: Wed Aug 1 22:29:55 2012 -0700 Fix asm constraint for Set/Test/ClearBitVector Compiling this assembly with gcc-4.4.3 in i686 results in a compilation error stating that %dil is not a valid register. GCC experts state that the compiler is correct and the problem is in the assembly constraints: https://bugzilla.redhat.com/show_bug.cgi?id=625263 (Summary for uninitiated: %dil is the low 8 bits of %edi, which is addressible in x86_64 but NOT in ia32) Slightly more detail: the setc instruction takes an 8-bit operand. Which means any register chosen must also be an 8-bit register (ia32: al, bl, cl, dl). The 'q' constraint means "any register addressible with the -l suffix", which is the correct constraint. At Jim's suggetion, I'm also adding 'Q' (ia32: ah, bh, ch, dh). Note that in x86_64, 'q' covers all registers, so 'q' vs. 'r' does not hurt x86_64. I also note that bts specifically alters CF (and we are indeed using setc to read it!), but "cc" is not on the clobber list. It was present on the clobber list of all the other assembly fragments, so I suspect this was an oversight. Why didn't we see this before? - These BitTest funcs tend to be used only in VMX - The only VMX that builds with gcc-4.4.3 today is ESX's, which ix x86_64 - The Linux Workstation vmx32 uses gcc-4.1.2 - (I'm experimenting with bumping Workstation Linux's gcc) There are no correctness concerns; if constraints were wrong, the code would fail to compile entirely due to incorrect register selection. Signed-off-by: Dmitry Torokhov commit ab1d65f655540a219d7c451cf981e63b94a4fe94 Author: VMware, Inc <> Date: Wed Aug 1 22:29:38 2012 -0700 MsgList_Create: annotate with printf declaration checker MsgList_Append has the printf declaration checker attribute in place. I believe at the time, there were a few MsgList_Create calls that had to be turned into MsgList_CreateStr; this change has since happened. Which means the format specifier check can now be fully enabled. Signed-off-by: Dmitry Torokhov commit 17c1271dff9f5fb108e55f1f991858a628767986 Author: VMware, Inc <> Date: Wed Aug 1 22:29:18 2012 -0700 Internal branch sync. Included in this change: . fix bug in ListAlias APIs - sloppy use of arrays vs pointers . vmxnet3 - fix MTU management in Solaris version: - do not start with MTU as 9000 but as 1500; - check if accept-jumbo was set before increasing MTU above 1500; - allow initial MTU to be picked up from vmxnet3s.conf; - update max sdu when MTU changes on OpenSolaris and on Solaris 11 . vmballon - add versioning to the balloon driver handshake . Fix up FileIsVMFS() so it correctly identifies VMFS* . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 1b83396ab8b67a7b56c8ca513ecd689c539f1598 Author: VMware, Inc <> Date: Wed Aug 1 22:28:12 2012 -0700 Prevent crashes on invalid message strings in release builds There might be Msg_Append call sites that pass in a raw string that lacks message ID. We assert in debug builds, but end up dereferencing an invalid pointer in release builds. Let's make up a generic error message out of the raw string instead. Signed-off-by: Dmitry Torokhov commit 72e2fd0415ea544668238c8b8eaae3896c5d2ea9 Author: VMware, Inc <> Date: Wed Aug 1 22:27:49 2012 -0700 vSock: Consolidate provider info Our provider protocol structures were scattered across three different installers. Just move them into a single header, one that is already included by everyone. Signed-off-by: Dmitry Torokhov commit 5b0965c8d0b0311417ffe295a2cfb8a3a670cddf Author: VMware, Inc <> Date: Wed Aug 1 22:26:12 2012 -0700 GOSTable: New Mac hardware, new GOSTable bit We need a new GOSTable bit for darwin12 to cover the new bridge and CPU architecture... we need to provide monitor specific settings appropriate to the OS. DARWIN12 will be 64-bit only so we can drop a 32-bit entry. Clean up any fallout. Once the monitor settings have been finalized a follow up change will deal with monitor settings. Signed-off-by: Dmitry Torokhov commit 31b316dc62ce67412bcf2d534989588b36f7c0e2 Author: VMware, Inc <> Date: Wed Aug 1 22:26:04 2012 -0700 Fix error on file deletion on read-only HGFS share The failure was being done at the set file information call of the Windows client instead of the create call. This only occurred when communicating to HGFS servers on Posix platforms. The Posix platform only uses the open mode of the HGFS open protocol request even if the desired access is valid. On Windows HGFS servers the desired access is checked and used if valid, and if not falls back to the Posix open mode call. However, for the case of delete requests, the Windows client does not set up the Posix open mode quite correctly. It igonores the DELETE desired access flag. This should be mapped to a Posix open mode requesting write access. So for occasions where read attributes and delete is requested in the desired access the Posix open mode is still passed as read-only. This causes the open to succeed on a read-only share when it should be failed with access denied. This fix is to address the HGFS Posix server to try to map a Windows client passing the desired access mask to the Posix open mode will then allow all Windows clients to have the open for delete access validated by the HGFS server. Linux clients are unaffected and do not use this field for the open requests. It also has the benefit of making the Posix and Windows HGFS servers more compatible. Signed-off-by: Dmitry Torokhov commit 13bf70945d446ab983cb1ab6c8aedcbc912daa4e Author: VMware, Inc <> Date: Wed Aug 1 22:25:19 2012 -0700 Internal branch sync. Included in this change: . more VGAuth rename work (handle renaming in foundry, the automation socket protocol and tools) . CopyPaste - fix up 64-bit X11 selection timestamp handling . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 5d6e01d595a2a6c596a8f1679d5857e610bc54ef Author: VMware, Inc <> Date: Wed Aug 1 22:24:55 2012 -0700 Fix toolbox 'shrink' feature on newer distributions using bind mounts VMware toolbox-cmd utility provides two disk related features i.e. shrink and wipe. When the user executes 'shrink' or 'wipe' command, the utility parses /etc/mtab and checks if there is an entry matching the specific mount point. If a match exists, then the utlity immediately stops the parsing. This approach is not very robust and may cause few issues especially if there are multiple entries for the specified mount point. If the first entry maps to an unsupported partition type and the second entry maps to a supported partition type, the current parsing logic returns EX_UNAVAILABLE error. We should fix this. Modified the code to continue parsing the entries if the first match entry maps to an unsupported partition type. Signed-off-by: Dmitry Torokhov commit b897dc27fcf06b9b07f613887f3ba3b67f30625a Author: VMware, Inc <> Date: Wed Aug 1 22:24:32 2012 -0700 VIX: directories created via VIX api should have 0700 permissions There are visibility issues with the directories created via VIX apis (VixVM_CreateDirectory). All the directories created via VIX apis should be tagged with 0700 permissions instead of 0755 permissions. Added few Ex functions in file.c to create directories with the specified permission. Modified the vix tools code to create the new Ex functions with the specific permission mode. Signed-off-by: Dmitry Torokhov commit 008314815e99b61c1b1cb3ce436180c86fd264ef Author: VMware, Inc <> Date: Wed Aug 1 22:23:51 2012 -0700 Internal branch sync. Included in this change: . Allow Mac code to be able to override the expansion of '~' . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 53fbf6d6b4f1ab75570154fcdbd4536f5468c4c6 Author: VMware, Inc <> Date: Wed Aug 1 22:19:30 2012 -0700 Bump up the Tools version for several milestones Signed-off-by: Dmitry Torokhov commit e493454a82e0bc5783094fa1f34e4c5c0cfa929c Author: VMware, Inc <> Date: Wed Aug 1 22:21:58 2012 -0700 I18n: prevent integer overflows This is an I18n and a security issue. When growing a dynbuf we may integer overflow. Detect when overflow will occur and return an error. Also look further into the stack and clean up a few places more. Signed-off-by: Dmitry Torokhov commit 70db7cffba22d0dc3a4041892f7e4665ce71a945 Author: VMware, Inc <> Date: Wed Aug 1 22:21:50 2012 -0700 lib/stubs: fix infinite loop in stub-user-msg.c Signed-off-by: Dmitry Torokhov commit ae64ea398410a1987831a8ee1b7441ab2e1bf326 Author: VMware, Inc <> Date: Wed Aug 1 22:21:40 2012 -0700 GuestInfo: ignore the extra NIC information If the total number of network interfaces configured for a VM exceeds the maximum XDR limit, then the guestInfo plugin crashes. GuestInfo plugin calls intf_loop() to retrieve the information about all the available interfaces. ReadInterfaceDetails() is passed as a callback function to intf_loop(). Add a check for the number of NICs processed and ignore the extra NIC information. By doing this, VMware Tools returns the maximum information that it could return and drops all the extra NIC info on the floor. Signed-off-by: Dmitry Torokhov commit afda9c9ca50880ff292cef8c57a88f72a0cd95da Author: VMware, Inc <> Date: Wed Aug 1 22:21:29 2012 -0700 VMCI: Restrict access to VMCI_RPC_PRIVILEGED As a temporary hack, we had opened up access to the privileged RPC handler to all users. This fix locks it down again: on Linux, only the superuser can access it, while on other platforms, it is denied completely (until we add seq packet support to the common code). Signed-off-by: Dmitry Torokhov commit cbcf57675c6c0a8f1da301c29bfcaed031ad2f85 Author: VMware, Inc <> Date: Wed Aug 1 22:21:04 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit b4493cb178e42161e7daafd5f116aae7e914e27a Author: VMware, Inc <> Date: Wed Aug 1 22:20:57 2012 -0700 VMCI: remove memset() before free() Strip out redundant calls to memset() before free(). Signed-off-by: Dmitry Torokhov commit defff25dc8577b2c0478a9f0e787468e8a956810 Author: VMware, Inc <> Date: Wed Aug 1 22:20:46 2012 -0700 L10n fixes for toolboxcmd utility Added few msg ids for proper L10n messages in the toolboxcmd utility. Signed-off-by: Dmitry Torokhov commit fe3c903546c5340bd9c2691f7eccef934d6460cb Author: VMware, Inc <> Date: Wed Aug 1 22:20:37 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 9879e8358d044c9a404ea85d5874165e56158b2e Author: VMware, Inc <> Date: Wed Aug 1 22:20:26 2012 -0700 Cleanup and rearchitecture of HGFS server change notification part VII Final initial change set for fixing FSEvents polling for Lion OS X 10.7. This is currently an OS X host only file, but now contains the main logic to handle the file system change notifications and is platform independent. The OS X platform specific code is now in hgfsFSEventsMac files. In a later change set this file will be renamed to reflect that it is common to all platforms while the platform dependent parts will implement the FSEvent API (as done for OS X in part VI). Currently only the OS X platform supports the change notification feature and as such only the scons build file has been changed. Signed-off-by: Dmitry Torokhov commit dd7daaf553b98de57cfb027c3e973b111799866a Author: VMware, Inc <> Date: Wed Aug 1 22:20:13 2012 -0700 VIX: temporarily turn off VGAuth support Signed-off-by: Dmitry Torokhov commit c4e2242b6c6afee3ab9e5a44256b4dcf9f233d27 Author: VMware, Inc <> Date: Wed Aug 1 22:19:43 2012 -0700 Don't use $HOME to get the current user's home directory on Mac OS There are some cases on Mac OS where the $HOME environment variable has not been set even though the current user does have a valid home directory. For example, if you enable the "root" user in the UI and then try to start Fusion via Finder, it would fail spectacularly because it was unable to figure out the Log and Preferences directories. In lib/misc, for Mac OS, instead of resorting to $HOME in the case where we are trying to expand "~" for the current user, we instead use the posix passwd API, which according to the man page is properly hooked up to DirectoryServices and thus will give us any user's homedir even if it isn't actually in the /etc/passwd file. Signed-off-by: Dmitry Torokhov commit 0b18ef7a16fa4b5750769d29602ae89b85212547 Author: VMware, Inc <> Date: Wed Aug 1 22:19:16 2012 -0700 lib/file and lib.misc: misc fixes for Android We should test for presence of __ANDROID__ macro, not ANDROID_X86. Signed-off-by: Dmitry Torokhov commit c3430239f3ebe6e325fe71852b178eb060c5ed8e Author: VMware, Inc <> Date: Wed Aug 1 22:18:49 2012 -0700 Fix time synchronization when restarting tools When the tools are restarted, and the clock is modified (out of sync with the host's clock), if 'timeSync' feature is enabled, then the clock is not synced. This happens only first time after the tools are restarted. There is no issue from the second time onwards. In the code, we do the one step synchronization only if the tool status is stopped. Ideally, we should do this one step synchronization the first time even after the tools are restarted. This is fixed by setting the tools status to stopped when the tools are restarted initially. Signed-off-by: Dmitry Torokhov commit 90766520c9a335c6ac1baaa5845b8dfb3f559339 Author: Dmitry Torokhov Date: Mon May 21 16:30:01 2012 -0700 Updating open-vm-tools version for release 2012.05.21-724730. Signed-off-by: Dmitry Torokhov commit 482332b8d4282df09838df5ea4c58df9cdb4faf3 Author: VMware, Inc <> Date: Mon May 21 15:29:31 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4c35cf46be050d15d2cb94f10eabdd7d2938b86c Author: VMware, Inc <> Date: Mon May 21 15:29:00 2012 -0700 Remove objectionable code from authPosix.c Auth_AuthenticateUser in authPosix.c, for both the PAM and non-PAM paths, has a short-circuit enabled by defining ACCEPT_XXX_PASS. When defined, anyone can login simply by specifying "XXX" as the password. There is no evidence this has ever been enabled in production code, but it's apparently X-rated enough that we want it gone immediately. Signed-off-by: Dmitry Torokhov commit 1b67065806a605c4e002c22b414620096394d92a Author: VMware, Inc <> Date: Mon May 21 15:28:43 2012 -0700 Add PRINTF_DECL to MsgList_Append Use PRINTF_DECL to validate proper message format and arg count for MsgList_Append. And fix the two remaining errors on compile (others were fixed while found). Signed-off-by: Dmitry Torokhov commit 85a42b14e8dfc15f1e012109a0d9fee8a5c8278a Author: VMware, Inc <> Date: Mon May 21 15:28:33 2012 -0700 Fix HgfsConvertFromNtTimeNsec() for arm-linux builds. ARM isn't just Android and iOS... Signed-off-by: Dmitry Torokhov commit 521825d895c01969c0ce59fdb178de149e9198a2 Author: VMware, Inc <> Date: Mon May 21 15:28:28 2012 -0700 Ivy Bridge model 3A is public Ivy Bridge features are still under wraps, but we no longer need to hide model 3A from Community Source. Signed-off-by: Dmitry Torokhov commit 5f32b14b957b52dd1a1247703f827c1317832d69 Author: VMware, Inc <> Date: Mon May 21 15:28:18 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 3d3a0b53b986474e56bebd829623390885d44a95 Author: VMware, Inc <> Date: Mon May 21 15:28:12 2012 -0700 Introduce VMW_CONTAINER_OF container_of() is a useful operation even outide of lists so let's add it to vm_basic_defs.h so it is available to everyone. Signed-off-by: Dmitry Torokhov commit 1abb20bd213976a1fa534e5d1521016a69848749 Author: VMware, Inc <> Date: Mon May 21 15:28:08 2012 -0700 char is unsigned on ARM - change some vars to 'signed char' or 'int' Unfortunately GCC isn't very good at warning for this, so I've probably missed some. Also fix a couple of uses of asm("int 3"). Signed-off-by: Dmitry Torokhov commit 32707b1a74364d8c849df7a6674251626ff22d08 Author: VMware, Inc <> Date: Mon May 21 15:28:03 2012 -0700 Fix vSockets stats on Linux. Unfortuntely these have been broken since we switched over to the QPair interface. The stats are handy, so let's fix them. Also keep track of total bytes consumed/produced. Signed-off-by: Dmitry Torokhov commit 86414109fb2fe7a11245573a61fd2daa7dbafe09 Author: VMware, Inc <> Date: Mon May 21 15:27:58 2012 -0700 Add DEBUGBREAK() macro for ARM. Signed-off-by: Dmitry Torokhov commit fcc5c7592ffeded6bbf5357e6aaa6c3f9bce3728 Author: VMware, Inc <> Date: Mon May 21 15:27:54 2012 -0700 Cleanup and rearchitecture of HGFS server change notification part II Server APIs for the file system change events renaming and type renamed. Signed-off-by: Dmitry Torokhov commit cc094bfb38f24391e4c390ba8ad1d5823748d9bd Author: VMware, Inc <> Date: Mon May 21 15:27:48 2012 -0700 Fix arm-7 version of Atomic_FetchAndAddUnfenced(). It was overwriting the amount to add with the result, which goes horribly wrong if the strex fails and the operation is retried. Signed-off-by: Dmitry Torokhov commit 1da136440820efe4ceb730f49cb3b4b6d1e907d6 Author: VMware, Inc <> Date: Mon May 21 15:27:39 2012 -0700 Update iOS sdk to 5.1 from 4.3 for mobilelibs. Change the compiler to apple llvm 3.1(clang) from gcc. This patch mainly worked on three things. Related Makefiles of mobilelibs target are modified. Because clang requires explicity of the returen value from the MACRO, I changed the ThreadUtils.c to return the value. Add the preprocess MACRO to separate the header files for IA-32 from non-IA-32 in atomic.c . Add the implementation of RoundupPow2Asm32 for ARM (none thumb) in vm_basic_asm.h . Signed-off-by: Dmitry Torokhov commit 9ac70d7fba5254e0e40413038ef142e9f393dcf3 Author: VMware, Inc <> Date: Mon May 21 15:27:34 2012 -0700 vmtoolsd: Log plugins' failed signal connection attempts. This change doesn't fix anything. It only adds context for debugging. Signed-off-by: Dmitry Torokhov commit 8a0b74033560c0d6641a4db98b9a8e48b75922e7 Author: VMware, Inc <> Date: Mon May 21 15:27:30 2012 -0700 Introduce SOCK_SEQPACKET to vSockets. Finally, the mythical sequential packet socket type appears. This socket type is specifically for guestRPC, over which Tools can communicate with the VMX. It is *not* a general sequential socket type: while you can certainly make these sockets on the host, they won't be able to connect anywhere, and you can't open such sockets inside the VMX, you can only receive connections from the guest. It works by using DGRAMs underneath. vSocket DGRAMs are bit-compatible with VMCI DGRAMs, so we can get from vSockets in the guest directly to the VMX, without having to go through the host vSockets driver. To make it connected and reliable, we introduce a very simple protocol using a new packet format. It consists only of CONNECT, DATA, SHUTDOWN and CLOSE (the latter two being mostly the same as far as the VMX is concerned). Datagrams going to the VMX are already reliable. In the other direction, if we fail to receive, we send a CLOSE down with an error (unlike the STREAM protocol, I actually remembered to embed an error code this time). For DATA packets, we place payload after the packet header. We have to copy in from user-mode anyway, so it doesn't add any copy overhead. This is part 1, which is the Linux guest side. It adds a new socket type to our family and implements the appropriate socket functions (things like accept() and so forth are just unecessary). Signed-off-by: Dmitry Torokhov commit a49bd0d1cfae0aea3228a99436373c0e39e1e021 Author: VMware, Inc <> Date: Mon May 21 15:27:23 2012 -0700 Cleanup and rearchitecture of HGFS server change notification part I Server callback for receiving file system change events renaming and type renamed. Signed-off-by: Dmitry Torokhov commit dfb3e18afb5712d6ea8fd9dd26a62b11e130bc80 Author: VMware, Inc <> Date: Mon May 21 15:27:15 2012 -0700 vmblock, HGFS: allow compiling on kernels 3.4+ Commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b removed d_alloc_root() (it was replaced by d_make_root), adjust our code to call the new function and provide the replacement on older kernels. Signed-off-by: Dmitry Torokhov commit d9ec8a96c58da298ff418acb4384e782719ddadb Author: VMware, Inc <> Date: Mon May 21 15:26:50 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit c195507ae75e535cdfc13c1cb17e215ff77486a2 Author: VMware, Inc <> Date: Mon May 21 15:26:42 2012 -0700 Fix HGFS build For some reason gcc options for hgfs are not happy with typecast of 'const void *' to 'volatile void *'. I have no idea why, as I thought that that is what casts are for, but for now let's do not typecast that thing. That should keep HGFS happy. Signed-off-by: Dmitry Torokhov commit d21df445c231f2661cb3226b93208ce73ec2a889 Author: VMware, Inc <> Date: Mon May 21 15:26:37 2012 -0700 hostinfoPosix.c: remove reference to sys/timeb.h sys/timeb.h is deprecated in FreeBSD9.0 and may cause compilation warnings turning into breakages when building Open VM Tools. Luckily we are not using ftime() that this header declares, so we can simply get rid of it. Signed-off-by: Dmitry Torokhov commit 3c3792977d2a3c4c5e6168287e27dd7e8d459245 Author: VMware, Inc <> Date: Mon May 21 15:26:33 2012 -0700 Introduce {Set,Clear,Complement,Test}BitVector functions There are functions which operate on 32bit and 64bit variables, but their inline assembly is not suitable for bigger arrays without forcing variable they operate on always to memory, which is not desirable. Existing functions also do not report previous value of the bit. So let's roll out versions that can operate on bit arrays. As all I need is 256 bits, I've implemented only version with 32bit index. Signed-off-by: Dmitry Torokhov commit 3254eb203c3001a31b49df266a182f314b904533 Author: VMware, Inc <> Date: Mon May 21 15:26:28 2012 -0700 vPageChannel: Failed to allocate packet (channel=ffff880013fda380) (size=69600) We're trying to perform really large atomic allocations, for example when allocating a packet to send receive buffers down to the host. Such allocations can be hard to fulfil when the kernel cannot block. So make the chunks even smaller when we're in an atomic context. One potential downside to this is that we will signal a lot, i.e., we're going to signal 16x more for page-sized than for DGRAM-sized packets. We fix this by writing out all of the packets and then only signalling afterwards. The peer is okay with this: it may peek a packet header but then not see sufficient data in the QP to be able to read the rest, so it will bail out, leaving the packet for when all the sends are complete and it gets signalled. The other, and more proper, way to fix this is to change the interface so that packets are iovecs of page-sized chunks. That's a somewhat more complex change that we aim to do for v2 anyway (actually we'll have packet lists, and each packet in the list will be split into page-sized chunks, and each chunk will hold actual PPNs). Signed-off-by: Dmitry Torokhov commit 6f27922f19c03f19cf05c1e407ca75d8a6591980 Author: VMware, Inc <> Date: Mon May 21 15:25:07 2012 -0700 Fix a missing break in MXUser_ControlExclLock. MXUser_ControlExclLock(lock, MXUSER_CONTROL_ENABLE_STATS, ...) would always return FALSE due to a missing break... it'd always fall through to the default case. No-one seems to care about the return value of the function so far... Signed-off-by: Dmitry Torokhov commit 791f14d6809405b5c57bc2517bbd5d25d9a7ba81 Author: VMware, Inc <> Date: Mon May 21 15:25:04 2012 -0700 Fix vSphere client/vim-cmd not showing IPv6 addresses The nicInfo structure was not getting populated because the RecordRoutingInfo function was failing as IPV4 wasnt configured on the VM (even though IPV6 addresses were configured). Signed-off-by: Dmitry Torokhov commit ef2d03d2d3bd60a56a3b1b8e62dc58ef29857fc1 Author: VMware, Inc <> Date: Mon May 21 15:24:59 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 856eabf8172346ad7f5ed5a5ba7178f87da67e45 Author: VMware, Inc <> Date: Mon May 21 15:24:19 2012 -0700 Add support for promoted AVX2 instructions This changeset adds support for AVX instructions promoted to enable use of the full 256bits of the ymm regs by the AVX2 feature set. This changeset does not introduce any new instructions or encodings. It just honors the VEX prefix 'L' bit used to indicate the width of the source and destination operands. Previously, these instructions would result in a #UD fault under AVX if VEX.L==1. Signed-off-by: Dmitry Torokhov commit 0913439a3b7de88c059c75d567be0ad578d64ccb Author: VMware, Inc <> Date: Mon May 21 15:24:09 2012 -0700 DescriptorWrite: revert to in-place write on NFS The ESX NFSv3 client can't handle rename. So we need to switch back to the write-the-descriptor codepath on NFS on ESX. Note that even though we don't use the result of the AtomicTempFile creation, failures to create/write the AtomicTempFile are still treated as fatal (see descriptor.c: errorWriteDirect HostType_OSIsVMK); while there are a few scenarios where we might be able to continue despite them, the storage is fatally sick and we should error early rather than limp along. Furthermore, special casing these failure paths requires significant additional code (and therefore development work and risk) with no benefit. Signed-off-by: Dmitry Torokhov commit 17b096bf196663ab269b376ea12bf31efee4f933 Author: VMware, Inc <> Date: Mon May 21 15:24:04 2012 -0700 Add NULL checks before accessing logger attribute. When we login into a VM, a new VMware Tools process starts with the logged in User account. If the logged in user is the least prviliged user (guest account in Windows 8), then the process may not be able to create a logger handler. GlibUtils_Create*Logger() functions may return NULL. In such case, accessing the logger handler may result in a crash. Modified the code to add proper NULL checks everywhere before accessing the logger handler. Signed-off-by: Dmitry Torokhov commit c89a391c0962a251b8f48e24b5921fedcf9379e9 Author: VMware, Inc <> Date: Mon May 21 15:23:53 2012 -0700 Fix obj build compile error change ~0 to (ULONG)~0 Signed-off-by: Dmitry Torokhov commit 6c137180e47d95394ceb34fc633476c8124472fb Author: VMware, Inc <> Date: Mon May 21 15:23:49 2012 -0700 Bump up the tools version for Fusion 4.1.2 Added code to bump up the tools version for Fusion 4.1.2. Signed-off-by: Dmitry Torokhov commit d313075bdeb7386171463fd8971c19782d83be79 Author: VMware, Inc <> Date: Mon May 21 15:23:44 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 9f7be45cb2adfb5cf710139cc13a5518ec2d93a6 Author: VMware, Inc <> Date: Mon May 21 15:23:35 2012 -0700 Internal branch sync. Included in this change: . another fix for File_PathJoin . remove the utf::string _variant_t/uvariant_t constructors . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit 2675d8c8c870b09da4986e67d04e429c06052732 Author: VMware, Inc <> Date: Mon May 21 15:23:16 2012 -0700 Add support for processor groups to Windows vmmon Many OS APIs represent processors using a uintptr_t bitfield. Processor groups were added in Win7/W2K8R2 to get beyond the limit of 64-bit processors on x64. Currently at most 4 groups, or 256 processors, are supported. This happens to match the current max pcpus define. This change utilizes the Win7 WDK and procgrp.h, which uses some #defines and thunking to use the native newer APIs on Win7-and-later, while emulating the behavior on older OSes using older existing APIs. By default a process is limited to one processor group. Certain operations, e.g., get/set TSCs will only be performed across the processor group that the vmx process is running on. HostIF_CallOnEachCPU() will eventually need to be modified to run across all processor groups rather than the current processor group. The vmx still needs to be modified to do a more elaborate determination of the # of processors because the standard OS APIs only return the vmx passing down a buffer that's too small for IOCTL_VMX86_GET_ALL_MSRS. This function is also used as part of Task_Terminate()'s call to TaskIsVMXDisabledOnAllCPUs(), and the call to Vmx86_EnableHV that's triggered by IOCTL_VMX86_ENABLE_HV. I also removed some logs that spew too much when running a VM with a kernel debugger attached. bcdedit.exe /set groupaware on Signed-off-by: Dmitry Torokhov commit 867d8ca0fb620cac34b6e35b4590534fdc6d1892 Author: VMware, Inc <> Date: Mon May 21 15:23:08 2012 -0700 Internal branch sync. Included in this change: . return a new error if the 'mount' command fails. . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit d6a43faa42815002b80439dcf420981cc9c4b8ce Author: VMware, Inc <> Date: Mon May 21 15:22:54 2012 -0700 Make the first of a few changes to accomodate Haswell. The new Haswell CPU seems to behave like the other newish Intel architectures, so in the main the changes needed are simple. I've added the macros to allow for detection for the model family and architecture. The interpreter changes are to make the interpreted results consistent with native execution. I also added Haswell to the list of architectures supported by vpmc. The test changes are the counterpoint to the monitor changes. Signed-off-by: Dmitry Torokhov commit 8a1a6dc8416432b731dd43c88e91d26b3042547c Author: VMware, Inc <> Date: Mon May 21 15:22:45 2012 -0700 Fix VThreadBaseNativeIsAlive Signed-off-by: Dmitry Torokhov commit 524d1b5d05c8fd0d519bc62974709c0fc619959e Author: VMware, Inc <> Date: Mon May 21 15:22:39 2012 -0700 resolutionSet: Correct a use-after-free bug Customer opened a thread in the Workstation forums noting he had trouble entering Unity.¹ After some back and forth, even after seeing that XRRSetScreenConfig claimed success,² this function would return failure. Here's why: XRRScreenConfiguration *xrrConfig = XRRGetScreenInfo(...); XRRScreenSize *xrrSizes = XRRConfigSizes(xrrConfig, ...); /* xrrSizes simply points to a member of xrrConfig. */ ... XRRFreeScreenConfigInfo(xrrConfig); return xrrSizes[i].width == width && xrrSizes[i].height == height; After the call to XRRFreeScreenConfigInfo, xrrSizes is no longer valid. Whether SelectResolution succeeds is ultimately a matter of luck w/r/t underlying implementation details. (“Does XFree() alter the contents of freed memory?”) 1. http://communities.vmware.com/thread/397056 2. We threw away XRRSetScreenConfig's return value. While this change doesn't alter logic to depend on this value, it's still at least worth logging. Signed-off-by: Dmitry Torokhov commit 2c4b07093529b7fb41fbaf3d4698f3c4a49a673b Author: VMware, Inc <> Date: Mon May 21 15:22:23 2012 -0700 Add support for BMI1/ABM instructions on Intel. This group of instructions is already supported on AMD in previous HW versions. Extend support to Intel starting with HWv10. Signed-off-by: Dmitry Torokhov commit 4e01f6ed02d47c3efed605a2ae984ad53dc449d2 Author: VMware, Inc <> Date: Mon May 21 15:22:02 2012 -0700 EXTERN: remive archaic definition Signed-off-by: Dmitry Torokhov commit a8eeedaa786168fce6fb9ff85071d5345fe7bdbf Author: VMware, Inc <> Date: Mon May 21 15:21:59 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit db0d66e69df2e069651ed1cf41e16a02400d4b7f Author: VMware, Inc <> Date: Mon May 21 15:21:49 2012 -0700 Audit and remove VMX86_WGS wgs/gsx/server (non-esx) code still lives within its older still active siblings. I located as much as possible and removed its dependencies and tried to make appropriate changes related to the code being removed. This change had the potential to remove a lot of other old products and tools, but I resisted that temptation (console, mui, ccagent to name a few). For the most part it was a standard removal. Signed-off-by: Dmitry Torokhov commit 161e4907028ce9dde80030f24f85a6e8fe659bee Author: VMware, Inc <> Date: Mon May 21 15:21:36 2012 -0700 Internal branch sync. Included in this change: . VMCI: increase pinned QP limit to support larger vPageChannel . VMCI: Doxygen vPageChannel API . VMCI: fix leaking shm pages in vPageChannel Destroy() . fix foundry code to use the higher order bits of VixError correcly . turn on VGAuth code in VIX . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov commit b12aecd270facaac9a8d9e767fa6e8c259d884e9 Author: VMware, Inc <> Date: Mon May 21 15:21:19 2012 -0700 GOSTable: MS Hyper-V Server Formally recognize MS Hyper-V Server in the GOS Table, UI and VMX. Signed-off-by: Dmitry Torokhov commit fb8f8ab613c3c62050f526e509ecb2980bfee080 Author: VMware, Inc <> Date: Mon May 21 15:21:13 2012 -0700 GOS: bit shaving As things stand we can only have 64 unique types of guests for hosted products. We used them all up and need to add more guest OSen. Collapse some less important explicit GOS OSen bits together, adjusting any visible strings accordingly. We have legal agreements with certain parties that require us to show an explicit recognition of their product (e.g. RH) so some things cannot be done away altogether... but we can bit on parties not likely to complain. Since the monitor doesn't need to know about differences, collapse Solaris 6 and 7 together, RHEL 6 and 7 together and SCO OpenServer 5 and 6 together. Total savings 4 bits (50 cents!). More than enough to add the one critical addition and leave room for growth in shipping product until we can implement a system that does away with the 64 guest OSen limitation. Signed-off-by: Dmitry Torokhov commit 46178fee87fcd4a52636a32dc13a54f62ad98666 Author: VMware, Inc <> Date: Mon May 21 15:21:05 2012 -0700 GOS: is it an enum or not Some time ago the GOS table ID values were changed from defines to an enum however the "enumity" of the values was not fully plumbed through the source base. Fix this so we get all of the type checking and visual goodness. Did a little bit of grouping/rearranging to the guest ID list to make it clear that the order can be changed (it's for internal use only). This will make it more obvious how many of each OS we have and make searching for things that can be compacted easier. This is the first of a series of changes to create some room for more guest OSen - we're limited to 64 as things stand (and they are all used). Signed-off-by: Dmitry Torokhov commit 4e36fa5f58dc3d5e53738760703346f4f3c313e9 Author: VMware, Inc <> Date: Mon May 21 15:20:56 2012 -0700 Bump up the Tools version for Hosted12 Techpreview 2. Added proper macros to bump up the tools version on hosted12 branch for TP2. Signed-off-by: Dmitry Torokhov commit 399e5b325b83dd1537ceea4caa36172af07b850c Author: VMware, Inc <> Date: Mon May 21 15:20:53 2012 -0700 VMCI: Set source context ID for DGRAMs destined for VMX In the routing code, we overwrite the ANY source context for DGRAMs destined for the host so that the destination knows who sent it. We should do the same for DGRAMs destined for the VMX, so that guestRPC knows who to reply to. Signed-off-by: Dmitry Torokhov commit babee8d2e4f775339f62a67dd623f5163364fb35 Author: VMware, Inc <> Date: Mon May 21 15:20:45 2012 -0700 lib/lock: clarify reference count and lock count We've got reference counting on locks which is different than the lock count (recursive depth). Disambiguate the names. Signed-off-by: Dmitry Torokhov commit 445ffc4e65d3fb2179ac2f0077d314f6687b138f Author: VMware, Inc <> Date: Mon May 21 15:20:37 2012 -0700 Internal branch sync. Included in this change: . remove VMCF transport from DnD . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit d56387d432e0465893768e5bbc9cad7014dba72e Author: VMware, Inc <> Date: Mon May 21 15:20:07 2012 -0700 Fix vmxnet_load_multicast() function In kernels version greater than 2.6.34 the vmxnet_load_multicast function used to return the entries to compute the LADRF used to return 0 always. Due to the above reason the IPV6 wasnt working after VMware Tools installation with upgraded kernel. Modified the function to return the correct value. Signed-off-by: Dmitry Torokhov commit 47867fe563eca5604e59d945885a8ab0d7f44859 Author: VMware, Inc <> Date: Mon May 21 15:20:02 2012 -0700 Bump up the tools version. Add proper #defines to bump the version of tools for next milestone. Signed-off-by: Dmitry Torokhov commit 427f59fa834be6dc32e5a8bda263af4f081df24b Author: VMware, Inc <> Date: Mon May 21 15:19:56 2012 -0700 Fix File_PathJoin ASSERTs some more I think that File_PathJoin's ASSERTs were a bit too aggressive. I believe that the intention was to disallow UNC paths for the tail portion of the path, not to disallow all paths that start with a directory separator. (Allowing a leading directory separator on Linux but not on Windows seems a bit dangerous anyway.) Signed-off-by: Dmitry Torokhov commit 95979ca689ab1fb600aa649f693f2b42bbdcc64d Author: VMware, Inc <> Date: Mon May 21 15:19:50 2012 -0700 Add support for BMI2 instructions. The upcoming Haswell CPU adds 8 new instructions advertised via a new BMI2 bit from the cpuid instruction. This change set adds the definitions for 6 of the 8 that can be methodically added to the existing decoder tables. The remaining 2 instructions require a bit of custom code and will appear upcoming reviews. Instruction definitions taken from: "Intel Architecture Instruction Set Extensions Programming Reference" February 2012. New instructions: BZHI,PDEP,PEXT,SARX,SHLX,SHRX Signed-off-by: Dmitry Torokhov commit 1cef7e27ca5f5626c3baf770575c1f78070e7a66 Author: VMware, Inc <> Date: Mon May 21 15:19:35 2012 -0700 Doxygen vmci_sockets.h This change adds API documentation for vmci_sockets.h using Doxygen. Signed-off-by: Dmitry Torokhov commit e9f178eec971692fba4e8206b3fa616f378175c8 Author: VMware, Inc <> Date: Mon May 21 15:19:20 2012 -0700 Introduce VMCI firewall in device backend This change implements the VMCI device backend part of the VMCI firewall. Signed-off-by: Dmitry Torokhov commit 5f6de78089977e33c8ce29783a6f4fa0f05d9bc0 Author: VMware, Inc <> Date: Mon May 21 15:19:08 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit a3024aa1cbecc94b8099646a2c804c8f355862ac Author: VMware, Inc <> Date: Wed Mar 14 11:34:54 2012 -0700 Updating open-vm-tools version for release 2012.03.13-651368. Signed-off-by: Dmitry Torokhov commit 0114aabd54bf2db4556563b7149c4fbbdec3d87b Author: VMware, Inc <> Date: Wed Mar 14 11:00:05 2012 -0700 USB Arbitrator: split version into vm_usbarb_version.h I swear that half of changes in open-vm-tools repositoty are due to arbitrator version updates recorded in vm_version.h. Let's split it out into vm_usbarb_version.h that we do not need to ship to make my job easier. Signed-off-by: Dmitry Torokhov commit b2e39b0ec855e2454817b6b7598a46270c1ea0b4 Author: VMware, Inc <> Date: Wed Mar 14 10:59:57 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 8cc61727ba438d1f04007a8122dc5b597a0f1ac9 Author: VMware, Inc <> Date: Tue Mar 13 13:15:35 2012 -0700 Make VMCI Socket protocol header definition public The upcoming VMCI firewall feature needs to understand the protocol format used by control packets for VMCI sockets. This change moves the definition to a new file in the bora/public for easier consumption by the VMCI module. Signed-off-by: Dmitry Torokhov commit 8811e8d63a83b8c22bd4c1c309ce02568d87b6be Author: VMware, Inc <> Date: Tue Mar 13 13:15:29 2012 -0700 Iternal branch sync. Included in this change: . updates to German and Japanese translations . make File_GetVMFSAttributes public. . small cleanup in lib/file. . VMCI: fix "scheduling while atomic" in VPageChannelAcquireSendLock. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4d2b02b1aa90d1a3df7777246416288ef89511f2 Author: VMware, Inc <> Date: Tue Mar 13 13:15:15 2012 -0700 Fix vmxnet driver compilation for kernel 3.3 Some ethtool callbacks were deprecated, remove them. Signed-off-by: Dmitry Torokhov commit f98f16625866138220326ed6f1b05f87ebd5cbc9 Author: VMware, Inc <> Date: Tue Mar 13 13:15:04 2012 -0700 lib/log: fix typo in comment lib not log Signed-off-by: Dmitry Torokhov commit d2cb2154c7014d9857f50c7947eeeabde8a45136 Author: VMware, Inc <> Date: Tue Mar 13 13:14:20 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit f872b34706bf1c5a43d713843f1410be47fefd8d Author: VMware, Inc <> Date: Tue Mar 13 13:14:15 2012 -0700 Internal branch sync. Included in this change: . VMCI: fix for locking scheme. . updates to Chinese/German/Japanese/Korean translations. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit f26732582f2a8e34fc823627d1dc6251744a3920 Author: VMware, Inc <> Date: Tue Mar 13 13:13:53 2012 -0700 VMXNET(3): allow building on Solaris 11 This CS does NOT fix all of the problems with a Solaris 11 Tools install, though the drivers do load and the install and uninstall complete. Signed-off-by: Dmitry Torokhov commit 93176d5a5edc1de2c3851b1342c3b7163d04db49 Author: VMware, Inc <> Date: Tue Mar 13 13:13:47 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit c9380b1d8a7fd223501c00fd346d1379e3a6e60e Author: VMware, Inc <> Date: Tue Mar 13 13:13:23 2012 -0700 Introducing new XML tag ... for command name in ListProcessesInGuest. This is to relieve VIX Client code from having to parse OS specific command names from the full command line, except for Windows, which has been left as it is. Without this fix, current implementation on Mac, Linux, Solaris and FreeBSD are broken whenever we have folders or executable file names with blanks spaces in them. Signed-off-by: Dmitry Torokhov commit 1ec2a02df370e91f5c1caedb7e8c27398f822f7e Author: VMware, Inc <> Date: Tue Mar 13 13:13:14 2012 -0700 Fix compile issues in hostinfoPosix on iOS Signed-off-by: Dmitry Torokhov commit c0cc3456436a545c55f51389d24218a0605b0dbd Author: VMware, Inc <> Date: Tue Mar 13 13:12:31 2012 -0700 Add an option to disable the Windows8 DPC watchdog This change adds an option to set the hypervisor CPUID bits that tells Windows to disable Watchdog timers. Signed-off-by: Dmitry Torokhov commit e5b5baec3721fef7c10256ded9012079212c2101 Author: VMware, Inc <> Date: Tue Mar 13 13:12:14 2012 -0700 Introduce FileIO_AtomicTempPath() This new function returns a temp path name in the same directory as the argument path. Signed-off-by: Dmitry Torokhov commit 2edd468eca9586f13a90bc6c52827e9967756c2b Author: VMware, Inc <> Date: Tue Mar 13 13:12:01 2012 -0700 Introduce VMW_CLAMP macro Signed-off-by: Dmitry Torokhov commit ed915fcc4b63c86f2a03b27938f7f798ac701730 Author: VMware, Inc <> Date: Tue Mar 13 13:11:53 2012 -0700 Improper ASSERTs in vmx cpuid handling 2 ASSERTs can trigger due to input values from the guest cpuid call. The first one happens if the input level falls within the valid low range level, but hits a hole where no level exists. The second ASSERT triggers if the ecx value is out of range for the TOPOLOGY level on Intel. The fix is to handle the values at runtime and not assert. Also fix a couple of line wraps. Signed-off-by: Dmitry Torokhov commit 6d178ace6bf01b0318f473c8da3632fa734fe236 Author: VMware, Inc <> Date: Tue Mar 13 13:11:46 2012 -0700 GOS table: add darwin12 We don't know of any reason why darwin12 will require support different than darwin11 so for now, implement it as an alias Signed-off-by: Dmitry Torokhov commit c12f4963878658643ca950fdddf6b2f6abe84512 Author: VMware, Inc <> Date: Tue Mar 13 13:11:41 2012 -0700 Clean up one of the GOS tables. Make things easier to read and maintain. Basically, line things up. Signed-off-by: Dmitry Torokhov commit a7e9dcf23158a09c957db728a988d0892afca4cf Author: VMware, Inc <> Date: Tue Mar 13 13:11:35 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 1da8fbf593f3586bb222b54f909cf1db98cf92ef Author: VMware, Inc <> Date: Tue Mar 13 13:11:30 2012 -0700 Fix HGFS, pvscsi, vmxnet3, vmci, and vmnet build problems on 3.3 kernel hgfs: Mode argument is now umode_t, rather than int. vmxnet3: Features are netdev_features_t, rather than uint32 (and they are uint64 now). vmci, pvscsi: Bool module option is bool, not int. vmnet: Missing compat_module.h include. Signed-off-by: Dmitry Torokhov commit a8c4664ad7c7d326610524ba565b2fa3c71b0b04 Author: VMware, Inc <> Date: Tue Mar 13 13:11:24 2012 -0700 Mac OS: stop depending on zprint Since Mac OS version 10.7, the proper way to retrieve kernel zone information is to call mach_zone_info(). The modified code is used by Fusion and the Mac OS Tools, so we have to be extra careful and check: o At run-time for the availability of mach_zone_info(), and in case it is not available, fallback on the existing zprint mechanism. o At compile time for the availability of various mach_zone_*_t types, and in case they are not defined, define them. Signed-off-by: Dmitry Torokhov commit 9143dfc8b7063774057e381238eb060757390fc4 Author: VMware, Inc <> Date: Tue Mar 13 13:11:12 2012 -0700 lib/file: trivial cleanup Simplify formatting strings for paths. Signed-off-by: Dmitry Torokhov commit 6ec38e15d86e71d1a3b3a9c82af571b9c6c7cd0f Author: VMware, Inc <> Date: Tue Mar 13 13:11:07 2012 -0700 Fix callback in vmcilib There's a nasty bug where, if the detach callback gets invoked at the same time that the client is releasing, we can end up executing after the client has unloaded. The problem is that the callback will wait on the lock, and once Release() lets it go, the client is allowed to unload. The lock, and the rest of the code for the callback, is then gone. The fix is two-fold: 1. Use the system callback mechanism. This utilizes callback objects stored in the system object table. The callback object is shared between the publisher and the subscriber using a symbolic name. This provides a level of indirection between VMCI and vmcilib, i.e., they don't have to rely on each other being around. 2. Introduce a new function, VMCI_Exit(). The client calls this function when it unloads, at PASSIVE level, with no locks held, and this unregisters from the callback. So the new workflow for a client is as follows: VMCI_DeviceGet() VMCI_DeviceRelease() VMCI_DeviceGet() VMCI_DeviceRelease() ... VMCI_Exit() The above changes require no modification to the VMCI/vmcilib IOCTLs and so are backwards-compatible with shipping clients that do not use callbacks (we haven't yet shipped any that do). Signed-off-by: Dmitry Torokhov commit d5dbe1f0d62aebfba490152133a84d95c4ee85ff Author: VMware, Inc <> Date: Tue Mar 13 13:10:54 2012 -0700 Allow compiling hgfs and dnd library code on Android Signed-off-by: Dmitry Torokhov commit 48a7c7b07743a961bc1ae31b767ad286c4c71d13 Author: VMware, Inc <> Date: Tue Mar 13 13:10:48 2012 -0700 gosTable: Add RHEL7 We'll need this soon so we need to have the framework in place now. The UI presence can be tweeked later. Signed-off-by: Dmitry Torokhov commit c7e704c0314294fd592f16de5c64f8f97dca685b Author: VMware, Inc <> Date: Tue Mar 13 13:10:34 2012 -0700 Change File_CreateDirectoryHierarchy to enable "undo" When calling File_CreateDirectoryHierarchy, there was no way to know what was actually created by the call and what wasn't. This meant that trying to be a good neighbor and clean up after ourselves if whatever we wanted the directory for failed (or was cancelled) wasn't possible. This change adds an optional OUT parameter to that gets set to the top-most directory which was actually created by the call. If the caller then wants to clean up, they can pass that into File_DeleteDirectoryTree. Signed-off-by: Dmitry Torokhov commit 12866c50c845063b7a24d998d1826aaed396be3e Author: VMware, Inc <> Date: Tue Mar 13 13:10:24 2012 -0700 Fix some inline assembly constraints The constant arguments to the "bt" family of instructions are limited to [0,31] for 32-bit operations and [0,63] for 64-bit operations. Signed-off-by: Dmitry Torokhov commit 341417e95d385b2b39a25c86fab43ebc9ced27bb Author: VMware, Inc <> Date: Tue Mar 13 13:10:20 2012 -0700 BIOS handoff to the operating system with X2APIC enabled The following change defines new backdoro command to be used by BIOS to check if it needs to enable X2APIC before handing off to the OS. Signed-off-by: Dmitry Torokhov commit 48c4ec254f7b4a3cb7b1d460b27088bb5a00448e Author: VMware, Inc <> Date: Tue Mar 13 13:10:16 2012 -0700 Internal branch sync. Included in this change: . FileIO_AtomicUpdate() should preserve errno value. . More VGAuth changes Signed-off-by: Dmitry Torokhov commit f23628071fa7add966076b40911cbc3299b27b6a Author: VMware, Inc <> Date: Tue Mar 13 13:09:56 2012 -0700 Fix compilation of vmxnet(3) for FreeBSD9.0 if_timer and if_watchdog were depricated in FreeBSD9.0 Signed-off-by: Dmitry Torokhov commit debbd2c10c7a51bcdb1c509fa112df504f07fd13 Author: VMware, Inc <> Date: Tue Mar 13 13:09:45 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 506b8ede9e1dcdb85bffea9b3f6ec3aac5aeaa68 Author: VMware, Inc <> Date: Tue Mar 13 13:09:39 2012 -0700 No need to lock twice before accessing VMCI context queue pair array. The VMCI context keeps track of queue pairs allocated by that context in a handle array. This handle array is always accessed while holding the general queue pair lock, so we do not need to grab the context lock as well. In fact, the header file already describes this. So drop grabbing the context lock for queuePairArray. Signed-off-by: Dmitry Torokhov commit 2abe0b1b8ee96c36da47966fd4e2131601b1e81a Author: VMware, Inc <> Date: Tue Mar 13 13:09:34 2012 -0700 Fix tools uninstall crash when stopping vmuser During uninstall/upgrade, tools launches vmtoolsd.exe -n vmusr --kill to stop the existing user process. The new instance however crashes before it could send the message, and therefore the existing vmuser process remains. The problem is uninstall doesn't wait for the process to finish, and proceeds with the uninstall. This removes the Tools registry entry which vmtoolsd.exe tries to read on startup. It hits the assert and crashes the process. The fix is in two places. We fixed vmtoolsd.exe so it doesn't assert if the registry entry doesn't exist, and updated the installer to launch and wait for the process to finish before continue. Signed-off-by: Dmitry Torokhov commit bf3078d5f3265e8b6a2a13acf64645908bad3eb6 Author: VMware, Inc <> Date: Tue Mar 13 13:09:28 2012 -0700 Adjust some log messages. Signed-off-by: Dmitry Torokhov commit e1165f4c22bec8c96e61c97388345ef1a5b0e2ff Author: VMware, Inc <> Date: Tue Mar 13 13:09:18 2012 -0700 Snapshot's file absolute path must be respected It is just wrong to take an absolute pathname, truncate it to a basename, then do a path search on the basename to find the file. It seems incredible that such a blunder has existed in a common routine since 2004. Made path search semantics more sensible: only unadorned basename is searched via path. Signed-off-by: Dmitry Torokhov commit a2e7fec3bf64b526a5635afc8655e6025f8be197 Author: VMware, Inc <> Date: Tue Mar 13 13:09:08 2012 -0700 Bump the major version again... ...cos we missed one release. Signed-off-by: Dmitry Torokhov commit 2557972dec442a5ea5b37d7863d4f120d88d5402 Author: VMware, Inc <> Date: Tue Mar 13 13:09:01 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 568df879d1e5fa55d78271f2f49faa2024c79589 Author: VMware, Inc <> Date: Tue Mar 13 13:08:57 2012 -0700 Widen MainMem pagenums. This change widens the MainMem pagenums to 30 bits, in order to support up to 4TB of vRAM. BPN_MAINMEM_TAG is bit 30 now. For non-mainMem BPNs, the slot bits move into bits 23-29. No monitor size change. Signed-off-by: Dmitry Torokhov commit 6da9432523815ec0148abbfed2955265b68dcafd Author: VMware, Inc <> Date: Tue Mar 13 13:08:42 2012 -0700 Check for NULL before calling strcmp(). In few code paths, we pass NULL value to the strcmp() functions which may result in a crash. Modified the code to implement NULL checks before calling strcmp() function. Signed-off-by: Dmitry Torokhov commit 8bc130b1b797ac3b8cca2ab32b8fa436271a8a47 Author: VMware, Inc <> Date: Tue Mar 13 13:08:37 2012 -0700 Trivial fix to check for NULL pointer prior to strncmp The MSG_MAGICAL() macro needs to check for a NULL pointer prior to calling strncmp on it. Signed-off-by: Dmitry Torokhov commit e2fc7f5ce418503f6711c44581f2ca9032523468 Author: VMware, Inc <> Date: Tue Mar 13 13:08:18 2012 -0700 Give CursorPosition it's own loglevel This change gives mksCursorPosition it's own loglevel to cut down on traffic in the mks loglevel. Signed-off-by: Dmitry Torokhov commit cb24b0626ba9b8fa1978065659435e280c17f34c Author: VMware, Inc <> Date: Tue Mar 13 13:08:10 2012 -0700 Stop flooding the event log with VMCI messages. We should only be sending warnings or *really* important stuff to the event log. Turns out we were also sending some things to the log that should really only go to the debugger, even in release builds! Signed-off-by: Dmitry Torokhov commit 8463ae3e0f1b20a8f9b4a64b916218f3e57a7116 Author: VMware, Inc <> Date: Tue Mar 13 13:07:58 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. VGAuth is already disabled for open-vm-tools. Signed-off-by: Dmitry Torokhov commit a6af50f34691b781c9f5c5f1d95ffc352996508c Author: VMware, Inc <> Date: Tue Mar 13 13:07:40 2012 -0700 Provide GuestOS functionality for the scheme code. This attempts to provide the functionality used by monitor mode that relates to guest OS types. Doing this required re-jiggering some of the enums and tables used by the guest_os so that we could get a hold of them from the scheme code. Mostly this involved making macro generators that can then be instantiated in more than one place. With that in place the actual scheme implementation was pretty straightforward. One small unfortunate detail is that the strings used by the guestOS code are often generated by letting the compiler concatenate two strings together, but when using macros to pull this into scheme we end up with two distinct strings. This meant the scheme code had to include a string-append to fix this for every entry even though most didn't need it. As one small bit of premature optimiztion, I modified the implementation of string-append to special case the case of having only one string. I got scared away from table-ifying the strings themselves due to the comments about GuestInfoGetOSName. I also modified VMOvhdGetVMConfigStr slightly so that it can be passed a NULL (or nil) default string. Testing: Played around with the new scheme functions and some logging. Used some logging and some VMs from eregsuite to make sure the C version of GuestOSID didn't give different results. frobos (BT-intel, BT-amd, VT, SVM, EPT, RVI) Signed-off-by: Dmitry Torokhov commit 2867695b3368fa26c3867c3906871be56aca1c4a Author: VMware, Inc <> Date: Tue Mar 13 13:07:11 2012 -0700 Internal branch sync. Included in this change: . VIX: plumb in VGAuth - Guest AUthentication (disabled for open-vm-tools though). . hgfsServer: fix warning when compiling with clang. . lib/file: don't drop advisory file locks during atomic file updates . Added number of strings parameter to utf::string::split . Fix restarting network on SLES11SP2 Signed-off-by: Dmitry Torokhov commit e5389bffa62ae35914613bf176e893667d4b47e8 Author: VMware, Inc <> Date: Tue Mar 13 13:06:45 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 2617ad3af3f28bbe1c7afaa8eb4d0e91039ab3b7 Author: VMware, Inc <> Date: Tue Mar 13 13:06:40 2012 -0700 lib/file: consistent style Move a few things to maintain consistent style. Signed-off-by: Dmitry Torokhov commit 846d7932e14e48c6d61086a1c36dd26a54a69226 Author: VMware, Inc <> Date: Tue Mar 13 13:06:33 2012 -0700 Fix HGFS Server malformed header for change notification events sent to the clients. The change notification events generate HgfsRequestNotifyV4 requests to be sent to the clients to report changes. Unfortunately, the server packed the header badly as it calculated the total packet size incorrectly: the size of file name length field was added twice. This means that the clients that handle notification events will receive them prefixed with headers with the packetSize field greater than the total packet size sent. This was not noticed until now as the Windows HGFS client (currently the only client enabled for change notification support) did not validate the header from the server request correcty or thoroughly. When this code was corrected, the notification requests failed with a protocol error validating the header. Furthermore, since this code has shipped in the HGFS server, clients have to effectively ignore that field for these request type. Cleaned up some code, so that unused functions now used instead of duplicating code. Cleaned up some possible memory leaks too. Signed-off-by: Dmitry Torokhov commit 7404879edbe39b9af9148206ea3b346e1d03bdc2 Author: VMware, Inc <> Date: Tue Mar 13 13:06:05 2012 -0700 Using service name from find_networking_script for Sysv 'service' command. Directly runing init script to start network service fails on distros like OpenSuse 12.1. so we need to first try Sysv's 'service'. The currently approach of finding network service name with 'service status xxx' will fail when network service is down (return 3), as a result, suspend vm will fail. This patch fixes the issue by using the network service name returned from find_networking_script, thus avoided 'service status xxx' command. Signed-off-by: Dmitry Torokhov commit e33305d566220ea3f6ddbe47afda35f325d78124 Author: VMware, Inc <> Date: Tue Mar 13 13:05:51 2012 -0700 compat_ethtool.h: adjust to newer kernel API Signed-off-by: Dmitry Torokhov commit d0979c3b35a41ada9171c0ffa7daf1cb1d246c26 Author: VMware, Inc <> Date: Tue Mar 13 13:05:45 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 668a453152248f592188998b1f313f86c35dfee3 Author: VMware, Inc <> Date: Tue Mar 13 13:05:37 2012 -0700 Disable desktopEvents plugin when running in Windows on physical box ... not that open-vm-tools expected to build on Windows. Signed-off-by: Dmitry Torokhov commit 3343d305ea5f0a93113a9e1f4e6a018f4fc0a573 Author: VMware, Inc <> Date: Tue Mar 13 13:05:29 2012 -0700 toolbox-cmd: fix checking if wiper is enabled before shrinking We may not be allowed to shrink volume(s) even if wiper functionality is available (because of presence of snapshots, linked clones and other factors). Unfortunately CS 1409972 broke this and resulted in toolbox-cmd proceeding to wipe disk only to be informed later that shrink could not be completed. Signed-off-by: Dmitry Torokhov commit c9b98de8bcc6e8aba4218cc102511fbed5c3815a Author: VMware, Inc <> Date: Tue Mar 13 13:05:07 2012 -0700 VMCI: Add creation flags to vPageChannel This change adds flags to CreateInVM() for vPageChannel. NOTIFY_ONLY replaces the notifyOnly boolean. DELAYED_CB makes delayed callbacks an option (they used to be the default) and PINNED makes pinned queuepairs an option. More explanation in vmci_page_channel.h. Signed-off-by: Dmitry Torokhov commit 40149e987d8c7f687f375e5baecba202e0a2394d Author: VMware, Inc <> Date: Tue Mar 13 13:04:43 2012 -0700 Update Chinese/German/Japanese/Korean translations Signed-off-by: Dmitry Torokhov commit 30a8019817569c6f2f42c5fc2ebe65d5896bf03d Author: VMware, Inc <> Date: Tue Mar 13 13:04:59 2012 -0700 Add support for injecting ACPI tables to EFI And support for removing ACPI tables from the guest for both EFI and legacy BIOS. And make both processes available in beta/release builds too. Only restricted functionality is setting vendor of the platform in ACPI to match SLIC table - that works only in obj builds, or if table comes from NX1000. Both of the options are usable mainly for debugging, but we have had requests in the past to be able to expose some random stuff via ACPI, and this provides way how to do that. Option for adding table(s) is acpi.addtable.filename - - for example acpi.addtable.filename = "/.vmware/waet.tbl" to add ACPI tables from waet.tbl to the VM. Option for removing table(s) is acpi.skiptables - and it lists table signatures to remove - for example acpi.skiptables = "WAET,BOOT,HPET" to remove WAET, BOOT, and HPET from the VM. acpi.skiptables is processed before acpi.addtable, so you can use this mechanism to replace arbitrary ACPI table - by blacklisting table generated by the BIOS, and injecting tweaked replacement. If you blacklist vital tables (RSDT, FACS, FADT, DSDT), you are on your own. Your guest probably won't boot, or maybe even firmware will crash. Making all this available for user required some additional changes in slicvendor handling. Most important is that exclusion is now per vendor/device, rather than one VM on the box. And in obj build this restriction can be overriden with config option. Signed-off-by: Dmitry Torokhov commit b383087dfdfe03ee60e4bf3cf533366727415ad8 Author: VMware, Inc <> Date: Tue Mar 13 13:04:05 2012 -0700 Return an error if the specified run script text is too large. VixMsg_AllocRequestMsg() ASSERTs if the message size exceeds VIX_COMMAND_MAX_REQUEST_SIZE. Made code changes to return an error if the specified script text is too large. Defined a new error code for this specific error case. Added a remark in the documentation for VixVM_RunScriptInGuest() function. Signed-off-by: Dmitry Torokhov commit 080a5a27711871f3a48cb397896f6a83fe4ad93c Author: VMware, Inc <> Date: Tue Mar 13 13:03:53 2012 -0700 Internal branch sync. Included in this change: . cleanup in machineID.c code. . more GOS indentifiers. . updates to our trademark strings. Signed-off-by: Dmitry Torokhov commit fe86b76f1bafb448210bb95056303d22e6e68a29 Author: VMware, Inc <> Date: Tue Mar 13 13:03:34 2012 -0700 Fix FileLockIntrinsic to propagate the exclusivity flag The exclusivity flag determines whether we ask for an exclusive lock or a read-shared lock. We had neglected to initialize it. Signed-off-by: Dmitry Torokhov commit 5df706c8e1ffd060ff819357265a66d9a1aaf0bd Author: VMware, Inc <> Date: Tue Mar 13 13:03:30 2012 -0700 VMCI: report VMCI_ERROR_DST_UNREACHABLE when VMX goes away When a VMCI driver with host side only attempts to route to an unknown context ID, it reports VMCI_ERROR_DEVICE_NOT_FOUND. Change that to VMCI_ERROR_DST_UNREACHABLE, since that is more descriptive. Signed-off-by: Dmitry Torokhov commit 8edef0b4332aedd2c0749c7545330ff43c082b27 Author: VMware, Inc <> Date: Tue Mar 13 13:03:21 2012 -0700 lib/log: Clean up the Log Facility API Signed-off-by: Dmitry Torokhov commit 8c9b565e40c1c18e6ad580298af04140ded6bec5 Author: VMware, Inc <> Date: Tue Mar 13 13:02:40 2012 -0700 Fix for HGFS file perms when modified on the host Saving and replacing a text file on the host's shared folder breaks permissions in the guest. After a file on the host has been modified listing the permissions from the guest results in: the permissions will show up as ?????????????????? Incorporate changes from a user supplied patch to address this. Signed-off-by: Dmitry Torokhov commit 4fd90ee2825567cff704e4cf41ad3c1a05d401dc Author: VMware, Inc <> Date: Tue Mar 13 13:02:30 2012 -0700 lib/lock: Adjustable MXUser statistics overhead Don't let the apparent size of this change put you off, this is almost entirely a mechanical variable name change. It turns out that the timer routines used my the MXUser statistics system can be very expensive. Make the MXUser statistics overhead tunable - off, light (basic statistics) and heavy (full). "Typical" performance numbers (on my old AMD box running Linux) mode 0 - 47 ns mode 1 - 61 ns mode 2 - MUCH larger. We've got an issue with timers that Kevin filed a PR for. Signed-off-by: Dmitry Torokhov commit 7963cf33f2725da1a18a11e7a5b4bdbacf49774b Author: VMware, Inc <> Date: Tue Mar 13 13:02:22 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 0c30bff97a5525941ff4e4bef1245328dd5c7721 Author: VMware, Inc <> Date: Tue Mar 13 13:02:15 2012 -0700 Slim down malloc/realloc/calloc/strdup wrappers in non-debug builds. The way we wrap malloc, realloc, calloc, strdup etc. causes us to pass a set of extra parameters into the functions that do the actual work, including a bug number (which is almost always -1), __FILE__ and __LINE__. In the release vmx alone, this costs us approximately 55 KB of extra text. This change slims down the wrappers in non-debug builds so that we avoid passing the extra arguments. One can argue about exactly which build type(s) should use slim wrappers; my proposal is anything without VMX86_DEBUG. Kevin tells me that there is some sort of scenario due to how gobuild works (for official? sandbox? only? builds) where we may end up calling the non-debug version of a library from a debug call site (you say huh? I say huh?!). To handle this case, all build types contain both versions of the work functions with differently suffixed names ("0" and "1"). I've also cleaned up the mksMemMgr code slightly. It no longer directly accesses Util_SafeInternal functions, although it still reaches into the internal malloc data structures in a not so nice way. Updated release vmx size data, accounting for the need to handle the build weirdness: text data bss dec hex filename 8926420 414752 1498600 10839772 a566dc current wrapping 8871692 414752 1498600 10785044 a49114 leaner wrapping ------------------ saved: 54728 bytes ------------------ Tests: build WS obj/opt/release, boot/halt xp64 with obj and opt, test-esx, sandbox wsall beta build. Signed-off-by: Dmitry Torokhov commit 2b85f2a8504d23dab128133fffa071354243c8e6 Author: VMware, Inc <> Date: Tue Mar 13 13:02:00 2012 -0700 Bump up the major version for VMCI/vSock. Signed-off-by: Dmitry Torokhov commit 7ba1a1250e5bc1782fcbe3005144a6667caf93e4 Author: VMware, Inc <> Date: Tue Mar 13 13:01:48 2012 -0700 Add AllocTrack_Init's allocation to its overhead value AllocTrack_Init allocates some ring buffers and a hash table. They should be included in AllocTrack's overhead. Signed-off-by: Dmitry Torokhov commit 4c7daa9484eba9ec5eb18194c977524596a93ecb Author: VMware, Inc <> Date: Tue Mar 13 13:01:24 2012 -0700 HGFS: fix compilation issues on SLES11SP2 "warning: initialization from incompatible pointer type" fsync() method was originally changed in Linux v3.1, but SUSE backported it to their 3.0 kernels. Signed-off-by: Dmitry Torokhov commit 1c8539334ac7b376107ef1adecc2999e6225652c Author: VMware, Inc <> Date: Tue Mar 13 13:01:18 2012 -0700 Internal branch sync. Included in this change: . hgfsServer: fix compiler warning. . adjustments to allow using clang to compile certain code. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit c614c7a7c8094142655b11fd5fb906fa26eabe7b Author: VMware, Inc <> Date: Tue Mar 13 13:00:38 2012 -0700 Update copyright to 2012 Happy new year, though this could have been done when the branch was cut since afaik no product expected to ship in 2011. Signed-off-by: Dmitry Torokhov commit bda2fc7216479bdb9470a0be2717ec1123413d8d Author: VMware, Inc <> Date: Tue Mar 13 13:00:34 2012 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 4106444038334fc926000f913340e0cccccd8193 Author: VMware, Inc <> Date: Tue Mar 13 13:00:30 2012 -0700 lib/lock: improve a log message Had a strange failure and it would have been nice to know what the executionID was. Output it now. Signed-off-by: Dmitry Torokhov commit 76ca68bc991e5c84821e61d54efc1d3434e04bba Author: VMware, Inc <> Date: Tue Mar 13 13:00:12 2012 -0700 lib/lock: reapply previously reverted commit Now that the big change is in, reapply this change. Signed-off-by: Dmitry Torokhov commit 943a9ed85d72b741832d2b25eb080b9951256316 Author: VMware, Inc <> Date: Tue Mar 13 13:00:06 2012 -0700 lib/lock: No need for stats all of the time Way back when there was a concern that a release build might need to be performance analyzed (for locks) in the field. At the time the VMX wasn't considered to be a major bottleneck so the MXUser statistics were built into every type of build. Now a days, we have stats builds in the field when we need numbers and the VMX is turning into a bottleneck. Remove the stats code from all but stats builds. This saves ~7 clocks when acquiring an uncontended exclusive lock in a release build. The statsMem pointer is left in all builds to maintain the size of the structure until will can find where a lock is used across two copies of lib/lock with different build types. Signed-off-by: Dmitry Torokhov commit 1b54e685027c4e0efc95bd391f19495aed6df0fc Author: VMware, Inc <> Date: Tue Mar 13 12:59:59 2012 -0700 lib/misc: pick up review comments Regis had a few, nice suggestions. Signed-off-by: Dmitry Torokhov commit 1484f83dcb6c4549f817f0e7512d3e5439583451 Author: VMware, Inc <> Date: Tue Mar 13 12:59:53 2012 -0700 lib/lock: more sign checking Found more places where the sign is confused. Signed-off-by: Dmitry Torokhov commit b619d237ca27661f616361d601d8031a93992392 Author: VMware, Inc <> Date: Tue Mar 13 12:59:36 2012 -0700 lib/lock: handle lock reference count consistently The native data type of the lock reference count is an "int" and the checking is done assuming this. The output said unsigned. Fix this. Add an extra assert. Signed-off-by: Dmitry Torokhov commit 307a7020ca07a287dcf0815e5557fe15db3bdf30 Author: VMware, Inc <> Date: Tue Mar 13 12:59:30 2012 -0700 lib/lock: save some stats memory We keep the holder address around. No need, we can grab it when we need it, saving a bit of memory. Signed-off-by: Dmitry Torokhov commit d2294526b73a8caf62a679d76951e766470ac0fa Author: VMware, Inc <> Date: Tue Mar 13 12:59:26 2012 -0700 lib/lock: move a function Move a function to get better grouping for a later change Signed-off-by: Dmitry Torokhov commit 6848726c8af70870af4b14cb9614cebb5c28d454 Author: VMware, Inc <> Date: Tue Mar 13 12:59:17 2012 -0700 Return an error in 'mount' call when shared folders are disabled WHile adapting to the newer kernel API we have changed the way a root dentry is filled. At the time of mount call, we don't send any request to the HGFS server to check if the shared folders are enabled or not. So, irrespective of the state of the HGFS server in the VMX, the 'mount' call succeeds. We should ideally return an error if the shared folders are disabled. This is done by issuing a getAttr request to the server and returning an error if the getAttr request fails. Signed-off-by: Dmitry Torokhov commit 3554ad1e16362faa0789e9f84c0283a15e8fdddf Author: VMware, Inc <> Date: Tue Mar 13 12:59:11 2012 -0700 Use sysv's "service" to stop / start networking. If we find a working "service" interface to init scripts, use it instead of fiddling directly with /etc/init.d and friends. Signed-off-by: Dmitry Torokhov commit e8338eaa071df2395b0db10c4cc03a2f322a504f Author: VMware, Inc <> Date: Tue Mar 13 12:59:02 2012 -0700 Internal branch sync. Included in this change: . lib/file: fix ASSERT that was too strict and fired too often. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov commit 54bbb09a33c159fccb0d2eddccc720c2aced4593 Author: VMware, Inc <> Date: Tue Mar 13 12:58:51 2012 -0700 lib/lock: less checking in non-debug builds Remove checking from non-debug builds. The original requirements called for checking all the time but this is turning out to be too expensive. Times in NS/Cycles (exclusive lock, uncontended): Before: 44/177 After: 39/103 Signed-off-by: Dmitry Torokhov commit 67533c1dfcaea308a89a9b06de1780b73b8ba552 Author: VMware, Inc <> Date: Tue Mar 13 12:58:39 2012 -0700 lib/misc: Mac Hostinfo_SystemTimerNS can go faster The Mac Hostinfo_SystemTimerNS can do its calculations a bit more economically. This results in ~2% overhead decrease. Signed-off-by: Dmitry Torokhov commit 5cef403580e36de476ace81394df10fd1cb34c7c Author: VMware, Inc <> Date: Tue Mar 13 12:58:31 2012 -0700 Allow certain libraries compile on Android & iOS. Signed-off-by: Dmitry Torokhov commit 1532c182f21150961d7639865cd9abfa2630bdec Author: VMware, Inc <> Date: Tue Mar 13 12:58:04 2012 -0700 lib/lock: MXUser statistics are too expensive Dmitriy specifically wanted the statistics measurement code to actually measure the time it took to acquire an uncontended lock. This turns out to be a very large overhead and not something we really care about or can measure accurately. Refactor the MXUser statistics code to only measure the acquisition time when the lock is contended - most of our locks will have virtually no overhead in a statistics build this way. Signed-off-by: Dmitry Torokhov commit fe00775cdd48ec4b9c74b00e3cf2cdc219f559d0 Author: VMware, Inc <> Date: Wed Dec 21 16:56:23 2011 -0800 Updating open-vm-tools version for release 2011.12.20-562307. Signed-off-by: Marcelo Vanzin commit dfca5cf9d1c2335c5d001deedd9266c84956b508 Author: VMware, Inc <> Date: Wed Dec 21 16:49:46 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d8118635bbe6679e71206ad895797b3294ffff7d Author: VMware, Inc <> Date: Wed Dec 21 16:49:21 2011 -0800 VMCI: adjust to craziness of grsecurity patches Apparently grsecurity patchset redefines struct file_operations as read only so we need to use static initializers. Also did some additional cleanup in module initialization. Signed-off-by: Marcelo Vanzin commit bd37ea3dbefab741a3ef881fb70e824b272ea91d Author: VMware, Inc <> Date: Wed Dec 21 16:48:20 2011 -0800 Send the proper reply size back to the VMX. In the present tools code, for few commands (like Hgfs packets), the reply size is not sent correctly back to the VMX. An extra 4 bytes is added to the reply size. We really don't require the extra 4 bytes. Modified the code to get rid of the extra 4 bytes. Signed-off-by: Marcelo Vanzin commit 5addeb11a23ed31d587fe5571483cb3bcf5f1c42 Author: VMware, Inc <> Date: Wed Dec 21 16:48:03 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b96a6f62aa2b7352cef0cbdafa11e8344ed3a986 Author: VMware, Inc <> Date: Wed Dec 21 16:47:28 2011 -0800 Fix tools build. Signed-off-by: Marcelo Vanzin commit 225bae6501f36ceb9eaed28567ed6243e5eea934 Author: VMware, Inc <> Date: Wed Dec 21 16:47:01 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ae0cd1637345d3c71fe846c79291680fd82c2c10 Author: VMware, Inc <> Date: Wed Dec 21 16:46:32 2011 -0800 fix build breakage #include Signed-off-by: Marcelo Vanzin commit 0035878a995c1ddac06f4d4466e1d90aadcf14af Author: VMware, Inc <> Date: Wed Dec 21 16:46:17 2011 -0800 lib/misc: constification Signed-off-by: Marcelo Vanzin commit 727b4ce322730214039f1c2b9163a6f6430f79dd Author: VMware, Inc <> Date: Wed Dec 21 16:45:59 2011 -0800 Use bash shell first when starting a program inside the guest. Check the bug 772203 for more details. Use the bash shell first when starting a program. If the bash shell doesn't exist, then use the bourne shell. Signed-off-by: Marcelo Vanzin commit b9a851e71be2e004f8d53dd41879935900705217 Author: VMware, Inc <> Date: Wed Dec 21 16:45:43 2011 -0800 free allocated string Since malloc() worked in Asprintf(), assume free() OK. Signed-off-by: Marcelo Vanzin commit 7701c7c006064edf3ff7ae08ca5b5ea23feb6881 Author: VMware, Inc <> Date: Wed Dec 21 16:45:25 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 16dfce701317eab2c2aacac0705e34090807797c Author: VMware, Inc <> Date: Wed Dec 21 16:44:40 2011 -0800 Execute HGFS_ASSERT_INPUT only in successful code paths. Check bug 816476 for more details. In changeset #1611812, we have removed the special logic related to the default session. So, in case of any error, HgfsParseRequest() doesn't guarantee that all the attributes of HgfsInputParam datastructure will be filled. In case of an error, the code should not execute HGFS_ASSERT_INPUT. Signed-off-by: Marcelo Vanzin commit 7a1cd2cd561e2b9d1553d762bc12083be2d3e2b4 Author: VMware, Inc <> Date: Wed Dec 21 16:44:20 2011 -0800 Internal branch sync. Included in this change: . vix: correctly return error for unsupported credential types. . vmci: rename the new packet API. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6103deb5a25d77888f4cbc3fb2bf48f9751cabf5 Author: VMware, Inc <> Date: Wed Dec 21 16:38:27 2011 -0800 lib/file: without the test code left in... Doh! Signed-off-by: Marcelo Vanzin commit 032c9b0e841df579ced0c74a4fd0cb6cc799ab2b Author: VMware, Inc <> Date: Wed Dec 21 16:38:14 2011 -0800 lib/lock: FileLock_IsLocked crashes Don't mix signed and unsigned arithmetic... Signed-off-by: Marcelo Vanzin commit d95b36cf633f5829dd251324632f971e69fabeb9 Author: VMware, Inc <> Date: Wed Dec 21 16:37:34 2011 -0800 lib/misc: publish the PtrHash interface Signed-off-by: Marcelo Vanzin commit 8b9bedd457a382d5ac58f37664d028ae12f7e2fd Author: VMware, Inc <> Date: Wed Dec 21 16:37:15 2011 -0800 lib/file: problems in a build Unused varaible. Signed-off-by: Marcelo Vanzin commit e7fdddda417332c648e189d386bacbe383d782ec Author: VMware, Inc <> Date: Wed Dec 21 16:36:53 2011 -0800 lib/file: IsLocked err argument is optional Signed-off-by: Marcelo Vanzin commit 719ccc3e5035e9da117fc3af0cd0fb396f42524b Author: VMware, Inc <> Date: Wed Dec 21 16:36:35 2011 -0800 lib/file: clean up before a change Make the new code more consistent with the existing code. Signed-off-by: Marcelo Vanzin commit 93561f8ab1896666dc34b31b87d88d454c14dfc1 Author: VMware, Inc <> Date: Wed Dec 21 16:36:14 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e7d607dd42915dfe793861f26cebf2d1efbe0109 Author: VMware, Inc <> Date: Wed Dec 21 16:35:50 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ace206159574c9d8e957f47f9eff2b3c58fc28d0 Author: VMware, Inc <> Date: Wed Dec 21 16:35:07 2011 -0800 Use $(MAKE) instead of make. Signed-off-by: Marcelo Vanzin commit 4498159f4da610f6a954d8a4c9215a158b3b10e9 Author: VMware, Inc <> Date: Wed Dec 21 16:34:40 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 07062153ea6a4a3fab37d162fc94581c02c184ab Author: VMware, Inc <> Date: Wed Dec 21 16:34:22 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bba562e974c58b2b85166e16fc93a717801e19dd Author: VMware, Inc <> Date: Wed Dec 21 16:33:49 2011 -0800 Fix signal source initialization. Code was doing initialization multiple times and probably leaking a few fds in the process. Signed-off-by: Marcelo Vanzin commit a1ea4882ed871a1476ad1858b68f85c2aeac8bca Author: VMware, Inc <> Date: Wed Dec 21 16:33:35 2011 -0800 Revert of a previous change. Signed-off-by: Marcelo Vanzin commit 3ef09963a9a0ce6d040759b9dec393c5a15743a8 Author: VMware, Inc <> Date: Wed Dec 21 16:32:59 2011 -0800 lib/lock: restore minor merge issue Signed-off-by: Marcelo Vanzin commit 577b7eb2dfc1939846ec97d8451f152ee456cd63 Author: VMware, Inc <> Date: Wed Dec 21 16:32:42 2011 -0800 Fix a security issue in HGFS server. When a packet is received by the HGFS server, all sanity tests related to the header size and packet sizes should be done first before doing any other tests. Moved the header and packet size checks to the beginning of the validation process. Signed-off-by: Marcelo Vanzin commit 53f3610a61ee7d89456e4cc8ed3b307d4faf3f44 Author: VMware, Inc <> Date: Wed Dec 21 16:32:22 2011 -0800 Internal branch sync. Included in this change: . vmci: Add support for pinning small queuepairs. . vmci: add packet API. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1d710ad975443507b77009d1328c52f809508ae8 Author: VMware, Inc <> Date: Wed Dec 21 16:26:54 2011 -0800 Remove the special logic implemented for default session. Recently, I have submitted a changeset #1571619 to make the HGFS server more robust for the file transfers. As a part of that changeset, we have implemented the separate HGFS sessions for Transport layer and Sessions layer. In order to handle old file copy library clients, we have implemented the concept of default session. This default session is created when the transport session is initially created and exists till the transport sessions is destroyed. But, because of this special default session, we had implemented special logic in various parts of the code. In future, it will be difficult to maintain/write any new code. We decided to remove this special logic. Modified the HGFS server code to get rid of the special handling for default session. Signed-off-by: Marcelo Vanzin commit 8831583a51484ebffcf0bf57fbd2f62c5ae9e7c9 Author: VMware, Inc <> Date: Wed Dec 21 16:26:34 2011 -0800 Ignore EBUSY when freezing filesystems. Thanks to bind mounts (and apparently some other changes in Fedora 15), we may try to freeze the same superblock more than once. Ignore the EBUSY errors the kernel returns in these cases. Log some more information and fix a memory leak in the process. Signed-off-by: Marcelo Vanzin commit 928bcd9f5c1475511a36ea5bbc5746ce9868e5cd Author: VMware, Inc <> Date: Wed Dec 21 16:26:02 2011 -0800 lib/lock: put back another piece Signed-off-by: Marcelo Vanzin commit 0617afe710e0148272f77b962864424833040290 Author: VMware, Inc <> Date: Wed Dec 21 16:25:30 2011 -0800 lib/lock: put more stuff back in Signed-off-by: Marcelo Vanzin commit 5962a38cb67e4925779202e80a6731bdf619baec Author: VMware, Inc <> Date: Wed Dec 21 16:25:13 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a43452d08be75c0cf386b140e65d8d5a93941e62 Author: VMware, Inc <> Date: Wed Dec 21 16:24:53 2011 -0800 Revert of previous change. Signed-off-by: Marcelo Vanzin commit 24678cc2be67d84b42ce697381473edd50841c13 Author: VMware, Inc <> Date: Wed Dec 21 16:24:22 2011 -0800 Add VMCI RPC channel RIDs and allow messages to them from vSockets. As part of the work to replace backdoor in the libRPC, we need two additional VMCI channels in the VMX. This change adds the resource IDs for those channels. One is privileged, meaning only admin/root guest users can send to it. The other allows messages from any user in the guest. This change does not add handlers for the new channels, those will be added in a future change. This change also modifies vSockets to allow DGRAM sockets to send messages over these new channels (we have explicit checks when sending to the VMX). Signed-off-by: Marcelo Vanzin commit 2a347ea063f1e4243039d3636280070625454d07 Author: VMware, Inc <> Date: Wed Dec 21 16:22:53 2011 -0800 Fix crash in tools log reconfig handler. Certain changes in the config file could trigger a NULL dereference in the code. Just add a NULL check. Signed-off-by: Marcelo Vanzin commit 48d12ff7b6720c8ebb5ebfc3ed16d269421ee2f4 Author: VMware, Inc <> Date: Wed Dec 21 16:22:35 2011 -0800 vmxnet(3) fix building with Linux kernel 3.2 API changes for skb->frag and multicast list Also, downstreaming change to prohibit vlan tag adding/removing when interace is in promiscuous mode. Also incorporated more changes from upstream to the driver. Some linux systems expose versions as 2.6.40 and 2.6.41 instead of 3.0.0 and 3.1.0 and so on. To make the version checking easier, this patch introduces a macro COMPAT_LINUX_VERSION_CHECK_LT(). This macro must be used to compare versions 3.0 and beyond only. Signed-off-by: Marcelo Vanzin commit febe3ad8a9cb2c9c60862babf0952da94cf5b01b Author: VMware, Inc <> Date: Wed Dec 21 16:21:31 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4d4abef2262632f312660fd3467947770c01e824 Author: VMware, Inc <> Date: Wed Dec 21 16:20:54 2011 -0800 Fix potential issue with 32-bit cmpxchg8 / Atomic_Write64 Signed-off-by: Marcelo Vanzin commit d0d0d1c77489711c55e0e18bb5a5a52da207db45 Author: VMware, Inc <> Date: Wed Dec 21 16:20:11 2011 -0800 lib/lock: perThread tracking information fixes Signed-off-by: Marcelo Vanzin commit 8337c4fac0de11cdaa5235abce946eddd4ec2989 Author: VMware, Inc <> Date: Wed Dec 21 16:19:41 2011 -0800 syncDriver: do not use stale errno on Linux close() may clobber errno so cache it immediately after calling ioctl(fd, FIFREEZE) instead of it directly later. Signed-off-by: Marcelo Vanzin commit 21a97b108b30a23c4e0959d635ed9eab5190bfb7 Author: VMware, Inc <> Date: Wed Dec 21 16:19:27 2011 -0800 Fix HGFS for linux kernel 3.2.x. 'struct inode' got changed in linux kernel 3.2.0. With the new change, 'i_nlink' attribute of the inode data structure was changed to a const type. So, we can't directly access the i_nlink attribute directly. Starting from Linux 3.2.x, we should use set_nlink(inode *, int *) function to set the i_nlink count. Designed a new function with the same name set_nlink() for kernel versions before 3.2.0. Modified the code to call set_nlink(). If the user tries out a latest kernel, the new kernel function gets called else the new function that is added in this changeset will be called. While testing the fix, noticed that build process couldn't resolve module_param function in tcp.c file. Not sure if anything got changed in linux kernel 3.2.x. Fixed the build issue by including proper header file in tcp.c. Signed-off-by: Marcelo Vanzin commit 09f3458e900f866605b773bd304453a6fa999352 Author: VMware, Inc <> Date: Wed Dec 21 16:18:40 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 69313afc1493c6bf703f6b11549b76f3c52686e0 Author: VMware, Inc <> Date: Wed Dec 21 16:17:50 2011 -0800 Modify the return value of HgfsServerSessionInvalidateInactiveSessions. Modified the function signature for HgfsServerSessionInvalidateInactiveSessions. With the new changes, the function will return the number of active sessions left in the HGFS server. This return value reflects the total number of sessions that still need to be either invalidated or destroyed. Based on this return value, the caller can make a decision whether to call the invalidator one more time or not. Modified the vixTools code to handle this new function signature. Signed-off-by: Marcelo Vanzin commit 6feb467b94f8c09d91dc9554e50afad77fab343b Author: VMware, Inc <> Date: Wed Dec 21 16:17:18 2011 -0800 make FileIOAligned_PoolInit thread-safe This function actually does have to be thread-safe because its caller, FileIO_OptionalSafeInitialize, is not (and doesn't have to be since it just performs idempotent operations). Most straightforward solution is to turn alignedPool.lock into a singleton. Signed-off-by: Marcelo Vanzin commit bb924ee4f244fb0a46827357744864fbf190f88d Author: VMware, Inc <> Date: Wed Dec 21 16:16:48 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0888ef1feaf14e2c98df82507450ad847abe0dc8 Author: VMware, Inc <> Date: Wed Dec 21 16:15:52 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 18d23a316ec113cdfc1f8353ce0900487bbc20be Author: VMware, Inc <> Date: Wed Dec 21 16:14:51 2011 -0800 Add a new HGFS error code (HGFS_STATUS_TOO_MANY_SESSIONS) - Added a new HGFS error code (HGFS_STATUS_TOO_MANY_SESSIONS). This error code is returned to the client when the maximum number of sessions were already created and a new session couldn't be created in the HGFS server. Signed-off-by: Marcelo Vanzin commit 85d3e7d25caf6404df9b7b8d172eb84b2551e318 Author: VMware, Inc <> Date: Wed Dec 21 16:13:59 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2e99540f1a38df659b9e284b5a4c5ee578d88c2e Author: VMware, Inc <> Date: Wed Dec 21 16:13:41 2011 -0800 [unity] Remove Unity_SetActiveDnDDetWnd. No code was calling this function. Also, remove the UnityDnD type (which was only used by this function) and any code related to this function in the unity back-ends. Signed-off-by: Marcelo Vanzin commit 34397f22027eb30845f764a8dad3987456cd4efc Author: VMware, Inc <> Date: Wed Dec 21 16:12:59 2011 -0800 Fix HGFS server stale session error The Windows HGFS server currently is the only server that returns the correct stale session error to a client. The platform specific error returned by the platform independent code was not translated for Posix HGFS servers correctly. Signed-off-by: Marcelo Vanzin commit 49e86e07ca7ad2db104a6111ba7ea1ddddb3a277 Author: VMware, Inc <> Date: Wed Dec 21 16:12:36 2011 -0800 Destory the sessions if they are inactive for a long amount of time. This changeset is an extension to my earlier changeset #1592340. In the changeset #1592340, I have implemented the 'InvalidateInactiveSessions' function in the HGFS server. When this new function is called, it checks for the inactivity of each session and invalidates the session if it is inactive for a long amount of time. Also, we should ideally implement another feature that destroys the session if the session is inactive for a very long amount of time. Modified the code to destroy the sessions besides just invalidating the sessions. Also, implemented the code to limit the number of sessions that can be created in one transport. HGFS server returns an error if the maximum number of sessions are already created. Signed-off-by: Marcelo Vanzin commit 7f7b00ccbe2e09f3cd104df9a903d4f7dfb08b24 Author: VMware, Inc <> Date: Wed Dec 21 16:12:06 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1d13e8f24f48ec3a70f7e373abfb89e9269500c9 Author: VMware, Inc <> Date: Wed Dec 21 16:10:38 2011 -0800 lib/lock: cleanly differentiate native from mapped threadID values Make it very clear which type of threadID is being used. Signed-off-by: Marcelo Vanzin commit 559727444291d2734273c3d4adae7a9662ccdd73 Author: VMware, Inc <> Date: Wed Dec 21 16:10:12 2011 -0800 lib/lock: access violation Signed-off-by: Marcelo Vanzin commit bb51ae6c340631603547ab641fbef9b594ee41c0 Author: VMware, Inc <> Date: Wed Dec 21 16:07:28 2011 -0800 lib/lock: Add formal fallback code Signed-off-by: Marcelo Vanzin commit 4b51138b66d2dcae76a2a8875b7e4f2b438a0874 Author: VMware, Inc <> Date: Wed Dec 21 16:06:47 2011 -0800 vmcf provider: doc updates. Signed-off-by: Marcelo Vanzin commit f0eca546eb9c2f0ce85594717701d78c9b1977fa Author: VMware, Inc <> Date: Wed Dec 21 16:06:22 2011 -0800 Reverting previous checkin. Signed-off-by: Marcelo Vanzin commit a012cb23f2337c82ef04d1168b06649e28908e3b Author: VMware, Inc <> Date: Wed Dec 21 16:05:13 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5697431079194bc5bb90a57ca57b39930b8b04a6 Author: VMware, Inc <> Date: Wed Dec 21 16:04:50 2011 -0800 lib/misc: Don't use log in essential service Signed-off-by: Marcelo Vanzin commit 735202ac583a1b15eb4f546d7330ec35ea3e21cd Author: VMware, Inc <> Date: Wed Dec 21 16:04:04 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0f631210b32a5b8f3a07402fd8418ecb37091f53 Author: VMware, Inc <> Date: Wed Dec 21 16:03:22 2011 -0800 Implement 'InvalidateInactiveSessions' in hgfsServer. This is the third part of the fix to make the HGFS server more robust. Please check the wiki: https://wiki.eng.vmware.com/PGI/RobustVIXFileCopy for more details. Implmented a new function i.e. HgfsServerSessionInvalidateInactiveSessions in HgfsServer. When this function is called, it checks all the available HGFS server sessions and invalidate the inactive sessions. Everytime a request is processed, session is tagged with timestamp when the request is processed. If no request has been processed in the last 2 minutes, then the session will be tagged as inactive and will be invalidated. Callers can make use of this function invalidate the inactive session. Implemented a watchdog in vixTools module which periodically sends this request to the HGFS server. Note: In this changeset, I have implemented the watchdog only in the vixTools plugin. Not sure, if we require the same watchdog in another modules. Signed-off-by: Marcelo Vanzin commit 124981fc1d64bd6169371734019a20ff44105932 Author: VMware, Inc <> Date: Wed Dec 21 16:02:56 2011 -0800 Internal branch sync. Included in this change: . Fix VMCI Socket MSG_WAITALL handling . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ab853c29401bd69246fcf84b4d0c0d582f2ec3ec Author: VMware, Inc <> Date: Wed Dec 21 15:59:55 2011 -0800 lib/lock: another missing piece is restored This one disappeared too. Put it back. Signed-off-by: Marcelo Vanzin commit b4ab69ce4c68e4adea4b0e720ec338b9eb14878c Author: VMware, Inc <> Date: Wed Dec 21 15:59:41 2011 -0800 lib/lock: bring message uniformity Make the location of a native object message uniform. Signed-off-by: Marcelo Vanzin commit 6ed82d6ccd402342b62030f68cc4eeda43b85efa Author: VMware, Inc <> Date: Wed Dec 21 15:59:26 2011 -0800 lib/lock: put back the last piece Signed-off-by: Marcelo Vanzin commit c6cac1d4b15f5511d207b1d0837c853ff465ff29 Author: VMware, Inc <> Date: Wed Dec 21 15:59:01 2011 -0800 lib/lock: enable syndrome bit production Signed-off-by: Marcelo Vanzin commit 7c96b254ae1387dd2d1ba3c953f11d6072ea0328 Author: VMware, Inc <> Date: Wed Dec 21 15:58:31 2011 -0800 lib/lock: restore lost fix An earlier fix was lost. Put it back. Signed-off-by: Marcelo Vanzin commit e611d054aa26d88f92fe2baa3c05ec3fa952ebc1 Author: VMware, Inc <> Date: Mon Nov 21 16:12:25 2011 -0800 Updating open-vm-tools version for release 2011.11.20-535097. Signed-off-by: Marcelo Vanzin commit 6c197b8e5eccf32bfee0e2452d8926968182aada Author: VMware, Inc <> Date: Mon Nov 21 16:01:20 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 216095ff28c741374f6d7746e9325df36e67c669 Author: VMware, Inc <> Date: Mon Nov 21 16:00:32 2011 -0800 HGFS: make compile on kernels 3.1-rc1 and above Commit 02c24a82187d5a628c68edfe71ae60dc135cd178 chnages signature of fsync() method; we need to adjust appropriately. Signed-off-by: Marcelo Vanzin commit 2a84eaa3291c64b9bd9225b0cdf6bb0d2c2c89c8 Author: VMware, Inc <> Date: Mon Nov 21 16:00:16 2011 -0800 lib/lock: more lack of "0x" before "%p" Clean up some more. Signed-off-by: Marcelo Vanzin commit 6f5c879c467c50de63b16063c2008723ee03b5cf Author: VMware, Inc <> Date: Mon Nov 21 16:00:05 2011 -0800 lib/lock: "0x" before "%p" The codes were inconsistent about this. Fix it. Signed-off-by: Marcelo Vanzin commit ac8f03709fb41f499d554ac7ab7ef913991bbfc2 Author: VMware, Inc <> Date: Mon Nov 21 15:59:51 2011 -0800 lib/lock: fix the build Running into time.h Signed-off-by: Marcelo Vanzin commit 58d2e69ba3e714b34399a66355b0ac6137dad0a4 Author: VMware, Inc <> Date: Mon Nov 21 15:59:38 2011 -0800 lib/lock: missed a "safetime.h" Fix the time.h problem. Signed-off-by: Marcelo Vanzin commit e40d3718da28ddb36383138575703f74f0da8df1 Author: VMware, Inc <> Date: Mon Nov 21 15:59:21 2011 -0800 lib/lock: syndrome bits don't work on ESX Signed-off-by: Marcelo Vanzin commit f99948210cc2fb51fb99b01c94fdac23081803c2 Author: VMware, Inc <> Date: Mon Nov 21 15:58:17 2011 -0800 Add StrUtil API for parsing unsigned 64-bit integers. Signed-off-by: Marcelo Vanzin commit f81192237bc33d9fbe2745d22215cf33aa822923 Author: VMware, Inc <> Date: Mon Nov 21 15:57:50 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d566e72fad8187e22784cd51ae8ec4d2cbd9e666 Author: VMware, Inc <> Date: Mon Nov 21 15:57:20 2011 -0800 lib/misc: pick up a few review comments Pick up a few review comments on random.c Signed-off-by: Marcelo Vanzin commit 2ebd3fe5ab7e2d27d5d222af13d8f0a9e5ebb861 Author: VMware, Inc <> Date: Mon Nov 21 15:56:39 2011 -0800 lib/misc: clean up random.c Make things cleaner. Signed-off-by: Marcelo Vanzin commit 28a125d71cd0afb78b485e94b783a4e61031530e Author: VMware, Inc <> Date: Mon Nov 21 15:56:24 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 48ed3897c5fc147c0f6a2acbbe9bd0f62f901948 Author: VMware, Inc <> Date: Mon Nov 21 15:55:46 2011 -0800 lib/lock: group all non debug function in ul.c together This makes it easier to avoid build mistakes... Signed-off-by: Marcelo Vanzin commit b7d3d8a27d419ec917d9d2a898d46b6dba0afba4 Author: VMware, Inc <> Date: Mon Nov 21 15:55:30 2011 -0800 OVT: Build lib/xdg with GLib flags. Didn't realize this library, as built for OVT, wasn't implicitly built w/ GLib headers in the include path, so adding a call to g_debug broke things. Whoops. Signed-off-by: Marcelo Vanzin commit accc844a9da047b469e4b5ed79fbf8f0c9ee096e Author: VMware, Inc <> Date: Mon Nov 21 15:55:09 2011 -0800 lib/lock: no need to comment out define Signed-off-by: Marcelo Vanzin commit 744eccec5fe4030f78e10f60609da4c6d2429fa0 Author: VMware, Inc <> Date: Mon Nov 21 15:54:30 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a2b47049ee6f170466983db05e0101f916ba59a7 Author: VMware, Inc <> Date: Mon Nov 21 15:53:56 2011 -0800 Unity/X11: Tweaks to support Ubuntu 11.10. • Refresh the logic in xdg-detect-de based on xdg-utils Git commit 5010c394. We now grok LXDE and Unity. • xdg-find-menus now uses (vmware-)xdg-detect-de instead of duplicating its own desktop environment detection. • Changed Xdg_GetDesktopEnv semantics slightly. It now returns a case- insensitive alphanumeric string on success and "" (as opposed to NULL) on failure. Signed-off-by: Marcelo Vanzin commit 01adcaa1c90527b05f0589726e1c4e792342922c Author: VMware, Inc <> Date: Mon Nov 21 15:52:39 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 65644b497fe164d137a9341292f4a00a5f65fd55 Author: VMware, Inc <> Date: Mon Nov 21 15:51:38 2011 -0800 Reduce heap allocations when listing processes in the guest. Friday clean-up. We can just put the integer key in the data structure that stores the state of the operation, and then pass the address of that field to the hash table. This does mean we need to use g_hash_table_replace() instead of insert(), since we must update the key if we update the value. Also, when passing the key along to timeout/clean-up function, just stuff it into the pointer, since pointers are always large enough to hold an int. This means more casts, but one fewer call to malloc(). Signed-off-by: Marcelo Vanzin commit d2ae38be9a5ae42b3db0739f03c9db204a193110 Author: VMware, Inc <> Date: Mon Nov 21 15:51:16 2011 -0800 lib/lock: fix off-by-one indent One line needs a fix. Signed-off-by: Marcelo Vanzin commit b0e9701c9e05b417cc53134ffa371b4b842012d0 Author: VMware, Inc <> Date: Mon Nov 21 15:51:00 2011 -0800 lib/lock: things go back The entire new lib/lock structure is back in... except that there is an ifdef for working the new way. By default it will run compatible with the old way. I've discovered that there are as many as 5 copies of lib/lock in some of our products (i.e. Linux UI). Things would be fine if the copies were used in a self contained fashion. When lib/lock runs in the new way, random syndrome bits per library caused crashes and hangs proving we're leaking locks across a boundary (something unexpected). Two copies of lib/lock passing around locks could be fatal if the two copies are different versions of lib/lock. Unfortunately logs and core dumps haven't been easy to find. I'm going to begin a detailed search for the root cause via the ifdef; others should not be affected. Signed-off-by: Marcelo Vanzin commit f8ac563ad3cab8dd286a3ac5b6776a6290725b00 Author: VMware, Inc <> Date: Mon Nov 21 15:50:07 2011 -0800 lib/lock: put more back... I'm going to get this down to the absoluate basics. Then we're finally going to catch the library problems. Signed-off-by: Marcelo Vanzin commit 38ce337202b17b5a13e4842e4acd62aa2f29aef2 Author: VMware, Inc <> Date: Mon Nov 21 15:41:11 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit c2ce800ed45dda69d8080795279138ce95e215ee Author: VMware, Inc <> Date: Mon Nov 21 15:40:59 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit 98629023bff17cb8420c3f7e1324cedcfebdfd5b Author: VMware, Inc <> Date: Mon Nov 21 15:40:30 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit dec16d440870f310b5d7c828f56a52c2d914143f Author: VMware, Inc <> Date: Mon Nov 21 15:40:10 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit 7553d756ca0530df4efe1c03497e8b85ecc7244a Author: VMware, Inc <> Date: Mon Nov 21 15:37:41 2011 -0800 lib/lock: finally put back the fix This heavily reviewed change goes back in with one exception - the part of the change that altered the size of structures isn't included. The altering of structure sizes is causing hangs and crashes. Hopefully the run-time checking, already in, will catch the problems and we can clean those up. Once cleaned up we will be free to alter structure sizes. Signed-off-by: Marcelo Vanzin commit 00b3b5de442a43bca65f963742fee487271cdb12 Author: VMware, Inc <> Date: Mon Nov 21 15:37:09 2011 -0800 lib/lock: A nice improvement . Don't use a bunch of defines. . Add checking for potential serial number roll overs. Signed-off-by: Marcelo Vanzin commit 5869646276c8ec5dd5578dde01aed28de2d18c97 Author: VMware, Inc <> Date: Mon Nov 21 15:36:47 2011 -0800 lib/log: fix typo Signed-off-by: Marcelo Vanzin commit 67808f366a18d5c2e77b01af951cd349643143c2 Author: VMware, Inc <> Date: Mon Nov 21 15:36:24 2011 -0800 lib/lock: if you can't beat'em, join'em Every time I change lib/lock to help find a bug it causes problem if and only if I alter the size of a structure. This indicates that there are multiple copies of lib/lock floating around (known; as many as 5 copies have been observed), some that may be incompatible with each other. This change adds a real time signature and identification analysis to lib/lock. It does this without changing any structure sizes. It will help us catch the culprits and come up with a build plan to handle this. The run-time checking is done by having lib/lock always use a unique signature, regardless of what type of build it is in. Any lock that comes from a different copy of lib/lock will have a different signature. Previously, the signatures were static and also provided debugging help to the type of lock. Signed-off-by: Marcelo Vanzin commit f91586a1fa9259868e25f9380938eeb1f87e9f0e Author: VMware, Inc <> Date: Mon Nov 21 15:35:22 2011 -0800 lib/lock: more juggling Trivial moves to get a bit change to be easy to review Signed-off-by: Marcelo Vanzin commit 9524397af86cd4c6db38514057d68ba734dc756a Author: VMware, Inc <> Date: Mon Nov 21 15:30:44 2011 -0800 lib/lock: back out a bit more Not quite what I need; back out a bit more. Signed-off-by: Marcelo Vanzin commit 08bcfff1fdc800988458e680d4cbc893ed042cb8 Author: VMware, Inc <> Date: Mon Nov 21 15:29:39 2011 -0800 lib/lock: the last piece This will put lib/lock such that the real-time checking can be done while not changing the size of any structure. This backs out changes to the point that we can go forward. Signed-off-by: Marcelo Vanzin commit fdec13e13e081ca2f705e6066e697f2627fe1d76 Author: VMware, Inc <> Date: Mon Nov 21 15:29:15 2011 -0800 lib/lock: continue to backout changes and adapt Almost there, almost there... I'm taking things back to a point that the run-time checking can be done and not create the hanging/crashing problems. Signed-off-by: Marcelo Vanzin commit 5ebbba9f33eb589eb4a4ed0c49e26fcc8cd076e8 Author: VMware, Inc <> Date: Mon Nov 21 15:26:59 2011 -0800 DnD: fix vmblock-fuse detection on newer Linuxes Newer Linuxes, such as Fedora 15 and Ubuntu 11.10, have /var/run symlinked to /run so when we read existing mount points in search of fuse.vmware-vmblock our matching on /var/run/vmblock-fuse does not work anymore. Try to resolve supplied mount point before comparing with mount data. Signed-off-by: Marcelo Vanzin commit ca5e12c77a3f4477238fe27bb2b915003570e739 Author: VMware, Inc <> Date: Mon Nov 21 15:24:46 2011 -0800 lib/lock: missed a change in the backout I'm backing things out and putting things in to get lib/lock to a known good place. Missed one change. Signed-off-by: Marcelo Vanzin commit 4dfa067b5280dffb6180b0f78d68e69ce1e3d362 Author: VMware, Inc <> Date: Mon Nov 21 15:24:31 2011 -0800 lib/lock: continue putting code back I'm working my way towards reintegrating the run-time checking version which was code-read. Signed-off-by: Marcelo Vanzin commit acbae0127c931f5d1b629a014c3639fa5ed33946 Author: VMware, Inc <> Date: Mon Nov 21 15:24:07 2011 -0800 lib/lock: begin putting back changes An earlier change, once again, blew up various products and so was backed out. Put back in what we can, things that don't cause the problem to occur. This will minimize later changes. Signed-off-by: Marcelo Vanzin commit 65f2326c8a01d4bfbf7cf215b9e9a6b3f573cabe Author: VMware, Inc <> Date: Mon Nov 21 15:23:47 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit 38be4ef8b65fd13676eb8910cc9ef9256688f71a Author: VMware, Inc <> Date: Mon Nov 21 15:23:27 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit 651706ee396928c1f1c6f6b1ba233a8c2928d296 Author: VMware, Inc <> Date: Mon Nov 21 15:23:11 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit f57f86b53a648d8d8de0a6bda43f8355c9b70fae Author: VMware, Inc <> Date: Mon Nov 21 15:22:49 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit 7ee303cc18c56ad3f61a1b1d9fb45f65278aa31a Author: VMware, Inc <> Date: Mon Nov 21 15:22:18 2011 -0800 Revert previous change. Signed-off-by: Marcelo Vanzin commit 061609c6f28f999b042e56f19d255a717d8cc87d Author: VMware, Inc <> Date: Mon Nov 21 15:21:50 2011 -0800 Revert previous change. Signed-off-by: Marcelo Vanzin commit 4023b5086bbb390aec9909077c04ccdb374f87e4 Author: VMware, Inc <> Date: Mon Nov 21 15:20:56 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit dce31ec75e17fbc6b3ee2727761a9b3dddc91b80 Author: VMware, Inc <> Date: Mon Nov 21 15:20:10 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ff86b50de1c33c3d7b03a64b3f227416644092cc Author: VMware, Inc <> Date: Mon Nov 21 15:19:42 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5904b29ab781eca8c7904de86d70451be34da554 Author: VMware, Inc <> Date: Mon Nov 21 15:19:26 2011 -0800 glib logger: don't try to log to an invalid fd. See nasty details in the comment for FileLoggerIsValid(). Long story short, glib will cause log recursion and because it abort(3)s the process when that happens instead of letting us handle the recursion, things don't work. Signed-off-by: Marcelo Vanzin commit 1e4eb41ace7bb63066ebcfc4af295d6b46b6d3af Author: VMware, Inc <> Date: Mon Nov 21 15:18:05 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 55cef918ad4349dd8eff6ea873b12e9ba15ccbef Author: VMware, Inc <> Date: Mon Nov 21 15:17:41 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7ed5c2a78c9ecbd6476e894c16db022d26b3a44f Author: VMware, Inc <> Date: Mon Nov 21 15:17:19 2011 -0800 glib logger: GIOChannel is not thread safe. And the medicine for all thread-safety issues is... Signed-off-by: Marcelo Vanzin commit e547319483fa8e4779c028995478957fc09f9bd5 Author: VMware, Inc <> Date: Mon Nov 21 15:16:50 2011 -0800 lib/lock: fix indenting it was hard to catch but some of the code was indented a bit off. Signed-off-by: Marcelo Vanzin commit 333401ed6ba13ff10cae429210d63164e0e9e8c7 Author: VMware, Inc <> Date: Mon Nov 21 15:15:56 2011 -0800 Remove hypervisor signature check from vmcheck. It seems the data returned has been changed, so it's better to just rely on the other methods to detect hypervisor features instead. Signed-off-by: Marcelo Vanzin commit 2fb8e3137a35ca84f162e54d9e835b7bff020f7c Author: VMware, Inc <> Date: Mon Nov 21 15:13:53 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 31c331c09a1037f00eb6b92e0f76d27f43a543cc Author: VMware, Inc <> Date: Mon Nov 21 15:04:52 2011 -0800 Bump tools version to "next unstable". Signed-off-by: Marcelo Vanzin commit 1ed0a60f807108bb66d0ba59cca5cf9d14ecf28d Author: VMware, Inc <> Date: Mon Nov 21 15:04:36 2011 -0800 glib logger: use a GIOChannel instead of a FILE pointer That code can be linked to a different version of the MS CRT than the glib library we're using, and when that happens it's not safe to use the FILE pointer returned by glib with CRT functions. Signed-off-by: Marcelo Vanzin commit 22f8f1eff5c855d5797f5c3ad14d6f63e76f19cc Author: VMware, Inc <> Date: Mon Nov 21 15:03:35 2011 -0800 lib/lock: a little clean up of condVar Trivial but nice clean up of a few things. Signed-off-by: Marcelo Vanzin commit a668160ef1e0008526921f4c5753a0d6433be930 Author: VMware, Inc <> Date: Mon Nov 21 15:03:17 2011 -0800 lib/lock: fix function comments The grammar needs some help... Signed-off-by: Marcelo Vanzin commit 77aa9286d57c7dd2e81f3d1cd44f055451691218 Author: VMware, Inc <> Date: Mon Nov 21 15:02:49 2011 -0800 lib/lock: put the syndrome bits back Took them out because the old way of doing things broke the tools build. This way works just as well, is simpler and easier to understand. Signed-off-by: Marcelo Vanzin commit a3985177d6273e5f9c4423d8dc4c368bd71352be Author: VMware, Inc <> Date: Mon Nov 21 15:02:28 2011 -0800 lib/lock: tools build problems Looks like lib/lock calling Hostinfo is causing havoc in the tools build. Remove it for now; I'll come up with something different soon. Signed-off-by: Marcelo Vanzin commit ab5f6f8d585767db81402266963d8b23ed11b735 Author: VMware, Inc <> Date: Mon Nov 21 15:02:04 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 97b68eb13374f54e7d6edd20363af75547389830 Author: VMware, Inc <> Date: Mon Nov 21 15:01:43 2011 -0800 Call vmwarectrl to set host GUI topology even if we use RandR12 The new vmwgfx driver needs to be separately informed about the host GUI topology since with screen objects we differentiate between that and Guest FB layout, which is set using RandR12. We could in theory set the host gui layout using direct kernel calls to the modesetting system of the kernel, but we won't do that until we've sorted out the security implications. To be paranoid, we grab the X server around the host GUI information update and the guest FB layout update, taking care to really flush the XUngrabServer call. Signed-off-by: Marcelo Vanzin commit 5c32dcd26eedacd04fa217cec7e644e9c276610d Author: VMware, Inc <> Date: Mon Nov 21 15:01:21 2011 -0800 Adapt to new output names of the vmwgfx driver The kernel- and Xorg vmwgfx drivers are about to change the output / connector names from LVDSx to Virtualx reflecting that we're not setting up LVDS monitors but virtual monitors. Fix up libresolutionset accordingly. Signed-off-by: Marcelo Vanzin commit 8831cf5597175e1cac1037127666993ac2e8dbed Author: VMware, Inc <> Date: Mon Nov 21 15:00:59 2011 -0800 lib/lock: nasty races and memory leaks (take 2) Signed-off-by: Marcelo Vanzin commit 65bb7578fbe71045fff7f4319e65e0140a05baf1 Author: VMware, Inc <> Date: Mon Nov 21 15:00:28 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f9afd3b9a4f1eb4132451826c8925d210ff6f238 Author: VMware, Inc <> Date: Mon Nov 21 14:59:57 2011 -0800 Fix invalid memory read. Signed-off-by: Marcelo Vanzin commit 9aa9213c5a83119fd3e022f64b2a2cc62ff448f2 Author: VMware, Inc <> Date: Mon Nov 21 14:59:40 2011 -0800 Add the vm_basic_types.h header to dndGuest.h. Signed-off-by: Marcelo Vanzin commit 23946b27fb0876f8e03872dc17d5970042ccf291 Author: VMware, Inc <> Date: Mon Nov 21 14:58:49 2011 -0800 lib/lock: Remove racey run time check In the lock release code the count was being checked for validity. This is a mistake as another thread may immediately after the lock drops and affect the count. Properly use the reference counting and destroy the lock on its last access/release. Signed-off-by: Marcelo Vanzin commit 1fbd3c9a0f71d998a826f09d85fae4042c766dd1 Author: VMware, Inc <> Date: Mon Nov 21 14:58:27 2011 -0800 lib/lock: fix typo Signed-off-by: Marcelo Vanzin commit 3c9b8ee07115571580e181c64387414ee448876f Author: VMware, Inc <> Date: Mon Nov 21 14:58:02 2011 -0800 lib/lock: MXUser Recursive Try test failure issue The MXUser Lock Facility has the ability to arbitrarily fail a try lock for testing purposes. The lock reference count needs to decremented if a force fail is a called for. Signed-off-by: Marcelo Vanzin commit 48df7f3f3fb334e151c4d236b0c79f9efb1cb6f5 Author: VMware, Inc <> Date: Mon Nov 21 14:57:41 2011 -0800 Implement separate HgfsSessions for Transport layer and Sessions layer. To make the hgFileCopy more robust, we have decided to implement separate sessions in the transport layer and the session layer. I implemented a list of sessions in the transport layer. Moved the necessary attributes from HgfsTransportSessionInfo to HgfsSessionInfo. Modified all the necessary server connect|disconnect|receive|... functions to handle the packets properly. Signed-off-by: Marcelo Vanzin commit 0721ded59a1b33b81a7a409455f4adcb421a489a Author: VMware, Inc <> Date: Mon Nov 21 14:56:47 2011 -0800 ACK! old code Use the right change... Signed-off-by: Marcelo Vanzin commit 2da43a0dfdfb8727c4f11e430b1dd2af0ff96625 Author: VMware, Inc <> Date: Mon Nov 21 14:56:23 2011 -0800 lib/lock: make all instances identical Two places aren't using the new way. Signed-off-by: Marcelo Vanzin commit 33d4d7ce75f382e5ede5817f2058133379382e97 Author: VMware, Inc <> Date: Mon Nov 21 14:55:54 2011 -0800 lib/lock: put back the rest of the signature setting Hide the clearing of the signature. Signed-off-by: Marcelo Vanzin commit c4c9cbb0ca7a339681e1e789426b0720d7f6250b Author: VMware, Inc <> Date: Mon Nov 21 14:55:15 2011 -0800 lib/lock: centralize MXUser object header signature control The setting and checking of MXUser object header signatures is centralized. Eventually, we can make a change in one place and have a way to detect old libraries; perhaps even multiple libraries. Signed-off-by: Marcelo Vanzin commit 54a98f1b90bc841a0e116ca65312c16ab2b5c3c3 Author: VMware, Inc <> Date: Mon Nov 21 14:54:42 2011 -0800 lib/lock: trivial assertion split up Split the compound assert into two; the second will be change to a run-time check in debug builds - with analysis. Signed-off-by: Marcelo Vanzin commit bcb35ca18ab986c72a95d2c0577552e4803c2075 Author: VMware, Inc <> Date: Mon Nov 21 14:54:02 2011 -0800 lib/lock: more pieces return More pieces go back in... Signed-off-by: Marcelo Vanzin commit fe03ca1ae43bedb274997279832184bd8c411858 Author: VMware, Inc <> Date: Mon Nov 21 14:53:45 2011 -0800 lib/lock: continue to put things back More trivial pieces go back in... Signed-off-by: Marcelo Vanzin commit ea53fb58fd13f152637191e234c512b246611f03 Author: VMware, Inc <> Date: Mon Nov 21 14:53:26 2011 -0800 lib/lock: put things back together My previous change, which had several parts, caused problems with 64-bit systems. I backed out the change. Now I'm putting things back, one piece at a time. This piece is the trivial, cosmetic piece. Signed-off-by: Marcelo Vanzin commit 7304d5950d756b0263494f0b178983832365d463 Author: VMware, Inc <> Date: Mon Nov 21 14:53:06 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit acfa6b5772726b155548d717e6fe3e45b181f005 Author: VMware, Inc <> Date: Mon Nov 21 14:52:42 2011 -0800 Revert a previous change. Signed-off-by: Marcelo Vanzin commit 16a7a44eebdff5d9f78ad8dc19c693614a7fb88b Author: VMware, Inc <> Date: Mon Nov 21 14:50:50 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6c1613a733ec2db0e76aeebbfc5cd3bb71dd9631 Author: VMware, Inc <> Date: Mon Nov 21 14:49:49 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c5725e4bea8bfc1a2108e218bb79ed6bbbf1a463 Author: VMware, Inc <> Date: Mon Nov 21 14:49:33 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f58c3680552a252244cdfff053afe24791a03cb7 Author: VMware, Inc <> Date: Mon Nov 21 14:48:42 2011 -0800 Avoid passing NULL channel to message library. I've looked at this code countless times, and can't come up with an explanation for why the bug happens without resorting to time drifts, quantum physics and possible questionable behavior of the glib main loop implementation. So just avoid the issue by having an explicit check. I've never been able to hit it myself either, to get a good debug session going on, and the cores I've seen have been less than helpful. Signed-off-by: Marcelo Vanzin commit 784b725c2d42d8696a3bcdbef58f835c8b784a13 Author: VMware, Inc <> Date: Mon Nov 21 14:48:14 2011 -0800 lib/lock: trivial reduction of a line No need to have 3 lines when one will do. Signed-off-by: Marcelo Vanzin commit 39de0ecd0871be9b7a1a60711e096d6eb0cdb369 Author: VMware, Inc <> Date: Mon Nov 21 14:48:00 2011 -0800 lib/lock: nasty races and memory leaks Signed-off-by: Marcelo Vanzin commit 3112f23c8db7a5b9d245d4f272a2ecfc88fbd498 Author: VMware, Inc <> Date: Mon Nov 21 14:47:15 2011 -0800 Fix stats builds The MXUser internal singleton lock routine is used by stats and debug; it needs to be there for both types of builds. Signed-off-by: Marcelo Vanzin commit 9636f19660a993cc682bff1b9f9e2897f7f74285 Author: VMware, Inc <> Date: Mon Nov 21 14:46:54 2011 -0800 lib/lock: some cleanups A few trivial cleanups - fix comments, no need for ifdefs Signed-off-by: Marcelo Vanzin commit 6ba5195ab397ce09d61154663edebdb93edae54b Author: VMware, Inc <> Date: Mon Nov 21 14:46:37 2011 -0800 lib/lock: trivial code move Move a function - no forward reference. Signed-off-by: Marcelo Vanzin commit 8bb1fc798a2454136daed8f1b4d4a020da0a3f1e Author: VMware, Inc <> Date: Mon Nov 21 14:46:17 2011 -0800 lib/lock: no bag on the side reference counting Use true reference counting on MXUser recursive locks. The destroy function remains to maintain compatibility with the existing code base. Signed-off-by: Marcelo Vanzin commit 4f0dd8dec1e52bcd235f397bbafffe098d61ba99 Author: VMware, Inc <> Date: Thu Oct 27 11:57:10 2011 -0700 Updating open-vm-tools version for release 2011.10.26-514583. Signed-off-by: Marcelo Vanzin commit 6271fde90248a4fd49e38aa61498db9e1dbf37c3 Author: VMware, Inc <> Date: Thu Oct 27 11:52:03 2011 -0700 make POSIX version of ProcMgr_ImpersonateUserStart i18n friendly. Signed-off-by: Marcelo Vanzin commit bdc46ab960ff0978e6a922006378fbd89d3747f4 Author: VMware, Inc <> Date: Thu Oct 27 11:51:24 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ff5b41485ca300121ad6fa4bfe01d41e1ba30836 Author: VMware, Inc <> Date: Thu Oct 27 11:50:43 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2def71a90774eac863ba191c0438cbbab6b4727e Author: VMware, Inc <> Date: Thu Oct 27 11:50:04 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 141dbd3fdc36da84b284590d426ae2910ac45151 Author: VMware, Inc <> Date: Thu Oct 27 11:49:45 2011 -0700 lib/lock: pretty up a message Make consistant with other messages. Signed-off-by: Marcelo Vanzin commit ed1519db0c575e0cfd314d716342642d755a8635 Author: VMware, Inc <> Date: Thu Oct 27 11:49:31 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1e60e13aebd695fbf590b0096ab2b643e59eea09 Author: VMware, Inc <> Date: Thu Oct 27 11:49:11 2011 -0700 lib/lock: exclusive locks should dump their owner(s) Signed-off-by: Marcelo Vanzin commit 7ec10106b1f650f9e545dff2d33b64400780b98a Author: VMware, Inc <> Date: Thu Oct 27 11:48:50 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit da93243d46b3d0ee80034f4b404c6be584be52e2 Author: VMware, Inc <> Date: Thu Oct 27 11:48:33 2011 -0700 Fix ternary operator usage in assert macros A couple of our ASSERT macros use the ternary operator without casting both operands to the same type. This is required for C++. bora does not have any usage of these macros in C++ code, but it breaks the build on sysimg branch. Signed-off-by: Marcelo Vanzin commit 9be74a297f228ac9d3f9e56ceb9554fbab22fa46 Author: VMware, Inc <> Date: Thu Oct 27 11:48:17 2011 -0700 open-vm-tools: fix non-Linux build. Need a new stub file. Signed-off-by: Marcelo Vanzin commit 73044c5fd09ecb9bcf29a71d2a8c295cd594e97a Author: VMware, Inc <> Date: Thu Oct 27 11:48:01 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 446a0e98467b096b06294a5c99895dc21e14e3e6 Author: VMware, Inc <> Date: Thu Oct 27 11:47:27 2011 -0700 vmtoolslib: use the new generic glib logging functions. This change replaces the vmtoolslib logger implementation with the "glib utils" library that was recently added. I also simplified a little the re-configuration code, both because the new loggers don't have the old "copy" function and because the old code was kinda confusing. Signed-off-by: Marcelo Vanzin commit d3a42ae2a66d7e88f8984e4007a417abc2a2580b Author: VMware, Inc <> Date: Thu Oct 27 11:46:16 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 319fe158bf699208fecfe4b4b522955c23c7d2c6 Author: VMware, Inc <> Date: Thu Oct 27 11:45:43 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 31124f480633c5821dac966be44bfdd05b80a75d Author: VMware, Inc <> Date: Thu Oct 27 11:45:14 2011 -0700 lib/file: improve function header Fill in the list of failure modes Signed-off-by: Marcelo Vanzin commit a4ffab16fdc330e81b9d60f673657ccca2a3df60 Author: VMware, Inc <> Date: Thu Oct 27 11:44:27 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fb644d635e66374b4a069e73ef4cab0683cdef7d Author: VMware, Inc <> Date: Thu Oct 27 11:44:00 2011 -0700 Leak tls key 0 We have a couple of bugs that show system libraries on linux have a nasty habit of destroying the first TLS key, even if they don't own it. This is due to using uninitialized global variables (which default to zero). Rather than expose ourselves to the blame for such bugs, let's just leak the key. Signed-off-by: Marcelo Vanzin commit bacfb71d72493bdb03c02b66b0acca7ff1e995cc Author: VMware, Inc <> Date: Thu Oct 27 11:43:36 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 017a363503844b1b30add3bdf002751365bd7ced Author: VMware, Inc <> Date: Thu Oct 27 11:42:49 2011 -0700 msgList.h pretty up Line up the structure fields Signed-off-by: Marcelo Vanzin commit f5ff1d421c43202f0493f28a3e0e8a81bd07a07e Author: VMware, Inc <> Date: Thu Oct 27 11:42:37 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2421205699825c5cf604b4ea9248862ed05615a9 Author: VMware, Inc <> Date: Thu Oct 27 11:41:43 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 300f92ba0c7f5ded609494804eeff5fcec6ad3d9 Author: VMware, Inc <> Date: Thu Oct 27 11:41:24 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit dc92050927cf937dff716ff54f4e857d05939551 Author: VMware, Inc <> Date: Thu Oct 27 11:40:36 2011 -0700 vmbackup: couple of fixes to Linux freeze ioctl support. . The sync driver code may get EIO and EACCES when trying to freeze filesystems. The first happens on our HGFS mount, if HGFS is not enabled on the host. The second, if a user has some filesystem mounted with "700" permissions, so our code can't access it. Just ignore those cases and keep going, freezing what we can. . The error handler wasn't properly unfreezing frozen filesystems, resulting in potentially unusable VMs if something went wrong. Signed-off-by: Marcelo Vanzin commit d838d11acea0c01872bcfd3deed744c4b7823692 Author: VMware, Inc <> Date: Thu Oct 27 11:39:22 2011 -0700 Fix Windows VMCI/vSockets build. The recent non-blocking change left out the extra "canBlock" parameter from the Windows-specific code. It was also missing the declaration for TryAcquire() and the definition of EAGAIN. Signed-off-by: Marcelo Vanzin commit 98cb68ba017a327ba8456c2ede0bc7b6739b7a1d Author: VMware, Inc <> Date: Thu Oct 27 11:37:39 2011 -0700 open-vm-tools: fix build without ICU. Signed-off-by: Marcelo Vanzin commit 24f39b42bebee5ddaf2239dd4afed7ac639ad8ee Author: VMware, Inc <> Date: Thu Oct 27 11:37:25 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e3b70855c2db746fb671d468f5d0f55a3f89b512 Author: VMware, Inc <> Date: Thu Oct 27 11:37:10 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 456240cd854f849d5ff710eabcd32bf917709272 Author: VMware, Inc <> Date: Thu Oct 27 11:36:48 2011 -0700 lib/misc: allow disabling ICU at compile time. Signed-off-by: Marcelo Vanzin commit e1873e35fa862b725a4a222ff2da5f56dbfecdb4 Author: VMware, Inc <> Date: Thu Oct 27 11:36:14 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c9f2a047fd7bb39b4ba428138f1ee28de2b051e2 Author: VMware, Inc <> Date: Thu Oct 27 11:35:40 2011 -0700 lib/lock: destroy reference count for bound locks Signed-off-by: Marcelo Vanzin commit 6b49e9764d20c9b1a64add28c291c4b8a9660d61 Author: VMware, Inc <> Date: Thu Oct 27 11:35:24 2011 -0700 Internal branch sync. Included in this change: . Adapt VMCI to support truly non-blocking enqueue/dequeue. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 773012d84d01f47b954671ca722cefb56b83b77b Author: VMware, Inc <> Date: Thu Oct 27 11:32:44 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 35e577d1d8210512a46bcf017df7ad2f7e45c773 Author: VMware, Inc <> Date: Thu Oct 27 11:32:20 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 81afc8b7475769cbe603e2da1a982114ad33f0e4 Author: VMware, Inc <> Date: Thu Oct 27 11:31:53 2011 -0700 lib/lock: Recursive lock destroy reference counting Signed-off-by: Marcelo Vanzin commit cba5f3e97fbf17d5bcea4646b370a43954d55d57 Author: VMware, Inc <> Date: Thu Oct 27 11:31:36 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6fe36b8b127f7140a5ffefce3f0bab4f283ee80b Author: VMware, Inc <> Date: Thu Oct 27 11:31:00 2011 -0700 Implementation of Util_Memcpy, routine using movsq and movsd to accelerate aligned copies. Signed-off-by: Marcelo Vanzin commit 6828f582f688327ef50ecdaa93a12d6951dcfa40 Author: VMware, Inc <> Date: Thu Oct 27 11:27:38 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 532e29d23f16c145c493685fc784d44cabc1febd Author: VMware, Inc <> Date: Thu Oct 27 11:27:19 2011 -0700 Fix crash in vmbackup's abort timer. VmBackupDoAbort cleans up the global backup state, so we shouldn't access its fields after calling that function. Signed-off-by: Marcelo Vanzin commit 94691cb9e61bb978c6779a6c160980776720c5a3 Author: VMware, Inc <> Date: Thu Oct 27 11:27:02 2011 -0700 Lower (process, i/o) priority when wiping disks on Win32. An attempt to avoid warnings popping up about applications that become unresponsive because we're hogging resources by writing lots of stuff to the disk. Also be less chatty with the backdoor, and fix a bug where we were passing the wrong parameters to the RPCI call making the VMX respond with a failure. Signed-off-by: Marcelo Vanzin commit 13ab4cc0a376993ac8b946a3a1f22126a4a36635 Author: VMware, Inc <> Date: Thu Oct 27 11:26:39 2011 -0700 Update network manager calls in suspend / resume scripts. Another NetworkManager release, another API breakage... sigh. NM 0.8 added a new method ("Enable") but still had the "Sleep" one according to the docs; 0.9 (used in Ubuntu 11.10) doesn't respond to "Sleep". So add a call to the new method. Also try the new methods first. On top of that, Ubuntu 11.10 freaks out if you call "/etc/init.d/networking stop", and to make it worse "/etc/init.d/networking start" doesn't work at all. So, when the NetworkManager call works, just don't do anything else. This is "best effort" anyway, applications should be resilient to network fluctuations (and we all live in a perfect world where pink unicorns roam free). Signed-off-by: Marcelo Vanzin commit b3bc87770059ef0979c4f8ac04aed6bd8e8db66b Author: VMware, Inc <> Date: Thu Oct 27 11:25:39 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f9ec406fd91998a405679db1a182c26db0ea99c4 Author: VMware, Inc <> Date: Thu Oct 27 11:25:17 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e748cae3a92a0a94f18c481a91f7890f01496fd3 Author: VMware, Inc <> Date: Thu Oct 27 11:24:56 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7f5efe440286f16e5804c47c11d90ea9378f5b95 Author: VMware, Inc <> Date: Thu Oct 27 11:24:28 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b97cf771cdff9501d8869939bf1754813598610e Author: VMware, Inc <> Date: Thu Oct 27 11:22:57 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c3d05a8c37db6ad524d979feed09124fdd4cfe5b Author: VMware, Inc <> Date: Thu Oct 27 11:22:23 2011 -0700 open-vm-tools: minor adjustments for uClibc. Mostly based on patch submitted by Wallace Wadge (SF Bug 3371547). Also added some autoconf trickery to disable our printf wrappers; now they're only compiled for Linux systems that have "ecvt()" (uClibc doesn't have that). This prevents compiling the wrappers on Solaris and FreeBSD (which was useless), and makes the code compile on uClibc (also fixing SF Bug 3026491). uClibc seems tricky, though; depending on how the library is compiled it won't work. I tried Alpine Linux, and it doesn't ship with uClibc locale support, so codesetOld.c fails to compile. I added a hack to work around the issue (not included here) and everything else compiled, and vmtoolsd seemed to run happily. Signed-off-by: Marcelo Vanzin commit ecfed3763c61153c1201ebc430540824c2a4d497 Author: VMware, Inc <> Date: Thu Oct 27 11:21:37 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fe53b7547c3cd7c3b337923c25ee22790795abd3 Author: VMware, Inc <> Date: Thu Oct 27 11:20:15 2011 -0700 Allow changing vmxnet2's MAC address while the interface is up There is nothing in the device backend which prohibits us from changing the MAC address of the vmxnet2 vNIC while the interface is up and running. This patch allows the same from guest driver. Thus vmxnet2 is comparable to vmxnet3 and e1000 behavior in this regard. Signed-off-by: Marcelo Vanzin commit 4973c5ad7a8efc843bfd60f3d246cfbb4f84bd35 Author: VMware, Inc <> Date: Thu Oct 27 11:19:45 2011 -0700 Fix QPair wakeup on suspend On vmkernel, we do not unregister the guest memory, when a VM is quiesced, so the queue pairs stay in a *_MEM state, if already there. When detaching from a queue pair, we were only waking up blocked kernel endpoints, if the queue pair was in the *_NO_MEM state, since that would indicate that the QP is quiesced. However, what we need to determine is whether the queue pair headers are still mapped, since that is the common operation for hosted and vmkernel on quiesce/unquiesce. Signed-off-by: Marcelo Vanzin commit 7d6cc0f7a724ea67a03a01ca4b2c5a6e77bac01e Author: VMware, Inc <> Date: Thu Oct 27 11:17:53 2011 -0700 ListProcessesInGuest Cleanup for ALL OS-es. Cleaning up memory leaks in error conditions. Re-structuring Process List to be an array of *new* Process Info structures, one per process. Affects ALL OS-es. Signed-off-by: Marcelo Vanzin commit 1ea6c5403f5fd360603d3fc6fc8015c927159be5 Author: VMware, Inc <> Date: Thu Oct 27 11:16:58 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fc0cd1018ba8831c78480a2fbc737bd6d49891ef Author: VMware, Inc <> Date: Thu Oct 27 10:57:19 2011 -0700 Implement HgfsGetRootDentry() to get the root dentry. When the user loads vmhgfs modules and mounts a shared folder, kernel crashes. During the intial hgfs mount process, we need a root dentry. We can get the reference to the root dentry by calling d_alloc_root(). But we cannot call d_alloc_root in HgfsReadSuper() since it requires a valid inode which we don't have at that point of time. We implemented a workaround for this issue. The workaround is done in two phases as specified below: - Create a dummy root dentry by calling d_alloc_name(). - Send a getAttr request to the hgfs server and get the root inode. - Populate the content of the dummy root entry with the root inode. This workaround works perfectly fine. But, with the latest kernel version, the semantics of d_alloc_name() is changed. We can no longer pass NULL to the d_alloc_name (which we have been doing till now). Fixed this by implementing a new function HgfsGetRootDentry() that first gets the root inode, fills the properties of the root inode and then uses d_alloc_root() to generate the root dentry. Signed-off-by: Marcelo Vanzin commit 5f4c46b50639ce8918b82a0fa8656d0a68733ad3 Author: VMware, Inc <> Date: Thu Oct 27 10:56:19 2011 -0700 Fix double-free in Linux sync driver code. Signed-off-by: Marcelo Vanzin commit 4b209f15b1d705111964c1c989570a104dbf506d Author: VMware, Inc <> Date: Thu Oct 27 10:55:00 2011 -0700 Account for the space we're skipping when de-serializing input data. This wouldn't cause a buffer overflow since the message layer always adds a trailing null to the incoming data, but it could cause invalid data to be parsed if the planets aligned correctly. Signed-off-by: Marcelo Vanzin commit 87c303e140beee133c1d9bc6b2eb483963856627 Author: VMware, Inc <> Date: Mon Sep 26 13:16:29 2011 -0700 Updating open-vm-tools version for release 2011.09.23-491607. Signed-off-by: Marcelo Vanzin commit 05baddbed1c5e47e9789a44d30bb217d7184232a Author: VMware, Inc <> Date: Mon Sep 26 13:07:25 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a4343baec799209022a97b88f49b9c5eb66eedca Author: VMware, Inc <> Date: Mon Sep 26 13:04:24 2011 -0700 hgfsmounter: store result of parsing dmasks correctly. Reported on SourceForge tracker (#3409598) Signed-off-by: Marcelo Vanzin commit cf11432e4b6bd80218310f07551f1f8a42a6a2ca Author: VMware, Inc <> Date: Mon Sep 26 13:03:47 2011 -0700 hashTable: pretty up include Make the style consistent Signed-off-by: Marcelo Vanzin commit 40da632b20fddfcf956165bfcd7d86d30e25e898 Author: VMware, Inc <> Date: Mon Sep 26 13:03:32 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 478d4b65388f19c566b299752818e812cf95c040 Author: VMware, Inc <> Date: Mon Sep 26 13:03:15 2011 -0700 Capture output of "ps" in linux vm-support. Somehow this got lost. Signed-off-by: Marcelo Vanzin commit 8ba53c4123cdc42de238ec3d098abef091e5c7ac Author: VMware, Inc <> Date: Mon Sep 26 13:02:43 2011 -0700 Remove stale comment about lib/nothread lib/nothread fell out of use a year or so ago, lib/misc/vthreadBase.c can now tolerate all threading models. Thus, this comment is now stale and can be removed. Signed-off-by: Marcelo Vanzin commit eed5c7f6d614f6170801334ba1a9b260b0f409c1 Author: VMware, Inc <> Date: Mon Sep 26 13:02:27 2011 -0700 MinGW-w64 portability fixes to vm_basic_types.h. MinGW-w64 uses different defines to protect size_t and ssize_t. Signed-off-by: Marcelo Vanzin commit 64c891d11a27914a242dd8d357628298acd5d059 Author: VMware, Inc <> Date: Mon Sep 26 13:02:08 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1c6d165b9b202ea75e196c1cdbcc9ecfff99efad Author: VMware, Inc <> Date: Mon Sep 26 13:00:34 2011 -0700 Make QP Broker locking local to vmciQueuePair.c The locking for the VMCI queue pair broker was distributed across the VMCI driver for the sole reason of being able to handle a failed copy to user on Linux for queue pair alloc. After this change, a failed copy to user will still detach from an allocated queue pair, but a peer may have attached to the queue pair between the alloc and detach. Since the copy to user won't fail with a correctly working VMX, this simplification is justified. Signed-off-by: Marcelo Vanzin commit 5bd57a8bb954902a8ab2d23439ea04dc6cd2dd54 Author: VMware, Inc <> Date: Mon Sep 26 12:59:51 2011 -0700 Import dlpam_sterror symbol. When the user executes any guest operation with invalid login credentials, vmtoolsd process crashes [Signal 11, Segmentation fault]. Got the stack trace and found out that the crash happens in Auth_AuthenticateUser() function. dlpam_strerror symbol is not loaded from the PAM library but is referenced. This causes the crash. Modified the code to import the dlpam_sterror symbol. Signed-off-by: Marcelo Vanzin commit e518318bc9212efdfef7c3e5c0ae40e4e8df3d20 Author: VMware, Inc <> Date: Mon Sep 26 12:59:03 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d153cc79455a4dc61f47be9841dbb08134a1ae56 Author: VMware, Inc <> Date: Mon Sep 26 12:58:02 2011 -0700 lib/misc: centralize validating a PID Code to determine is a PID is valid is tricky; we shouldn't have multiple codes to do this. We happened to have a good, working code for this in the file locking code. Move the code to lib/misc, adapt it, slightly, to its new environment and then fix up the call sites. Signed-off-by: Marcelo Vanzin commit 2c9e2ee613a4bf4c490d755eb4678b6a784d963c Author: VMware, Inc <> Date: Mon Sep 26 12:55:48 2011 -0700 vmblock-fuse: add os_atomic_read() definition This is needed for tools OBJ build. Signed-off-by: Marcelo Vanzin commit 4f2cd3a5f3ead99395c06225384b823b850d4750 Author: VMware, Inc <> Date: Mon Sep 26 12:55:20 2011 -0700 vmblock: fix OBJ build All my local/sandbox builds were done as betas so I missed thsi breakage. Signed-off-by: Marcelo Vanzin commit 69bfe1ea3957beafdf805cb70b43a3d3bb8e3fc0 Author: VMware, Inc <> Date: Mon Sep 26 12:55:04 2011 -0700 vmblock: consolidate refcounting and freeing of block objects Combine refcounting and memory management by providing BlockGrabReferenec() and BlockDropReference() and have BlockDropReference() free the block object once last reference is dropped instead of callers explicitly checking refount and freeing the object manually. Signed-off-by: Marcelo Vanzin commit a84134e4b40651b9f019adae50d1dc091fa3f428 Author: VMware, Inc <> Date: Mon Sep 26 12:53:59 2011 -0700 lib/misc: clean up hostinfo.h Got a change coming. Let's do some trivial but pretty clean up. Signed-off-by: Marcelo Vanzin commit fe5a6484c9df7af37dea85acf997d96e30efddc0 Author: VMware, Inc <> Date: Mon Sep 26 12:53:20 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7608c337be113344fc178b6507959c79307c23b0 Author: VMware, Inc <> Date: Mon Sep 26 12:52:38 2011 -0700 Make VMCI doorbell notification return VMCI_ERROR_NOT_FOUND If a doorbell handle isn't found, we currently return VMCI_ERROR_INVALID_ARGS. A more informative error code would be VMCI_ERROR_NOT_FOUND, so let us do that instead. Signed-off-by: Marcelo Vanzin commit 48688f16ef2896f7340eea2be5d5b3016242edc1 Author: VMware, Inc <> Date: Mon Sep 26 12:51:47 2011 -0700 Fix dangling pointer in DynBufRealloc(). Coverity complains a lot about using a pointer after it has been freed. Indeed, for certain conditions, the buffer is being freed, but a pointer to it is not being set to NULL. And since this function is actually trying to duplicate the functionality of realloc(), simplify it a bit and get rid of the offending piece of code. From realloc() documentation: " In case that ptr is NULL, the function behaves exactly as malloc, assigning a new block of size bytes and returning a pointer to the beginning of it. In case that the size is 0, the memory previously allocated in ptr is deallocated as if a call to free was made, and a NULL pointer is returned. " Signed-off-by: Marcelo Vanzin commit 6ea7b1d484f7a90d1e8f61cd0c42f785a19d7c45 Author: VMware, Inc <> Date: Mon Sep 26 12:51:16 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0eb6bdbefb9d4aa1b8e8e518127563ea9deb7a88 Author: VMware, Inc <> Date: Mon Sep 26 12:50:24 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 92321f05e4511502862b2ead3e3dd88028479905 Author: VMware, Inc <> Date: Mon Sep 26 12:48:38 2011 -0700 Remove VM to VM communication from VMCI This change makes the host code enforce that two VMs cannot communicate via VMCI. Since the guest driver may be used on older versions of our products, where VM to VM communication is still allowed, we do not attempt to filter out VM to VM communication in the guest. Signed-off-by: Marcelo Vanzin commit 7563cc14089b3a1f58e15f9aa0db41ebe60032e9 Author: VMware, Inc <> Date: Mon Sep 26 12:48:01 2011 -0700 Fix VMCIQueuePair_Alloc error on non-local peer for local QPs VMCIQueuePair_Alloc will allow a local queue pair to be allocated with a non-local peer ID. Instead, it should return VMCI_ERROR_NO_ACCESS. This change fixes that. Signed-off-by: Marcelo Vanzin commit 72316755e905db73979d9d0c2297f99c74374cc3 Author: VMware, Inc <> Date: Mon Sep 26 12:43:47 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 33bf27267b7e686b1e757c2ba5268fee7f07f1c9 Author: VMware, Inc <> Date: Mon Sep 26 12:41:36 2011 -0700 Use bora formatting functions in log wrappers. glib and bora disagree about format strings, so don't mix them. Signed-off-by: Marcelo Vanzin commit b8aa478831df64b5d0c5a1adb92810e5f4ab0581 Author: VMware, Inc <> Date: Mon Sep 26 12:40:11 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 908832ad12c42641c820d27fdb113c4609365bb0 Author: VMware, Inc <> Date: Mon Sep 26 11:58:06 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8cb645ef3dddb1da0c6cf52b1f0025ae6f6f3210 Author: VMware, Inc <> Date: Mon Sep 26 11:57:29 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1b59fd02b2981fcd102f0bfb4efc3365855178db Author: VMware, Inc <> Date: Mon Sep 26 11:56:53 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 28afee7070544af2c48847072f306f3b20aa122f Author: VMware, Inc <> Date: Mon Sep 26 11:56:37 2011 -0700 VixTools: List Processes - Fix for potential core and couple of optimizations. Change 1: Once we have found and printed the input pid we are looking for, we can "break" the loop and move to the next input pid. Change 2: The ignore for exited pid belongs to the outer "for" loop. Change 3: Incorrect indexing into procList prints wrong process info. Also may cause a core if "i >= procList->procCount". Signed-off-by: Marcelo Vanzin commit bb428bcdb68f77f6e0e4f2522dbd6a11ec5a3926 Author: VMware, Inc <> Date: Mon Sep 26 11:56:06 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ac97ffb35d670218b7410be2109423b8ff618e19 Author: VMware, Inc <> Date: Mon Sep 26 11:55:42 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 382c8a9133a434dcc9e99bd95a21e41400e56e4b Author: VMware, Inc <> Date: Mon Sep 26 11:54:52 2011 -0700 Removing shadow option from pam_unix2.so Checked earlier verion of pam_unix2 (pam_unix2 1.30, and pam_modules-9 on sles 9), as well the changelog, pam_unix2 never mentioned about shadow option support. Signed-off-by: Marcelo Vanzin commit 3b72698430e3c1f8dcb9ca1f2227042b8b53fd2c Author: VMware, Inc <> Date: Mon Sep 26 11:54:26 2011 -0700 lib/lock: Fix a comment. Signed-off-by: Marcelo Vanzin commit 0d60f1239c5a701c420df307058bcd865a266479 Author: VMware, Inc <> Date: Mon Sep 26 11:54:04 2011 -0700 lib/lock: off by one. The lock count needs to be tested after an increment. Signed-off-by: Marcelo Vanzin commit 60b336c5462a6f5d1c1c20cf530c012f7515ecc4 Author: VMware, Inc <> Date: Mon Sep 26 11:53:51 2011 -0700 lib/lock: ACK! Try acquire on an MXUserRecLock fails! The try lock implementation only works for exclusive locks. Fix this. Signed-off-by: Marcelo Vanzin commit 6d1bdd235e820b0a52291918d2eb9b9c1a7ff84b Author: VMware, Inc <> Date: Mon Sep 26 11:53:33 2011 -0700 Fix asymmetric VMCI queue pair allocation The entries in the VMCI queue pair broker are assumed to be stored from the guest point of view, but if the queue pair is created by the host endpoint, the sizes are not assigned correctly. Instead, the produce queue will have the consume queue size and vice versa. This change ensures that the values stored in the queue pair broker entries are always from the guest point of view. Signed-off-by: Marcelo Vanzin commit 6e07079eb09a46010dc3bddab1c4fc99e74ee864 Author: VMware, Inc <> Date: Mon Sep 26 11:53:15 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 713f391924d3ed2d5403058e5553cf61f539a757 Author: VMware, Inc <> Date: Mon Sep 26 11:52:53 2011 -0700 Fix VMCI QP state transition on host detach If the host detaches from a queue pair that is in an unmapped state, it will erronously put it into a mapped state (SHUTDOWN_MEM). This change makes the host detach move the queue pair into SHUTDOWN_NO_MEM if the queue pair is already in a *_NO_MEM state. Signed-off-by: Marcelo Vanzin commit d823f1e73ed7f228f3b41284757b4669eebfff15 Author: VMware, Inc <> Date: Mon Sep 26 11:52:24 2011 -0700 Remove support for the VMCI domain on ESX Signed-off-by: Marcelo Vanzin commit 288c57878f7ba3eefdab017dea87a40138713e19 Author: VMware, Inc <> Date: Mon Sep 26 11:50:08 2011 -0700 Retire VMCI wellknown handles. With VM to VM communication being retired, the wellknown handles no longer serve any purpose. This change removes the remaining support for them. Signed-off-by: Marcelo Vanzin commit 0597ad723ce326bb2c8f40a30dcb2cc60846210c Author: VMware, Inc <> Date: Mon Sep 26 11:49:23 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 96a0fadfc11ce7a381febfa17d2618b4f173a962 Author: VMware, Inc <> Date: Mon Sep 26 11:46:02 2011 -0700 Trivial pretty up Signed-off-by: Marcelo Vanzin commit 7469d67890c367c4d459a2e01010956fe8e9183c Author: VMware, Inc <> Date: Mon Sep 26 11:45:34 2011 -0700 Remove obsolete compat_netif_* definitions Most of them are needed when compiling on kernels earlier than 2.6.9 and so can be removed. Signed-off-by: Marcelo Vanzin commit e430c76db89eec8f2cf4059340055a61f1baa4a8 Author: VMware, Inc <> Date: Mon Sep 26 11:43:58 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 87f5acdafaab3385d60a1c96ff272167286671ac Author: VMware, Inc <> Date: Mon Sep 26 11:43:29 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 89fe2a179ca8486216bbc142bc7a2388b35a6828 Author: VMware, Inc <> Date: Mon Sep 26 11:41:03 2011 -0700 VMCI queue pair quiesce support This change allows the host side of a queue pair to deal with a VM being temporarily stunned in two ways; it may either block in the queue pair enqueue or dequeue operation until the VM becomes available or it can use a non-blocking behaviour, where the operation will return a would block error message. Signed-off-by: Marcelo Vanzin commit 3a4d16fa4236ec89cf7a0ef08711f5df92d6cb7f Author: VMware, Inc <> Date: Mon Sep 26 11:38:02 2011 -0700 VMCI Queue Pair Rewrite The VMCI queue pair implementation is being simplified to only supporting VM to host communication. This new approach will use the VM memory directly for the queue pair content, making any host side queue pair operations work directly on the VMs main memory, instead of operating on special shared memory that has been remapped into the VM. Signed-off-by: Marcelo Vanzin commit b27b971dfec9449df8015bd800942f66e73e4aeb Author: VMware, Inc <> Date: Mon Sep 26 11:36:32 2011 -0700 lib/lock: bound thread ID creation on Windows Apparently thread IDs are reclaimed immediately on POSIXen. On Windows thread IDs are essentially unique leading to huge amounts of MXUser (lock) tracking memory being wasted. The fix is simple - use VThread_CurID. This is our bounded, quickly recycled thread ID service. Signed-off-by: Marcelo Vanzin commit 1c51204cd887d1efd2197095efb19bcc47913bb6 Author: VMware, Inc <> Date: Mon Sep 26 11:35:42 2011 -0700 Fix for Coredump in Tools when PAM fails to start. Whenever PAM fails to start for any reason (i.e., pam_start() returns with error), calling pam_end() after that causes tools to coredump. For all other pam calls, if there is any failure pam_end() should be called. Signed-off-by: Marcelo Vanzin commit 7ffcfbe108f1fcd6fb808b7954e9941bbd6f36f2 Author: VMware, Inc <> Date: Mon Sep 26 11:34:40 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ab26e9f8f740970c4e9d9c5d0b6783d08ef5a6fd Author: VMware, Inc <> Date: Mon Sep 26 11:34:12 2011 -0700 Rework VMCI lock ranks and expand semaphore usage on vmk. Signed-off-by: Marcelo Vanzin commit b9fa212a1f126f1c67144a73153104485c3d8835 Author: VMware, Inc <> Date: Mon Sep 26 11:32:09 2011 -0700 Preserve hidden attribute for files copied from guest to MAC hosts. Implemented the code to preserve the hidden attribute when a file is copied from the gues to the MAC host. Note: I have copied couple of functions from hgfsServerLinux.c. In future, at some point of time, we should move those function to a common file which will be consumed by various HGFS components. Recently, we have submitted a changeset to preserve the permissions of the directory when it is copied from the guest to host. As a part of the changeset, a dummy fileInfo structure is added into the linked list. When a user DND a folder from the guest to the host, we should not display any progress when the dummy entry is processed. Modified the code accordingly. Modified the way, the arguments are passed while calling HgfsSetHiddenXAttr in hgfsServerLinux.c. Re-factored the code in ChangeInvisibleFlag() function. Signed-off-by: Marcelo Vanzin commit 2c870a20a6e87345a89165b333527f85df446a95 Author: VMware, Inc <> Date: Mon Sep 26 11:31:04 2011 -0700 VMNET: fix compilation on 3.1 kernels Commit e2270ea62ae4d7a47d6d72942cdb8c669be6357a removed HAVE_NET_* feature macros so we need to cope with it. Luckily most of them were present since before 2.6.9 so we can just remove references to them. This is a minimal change needed to build for 3.1 and suitable for cross-porting; more cleanups will follow. Signed-off-by: Marcelo Vanzin commit 8fd3fde9d38f4be48957cdde9d7b9f0a2e9aeed9 Author: VMware, Inc <> Date: Mon Sep 26 11:30:29 2011 -0700 Open VM Tools: Prune Unity plugin from OVT build. So, like, napkin cost-benefit analysis showed this plugin wasn't worth keeping around. Workstation & Fusion users overwhelmingly stick with the "official" Tools, and appliance vendors aren't particularly interested in Unity. Meanwhile, we're still getting bit with build failures by dealing with disjoint build systems. (Oh, and GHI has been busted since October, anyway.) Signed-off-by: Marcelo Vanzin commit 21589b1931fc2308cb0b27ae7ee7753899fafd79 Author: VMware, Inc <> Date: Mon Sep 26 11:27:39 2011 -0700 Support for VMODL Guest Operations inside a MacOS Guest OS - Part 2 Signed-off-by: Marcelo Vanzin commit e08b5f4c0dc2dc83ce662c827fad16253b8e9fd8 Author: VMware, Inc <> Date: Mon Sep 26 11:25:58 2011 -0700 Use individual arguments for the components of opening a menu and opening a specific item in a menu. Rather than having the library do all the serialization to a DynBuf (containing an ASCII representation sent over the backdoor) return the individual items in their original form and defer the serialization to the plugin which is more acquainted with the transport requirements. Signed-off-by: Marcelo Vanzin commit a35d2002a0cd384a8f0c117fa97dba125b3ff8c2 Author: VMware, Inc <> Date: Mon Sep 26 11:24:32 2011 -0700 open-vm-tools: don't create /etc/vmware-tools. vmtoolsd knows the right location of the plugin directory, no need for the symlink that was being placed in that directory. Signed-off-by: Marcelo Vanzin commit 19a156805352238d47795e5a36775544a9ee1c96 Author: VMware, Inc <> Date: Mon Sep 26 11:22:36 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3240978820f65936ef755f80ffa8a6bdafd68956 Author: VMware, Inc <> Date: Mon Sep 26 11:21:08 2011 -0700 shutdownStreamTest fails on RHEL6.1 The problem is that the test is broken for Linux, and it appears to work with INET but actually it doesn't. What happens with /st is that when we do the send(), we actually get a SIG_PIPE, and the process exits, but there's no error message, so it looks like the test passes. Based on this pass, when running the same test for vSockets, it seems like we don't match the behavior because we fail. But fixing the signal problem, by passing MSG_NOSIGNAL to the send, makes it fail for INET too. So now the test fails for both system sockets and vSockets The correct behavior on Linux is for the final recv() to succeed. Even with a local shutdown, the socket should return 0 after a recv(). This change fixes the test to expect 0 on Linux (and failure only for Windows, which is correct). Signed-off-by: Marcelo Vanzin commit 00bc722e124cbf8d54afa4af1003f49161813de9 Author: VMware, Inc <> Date: Mon Sep 26 11:16:48 2011 -0700 lib/lock: trivial cleanup before a change Change MXUserGetNativeTID to MXUserGetThreadID - don't imply anything about where the thread ID is derived from, we may choose native and portable implementations. Signed-off-by: Marcelo Vanzin commit 7c259ffe9202a33ef98192ba566750e212fcec33 Author: VMware, Inc <> Date: Mon Sep 26 11:12:55 2011 -0700 Support for VMODL Guest Operations inside a MacOS Guest OS. Signed-off-by: Marcelo Vanzin commit 37b81a22a4386b560fcd15270a6fabe5d8f34032 Author: VMware, Inc <> Date: Mon Sep 26 11:10:55 2011 -0700 [unity] Remove unused typedef for DesktopSwitchCallbackManager. Signed-off-by: Marcelo Vanzin commit c16eb69e878b268530e3a5a70282a2dc8faf9274 Author: VMware, Inc <> Date: Mon Sep 26 11:09:45 2011 -0700 [unity] Move glib signal from lib/unity to unity plugin. The dnd plugin expects the unity plugin to emit a g_signal whenever we enter or exit unity so that it can update some state. Since the signal is strictly a plugin thing, move it out of the unity library code and into the unity plugin code, which feels like a better fit. Signed-off-by: Marcelo Vanzin commit 31421f5dfd15d5d21217378ba22460c138dab02f Author: VMware, Inc <> Date: Mon Sep 26 11:09:12 2011 -0700 Remove some ancient cruft from vm_assert.h Two things that we don't need in vm_assert.h; both of these disappeared >5 years ago. - LogDB/WarningDB: we don't need special hooks anymore for logging these. (They weren't hooked up to anything special.) - FILECODE: we stopped using this ~2005. Six years later, the warnings probably aren't useful. Signed-off-by: Marcelo Vanzin commit 11f471fda5e6c2dc3550ae3d232fcf732ab46e63 Author: VMware, Inc <> Date: Mon Sep 26 11:08:22 2011 -0700 open-vm-tools: enable PAM check for non-Linux builds. Signed-off-by: Marcelo Vanzin commit 89e51bf8cf6a99ea3802b348789defe011be46d8 Author: VMware, Inc <> Date: Mon Sep 26 11:08:04 2011 -0700 Fix non-conformant IPv6 link-local address. Some TCP stacks stick the scope id in there when they shouldn't. Fix it in our code so that outside people see the correct address. Signed-off-by: Marcelo Vanzin commit b10d2550589bed49cefd9e63227c691b331b865a Author: VMware, Inc <> Date: Mon Sep 26 10:59:40 2011 -0700 Remove dead code. Signed-off-by: Marcelo Vanzin commit 3e2783d34525e73f61190ac4130b71de11fd020b Author: VMware, Inc <> Date: Mon Sep 26 10:59:06 2011 -0700 lib/file: improved defensive response The /proc parser should bail and use its error processing in one additional case. Signed-off-by: Marcelo Vanzin commit b8f5f1106311be6a84140677948d37356af01789 Author: VMware, Inc <> Date: Mon Sep 26 10:58:48 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e1595739f211123de02a39230292f23ba2185e16 Author: VMware, Inc <> Date: Mon Sep 26 10:58:16 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 905627fa2d19e1118b86a4b8c4b18dcd460d21b1 Author: VMware, Inc <> Date: Mon Sep 26 10:56:51 2011 -0700 Use Linux ioctls for freezing filesystems. The main purpose of this change is to allow using Linux ioctls that were added in 2.6.29 (and backported to a few distro kernels) instead of our own vmsync driver to freeze/thaw file systems. This particular change required changing the way the POSIX sync driver backend works, since it now has to try different backends to see what is available or not. This means having a second "null" backend (the other one is in the vmbackup plugin). On top of that, I decided to clean up some of the code. Mainly: . put the POSIX backends in their own files, make the syncDriverPosix.c just call into the backends. . get rid of the "DrivesAreFrozen()" call which wasn't really that useful, and couldn't be implemented in some situations (e.g., the Linux ioctls). . minor cleanups here and there. Signed-off-by: Marcelo Vanzin commit ecfce537d170aac6eab82e0684452c1c36694c5b Author: VMware, Inc <> Date: Mon Sep 26 10:55:33 2011 -0700 Eliminate duplicate handle field from VMCI resources. Each VMCI resource has handle field, which is a duplicate of the handle that is already stored within the hash entry, which is also embedded inside the resource. This change removes the handle field and adds an accessor to retrieve the handle from resource via the hash entry. The doorbell code has been modified to use this accessor. Signed-off-by: Marcelo Vanzin commit 7b56bfa31270f817ede071b3a5c0719d0628c20c Author: VMware, Inc <> Date: Mon Aug 22 14:23:59 2011 -0700 Updating open-vm-tools version for release 2011.08.21-471295. Signed-off-by: Marcelo Vanzin commit 2b3d76ba776f55d06fb5b62499b189ebd6bc1c75 Author: VMware, Inc <> Date: Mon Aug 22 14:18:04 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 02c3629072a5c8e2535aeb82069d57ae6a95f499 Author: VMware, Inc <> Date: Mon Aug 22 14:15:44 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 60e89354668c25059dc87cf92a373cd32f9bb13e Author: VMware, Inc <> Date: Mon Aug 22 13:27:38 2011 -0700 Remove VIX_BACKDOORCOMMAND_CHECK_USER_ACCOUNT command. We have a backdoor command i.e. VIX_BACKDOORCOMMAND_CHECK_USER_ACCOUNT but is not used anywhere in the code. VMX forwards "check user account" commands through backdoor using VIX_BACKDOORCOMMAND_COMMAND. I have removed the code that is related to VIX_BACKDOORCOMMAND_CHECK_USER_ACCOUNT. Signed-off-by: Marcelo Vanzin commit 0b8189cadb5f6913106d90791505d980fc92d06f Author: VMware, Inc <> Date: Mon Aug 22 13:26:45 2011 -0700 Correct the definition of COMPAT_NETDEV_TX_BUSY NETDEV_TX_* became enum after 2.6.31. Hence the current definition fails to define COMPAT_NETDEV_TX_BUSY properly. It is defined as 0x1 instead of 0x10. This changes fixes the definition of COMPAT_NETDEV_TX_BUSY Signed-off-by: Marcelo Vanzin commit 469d7ecd0c591865e48baa833928b4c8eb5bc70b Author: VMware, Inc <> Date: Mon Aug 22 13:23:56 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 14734fa09089176dc0a2128ac06af26deefa56b1 Author: VMware, Inc <> Date: Mon Aug 22 13:21:37 2011 -0700 Fix disk device detection on Mac OS. A recent reorg of this code seems to have uncovered an issue where our FreeBSD-targeted WiperIsDiskDevice doesn't really work on MacOS, in spite of what the comments say. Signed-off-by: Marcelo Vanzin commit c514f538dcb3cacde6f2cfe628435c7810feae0d Author: VMware, Inc <> Date: Mon Aug 22 13:21:04 2011 -0700 Move unity back-ends into subdirs. Move the per-platform unity code into subdirs. This change has the makefile and source code changes required. Note that I had to rename lib/unity/x11/platform.cc to lib/unity/x11/x11platform.cc to work around a problem in the open-vm-tools build; platform.h was renamed for consistency. Signed-off-by: Marcelo Vanzin commit d441ed66d232b110e9444da0f292eb61a81a2f84 Author: VMware, Inc <> Date: Mon Aug 22 13:18:44 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3464afc532bcac75c9e702a19a59499539952133 Author: VMware, Inc <> Date: Mon Aug 22 13:17:56 2011 -0700 Support for VMODL Guest Operations inside a FreeBSD Guest OS - Part 2 The following changeset reflects support for the GuestFileManager APIs only. Signed-off-by: Marcelo Vanzin commit 3b73c780f508044e6b22b84dabc9567f851e47a7 Author: VMware, Inc <> Date: Mon Aug 22 13:15:38 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 87a7b1e2290efce79381c4fd9f702b512137ec16 Author: VMware, Inc <> Date: Mon Aug 22 13:15:02 2011 -0700 Fix crash caused by passing NULL to strcmp. Signed-off-by: Marcelo Vanzin commit 93a2f585eb45494024ab3c1caf8e27510f8ea207 Author: VMware, Inc <> Date: Mon Aug 22 13:14:32 2011 -0700 Merge of tools localized files. Signed-off-by: Marcelo Vanzin commit 1e86a5d2be0aa1b65772b294dffbe7b961d45dfa Author: VMware, Inc <> Date: Mon Aug 22 13:13:50 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 20704e048a23d9b6dcdc14770e188626abc8b569 Author: VMware, Inc <> Date: Mon Aug 22 13:13:22 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c49d892a87af4cd3d1a03815c46e0f81232b0288 Author: VMware, Inc <> Date: Mon Aug 22 13:12:56 2011 -0700 Fixing the build break for open-vm-tools for freebsd Changes are trivial: 1. included in procMgrPosix.c 2. added -lkvm in configure.ac Signed-off-by: Marcelo Vanzin commit 37e92c10c6260176471ff60e245515c1f9df3899 Author: VMware, Inc <> Date: Mon Aug 22 13:12:40 2011 -0700 tools: remove the last vestige of fixed length strings The caching technique used in the guestInfo server was built around fixed length strings. This is unnecessary and can lead to an assertion failure (too long) should real data exceed the hard limits. Change this to allow strings of any length. Signed-off-by: Marcelo Vanzin commit 241182026adb4e47b6a28a1fda427933a8ca003e Author: VMware, Inc <> Date: Mon Aug 22 13:12:14 2011 -0700 lib/misc: Do not constrain the OS name string The Hostinfo API for obtaining the OS name constrains the name of the OS. These strings are highly variable in length and may grow unexpectedly. Refactor the API to not care about the length and fixup the call sites. In a future change the internals of lib/misc will be overhauled to also not care about the size. For now the (internal) size will be inflated to more than large enough (512). Another future change will remove any limitations found within the tools code. Signed-off-by: Marcelo Vanzin commit 17a4d1fb1c77d5f1554ad60910480b397186beaa Author: VMware, Inc <> Date: Mon Aug 22 13:11:32 2011 -0700 Disable gcc 4.6's unused-but-set-variable warning. This warning is more annoying than useful. It breaks too easily with our ASSERT (which is a no-op in non-debug builds) and other styles of coding we use for cross-platform support. Signed-off-by: Marcelo Vanzin commit 1581fd45ad61d577109768a74c22d9710a551a42 Author: VMware, Inc <> Date: Mon Aug 22 13:11:08 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6db0aa82bf56a258a668beadbc0a7dc46f6d6639 Author: VMware, Inc <> Date: Mon Aug 22 13:10:05 2011 -0700 Fix OS X HGFS client access error The client would previously return EPERM for these access errors however, all other file systems return EACESS so changing to comply. Signed-off-by: Marcelo Vanzin commit 161fb6017a1fe780388a253fb05e8455e1bc856e Author: VMware, Inc <> Date: Mon Aug 22 13:03:51 2011 -0700 Fix glitches in the toolbox-cmd localization files. Some newlines seemed to have gotten lost in translation. Signed-off-by: Marcelo Vanzin commit e203c78febe76e109eebe1f662c3ab915f2768f6 Author: VMware, Inc <> Date: Mon Aug 22 13:02:44 2011 -0700 Support for VMODL Guest Operations inside a FreeBSD Guest OS. The following changeset reflects support for the GuestProcessManager APIs only. (GuestFileManager APIs will be worked upon next). . Enable some Posix_ & ProcMgr_ functions for FreeBSD . Enable Impersonate functions for Start, Stop, GetUserInfo for FreeBSD . Write new function for Listing Processes using libkvm (procfs is not auto mounted in FreeBSD for security reasons) . Use the original process envp pointer (from the AppToolsContext) in VixTools_Initialize() to build the user env hash table. This was suggested by Marcelo over trying to use the "environ" global variable, since "environ" might reflect additional env changes done by the loader scripts, that should not be returned to the VixClient user. Signed-off-by: Marcelo Vanzin commit 24701036c96505c8c8c229ccd5f76d89f21258f4 Author: VMware, Inc <> Date: Mon Aug 22 12:59:53 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2f016170e99fd6bd7ba0152bcca51b6311b10408 Author: VMware, Inc <> Date: Mon Aug 22 12:57:41 2011 -0700 Fix OS X 10.7 unzip of files in shared folders using Archive Utility Using Finder to double click on a zip file invokes the Archive utility which fails to unzip a file on HGFS shares. This was due to a read request of zero bytes being incorrectly handled. The request was forwarded to the HGFS server which misinterpreted the request for backdoor V3 read operation to instead using the shared memory. This caused a protocol error to be returned from the HGFS server. The fix therefore is really two fold: - The HGFS client should short-circuit the empty read and complete it successfully immediately. - The HGFS server should correctly handle zero length read requests and not assume they will never be sent from any client. Signed-off-by: Marcelo Vanzin commit cb9afcedfd4167bf999b26043078f8b48e49c038 Author: VMware, Inc <> Date: Mon Aug 22 12:53:06 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cc7b2a2f8555ea092352ea973462cbf5014ccb6f Author: VMware, Inc <> Date: Mon Aug 22 12:52:31 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d1bb5c797fa0dbefce0da772f768545cbb830229 Author: VMware, Inc <> Date: Mon Aug 22 12:51:34 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4904cb3fc069cafb09d8213192a80ea06030cd04 Author: VMware, Inc <> Date: Mon Aug 22 12:50:49 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bd64dac60be57e70bb7a15a600ddd0eae9432444 Author: VMware, Inc <> Date: Mon Aug 22 12:48:33 2011 -0700 Fix Mac OS tools. Two fixes: . Enable Hostinfo_TouchBackDoor for Mac OS. The comment doesn't seem to be true, at least not anymore. . On Mac OS, create the glib main loop with the "running" flag set. Since we don't call g_main_loop_run() on Mac OS, that's the only way to signal that the loop is running. Signed-off-by: Marcelo Vanzin commit aaff2808cccfd752996e581596e038493fe2f2a6 Author: VMware, Inc <> Date: Wed Jul 20 14:00:08 2011 -0700 Updating open-vm-tools version for release 2011.07.19-450511. Signed-off-by: Marcelo Vanzin commit 5bed6f1369ca6e9c2c7fbaf4205d86e50f219c5f Author: VMware, Inc <> Date: Wed Jul 20 13:52:51 2011 -0700 Ignore empty CPU vendor string when checking hypervisor. This should work around an issue filed in the Ubuntu tracker that says our code is not detecting a VM running in Server 2.0. Signed-off-by: Marcelo Vanzin commit 31df947e59a507beaba1a8255e7bdcc3a14fbc79 Author: VMware, Inc <> Date: Wed Jul 20 13:52:10 2011 -0700 lib/file: tolerate /proc failures The file locking code for POSIXen was depending on /proc, a Linuxism. Should /proc not be accessible, create a default process descriptor instead of failing. Signed-off-by: Marcelo Vanzin commit e6ecfeb3ad3e24131e096a6500bc5bb1bbf63f85 Author: VMware, Inc <> Date: Wed Jul 20 13:50:49 2011 -0700 lib/file: fix dummy functions Handle a name change for the dummy function. Signed-off-by: Marcelo Vanzin commit 5e1126b805f4525c346509b7e33f824b0cebf2b7 Author: VMware, Inc <> Date: Wed Jul 20 13:50:35 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ce85fd54855f9bc05444197108b47a4634add4a2 Author: VMware, Inc <> Date: Wed Jul 20 13:50:12 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9bc66d1b3d4b9cd1cfdcb5caed7ed9e167ce6b07 Author: VMware, Inc <> Date: Wed Jul 20 13:47:43 2011 -0700 lib/file: file locking upgrade Improve the robustness and information logging of the process validation used by the file locking code. Define an improved, upwards compatible format for the execution ID such that is is possible to include the name of the process should it be available. This change is done such that older code will run properly, even if it sees a newer lock file. Signed-off-by: Marcelo Vanzin commit 7fcb6887db59661a72cbf2b9072c9055817cccbd Author: VMware, Inc <> Date: Wed Jul 20 13:47:02 2011 -0700 lib/file: Temporary directories need to be fully accessible Creating a private, temporary directory requires access to it. Change the access mode from 0600 (like a file) to 0700 so as to make it traversible. Signed-off-by: Marcelo Vanzin commit f3ebeac03fc9f5e7693ece88c44339322dc4f76f Author: VMware, Inc <> Date: Wed Jul 20 13:46:14 2011 -0700 Move even more code out of lib/guestApp. This time it's mouse and old copy & paste protocol functions, which are only used by the dnd plugin. Signed-off-by: Marcelo Vanzin commit a3767e23621d3ab8cbd2ab6a771b784cfd81ab48 Author: VMware, Inc <> Date: Wed Jul 20 13:44:20 2011 -0700 Fix comment. Signed-off-by: Marcelo Vanzin commit 9a11ac90131d41c306c436d68cc5c8238f7d0f1e Author: VMware, Inc <> Date: Wed Jul 20 13:44:07 2011 -0700 Move more stuff out of lib/guestApp. Now that there's only one call site, move functions of questionable general utility to the place where they're needed, or replace them with equivalent code. Signed-off-by: Marcelo Vanzin commit 654f687a2cd067fee26906b219da0198878a3bff Author: VMware, Inc <> Date: Wed Jul 20 13:43:19 2011 -0700 Code cleanup. Signed-off-by: Marcelo Vanzin commit 939495b80ef37451027b4cdb2e8b5393be673fa7 Author: VMware, Inc <> Date: Wed Jul 20 13:42:59 2011 -0700 open-vm-tools: remove lib/eventManager Signed-off-by: Marcelo Vanzin commit 895358a6b6409631c1f1d2af00f1069ec1546966 Author: VMware, Inc <> Date: Wed Jul 20 13:41:37 2011 -0700 Shut up gcc 4.6. gcc 4.6 complains about "set but unused" variables by default with -Werror. Fix the code that triggers that warning. Also sneak in a fix to rpcgen_wrapper.sh. Signed-off-by: Marcelo Vanzin commit 964fa80bfdc6ce9933406f7ae26f36eee3e0af98 Author: VMware, Inc <> Date: Wed Jul 20 13:40:22 2011 -0700 open-vm-tools: only build the glib version of the rpcin library. Signed-off-by: Marcelo Vanzin commit 14cb1cc82ca3da1add76a81eb65c06f02eaa9cd0 Author: VMware, Inc <> Date: Wed Jul 20 13:39:24 2011 -0700 Capture screen is not working well with CP enabled The reason for the bug is that there is a race condition between regular copy/paste and guest screen capture copy/paste. 1. There is image A on host clipboard. 2. After switch from host to guest, image A is copied to guest clipboard 3. User does a guest screen capture and it is put into host clipboard 4. After switch from guest to host, image A is copied again from guest to host and overwrites the new guest screen capture in host clipboard. The fix is not to do step 3. To do this, clipboard timestamp after step 2 is recorded. When user switches from guest to host (step 4), the timestamp will be checked. If the timestamp is not changed, the guest clipboard will not be copied to host. Signed-off-by: Marcelo Vanzin commit 2e5ec6ca3ad0d52815002f73082c13bcd2ab2ab2 Author: VMware, Inc <> Date: Wed Jul 20 13:38:28 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ca413e61f00d4f71f64075e62eef6d75e41111bc Author: VMware, Inc <> Date: Wed Jul 20 13:37:44 2011 -0700 Lock the vmtoolsd pid file when daemonizing. Use the newly introduced HOSTINFO_DAEMONIZE_LOCKPID flag to lock the pid file vmtoolsd generates when daemonizing so that vmtoolsd will refuse to run multiple instances using the same pid file. Signed-off-by: Marcelo Vanzin commit 907c26dc5337208da3de398c5d61138c5134117b Author: VMware, Inc <> Date: Wed Jul 20 13:37:20 2011 -0700 Lock the PID file when daemonizing. In Hostinfo_Daemonize prevent two processes from daemonizing using the same PID file by taking an advisory exclusive lock on the PID file before daemonizing the process. Signed-off-by: Marcelo Vanzin commit b76ee855f6f4ff1e51a61a43599329527e0d3ae1 Author: VMware, Inc <> Date: Wed Jul 20 13:36:53 2011 -0700 Fix HgfsDirLlseek function. In HgfsDirLlseek() function, a copy of mutex/semaphore is retrieved and a lock is acquired on the copy. This is not correct and can lead to issues. We should ideally acquire a lock on the original mutex/semaphore of the inode. Signed-off-by: Marcelo Vanzin commit 409a35abeabe553587c1fffbc469d8ce1cedb17a Author: VMware, Inc <> Date: Wed Jul 20 13:36:19 2011 -0700 lib/file: file locking static functions lack FileLock prefix Signed-off-by: Marcelo Vanzin commit b7a2d21b7fd6c4aa919be3606f67b32e3c89589c Author: VMware, Inc <> Date: Wed Jul 20 13:35:47 2011 -0700 lib/file: remove coding standard violations Signed-off-by: Marcelo Vanzin commit 909990fbe15a51ef59781215b4cc5ff07ed36cf9 Author: VMware, Inc <> Date: Wed Jul 20 13:35:07 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 132cc86336e3ec3fd046c5c097ba742a47b72a9c Author: VMware, Inc <> Date: Wed Jul 20 13:34:34 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5f3c35459cd1622632eda09119edbd6a99524d65 Author: VMware, Inc <> Date: Wed Jul 20 13:33:55 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2b8b159075070d5c4efca39e3e5a54cc8fea8204 Author: VMware, Inc <> Date: Wed Jul 20 13:33:29 2011 -0700 Fix uninitialized struct field. Signed-off-by: Marcelo Vanzin commit d2ed5c806055ac35f4a4e050d557e42a5f6b7cb1 Author: VMware, Inc <> Date: Wed Jul 20 13:33:15 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b977ace2849a5bb44467d234d6b311770a079fbb Author: VMware, Inc <> Date: Wed Jul 20 13:32:48 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 71ba150b43d43810571635752f2ce68707847b7e Author: VMware, Inc <> Date: Wed Jul 20 13:31:56 2011 -0700 Fixed a comment Signed-off-by: Marcelo Vanzin commit 2b18f134f0497623f517932132dce97bb9765ecb Author: VMware, Inc <> Date: Wed Jul 20 13:31:20 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a7a878e037dc58fb46080caa837c0f4d6f7d820d Author: VMware, Inc <> Date: Wed Jul 20 13:30:57 2011 -0700 Make kernel 3.0.0 supported in the platform hostinfo was asserting that kernel minor version is >= 2. Signed-off-by: Marcelo Vanzin commit 595a8c6551670ae7e01f169f673c7821c58435c4 Author: VMware, Inc <> Date: Wed Jul 20 13:30:17 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7273b1205b6351768bf6628731517441d1626fb6 Author: VMware, Inc <> Date: Wed Jul 20 13:28:47 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fc8a36d3e8b834f33973c672511445f65f7c893f Author: VMware, Inc <> Date: Wed Jul 20 13:27:53 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 89db3380bf59a46459a29d80cba347c96fc1db7b Author: VMware, Inc <> Date: Tue Jun 28 13:28:00 2011 -0700 Updating open-vm-tools version for release 2011.06.27-437995. Signed-off-by: Marcelo Vanzin commit 166bbe1d28da4dab763b9568f163c8dca99ced9c Author: VMware, Inc <> Date: Tue Jun 28 13:20:02 2011 -0700 Stage compat_log2.h. Signed-off-by: Marcelo Vanzin commit 2ccded7180d0ec8bd2176989ee77cc5bf3e7d5af Author: VMware, Inc <> Date: Tue Jun 28 13:19:19 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fcb40676113d8b20ea2dee9434eb9d58108f5bcf Author: VMware, Inc <> Date: Tue Jun 28 13:02:15 2011 -0700 Minor enhancements to xferlogs. Mainly, make the files names it writes useful, plus some very minor code cleanups. Signed-off-by: Marcelo Vanzin commit ae483e1f2970640bab9de6197761449cd5bad45c Author: VMware, Inc <> Date: Tue Jun 28 12:58:55 2011 -0700 Backout previous changeset. Signed-off-by: Marcelo Vanzin commit 6914930714c07f10e4c31a554f26abbfdcc5706e Author: VMware, Inc <> Date: Tue Jun 28 12:56:11 2011 -0700 Unity/X11: Bring back Unity capability registrations. Dev's shift of plugin registration from UnityPlatformRegisterCaps to C++ wrappers didn't account for *nix guests. :P Signed-off-by: Marcelo Vanzin commit 17eed6f6e7c7f19a92690bbb5bfc638bb91b7b85 Author: VMware, Inc <> Date: Tue Jun 28 12:55:17 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fbea866e8835d854b507115b9bf61a9b05e48ffc Author: VMware, Inc <> Date: Tue Jun 28 12:54:23 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d8a17c8a07394a7f429a1be5086fc56faf3c4cae Author: VMware, Inc <> Date: Tue Jun 28 12:53:49 2011 -0700 Unity/X11: Make annoying logs opt-in. Noisy logging isn't just annoying. By drowning out useful stuff and slowing things down, it's harmful. From now on, users can opt in to annoying Unity logging by setting the VMWARE_UNITY_VERBOSE_LOGGING environment variable before running vmusr. Signed-off-by: Marcelo Vanzin commit fd84640555671d85d65ba0cae472fe593233d539 Author: VMware, Inc <> Date: Tue Jun 28 12:53:24 2011 -0700 Unity/X11: More dirty hacks to match executables to .desktop files. Summary: o Now recognizing "gnome-" prefix for .desktop entries. o Matching Firefox and Thunderbird to mozilla-{firefox,thunderbird}. o All pattern matching stuff is setup once in WindowPathFactory's constructor. Details: Unity/X11 wasn't returning icons for Firefox, Nautilus, and GNOME's calculator. Turns out what RHEL packaged some GNOME apps with their .desktop files including a gnome- prefix. This is similar to the kde4- prefix we saw with OpenSUSE. The Mozilla apps were packaged with mozilla- prefixes. This change tosses in a few hacks to accommodate. Signed-off-by: Marcelo Vanzin commit f1aafb9f9c3d59fcc2f2fd221eb3b7b0c1221adc Author: VMware, Inc <> Date: Tue Jun 28 12:52:13 2011 -0700 Util_* : clean up .h The .h could use a little clean up Signed-off-by: Marcelo Vanzin commit 2902e6d8bebc45614cb7f832557dd2a313545b24 Author: VMware, Inc <> Date: Tue Jun 28 12:51:56 2011 -0700 Remove the X{Grab,Ungrab}Server calls in resolutionSet When using vesa X was getting into a sort of race condition because we were not calling XSync after the X{Grab,Ungrab}Server calls. This was causing X to appear to hang. Really since we aren't setting anything (only reading values) I don't see a reason to keep these calls. Hence remove them and fix the bug. Signed-off-by: Marcelo Vanzin commit 1d122f12cc9b354c2e43880280fbd03e425f7da7 Author: VMware, Inc <> Date: Tue Jun 28 12:51:17 2011 -0700 lib/file: an optimization We can avoid a loop. Signed-off-by: Marcelo Vanzin commit 1ba909bba1a31b29d63087434f4b6418ce62a5ab Author: VMware, Inc <> Date: Tue Jun 28 12:50:55 2011 -0700 File_MakeTempEx2 race There is a nasty race when two threads/processes call File_MakeTempEx2. It is possible for one caller to be creating files while the other is creating directories. Since there is one "name space" there can be collisions that are a pain to deal with. The solution is simple - files are created with odd numbers, directories with even numbers. This way the available exclusions (via O_EXCL and mkdir) provide reliable collision detection. We never have a possibility of attempting an open on a directory. Signed-off-by: Marcelo Vanzin commit 718a3254130eab3e78198472bf54097d3f3baaa7 Author: VMware, Inc <> Date: Tue Jun 28 12:48:49 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bcbc2b08caa835643195d3f5896fc6e2236ddc80 Author: VMware, Inc <> Date: Tue Jun 28 12:46:31 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 58a2ab896f3152632db6b8680ee3385924d2a246 Author: VMware, Inc <> Date: Tue Jun 28 12:46:07 2011 -0700 Unity/X11: Ignore XComposite composite overlay windows. XComposite since 0.3 provides composite overlay windows, or windows whose geometry match the root windows', are stacked above applications but below the screensaver, don't appear in QueryTree requests, etc. They're intended for use by compositing managers to redirect contents to and draw upon. When Unity/X11 encountered such a window, it would treat it as a regular override redirect window. In other words, it'd tell the host UI that the VM has a window whose geometry takes up the entire screen. This resulted in bug 690447, where the guest's entire desktop appears onscreen. My fix was to ask XComposite for the IDs of these windows, and then just ignore any events related to them. Signed-off-by: Marcelo Vanzin commit 0790ed2f685a8192fd8bac44ae04ead947322765 Author: VMware, Inc <> Date: Tue Jun 28 12:45:07 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 29bbbdbaff67c4ce1caa043dc9e408f226f27f8d Author: VMware, Inc <> Date: Tue Jun 28 12:43:29 2011 -0700 Use geteuid() instead of getuid() We should effectively use geteuid() instead of getuid(). Signed-off-by: Marcelo Vanzin commit fbe84542841810cd014688f6f9da1886b1688615 Author: VMware, Inc <> Date: Tue Jun 28 12:37:21 2011 -0700 Fixing problems with change notifications. invalidateObjects functions deletes all change notification watches. Thus after this function is invoked notifications are not delievered any more and directory handle re-open is needed for notifications to resume. invalidateObjecs is wrong place to cleanup change notifications related to a session. Move this call to channelExit just before call to detroy session. Signed-off-by: Marcelo Vanzin commit 863dc2451696e5ee8b37528fc05ede8f577ee1ea Author: VMware, Inc <> Date: Tue Jun 28 12:36:24 2011 -0700 Fix RO attribute dropped in directory read with HGFS Posix Server Flags were incorrectly being tested for to map to HgfsDirentryV4 when on a Posix HGFS host. Signed-off-by: Marcelo Vanzin commit 9fe618ad9a085c8c841b693697af3c29fc39c346 Author: VMware, Inc <> Date: Tue Jun 28 12:35:56 2011 -0700 vSockets should attach itself to VMCI and support detaching. The drivers are still merged, but with this change, vSockets now supports attaching on-demand to VMCI, and also enables the detach callback so that VMCI can dynamically unload. Signed-off-by: Marcelo Vanzin commit 426ea18990eb9f5d050915bda524e11deab4c59f Author: VMware, Inc <> Date: Tue Jun 28 12:35:11 2011 -0700 Remove definition of VIX_COMMAND_SET_GUEST_PRINTER. It is, as they say south of the boarder, mucho unused. Signed-off-by: Marcelo Vanzin commit 8fc4f0c18c31aaadad5f82b4ff19aef9ebafdbcf Author: VMware, Inc <> Date: Tue Jun 28 11:57:52 2011 -0700 Fix issues discoved using Coverity. In a specific function i.e. HgfsServerSearchRead, we check if an a variable of type unsigned int is less than zero which is clearly a no-op. Fixed this code. Signed-off-by: Marcelo Vanzin commit 21218998a1cc1e2d9aa72e1b31b7df71e690b611 Author: VMware, Inc <> Date: Tue Jun 28 11:57:20 2011 -0700 More tools documentation re-org. Separate logging and i18n docs and functions into separate sections of the generated documentation. This means moving a function to a different header file, so some '#include's had to be added around the place. Signed-off-by: Marcelo Vanzin commit a0a55d59c430fbf88e944f03cb72779c6e92b5c6 Author: VMware, Inc <> Date: Tue Jun 28 11:55:42 2011 -0700 Unity/X11: Clear tools.capability.unity in response to X I/O errors. Summary: desktopEvents: - No longer reloading self in X I/O error handler. - Emitting GLib signal prior to shutting down RPC channel. unity: - Attach to new XIOError signal a callback which clears the Unity capability. Long version: In response to an X I/O error, cleanup of the vmtoolsd container is kinda hard. From the plugin providing the X I/O error handler, we can't directly call the cleanup routines, and even if we could, there's nothing to prevent any of them from attempting additional X calls during cleanup, bringing us back to square 1. For the most part, this lameness hasn't caused any serious problems. One annoyance, however, is that if our user was in Unity mode at the time, vmusr's untimely termination wouldn't inform the host UI that vmusr was on its way out, leaving the host UI believing it should remain in Unity mode. While we can't perform a full, correct cleanup, we can at least undo a few small critical things, such as saying, "Hey, host UI. Please to be doing the needful and bumping us out of Unity now, kthx." This is accomplished by a) emitting a GLib signal in the XIO error handler, and b) connecting that to a Unity plugin callback which clears the capability. Brownie points: I got rid of the dumb call to Reload_Do that I was responsible for years ago. There really isn't a good reason for an X client to restart itself in response to an X I/O error, so let's just stop, yeah? Signed-off-by: Marcelo Vanzin commit bae549f8e7b2975165e7654093bbf7013e10ac04 Author: VMware, Inc <> Date: Tue Jun 28 11:53:19 2011 -0700 Get rid of compat_init.h We are way past supporting kernels that did not have module_init() or module_exit() so it is time to retire this compat header. Signed-off-by: Marcelo Vanzin commit 1d1f15eb047d6dcdc579056bc1092c14e2b94b44 Author: VMware, Inc <> Date: Tue Jun 28 11:52:59 2011 -0700 Internal branch sync. Included in this change: . Fix issue with screen capture not working well with clipboard for Linux. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0412e890a7d0e9e3d45fa8ce372e89319628baa2 Author: VMware, Inc <> Date: Tue Jun 28 11:47:41 2011 -0700 vmtoolsd: separate loading and initializing plugins. Currently the code that loads the plugins also initializes them right away. This is undesired when using appLoader, since in the process of figuring out dependencies, it may fork the process again and cause the same plugin to be initialized multiple times. This doesn't cause any issues other than a few (one time) memory leaks and wasted work, but it's better to avoid this. Signed-off-by: Marcelo Vanzin commit 6dfa76295767219b9414b937b1fd3f846aff3790 Author: VMware, Inc <> Date: Tue Jun 28 11:44:00 2011 -0700 Enhancements to the tools API docs. Add a landing page, and add a group for the thread-related functions. Signed-off-by: Marcelo Vanzin commit b67a4e00332afd497a198047f846a3a2d1008b5d Author: VMware, Inc <> Date: Tue Jun 28 11:41:46 2011 -0700 Don't drop messages from core dump library. Instead of dropping messages to avoid glib's aversion to log recursion, just bypass glib and call our logging functions directly when recursing. Signed-off-by: Marcelo Vanzin commit 76a591213c962310071a7154e3662aca68ee9cd7 Author: VMware, Inc <> Date: Tue Jun 28 11:40:44 2011 -0700 Bump VMCI and vsock major version. Need to bump all the versions again to compensate for the recent mess. Signed-off-by: Marcelo Vanzin commit c061f90ac62c2eed4e5d3121a61a5b27b65f419c Author: VMware, Inc <> Date: Tue Jun 28 11:40:17 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3c6f70574733e181966255ff510199b11e5502b9 Author: VMware, Inc <> Date: Tue Jun 28 11:38:56 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9c7c89b932cef91b55328479b5dd308021b98f85 Author: VMware, Inc <> Date: Tue Jun 28 11:38:18 2011 -0700 Tools version maintenance. Signed-off-by: Marcelo Vanzin commit 3c4d3f51595969a35512b2b3d38446d23bceb27f Author: VMware, Inc <> Date: Tue Jun 28 11:36:14 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1a5ef1c8109405db4956026a0bff6d4785f14373 Author: VMware, Inc <> Date: Tue Jun 28 11:35:54 2011 -0700 Flip the switch to enable GHI for XFCE. Signed-off-by: Marcelo Vanzin commit 62ec1116dd62669af074e5f14d165c2a610223b9 Author: VMware, Inc <> Date: Tue Jun 28 11:34:44 2011 -0700 GHI/X11: Disable Ubuntu's menuproxy when launching apps via GHI. Our Unity doesn't support a global menu bar, so hint as much to Ubuntu packages launched by vmusr. See https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationMenu for additional info. Signed-off-by: Marcelo Vanzin commit 37558e3b5f03c7b36b7f2eb73b36fd179d99a2ea Author: VMware, Inc <> Date: Tue Jun 28 11:32:46 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f68b23be09449f6747d2530b8b4fdad39e6c1ae0 Author: VMware, Inc <> Date: Tue Jun 28 10:58:28 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7e40b9c3d9f51369a4e36d6682c7b1b123522913 Author: VMware, Inc <> Date: Tue Jun 28 10:57:36 2011 -0700 Make RpcChannel_Start() idempotent. The code wasn't well behaved if RpcChannel_Start was called multiple times. Since there's no way to know whether the channel has been started, just make subsequent calls do nothing. Signed-off-by: Marcelo Vanzin commit 585723d252cb4ecadb961dfa706557b899e5344a Author: VMware, Inc <> Date: Tue Jun 28 10:56:52 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 99c60f34af7aa2731959533664b04341994df6f5 Author: VMware, Inc <> Date: Tue Jun 28 10:56:10 2011 -0700 IOLockAlloc can fail (according to the documentation). We should handle the errors gracefully. We use IOLockAlloc() to allocate locks on VMCI on OS X. But we assume the function always succeeds when in reality it is allowed to fail and return NULL. Fixed so that we check this. Signed-off-by: Marcelo Vanzin commit 60e293beb5238c1555a80c3c30417e06dd8cd0de Author: VMware, Inc <> Date: Tue Jun 28 10:55:37 2011 -0700 Fix unescaping of character sequences when it should not The HGFS server when reading directory entries checks for an escape character sequence and if found unescapes it before sending the entry to the HGFS client. However, if the sequence happens to be one generated by a user legitimately on the host and not because the HGFS server found an illegal character, the unescape mechanism has no way to tell and currently does more undo operations than the escape. This leads to some file names being mistranslated and therefore inaccessible e.g. Here is an overview of the current scheme as best I could tell. The escape character is the percent. The character to escape the escape character is the right square parenthesis. Escape looks for the following characters or sequences: platform illegal char -> platform substitute char and '%' ']%' - > ']]%' platform substitute char and '%' -> substitute char and ']%' Windows reserved names or ending with a period Currently the unescaping code checks for the ']%' character sequence resulting from item 2 or 3 above is preceded by a character to replace an illegal one from a client. The code simply assumes the preceding character is of the right type, and so modifies the string. A file "@]%.txt" on the host is unescaped in a directory read to the client as "@%.txt" where the client will escape it again if required. When a client application tries to open the file, the HGFS client returns the "@%.txt" to the host HGFS server. There the escape mechanism for Linux/OSX does not see this as a sequence requiring escaping as the '@' is not a substitute character. This means the file name is not the same as the original on the host and it either fails to open or the server will create a new file with the modified name. The escape undo code now only strips out the escape-escape character if it is preceded by the same character or a platform substitute character (i.e. a sequence that the escape mechanism generated). Signed-off-by: Marcelo Vanzin commit 1de846c58271aaed22d4fe9e392fe9d802d39a68 Author: VMware, Inc <> Date: Tue Jun 28 10:53:48 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0b5c4a106efe7e3c37e945477f91533b0f29c126 Author: VMware, Inc <> Date: Tue Jun 28 10:53:29 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f64f32c9f3474f8565b30a26efcb77c335161b51 Author: VMware, Inc <> Date: Tue Jun 28 10:53:11 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0a4e218a7711609c72410b4a067220296e1965bd Author: VMware, Inc <> Date: Tue Jun 28 10:52:45 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c60a3a5b67530aeb10cfecccc472958ac35dc132 Author: VMware, Inc <> Date: Tue Jun 28 10:50:35 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3f6ffcadf8200f943d0465f77e8af2a171d29597 Author: VMware, Inc <> Date: Tue Jun 28 10:49:48 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f7068b1dfc1c89853bb4d1ecbc69cbe837b9898a Author: VMware, Inc <> Date: Tue Jun 28 10:49:19 2011 -0700 Switch to Super User if futimes() fail. Even if the userid of the VMX process matches the userid of the file residing on the file system, futimes fails in few scenarios. In such case, we should switch to superuser and try one more time. Signed-off-by: Marcelo Vanzin commit 0a5482b87639c5734c65bea1f3cdb7a982dd3b95 Author: VMware, Inc <> Date: Tue Jun 28 10:48:04 2011 -0700 Internal branch sync. Included in this change: . Changes to wiper library to allow querying if drives can be wiped. Not implemented on POSIX systems yet. . Fix vmxnet driver's power management handling on Linux. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1b620b8d63097bab736e9360f3037ed919b18d39 Author: VMware, Inc <> Date: Sat May 28 13:25:43 2011 -0700 Updating open-vm-tools version for release 2011.05.27-420096. Signed-off-by: Marcelo Vanzin commit 3793ddc9c9b5facf376a2625d4c2252aa9bd3daa Author: VMware, Inc <> Date: Sat May 28 13:18:55 2011 -0700 Fix race condition when disabling shared folders. HGFS server must stop generating change directory notifications before releasing objects that notification delivery code may use. Moving call to stop notifications before invoking HgfsInvalidateSessionObjects instead of doing it at the very end of session deleting sequence. Signed-off-by: Marcelo Vanzin commit 456557c03832397813b28c9bbd664b2e24a3ec5c Author: VMware, Inc <> Date: Sat May 28 13:18:39 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit aab719b736cfaa33819e429d3ceb44c064be66ce Author: VMware, Inc <> Date: Sat May 28 13:18:21 2011 -0700 Bump VMCI and vsock major version. Signed-off-by: Marcelo Vanzin commit a148b2428261ecedef184f11e62df7be40788857 Author: VMware, Inc <> Date: Sat May 28 13:18:02 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e82d5b8cc460e0188ab19c8a9c25916388f3f47b Author: VMware, Inc <> Date: Sat May 28 13:17:42 2011 -0700 Refreshing list of shared folders. MacOS keeps root directory opened indefinitly. When guest enumerates shared folders HGFS server always returns cached entries. As a result if shared folders configuration is change this change is not reflected in the guest. The short term solution is to refresh list of shared folders every time when reading the first directory entry in the root directory. In the long term we need to stop caching directory entries in HGFS server since it is almost impossible to keep cahced entrie list consistent with underlying file system. File systems has support to resume directory enumeration from a arbitrary point and HGFS server should use this feature to handle searchRead requests. Signed-off-by: Marcelo Vanzin commit fd8c399f1f331b47a782b3e7a0df64a2718b5f4f Author: VMware, Inc <> Date: Sat May 28 13:17:13 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7acd391076b9896b847ff352981dcf1ae2119025 Author: VMware, Inc <> Date: Sat May 28 13:17:02 2011 -0700 Remove dead VMCIBuffer definitions The implementation using this was deleted a long time ago. Clean vmci_kernel_if.h up as well. Signed-off-by: Marcelo Vanzin commit 391c07bb70b5676384c4612b3ef1588d71f4e3eb Author: VMware, Inc <> Date: Sat May 28 13:16:40 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a9c006cf9e390e707488999b860974e5dc9534e3 Author: VMware, Inc <> Date: Sat May 28 13:16:24 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fb9b705747f9204e4cbf71c37ffa3575ed3a6a9d Author: VMware, Inc <> Date: Sat May 28 13:14:48 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 360d8ed0f21d67a2bfed11f4425f3886341b935d Author: VMware, Inc <> Date: Sat May 28 13:14:35 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b43151e2e76530bb4b6c5a7aa7c9053051cdfaaf Author: VMware, Inc <> Date: Sat May 28 13:14:16 2011 -0700 Cleanup some tools log messages. (i) demote Log() to "info" level. Lots of places in our internal code use Log() to report uninteresting things. Having "message" as the mapping for Log() means our default configuration on non-release builds will spit out all those messages to syslog / event log. (ii) Demote some log entries in vmtoolsd and plugins. These shouldn't really be logged by default, since they may show up in normal operation. Leave "g_message" for less serious errors only, and move "status report"-type messages to the info level. Signed-off-by: Marcelo Vanzin commit 82fcd914d09e7c89fa7165159e35cd76e05eb9d6 Author: VMware, Inc <> Date: Sat May 28 13:13:39 2011 -0700 Internal branch sync. Included in this change: . Fix bug: guest background does not refresh after exit from unity mode. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2ecbab3965b6868d6a2bae6c331c6e811a967916 Author: VMware, Inc <> Date: Sat May 28 13:11:47 2011 -0700 GHI/X11: Don't pass DESKTOP_AUTOSTART_ID env var to children. DESKTOP_AUTOSTART_ID was proposed on the xdg@freedesktop.org mailing list, but doesn't seem like it made it to a final spec. http://lists.freedesktop.org/archives/xdg/2007-January/007436.html It refers to a XSMP session manager client ID which shouldn't be passed to children. Having this environment variable breaks launching nautilus w/o arguments. (Aside, GNOME fixed this upstream in response to https://bugzilla.gnome.org/show_bug.cgi?id=649063.) Signed-off-by: Marcelo Vanzin commit ace7686cd3ecde6065bb8c7cb3f3327c0af046b9 Author: VMware, Inc <> Date: Sat May 28 13:11:22 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 18db28c0842c6e542894d169cad2223f6157451e Author: VMware, Inc <> Date: Sat May 28 13:11:03 2011 -0700 GHI/X11: Exorcise dead code. This stuff was either if 0'd out or if (1) {...} else { foo }'out. Signed-off-by: Marcelo Vanzin commit e6311447b2c203c3527f4005e113db5bc48f1228 Author: VMware, Inc <> Date: Sat May 28 13:10:40 2011 -0700 Original Description: fix crash in the HGFS server send complete code. guestInitiated should be set to do the packet clean up properly in the server send complete callback code. Signed-off-by: Marcelo Vanzin commit e4585eb5e408bba064a30b84838098e036a2b93a Author: VMware, Inc <> Date: Sat May 28 13:09:58 2011 -0700 Make the rpc channel reset check a high priority task. The reset check is an "idle" task, whose default priority is G_PRIORITY_DEFAULT_IDLE. That's lower than the default timeout priority (G_PRIORITY_DEFAULT), so when dispatching the glib main loop will give priority to the timeout sources being triggered; since we're servicing RPCs, this means that the idle task will never run until the host stops sending RPCs. So the guest apps will see the "reset" way later than they should. So make the idle task's priority be higher than the rpc channel's timeout source's priority, to make sure it executes first. Signed-off-by: Marcelo Vanzin commit 01772b154b34ae30c25f7c4e0505e0c1b994eecc Author: VMware, Inc <> Date: Sat May 28 13:09:23 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f4218af9fd9758989f9f14d43bd3cf179ba7daef Author: VMware, Inc <> Date: Sat May 28 13:08:57 2011 -0700 lib/log: fix the build Signed-off-by: Marcelo Vanzin commit 4d5ba7df3a66ceb78785028829cf0ff6762007f6 Author: VMware, Inc <> Date: Sat May 28 13:08:40 2011 -0700 lib/log: rename/retype a few variable Make things clearer Signed-off-by: Marcelo Vanzin commit 24f3ff99559f734db4a7a847d98735c69176658c Author: VMware, Inc <> Date: Sat May 28 13:08:30 2011 -0700 Another fix. Signed-off-by: Marcelo Vanzin commit abbb30209def61a8688683303e473ce50c91a4c7 Author: VMware, Inc <> Date: Sat May 28 13:08:01 2011 -0700 Fix build error Fix the compat_flush_workqueue macro definition to avoid compilation error in 2.6.9 Signed-off-by: Marcelo Vanzin commit 4f24d808fb7a2b14c3fc81657137753acb6b6bbc Author: VMware, Inc <> Date: Sat May 28 13:07:33 2011 -0700 Update workqueue APIs. Signed-off-by: Marcelo Vanzin commit f12645e8ccd97a7e5ea83b81dba1bfb088894d21 Author: VMware, Inc <> Date: Sat May 28 13:06:53 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d7a7a27738412613221ac963105bcc5b5a5d5758 Author: VMware, Inc <> Date: Sat May 28 13:06:30 2011 -0700 Fix open-vm-tools "make install". There's only one pam file now. Signed-off-by: Marcelo Vanzin commit 2643f561d5ea10a3a553cf4672512b3c800280cc Author: VMware, Inc <> Date: Sat May 28 13:06:19 2011 -0700 lib/file: pretty up Keep comments consistent Signed-off-by: Marcelo Vanzin commit a67ca2639d9acd9c8a9c901dc1272b3352ab288a Author: VMware, Inc <> Date: Sat May 28 13:05:41 2011 -0700 BSD printf: missing ifdef Add a missing ifdef. Prevent what looks like uninitialized variable usage. Signed-off-by: Marcelo Vanzin commit 137b52504ca99dbc01876e45db86663a760add3c Author: VMware, Inc <> Date: Sat May 28 13:05:12 2011 -0700 Internal branch sync. Included in this change: . Fix confusion about buffer ownership in the HGFS server. . Do not delete files after DnD if all files are copied. . Invalidate HgfsNodeInfo->hostFileId associated with the inode in the open() code path. Signed-off-by: Marcelo Vanzin commit b8683854d9c51b0ad73ba9121c83a5293e3d43fd Author: VMware, Inc <> Date: Sat May 28 12:57:30 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cc20a54144fbbfbc1eb9861900397b573505bfd9 Author: VMware, Inc <> Date: Sat May 28 12:57:15 2011 -0700 Remove unneeded PAM file from open-vm-tools. Signed-off-by: Marcelo Vanzin commit 80901d02a1dfab943a3a404eae575f5a14b56afd Author: VMware, Inc <> Date: Sat May 28 12:56:50 2011 -0700 shutdownDgramTest fails for ubuntu9 guest We fixed shutdown() recently so that it kicks DGRAM sockets even if they are unconnected. But to be truly consistent with UDP, we should still return an error if they are unconnected. Fixed so that we kick the socket and then fail. Signed-off-by: Marcelo Vanzin commit e788645071b5f568a365c6bfabe11c3dba0c160b Author: VMware, Inc <> Date: Sat May 28 12:56:22 2011 -0700 Make PAM files to use relative paths Ever since we started using PAM we have been using FQ paths instead of relative paths. This works but is apparently unnecessary. Now that Ubuntu 11.04 moved modules around, the FQ paths no longer work. So instead use only relative paths. Signed-off-by: Marcelo Vanzin commit f01b79095b2a01a07640c5827b1643e89413b0bc Author: VMware, Inc <> Date: Sat May 28 12:55:39 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 113128299a5f2535f95266be9f6d4f22b90dc002 Author: VMware, Inc <> Date: Sat May 28 12:55:27 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 44c2e43562e0abc43efae8a47dcee66165b43db3 Author: VMware, Inc <> Date: Sat May 28 12:55:10 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5742e101c42d213cda31a704453ada3fde0255c3 Author: VMware, Inc <> Date: Sat May 28 12:54:55 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9f2a4a2534fc8d71bad9108db12bf953802c822a Author: VMware, Inc <> Date: Sat May 28 12:54:35 2011 -0700 Make VMCI handle array use VMCI_MEMORY_ATOMIC Allocating VMCI handle arrays should use VMCI_MEMORY_ATOMIC. Signed-off-by: Marcelo Vanzin commit bc2a99c180ff6eefa2b07cb08cf953affd2df5a5 Author: VMware, Inc <> Date: Sat May 28 12:54:22 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b98a035a0d663a07c988a8de664e571d09d23427 Author: VMware, Inc <> Date: Sat May 28 12:53:54 2011 -0700 Static analysis bug: NO_EFFECT A trivial fix. Signed-off-by: Marcelo Vanzin commit e0e15b16e1a6e481a7d845f5f8521f08f37e43b1 Author: VMware, Inc <> Date: Sat May 28 12:53:33 2011 -0700 lib/string: clean up before a change A bit of cleanup before a change Signed-off-by: Marcelo Vanzin commit 086e5d74a11088ac3c6fee37b34784017beca2a6 Author: VMware, Inc <> Date: Sat May 28 12:53:23 2011 -0700 Fix encoding confusion. strftime (local) + g_print (utf8) = madness. Signed-off-by: Marcelo Vanzin commit 5a738455a453ce4c06870ec16da3fc7875557cd9 Author: VMware, Inc <> Date: Sat May 28 12:52:58 2011 -0700 lib/string: BSD vsnprintf improvements We found a printf test suite and our BSD printf did OK but had a few problems. Several of the problems occurred in the floating point area, handling zeros, INF, -INF and NAN. Signed-off-by: Marcelo Vanzin commit ed553dd79c286d85f1bec284d2c54fd5c8ab0880 Author: VMware, Inc <> Date: Sat May 28 12:51:51 2011 -0700 lib/string: clean up before a major change Pretty up things at a bit... Signed-off-by: Marcelo Vanzin commit 5e2a46fb57ecb7b649e51276616fe3e73c08cfd0 Author: VMware, Inc <> Date: Sat May 28 12:51:41 2011 -0700 Fix saving MS Project files in a folder on a NFS server The files appeared as read only because the set attributes call to update the file modification time was failing. This occurred due to the Posix HGFS server switching to running as super user when updating the file timestamps by calling futimes. This was done if the VMX was the file owner or running as root. This is okay for local file systems but not for network shares. In this case the VMX was indeed the file owner and so switching to super user was not necessary. Fix is to not switch to super user if the VMX is the file owner. Signed-off-by: Marcelo Vanzin commit be89e54575e7cb92fb45908c0ac8661a80b9c564 Author: VMware, Inc <> Date: Sat May 28 12:51:06 2011 -0700 Fix reading catalogs with Windows line breaks. lib/dict doesn't seem to like Windows line breaks, so fix the line breaks to make it happy. Signed-off-by: Marcelo Vanzin commit c3c1b0bd2848c9209863cf48f91e53b7603151ca Author: VMware, Inc <> Date: Sat May 28 12:50:53 2011 -0700 lib/file: review comments Missing one! Signed-off-by: Marcelo Vanzin commit 4256ff2db2efc687d9d0990f61936ae506d3e42a Author: VMware, Inc <> Date: Sat May 28 12:50:42 2011 -0700 lib/file: bad merge I merge a change and dropped some code that needed to be there. Signed-off-by: Marcelo Vanzin commit c3e240d50fd9cda801b6852a60d4896c9a6b7afc Author: VMware, Inc <> Date: Sat May 28 12:50:26 2011 -0700 Netware: Rust In Pieces We don't support Netware with this code base anymore so remove all of the ifdefs and code associated with it. Signed-off-by: Marcelo Vanzin commit 1efa1ca3f7c6e1188501144a2d593294efb2cd08 Author: VMware, Inc <> Date: Sat May 28 12:46:07 2011 -0700 Internalize the old "guest dict" code. It's currently only used when translating old config files. Internalize it to the vmtools library, and trim some unused features of the code in the process. Signed-off-by: Marcelo Vanzin commit 2ac7046cf8c7027dbff99fcbdaf39b109d431e89 Author: VMware, Inc <> Date: Sat May 28 12:45:43 2011 -0700 resolution set: remove references to old "guest dict" code. In the process, re-organize the headers a little bit to avoid duplication of code and definitions. Signed-off-by: Marcelo Vanzin commit 3402d59f5d2d234b45854db282961f6d70aa057e Author: VMware, Inc <> Date: Sat May 28 12:43:33 2011 -0700 lib/file: fix builds Signed-off-by: Marcelo Vanzin commit 45484ae04c791327586476ee9c9ae6c746a837e2 Author: VMware, Inc <> Date: Sat May 28 12:42:31 2011 -0700 lib/file: drop redundant code The file locking code can use the FileIO functions and avoid having custom implementations of several of its functions. Signed-off-by: Marcelo Vanzin commit a87c8c121e4a7d5cdc5fb295c3b8cff0c0f75b27 Author: VMware, Inc <> Date: Sat May 28 12:42:02 2011 -0700 Internal branch sync. Included in this change: . Fix unexpected file paste with KDE guest. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit be82d2dca696c48958cba04f54181d40aa47a9e9 Author: VMware, Inc <> Date: Sat May 28 12:39:35 2011 -0700 unity: remove references to the old "guest dict". Signed-off-by: Marcelo Vanzin commit 3289464f2d7ad59e3ac8247d448eab535d19cf31 Author: VMware, Inc <> Date: Sat May 28 12:39:19 2011 -0700 vm_basic_defs: Windows usleep incorrect The POSIX/BSD usleep is an int function that returns 0 upon success and -1 (with errno set) on error. The Windows Sleep() primitive is "void" so always return success. Signed-off-by: Marcelo Vanzin commit fdc34b45426a979fe8809f6435657e70a4b684ff Author: VMware, Inc <> Date: Sat May 28 12:38:50 2011 -0700 Fixing setting hidden attribute for readonly files. Setting hidden attribute is translated into updating extended attributes on Mac OS which requires write access to the file. Changing temporarily file permissions to allow such access and restore permissions back after updating attribute. Signed-off-by: Marcelo Vanzin commit 1afc5b5c69bd01ce98f8bf710d5ecdf8726dda9a Author: VMware, Inc <> Date: Sat May 28 12:38:28 2011 -0700 Internal branch sync. Included in this change: . Split the disk shrink toolbox command workflow into 2 separate steps, one for wiping the disk and another for performing the disk shrink operation only. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ed804b642598d4fb69fadd4dea0fb8af5109e71d Author: VMware, Inc <> Date: Sat May 28 12:34:15 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 00d2d1921fe6cdc6ea763217ae9dd526fe6b648b Author: VMware, Inc <> Date: Sat May 28 12:33:52 2011 -0700 vix plugin: cleanup internal headers. Get rid of a few headers by consolidating things a bit. Signed-off-by: Marcelo Vanzin commit 640ae880d317262c6a4c771d8be6d2070423da1b Author: VMware, Inc <> Date: Sat May 28 12:33:32 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 01cc7301d6c139fd975244c8d43a494c4bb62c89 Author: VMware, Inc <> Date: Sat May 28 12:32:57 2011 -0700 Fix Posix's function for converting O_* open flags to FILEIO_OPEN_* counterpart: O_RDONLY/O_WRONLY/O_RDWR are not bits: O_RDONLY is 0, O_WRONLY is 1, and O_RDWR is 2. So O_RDONLY was always converted to nothing rather than FILEIO_OPEN_READ. Signed-off-by: Marcelo Vanzin commit b60e17559597ae533e28afb0c0669256817b2b51 Author: VMware, Inc <> Date: Sat May 28 12:31:42 2011 -0700 BSD vsnprintf: POSIX compliance BSD printf doesn't comply with the POSIX specification for "%e" output. There should only be two digits of exponent until the exponent is larger than 99. E5 -> E05 E15 -> E15 E115 -> E115 Signed-off-by: Marcelo Vanzin commit 991800838bd491ea2c43a2341d70824eaf7d0146 Author: VMware, Inc <> Date: Sat May 28 12:31:03 2011 -0700 toolbox-cmd: read config so logging can be configured. Signed-off-by: Marcelo Vanzin commit ec84253c229eb3d6affa3952c74148f4e93efa5c Author: VMware, Inc <> Date: Sat May 28 12:30:48 2011 -0700 VMCI device needs a limit on the datagram queue It turns out that we've never put a limit on the number of datagrams that can be queued in the device. The perf test keeps pushing datagrams, and with nobody reading them, the queue in the VMX just keeps growing until we exhaust the pagefile. Added a limit in VMCI_QueueDatagram(). We use the same limit we use elsewhere, which is 2 x DG_MAX, or ~128K, for normal datagrams, and a higher limit for events (datagrams sent from the VMX/event resource ID). Signed-off-by: Marcelo Vanzin commit 9b96e2c2db2343a9d9c44e1e6f84da231014379f Author: VMware, Inc <> Date: Sat May 28 12:29:47 2011 -0700 lib/file: introduce an internal robust FileIO_Create This will be used for some restructuring and code reduction. Followup changes will: a) Switch the file locking code to FileIO and drop a large amount of support functions. b) Switch the file/directory make temporary functions to use the existing robust/retry functions. This will make Windows work properly under stress. Signed-off-by: Marcelo Vanzin commit 31c63fdf6fcb24ae7a2583ff877d5cf088d8ed89 Author: VMware, Inc <> Date: Sat May 28 12:29:16 2011 -0700 Remove unused variables from vmhgfs modules. When vmhgfs modules are compiled in a Fedora 15 VM, there were few warnings about unused variables. Made code changes to get rid of all unused variables to fix all the warnings. Signed-off-by: Marcelo Vanzin commit 8f7fd45a1be56f2c2f4d85a7a0f30c2a71da9c87 Author: VMware, Inc <> Date: Sat May 28 12:28:43 2011 -0700 lib/file: modernize the header file A few cleanups to the header file. Signed-off-by: Marcelo Vanzin commit d28444f1dd1dda7d40ff41b364edcb2c6c429c85 Author: VMware, Inc <> Date: Sat May 28 12:27:44 2011 -0700 Fix ASSERT in string.cc:80 The reason for the bug is that we assume that there should be ending NULL for any text clipboard, but for clipboard data from old guest (win95/98), the text may be not NULL terminated, and caused problem. The fix is to always attach NULL for any clipboard buffer. Signed-off-by: Marcelo Vanzin commit e3639cff470ecee783d507b628f6c67dc9cb62ca Author: VMware, Inc <> Date: Sat May 28 12:25:58 2011 -0700 lib/file: remove prototype of dead function Doesn't exist anymore. Signed-off-by: Marcelo Vanzin commit a2a99587abfc59d447a0f0f03691faa275f6effa Author: VMware, Inc <> Date: Sat May 28 12:25:13 2011 -0700 lib/file: use portable numbers Windows doesn't have all of the lovely symbolic values Signed-off-by: Marcelo Vanzin commit 911e69626a480d9d73d16b28328df54557632fb4 Author: VMware, Inc <> Date: Sat May 28 12:24:46 2011 -0700 lib/file: fix a comment Refer to an existing function... Signed-off-by: Marcelo Vanzin commit bddd0b101e43fecebf6f8af02fa146d249994706 Author: VMware, Inc <> Date: Sat May 28 12:24:18 2011 -0700 lib/file: make robust mkdir more general Make the robust mkdir internal routine behave like the POSIX system call. Later changes will pass other values for the mask. The Windows code ignores it for now. Signed-off-by: Marcelo Vanzin commit 8554bb3e1667805974c96e7aafd813af2ec5a522 Author: VMware, Inc <> Date: Sat May 28 12:11:32 2011 -0700 lib/guestapp: spring cleaning. Clean up more stuff we don't use or don't need in lib/guestapp. . OpenUrl goes the way of the dodo, along with the POSIX "find program" and "set spawn env" functions. (The gtk toolbox is just dead code walking, so it's changed to not call those functions.) . that allows the platform-specific implementations to be removed, since they're not needed. . we don't support pre-2k Windows anymore in this code, so we can use the bora/lib implementation of GuestApp_GetConfPath(). . other unreferenced functions are also removed. Signed-off-by: Marcelo Vanzin commit 7f7636f48a86f8d36c258c089007f07afbd26460 Author: VMware, Inc <> Date: Sat May 28 12:10:45 2011 -0700 Make vsock Linux module not have unused but set variables. Fedora 15 compiles modules with the -Wunused-but-set-variable flag. This exposed some cases, where the vsock code would set variables without using them. Fix those. Signed-off-by: Marcelo Vanzin commit ada5e3e4d98c9b71702ec97db77dd75940f417f9 Author: VMware, Inc <> Date: Sat May 28 12:08:29 2011 -0700 Make vmci linux module not have unused but set variables. Fedora 15 compiles modules with the -Wunused-but-set-variable flag. This exposed some cases, where the VMCI code would set variables without using them. Fix those. Note that the unused annotation only means potentially unused. Signed-off-by: Marcelo Vanzin commit 72d1170a6b2635772a31e2951a5c91665b812a91 Author: VMware, Inc <> Date: Sat May 28 12:07:50 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 03edbb8e8d2c6733afbb5f6c52ff92934ee1af9a Author: VMware, Inc <> Date: Sat May 28 12:07:30 2011 -0700 Miscelaneous cleanup of unused tools stuff. Signed-off-by: Marcelo Vanzin commit 9b97f900820e7d5f312b2dc26c4435dc216c2686 Author: VMware, Inc <> Date: Sat May 28 12:06:42 2011 -0700 Fix VMCI doorbell index allocation With the merging of the guest and host code, the code that allocates a doorbell got shuffled around. This introduced a bug, where a guest personality allocation of a doorbell will register the index of a doorbell handle with the VMCI backend before allocating it. This change moves the allocation of the index up before it is registered with the backend. To avoid generating callbacks before we know for sure that a given doorbell has been successfully created (this can happen due to index sharing), an active flag has been added to the doorbell entry. This flag is set to true only after the creation of the doorbell has been successfully completed. Signed-off-by: Marcelo Vanzin commit 929425c8b447d7abdada1513d29eaa25e824ecf8 Author: VMware, Inc <> Date: Sat May 28 12:05:56 2011 -0700 Add some log wrappers to tools. Basically, add missing glib functionality (g_info()) and create versions that automatically prepend the function name to log messages. Signed-off-by: Marcelo Vanzin commit 3c91a3ee9d2df68844b24ac34846b63b92a07a0b Author: VMware, Inc <> Date: Sat May 28 12:05:07 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e8fdf985af2b49363ab4b7bc1636a37e1f96f3cd Author: VMware, Inc <> Date: Sat May 28 12:04:37 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5cc0e08873ba75841dd98034a46b8c1d5699429c Author: VMware, Inc <> Date: Sat May 28 12:03:33 2011 -0700 Fix killProcess looking at dead processes' exit state. It needs to also be sure the program is gone before rewriting the error to be NO_SUCH_PROCESS. Signed-off-by: Marcelo Vanzin commit 21a7ec2957c3b1f57359b485bcf88b1614716a7b Author: VMware, Inc <> Date: Sat May 28 12:02:01 2011 -0700 Don't try to dump service state when main loop is not running. There is a race during service startup, where some thread (e.g., the Win32 service control manager thread) may trigger the "dump service state" code before all service state has been initialized. Avoid that by only allowing state to be dumped while the service's main loop is running, so that we know the state data is in a known state. Signed-off-by: Marcelo Vanzin commit 24ba2a4454cd8c5da783fcff8aa59539a457f262 Author: VMware, Inc <> Date: Sat May 28 12:01:18 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9cfaa309750635bcfafefbb4fa07edca20038dcf Author: VMware, Inc <> Date: Tue Apr 26 14:35:09 2011 -0700 Updating open-vm-tools version for release 2011.04.25-402641. Signed-off-by: Marcelo Vanzin commit 3112c27981074deb53e86e30e1c168d55e42220c Author: VMware, Inc <> Date: Tue Apr 26 14:28:18 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f4220c5fe068cd4bba0b0b5547f2b9b1ffe466ca Author: VMware, Inc <> Date: Tue Apr 26 14:28:01 2011 -0700 Translation updates for JA. Signed-off-by: Marcelo Vanzin commit e0d1317dd4208dd36bc2e054238779a2ff5fb56c Author: VMware, Inc <> Date: Tue Apr 26 14:27:21 2011 -0700 lib/file: another include file missing Signed-off-by: Marcelo Vanzin commit fc4c2d6680a11f4335705551daf64dc38af4969b Author: VMware, Inc <> Date: Tue Apr 26 14:27:12 2011 -0700 lib/file: fix the build Drop a line in my last check in Signed-off-by: Marcelo Vanzin commit 856d2e7da570c4452a85eb051965ed95ca840e9a Author: VMware, Inc <> Date: Tue Apr 26 14:27:00 2011 -0700 lib/file: prep change before fix Move the "make temp" functions from file.c to fileTemp.c. Once properly collected and under the same roof, further considation, simplification and a fix can be done Signed-off-by: Marcelo Vanzin commit 940597efee460bb6ed6705b812ff5f969926e2be Author: VMware, Inc <> Date: Tue Apr 26 14:26:44 2011 -0700 lib/file: prep change before overhaul The "make temp" functions currently live in file.c and should live in fileTemp.c. In order to move them, remove the Msg_* stuff - this should be Log and Warning - and include the work-around just added to ESX50. After this change and moving the code to its proper place, a full fix for the worked-around problem will be done. Signed-off-by: Marcelo Vanzin commit ef258adbae62934ba7fc12560b509c0936bd8203 Author: VMware, Inc <> Date: Tue Apr 26 14:26:14 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c0a55f201172e8d60287d36b73d67a95c18d8ac5 Author: VMware, Inc <> Date: Tue Apr 26 14:25:56 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2ec3d0a5f62a8848b9930a676a27a846376ff7d3 Author: VMware, Inc <> Date: Tue Apr 26 14:23:05 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c1a600175d532710a1c642cd204f41fb0affd184 Author: VMware, Inc <> Date: Tue Apr 26 14:22:47 2011 -0700 Backout previous change. Signed-off-by: Marcelo Vanzin commit d57239d9ce27173357d744598ca02ab73d2b2b9f Author: VMware, Inc <> Date: Tue Apr 26 14:22:22 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b15a54e4e818e8fd7ea74621e733b9c4d4d58ab7 Author: VMware, Inc <> Date: Tue Apr 26 14:21:29 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit baf26a56be08d62e49a6d0c5312762fbbb0d72e0 Author: VMware, Inc <> Date: Tue Apr 26 14:20:31 2011 -0700 lib/file: pretty up before a change Signed-off-by: Marcelo Vanzin commit d0c6dd9fd73bbb4d1498faf66149c01a7d503015 Author: VMware, Inc <> Date: Tue Apr 26 14:20:13 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 186a0f1f24168b709b30a53112cedee9e7e37b37 Author: VMware, Inc <> Date: Tue Apr 26 14:19:54 2011 -0700 Internal branch sync. Included in this change: . HGFS: return a proper error if the filename is too long. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6b6fe8e04f2914467be539bb1b272e878644d31e Author: VMware, Inc <> Date: Tue Apr 26 14:17:21 2011 -0700 vmblock-fuse: move over to /var/run/vmblock-fuse Do not mount vmblock-fuse in /tmp as it may interfere with services scanning /tmp, such as tmpwatch. Let's mount it in /var/run/vmblock-fuse instead. Signed-off-by: Marcelo Vanzin commit 8736b712619e1614d1e5d355b7fada8a7f6bc3d7 Author: VMware, Inc <> Date: Tue Apr 26 14:15:50 2011 -0700 DGRAM shutdown() on Linux has a bug where if the socket is unconnected, it skips waking up the socket. DGRAM sockets are hardly ever connected, so this has been fixed. Signed-off-by: Marcelo Vanzin commit f10ce3b509c8b86ca917a9c3128207dabc84b77e Author: VMware, Inc <> Date: Tue Apr 26 14:15:06 2011 -0700 Call g_clear_error(&err) after g_locale_from_utf8() fails. After catching an error from g_locale_from_utf8() the error structure is not freed. This results in a warning from GLib when we later call g_spawn_async() with the same (now populated) error parameter. While we're in here copy the debug message from the Windows version of PowerOpsScriptCallback() so that the exit code of the power script is logged. Signed-off-by: Marcelo Vanzin commit df06d1c243c13e512164cc775db345c5b7149c5b Author: VMware, Inc <> Date: Tue Apr 26 14:14:49 2011 -0700 Fix bsd build for new inline assembly functions: use __asm__ instead of asm to satisfy C99 rules. Signed-off-by: Marcelo Vanzin commit 6dbefb2f893af326414b4cf71aae1100597e08b7 Author: VMware, Inc <> Date: Tue Apr 26 14:14:32 2011 -0700 On running queuepairAllocTest24_l test on Ubuntu9 guest, the guest goes unresponsive We try to allocate the queuepair pages before we make the hypercall (which would eventually hit the restriction in the device). On Windows and Mac OS, we can't allocate a single contiguous block this big, so the allocation fails immediately. On Linux, we allocate each page separately, so what happens is that the system starts thrashing and becomes unresponsive. Signed-off-by: Marcelo Vanzin commit 041692223ade791cc00fa952c31ec60126d69762 Author: VMware, Inc <> Date: Tue Apr 26 14:13:54 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1b61c4568d406e7455ccf1114a40cd16c70ccc06 Author: VMware, Inc <> Date: Tue Apr 26 14:13:07 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e26c81ed31d3f99d984f2425d57b81913495013b Author: VMware, Inc <> Date: Tue Apr 26 14:12:18 2011 -0700 TBB: really simplify stubbed Msg_AppendMsgList This simplified version just prints MSGIDs. I'll look at the problem in more detail once Tinderbox is green again. Signed-off-by: Marcelo Vanzin commit 16fe2017ddc83a2f70d0bba425bb2785d59f1d8c Author: VMware, Inc <> Date: Tue Apr 26 14:11:55 2011 -0700 Fix Mac OS obj build Name length is not a size_t here, it's a uint32. Signed-off-by: Marcelo Vanzin commit f886c0dc8824e923417788312820c446882920ef Author: VMware, Inc <> Date: Tue Apr 26 14:11:38 2011 -0700 TBB in stub-user-msg.c free() was not declared. Yes, really. Include stdlib.h to get it. Signed-off-by: Marcelo Vanzin commit 1d95d8cd4a1028e9691e421f1a13e5248a86747a Author: VMware, Inc <> Date: Tue Apr 26 14:11:18 2011 -0700 Build fix: Msg_AppendMsgList in tools Missed the Tools Msg stub files. dictionary.c now uses Msg_AppendMsgList extensively, so need to add to the stubs file too. Signed-off-by: Marcelo Vanzin commit 2d4736d41b937ba404fcc3ef36f46d97366dc096 Author: VMware, Inc <> Date: Tue Apr 26 14:10:38 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8c1f04b5363fe995e6afb184dad7d07c01b0bbd4 Author: VMware, Inc <> Date: Tue Apr 26 14:10:13 2011 -0700 HGFS Dir Read Part IV: Server changes for search read V4 Added search read V4 support to the HGFS server which can return multiple directory entries as will fit in the reply buffer or a single entry. Signed-off-by: Marcelo Vanzin commit f7a430456b5f610b4942536443c86f1140357fb7 Author: VMware, Inc <> Date: Tue Apr 26 14:09:55 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 94cf9dfe92e121f5b3a56f36abf156f6a44be7dc Author: VMware, Inc <> Date: Tue Apr 26 14:09:29 2011 -0700 lib/string: BSD printf flubbs floating point output The BSD printf flubbs floating, especially when the number ends with all zeros. The root problem is that one digit is printed explicitly; any remaining digits need to be printed too - but only if they aren't zero since the zero fill will take care of them. If there is only one digit, to print (e.g. 1.000) the calculation handling the remaining digits comes up with -1 and, well, one gets what they deserve. The fix is easy - don't try to output a negative number of digits. Signed-off-by: Marcelo Vanzin commit 8b2c3d1457b02860f5b65c2f9485d3c7f518b53c Author: VMware, Inc <> Date: Tue Apr 26 14:08:49 2011 -0700 lib/string: cleanup before change Signed-off-by: Marcelo Vanzin commit 6653ae8c2f3fe3979f1635a15689e75931dc1c2b Author: VMware, Inc <> Date: Tue Apr 26 14:08:37 2011 -0700 lib/string: more cleanup Signed-off-by: Marcelo Vanzin commit 23516ebca243135ba5811e4ecac5b02657d2586b Author: VMware, Inc <> Date: Tue Apr 26 14:08:19 2011 -0700 lib/string: more cleanup Signed-off-by: Marcelo Vanzin commit b6d2798d25daf84eeb693a117e6b34b730d1c50f Author: VMware, Inc <> Date: Tue Apr 26 14:07:38 2011 -0700 lib/string: clean up before change Signed-off-by: Marcelo Vanzin commit 9d588f23a03ea3107d60713f010080c6792f56fe Author: VMware, Inc <> Date: Tue Apr 26 14:07:02 2011 -0700 lib/string: more cleanup Signed-off-by: Marcelo Vanzin commit f2504557c69e7b1b773ae8545363b0f15c15b2ce Author: VMware, Inc <> Date: Tue Apr 26 14:06:45 2011 -0700 lib/str: minor cleanup before change Signed-off-by: Marcelo Vanzin commit ec413bc828a10fde76f60eeb91f9bb27f9be0dfb Author: VMware, Inc <> Date: Tue Apr 26 14:04:51 2011 -0700 Fix ordering of HGFS opcode for search read V4 backwards compatibiliy Since change notification is released as of Beta 1 the previous change of inserting the search read opcode ahead of this will lead to incompatibily for Beta 2 servers against Beta 1 tools. Make the continuity seamless by keeping the change notification opcode ahead of the search read V4. This means the HGFS server dispatch handler must check for a NULL entry in its handler dispatch table now. (Or we could put a dummy dispatch handler which always returns protocol error, but I think NULL is okay.) The change notification opcode is only for requests sent by the server to the guest clients in response to a directory change event. Signed-off-by: Marcelo Vanzin commit b2e34c3f1f81b839ae0d6e40a29b170cb56cff30 Author: VMware, Inc <> Date: Tue Apr 26 14:03:43 2011 -0700 Reduce memcpy for data packets on VMCI requests The get data packet routine would always do a copy of the guest data into the memory allocated buffer even if the request was for a writable memory buffer. So for V4 read and directory read requests there was an unnecessary memcpy. The reason for this was that the meta packet uses the same routine but does need to read in the guest memory (for the request) but needs to write the reply into the same memory. So instead I have now added a third buffer access option to the READ and WRITE existing ones: READ-WRITE. So now meta packets use the READ-WRITE and the V4 read and directory read will use the WRITE option. The memcpy to read the guest data is only performed for READ or READ-WRITE buffer requests. Signed-off-by: Marcelo Vanzin commit d9473d85285a8924c543810653cb8b8444d230c8 Author: VMware, Inc <> Date: Tue Apr 26 14:02:57 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8c982641b3a2b4bc974c8395ebb21f18c707dcae Author: VMware, Inc <> Date: Tue Apr 26 13:59:46 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d9241674b22359d4173e34a8afcc1aa29a1a3431 Author: VMware, Inc <> Date: Tue Apr 26 13:57:20 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1c186c7794d442d1215969c6f4ee035a51704261 Author: VMware, Inc <> Date: Tue Apr 26 13:56:53 2011 -0700 Fix comment in vmci_sockets.h GetVersion -> Version. Signed-off-by: Marcelo Vanzin commit c254949f148fda18096e48a2285a2efe5227bd39 Author: VMware, Inc <> Date: Tue Apr 26 13:56:41 2011 -0700 Enable logging by default in vmtoolsd. To ensure we get at least some logging by default, enable a default logger that writes to syslog in vmtoolsd. The default log level ("message" on beta builds, "warning" on release builds) is unchanged. The change also makes "syslog" the default log handler for everybody, in case a handler is not specified in the config data. (Previously, it would be "stdout" on POSIX, or "outputdebugstring" on Win32.) Also: . reset the logging system after reading the command line args, so that syslog can pick up the change in the container name. . fix an issue in the POSIX syslogger; openlog() doesn't seem to make its own copy of the "ident" argument, so it could end up referencing freed memory as we reconfigure the log system. Keep a copy in the log data. Signed-off-by: Marcelo Vanzin commit 7a4486adf8de07896106a267119c408666bb3388 Author: VMware, Inc <> Date: Tue Apr 26 13:55:47 2011 -0700 rpcin: fix cleanup on error path. We need to make sure we clean up the GSource on the error path too, so that the main loop doesn't try to re-run the loop after an error (in which case the channel will be NULL). Signed-off-by: Marcelo Vanzin commit e816fdd33ef38a0e74ef0dc5f04445c37e0495e3 Author: VMware, Inc <> Date: Tue Apr 26 13:55:30 2011 -0700 Fix up vm-support-lx. . clean up indentation . make it /bin/sh-friendly . make it support FreeBSD and Solaris too . stop packaging up /proc, which takes a long time and doesn't necessarily help. . don't follow symlinks (so that we don't package ICU data or plugins under /etc/vmware-tools). . package syslogs too. . get rid of the spinning thing (progress "report") since it doesn't play well with FreeBSD's/Solaris's /bin/echo. Signed-off-by: Marcelo Vanzin commit bb9ed1e2cb00cb6bc1fa5c7d21baa108a40a1e84 Author: VMware, Inc <> Date: Tue Apr 26 13:54:47 2011 -0700 Increase buffer size for OS name cache. Increase the scope of a previous fix to also cover long OS names, so that guest info and vix have enough buffer space to cover the max size supported by the hostinfo library. Signed-off-by: Marcelo Vanzin commit 004c98fb4c3db6d7fec04fde05feaaa85964386c Author: VMware, Inc <> Date: Tue Apr 26 13:53:42 2011 -0700 Internal branch sync. Included in this change: . Remove memcmp call from eth_public.h, to work around an issue found with newer GCC versions not including string.h. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 021a91dc0261ed1cb19079be30796761c2bb149e Author: VMware, Inc <> Date: Tue Apr 26 13:48:03 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0a33dd72cf0753db2ba741c5e5ba5a057761f0bf Author: VMware, Inc <> Date: Tue Apr 26 13:47:36 2011 -0700 Add API to query VMCI sockets driver version. VMCF asked for a way to determine the version of the VMCISockets driver so that they can blacklist versions that have issues. This change introduces such an API. The version is platform-dependent, like the VMCI driver version, and uses the same format, A.B.C.D, where A is an epoch, B the major version (incremented per release branch), C the minor version (incremented per change) and D is unused. It is embedded in the file vsock_version.h for each platform. The API is exposed through a new call in vmci_sockets.h, VMCISock_Version(), as an unsigned integer. New macros are provided to extract the A, B and C component parts of the version. Signed-off-by: Marcelo Vanzin commit 80ce3359f56119c805154b14106901a898135259 Author: VMware, Inc <> Date: Tue Apr 26 13:46:47 2011 -0700 VMCI: add some missing newlines to the logging. Signed-off-by: Marcelo Vanzin commit 93b08c9b9932b9e5c0445ed704b4f1e3c9594755 Author: VMware, Inc <> Date: Tue Apr 26 13:46:05 2011 -0700 Recognize Debian 6. Signed-off-by: Marcelo Vanzin commit 66cd15635c03eade74c73bd4c751a137270d5c14 Author: VMware, Inc <> Date: Tue Apr 26 13:45:55 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f7c7f464907ee545d9c6525af341d32ee7298be7 Author: VMware, Inc <> Date: Tue Apr 26 13:45:35 2011 -0700 lib/file: trivial cleanup Signed-off-by: Marcelo Vanzin commit 7747f1533f08ad3a792b004c44e801d73dbf1976 Author: VMware, Inc <> Date: Tue Apr 26 13:44:03 2011 -0700 Remove support URL from toolbox-cmd's help output. Signed-off-by: Marcelo Vanzin commit b11aab9cc326aee441a0a07db08f8e7987752a96 Author: VMware, Inc <> Date: Tue Apr 26 13:43:36 2011 -0700 Fix up HGFS server get packet buffer. When guest mappings were being released the start index for the IOV array was not correct it started from zero instead of the startIndex. For meta packet the start index is zero, but for data packets it is 16. Signed-off-by: Marcelo Vanzin commit 615ef17f8dd0b0e80a619257780e2b9f97a9fa4e Author: VMware, Inc <> Date: Tue Apr 26 13:43:13 2011 -0700 Change error code of VMCIDoorbell_Create Before the merging of the two VMCI drivers, the guest version would return VMCI_ERROR_ALREADY_EXISTS when creating a doorbell with a handle that already exists. The host code actually returned VMCI_ERROR_DUPLICATE_ENTRY, which is the hash table error code for duplicate entries. After the merge, we always return VMCI_ERROR_DUPLICATE_ENTRY, but VMCI_ERROR_ALREADY_EXISTS is slightly more descriptive so return that instead. Signed-off-by: Marcelo Vanzin commit 216f0dab825ab5a0c2a532f4c17c6e2a645e3191 Author: VMware, Inc <> Date: Tue Apr 26 13:42:42 2011 -0700 More VMCI device state locking. An ASSERT could be hit where we were trying to read in a datagram from the device but the device was not started (and so the guest personality was not active). It's actually okay to read in at that time, so stop ASSERTING on the personality being active. Signed-off-by: Marcelo Vanzin commit 2b3588ff3957bf3dedd27bf4e491b826262a30e0 Author: VMware, Inc <> Date: Tue Apr 26 13:41:12 2011 -0700 fix irq naming to match network convention The vmxnet driver always requests irq with name of 'vmxnet' which is incorrect. It causes multiple entries in /proc/interrupts and confuses scripts like irqbalance that try and manage smp affinity on network cards. The fix is simple, just use the standard convention of putting device name in the irq name. This applies to all kernel versions. Signed-off-by: Stephen Hemminger Signed-off-by: Shreyas N Bhatewara Signed-off-by: Marcelo Vanzin commit 04828c3f35f93726d8c4ede7a2035680c1b26422 Author: VMware, Inc <> Date: Tue Apr 26 13:40:30 2011 -0700 Change lib/file build order. Signed-off-by: Marcelo Vanzin commit 581500d330a8f1f64003639accfe1e2e07092a85 Author: VMware, Inc <> Date: Tue Apr 26 13:39:12 2011 -0700 Fix the build Use a Posix routine. Signed-off-by: Marcelo Vanzin commit dea9ab8b363088b37b71d0bd4c973aa28551234c Author: VMware, Inc <> Date: Tue Apr 26 13:38:44 2011 -0700 lib/file: retire the unsafe temp directory routines Since all of the painful dependences have been clean remove there is no longer a reason to have good and bad temp directory routines. The unsafe versions go to the bit bucket. Signed-off-by: Marcelo Vanzin commit bcc970017bc734a337825e209fa5599e174fd0cb Author: VMware, Inc <> Date: Tue Apr 26 13:36:26 2011 -0700 VMCIQPair_Detach() should not leak when it fails. We're hitting an ASSERT on shutdown. Code can still have a socket open very late in the OS shutdown sequence. VMCISockets forcibly closes this socket so that it can safely unload. The device I/O space is already gone at this point, and with it the queuepairs. So we fail to detach the queuepair, but we still ASSERT at the VMCISocket level that we released it. This occurs in both the common code (ESX, Mac OS and Windows) and the Linux code. At the VMCI level, we're actually leaking when it fails, because we only release the entry and qpair struct on success. There's nothing a caller can do at that point, so we should always release the entry and qpair struct. Signed-off-by: Marcelo Vanzin commit bc7b7fa7cd06d0db34fdfb4363637eb6a94bf5d7 Author: VMware, Inc <> Date: Tue Apr 26 13:34:54 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8f02ee79e4442cc6cce05df43a242741a5463859 Author: VMware, Inc <> Date: Tue Apr 26 13:34:23 2011 -0700 Linux hosted modules: BKL is no more As of 2.6.39 merge window BKL and its header file (smp_lock.h) have been removed from the kernel, so, to make out code buildable we should remove the remaining traces of BKL in our code. Signed-off-by: Marcelo Vanzin commit 8bb81e03780f936a4d3f04def07e3d467bf30c01 Author: VMware, Inc <> Date: Tue Apr 26 13:34:01 2011 -0700 open-vm-tools: remove the gtk toolbox code. Plus some minor code rearrangements to remove the dependency on toolboxInt.h. Signed-off-by: Marcelo Vanzin commit ef52e68d9deb0ed08c5f0f4b3a4ea53856892d34 Author: VMware, Inc <> Date: Tue Apr 26 13:33:42 2011 -0700 lib/user, lib/file: move safe temp directory code to lib/file Part of lib/file has been sitting, heavily entangled, in lib/user for a long time. This prevents out code from always using safe temporary directories. These functions sat in lib/user but used lib/file functionality. They are no more or less entangled living in lib/file and having lib/file names than in lib/user - once the last lib/user entanglement is removed. It is now possible to untangle the functions and move them. This is "heavy lifting" change. A follow on will remove the older, unsafe versions from lib/file and our code base. Signed-off-by: Marcelo Vanzin commit 67c6930e3e4c0e8ade0343dfe020c1901b91564c Author: VMware, Inc <> Date: Tue Apr 26 13:33:02 2011 -0700 Internal branch sync. Included in this change: . DnD: cache the file list so that we can provide a valid response after the DnD operation has finished. Also add "ftp" to the supported schemes. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 72d87e223b4350f0d59cff9fb566970da362f246 Author: VMware, Inc <> Date: Tue Apr 26 13:28:48 2011 -0700 HGFS protocol support for multiple directory entry transfers part I This is some of the protocol cleanup and changes ahead of the main request implementations. Signed-off-by: Marcelo Vanzin commit 544239339d72b99981946087443fe838ffec15d7 Author: VMware, Inc <> Date: Tue Apr 26 13:28:24 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 350a79ba1fbc291d2d253c901b2d86b6411d7d28 Author: VMware, Inc <> Date: Tue Apr 26 13:26:33 2011 -0700 Stop using kmap for VMCI queue pair host side headers The VMCI host driver for Linux does two kmaps for each active queue pair. Since there is a limited number of kmap entries for mapping high memory, convert the code to use vmap instead. Signed-off-by: Marcelo Vanzin commit 51ad20779f3aa2ae25589f6a9760f6720e3507cd Author: VMware, Inc <> Date: Tue Apr 26 13:26:11 2011 -0700 Make VMCIHashTable understand CID_ANY better A while back, the VMCI hashtable code was made understand a CID wildcard. However, the function verifying whether a handle is already registered doesn't do wildcard matching on the handles already in the database. This change rectifies that. Signed-off-by: Marcelo Vanzin commit 095332e4bf7a9a73ebbc6de365f8fb4ae625df9a Author: VMware, Inc <> Date: Tue Apr 26 13:25:38 2011 -0700 Minor cleanup. Signed-off-by: Marcelo Vanzin commit 9bd15faaf92b0e488241bde1fb4f70626a26cf4a Author: VMware, Inc <> Date: Tue Apr 26 13:24:39 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 74f643fca682c29afc265611cfc2ed632076cc80 Author: VMware, Inc <> Date: Tue Apr 26 13:24:09 2011 -0700 wiper: use Posix_Access, not access. This doesn't really feel right, since the MNTINFO struct is not unicode-ized. But other parts of the code already did it, and it shuts up the symbol checker. Signed-off-by: Marcelo Vanzin commit 54ccb0cc98dd72c6689330a82c48b1b7d325edfe Author: VMware, Inc <> Date: Tue Apr 26 13:23:40 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9ef428550b0a80d9c1c87b1b357bdf048a8ae445 Author: VMware, Inc <> Date: Tue Apr 26 13:23:19 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 769e75e3ebbfd4e1dd13ac699c7dda7282715293 Author: VMware, Inc <> Date: Tue Apr 26 13:21:59 2011 -0700 Internal branch sync. Included in this change: . DnD: don't reset state of active file trasfers, so that DnD works even when snapshots are taken. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 03cb3ad1e9103ca2566941de3d48697fedb0f97d Author: VMware, Inc <> Date: Tue Apr 26 13:18:52 2011 -0700 Allow shrinking ZFS partitions. Also reorganize the code a little bit. ZFS doesn't really look like a normal disk, so we'll just assume it's living in a VMDK (not that we really check for that for other FSes). Users can probably shoot themselves in the foot a lot easier with ZFS by attaching storage to existing volumes and doing other crazy things ZFS allows, but hey, if they want to do it... Signed-off-by: Marcelo Vanzin commit 5116e80dd366ceaede120c5a2c0ee86094ba3fbf Author: VMware, Inc <> Date: Tue Apr 26 13:17:51 2011 -0700 lib/file: untangle many commonly used routines Make commonly used rotuines free of complex dependencies. I choose to name the new file "StandAlone" since, over time, many routines, including those not specifically manipulating path string, will move here. Signed-off-by: Marcelo Vanzin commit 9cb3424c2a7912fc5ba4b24fef52a4f2af267dfc Author: VMware, Inc <> Date: Tue Apr 26 13:16:10 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c8aa571005a0028c36632a40494164a6b3c05e16 Author: VMware, Inc <> Date: Tue Mar 29 13:35:10 2011 -0700 Updating open-vm-tools version for release 2011.03.28-387002. Signed-off-by: Marcelo Vanzin commit ec43520f5f3a50f5a980a73d22ae231380f97555 Author: VMware, Inc <> Date: Tue Mar 29 13:28:35 2011 -0700 HGFS: handle the RCU-based path walk mode on 2.6.38 2.6.38 introduced a new, lock-less path walk mode called RCU walk. It is used by default and file system code is supposed return -ECHILD if permission check requires sleeping. Do that, otherwise bad things may happen. Also adapt to the new APIs of 2.6.39-rc0 (smp_lock.h is gone, get_sb method in file_system_type structure replaced with mount method, dentry->d_count is not an atomic anymore, SPIN_LOCK_UNLOCKED is not there as well). Signed-off-by: Marcelo Vanzin commit a53e04f4b8171c6ebc777884b4290539c4bbe0a5 Author: VMware, Inc <> Date: Tue Mar 29 13:28:22 2011 -0700 Fix compilation on ARM. Signed-off-by: Marcelo Vanzin commit 8d1432d0625ff350480401e7a5b052476a1deda4 Author: VMware, Inc <> Date: Tue Mar 29 13:28:14 2011 -0700 Branch files ahead of big change Branch a few files and do some minor cleanup ahead of a major change. This will make the major change easier to read. Signed-off-by: Marcelo Vanzin commit 724c4e5d55cb6f7e9e864adc253a9d71140f4552 Author: VMware, Inc <> Date: Tue Mar 29 13:27:57 2011 -0700 Fix non-glib rpcin code. For non-glib tools, set in->nextEvent to NULL as soon as we enter RpcInLoop. This is important, since in->nextEvent and the next pointer in EventManager_ProcessNext point to the same Event struct when we enter the function, and EventManager_ProcessNext frees the pointer after RpcInLoop exits, so freeing it in RpcInLoop results in a double-free and corrupts the heap. This can happen if RpcInStop is called at the end of the loop in response to a call to RpcIn_stop from inside cb->callback. Also, after re-reading the glib docs and consulting with others, fix how we manage the lifetime of the GSource used to run the RpcInLoop in the glib case. If we are stopping the loop from _inside_ the loop, then we need to unref the source but _not_ destroy it; instead we should return FALSE so that the g_main_loop with also unref it (and hence destroy it). If we are stopping the loop from outside the loop, then the source must be destroyed (to get the g_main_loop to release its ref) and then unref'd (to release our ref). Finally if we do not reschedule the timer while running the loop (because the timeout hasn't changed) then we must return TRUE so that the source will remain attached to the g_main_loop. Signed-off-by: Marcelo Vanzin commit d46ddcf343ffd97b4622c5353d87f3570823311e Author: VMware, Inc <> Date: Tue Mar 29 13:26:48 2011 -0700 Integrating bug fixes from Korean drop. Signed-off-by: Marcelo Vanzin commit df560a543b2d3d891c9a9626cfd2ad2df78d4f60 Author: VMware, Inc <> Date: Tue Mar 29 13:26:23 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 03b60255bf8d71cbcadb2035e6ca0bc95e509d6c Author: VMware, Inc <> Date: Tue Mar 29 13:25:53 2011 -0700 vmsync: fix building module on 2.6.39-rc0 path_lookup() is gone in 2.6.39-rc0 so need to adapt to the new ABI. Signed-off-by: Marcelo Vanzin commit 15c44f2b877d64bb89a561d5c7455260fc7420e7 Author: VMware, Inc <> Date: Tue Mar 29 13:25:44 2011 -0700 Fix wrong log level checks in tools syslogger. Signed-off-by: Marcelo Vanzin commit 5e950764a89f8e67a4d001fd29eec21aac9c5611 Author: VMware, Inc <> Date: Tue Mar 29 13:25:30 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2ffd451156663b1a56e8e80da0e952114fa68e82 Author: VMware, Inc <> Date: Tue Mar 29 13:25:10 2011 -0700 This is part 17 (this is getting ridiculous) of a change to support Nested VMs. This change switches over the HasPeronality() and DeviceEnabled() rules to match those of the Linux driver. This allows it to handle *always* having two devices in a guest, even if a hosted product is not installed, which is now a restriction imposed by the installer. DeviceShutdown() and InUse() are redundant on platforms that don't have retarded stop/removal rules, so moved that functionality out of the common code and into the Windows driver code. Signed-off-by: Marcelo Vanzin commit 7166193957df9f300c7ca0ce256d4285df5466cb Author: VMware, Inc <> Date: Tue Mar 29 13:24:23 2011 -0700 lib/file: minor cleanup Signed-off-by: Marcelo Vanzin commit fff55a79276cad65ea3278e07757a7fdda666779 Author: VMware, Inc <> Date: Tue Mar 29 13:24:10 2011 -0700 Internal branch sync. Included in this change: . Fix missing or incorrect "x MB of y MB" info for DnD/CopyPaste. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 227e81735f5f54e9f43383b690c671cbc22c3326 Author: VMware, Inc <> Date: Tue Mar 29 13:23:40 2011 -0700 Linux host modules: use DEFINE_SPINLOCK()/DEFINE_RWLOCK() SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED have been removed from 2.6.39-rc0 so we can't use them anymore. Let's switch to DEFINE_SPINLOCK/DEFINE_RWLOCK instead. Even though they are not present on kernels before 2.6.11 we can easily add them to the compat code. DEFINE_SPINLOCK() does not allow to decorate spinlocks with attributes but as far as I can see we do not really need to mark them as "unused" with the newer (or maybe 'not ancient') spinlock code. Also remove some old compat code from compat_spinlock.h Signed-off-by: Marcelo Vanzin commit bf748718b997349b1724b49607384bbf9fb00ca4 Author: VMware, Inc <> Date: Tue Mar 29 13:23:20 2011 -0700 vmblock: make buildable on kernel 2.6.39-rc0 get_sb() is gone as is path_lookup(). Adapt to the shiny new APIs so that we can build our module. Signed-off-by: Marcelo Vanzin commit 33e45b5a760deec20786a2512707fb3613a23f4e Author: VMware, Inc <> Date: Tue Mar 29 13:23:00 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1456ef60d993c2217cf4a6be60a35c6c35385520 Author: VMware, Inc <> Date: Tue Mar 29 13:22:35 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cfdd63fc8cd037a23cf8cccb5da40c5970dc73c8 Author: VMware, Inc <> Date: Tue Mar 29 13:22:13 2011 -0700 Bump VMCI Linux driver version Better late than never. The Linux VMCI Driver version should be bumped due to previous changes unifying the host and guest code. Signed-off-by: Marcelo Vanzin commit 86fc8fbee80600e8581895999967efd9277780b8 Author: VMware, Inc <> Date: Tue Mar 29 13:22:03 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit de714adb2a449d10226b5461b15ba21842016877 Author: VMware, Inc <> Date: Tue Mar 29 13:20:59 2011 -0700 Rename VMCI_Has*Device to VMCI_*PersonalityActive Since the host device is more or less always there and since it isn't really a device, the name VMCI_HasHostDevice is kind of misleading. Rename the two functions to mean that the given personality of the vmci driver is active. Signed-off-by: Marcelo Vanzin commit ed36fab749fa89bfd652db3183aa90e2ff242e61 Author: VMware, Inc <> Date: Tue Mar 29 13:20:49 2011 -0700 Check for other hypervisors before checking for the backdoor. Some hypervisors don't seem to like when we try to access our backdoor. To avoid issues, check for them before trying that, and fail the "virtual world" check if they're detected. Signed-off-by: Marcelo Vanzin commit e85ce0ad847e9fa7ccb364bd3c8a32ed3b6f6b75 Author: VMware, Inc <> Date: Tue Mar 29 13:20:39 2011 -0700 lib/misc: move hypervisor-related functions into a new file. While working on bug 692831, the "checkvm" utility was changed to call some Hostinfo functions. The compilation unit where those functions lived referenced a whole bunch of other symbols that ended up pulling lib/unicode into checkvm. That made the binary size blow up from 5kB to 450kB, stripped. Putting these functions into a separate compilation unit avoids that issue, and makes the binary grow much less (it's now ~45kB). Signed-off-by: Marcelo Vanzin commit a1ef0c737d9e545611a4ecaba9e1ab19d6c05132 Author: VMware, Inc <> Date: Tue Mar 29 13:20:05 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 70846bdfbc5d13637f51730157fe6f3aedbf1885 Author: VMware, Inc <> Date: Tue Mar 29 13:19:20 2011 -0700 Make VMCI Linux driver support host and guest concurrently This change makes the VMCI Linux driver enable both the guest and host driver functionality as appropriate. The host driver part will always be initialized, but to limit its exposure in guests not used as a virtual host as well, we adopt the following behaviour for VMCI_HasHostDevice: - if there is no VMCI PCI device, VMCI_HasHostDevice() returns TRUE if it has been initialized. - if there is a VMCI PCI device, VMCI_HasHostDevice() returns TRUE iff theere are active contexts. This will make the default behaviour in non-nested cases the same as prior to this change. In the nested VM case, we may have VMCI clients, that use resources as a host endpoint, before any contexts have been created, e.g., allocating a doorbell before any VMs are started. The VMCI_HasHostDevice() check has been removed from the doorbell creation code to allow for this case. Signed-off-by: Marcelo Vanzin commit f652aa4170295a079fe8c30e1bf680cec25835e5 Author: VMware, Inc <> Date: Tue Mar 29 13:18:50 2011 -0700 desktopEvents: Tell the session manager it should not start us when relaunching a session. A session as defined by an X Session Manager is a collection of applications and some state such that this collection may be recreated arbitrarily in the future. For example, a developer may define a development session consisting of an instance of Emacs and a web browser pointing to some documentation. Rather than relaunch both apps upon each login, s/he could define a "happyfundev" session and select that to launch that collection of apps at any time. One requirement of being managed by a session manager is that one must provide add'l metadata to the session manager to support this restart/restore case. However, when the session manager relaunches applications as part of a recorded session, it doesn't record anything about the environment -- instead, each application must persist as much of the environment it needs by itself. In our case, we rely on the environment set up by (ironically) the session manager during its autostart phase in order to launch correctly. (E.g., we rely on environment variables like KDE_FULL_SESSION to determine that we're running under KDE.) Since vmusr gains nothing from being restartable via the session manager, we'd rather inform the session manager NOT to restore vmusr as part of any desktop session. Instead, it should continue to only launch as part of the XDG autostart phase. Without doing this, there is a race between two instances of vmusr launching: one from the autostart phase and one from the session restore phase. If the session restore instance wins, things break. Signed-off-by: Marcelo Vanzin commit 3108553496ec07875a52fbd7ee7db7dbcf2af071 Author: VMware, Inc <> Date: Tue Mar 29 13:17:24 2011 -0700 unity/X11: Exit Unity upon notice of session termination. During session termination, not exiting Unity until vmusr unloads the plugin is racy. By the time the Unity shutdown routine executes, it's possible that the X server has already terminated (or at least severed our connection to it). Instead of waiting until then, we'll instead exit Unity as soon as vmusr is alerted of a pending session termination, _before_ vmusr returns its acknowledgement to the session manager. Signed-off-by: Marcelo Vanzin commit 24d06744caf305efd97b4a2c01f9b1c56836a6fb Author: VMware, Inc <> Date: Tue Mar 29 13:17:07 2011 -0700 Unity/X11: Guess at menu-spec desktop ID prefixes when searching for apps. Consider this: - menu-spec root is /usr/share/applications. - .desktop files found in that directory are assigned IDs of the form basename($foo).desktop. - .desktop files in subdirectories are assigned IDs of the form { $subdir =~ s|/|-|g; return sprintf("%s-%s", $subdir, basename($foo)); } Examples: thunderbird.desktop => desktop ID: thunderbird.desktop kde4/kcalc.desktop => desktop ID: kde4-kcalc.desktop The problem with the newish WindowPathFactory is that it didn't take application prefixes into account. So, when trying to find a .desktop file for (e.g.) kcalc, it incorrectly guessed at "kcalc.desktop" instead of "kde4-kcalc.desktop". This change hackily inserts a fixed set of prefixes (currently "" and "kde4-") when searching for .desktop files. As a result, we do a much better job of identifying KDE apps. (Ideally we would discover the prefixes when trawling $XDG_DATA_DIRS/applications to compile menus, but this will have to do for now.) Signed-off-by: Marcelo Vanzin commit d3821e6aaa4b0af16d3a36d4e036c1575da8c5bc Author: VMware, Inc <> Date: Tue Mar 29 13:16:43 2011 -0700 Fix Open VM Tools build. Forgot to incorporate recent GLib signals change (CLN 1338989) into Open VM Tools build. (,_,) Signed-off-by: Marcelo Vanzin commit 65853d490a644967b2ff5d4cad56956042197d05 Author: VMware, Inc <> Date: Tue Mar 29 13:16:31 2011 -0700 Update Tools version. Signed-off-by: Marcelo Vanzin commit cdc77e06a675c93dc898ac7c0b0f7454ec675336 Author: VMware, Inc <> Date: Tue Mar 29 13:16:20 2011 -0700 desktopEvents: Reflect XSM callbacks as GLib signals. This change defines 4 new signals, one for each of the XSM client callbacks. Each callback now emits its corresponding signal. I added it to allow the Unity plugin to terminate Unity upon notice of session shutdown. Additional context from review request: When exiting Unity, we must restore misc desktop properties (ex: screensaver, taskbar visiblity) to their pre-Unity state. This requires communication with the X server. As plugins are loaded and their shutdown signals connected in alphabetical order by plugin name, desktopEvents's shutdown routine executes before unity's. Once desktopEvents calls SmcCloseConnection, the session manager considers vmusr's shutdown procedure complete, and it may terminate, killing the X server. In our case, the X server may have died while remaining vmusr plugins still execute shutdown code. The change allows all X clients to clean up _before_ we signal the X server that we're good to go. Signed-off-by: Marcelo Vanzin commit f4e3e507103e43cd87168474891887e72242d642 Author: VMware, Inc <> Date: Tue Mar 29 13:15:33 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5bf1b31d22fe17ca9888c62385c2dfb46c3239a4 Author: VMware, Inc <> Date: Tue Mar 29 13:15:20 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 34b9dde90b3df74abd93f24191083e1798854713 Author: VMware, Inc <> Date: Tue Mar 29 13:14:54 2011 -0700 This is part 16 of a change to support Nested VMs. This change fixes some small bugs in the unified Windows driver (unitialized fields, wrong VMX path). It also removes some more references to VMX86_TOOLS. Signed-off-by: Marcelo Vanzin commit c60be555b6cada20b77a0dd9aa33a2f1fd68a1d8 Author: VMware, Inc <> Date: Tue Mar 29 13:14:16 2011 -0700 Make VMCI_HasGuestDevice safe while atomic on Linux VMCI_HasGuestDevice() would be called from interrupt context, and could grab a mutex. This change rewrites the code to be safe from interrupt context as well. At the same time, VMCI_DeviceEnabled has been changed to cover both guest and host devices. Signed-off-by: Marcelo Vanzin commit 4d78a12deb32670ce37226a91ed5f3c44b9e8b90 Author: VMware, Inc <> Date: Tue Mar 29 13:14:04 2011 -0700 Integrating bug fixes for Korean drop. Signed-off-by: Marcelo Vanzin commit 76dccec4dd4002cec240e71e0042cdacfae6cca7 Author: VMware, Inc <> Date: Tue Mar 29 13:13:47 2011 -0700 suidWrapper: remove remnants of TOGGLE_VMBLOCK I meant to remove this code together with the change that disabled/removed toggling from FreeBSD/Solaris but I forgot. Better late than never... Signed-off-by: Marcelo Vanzin commit a4468e24e06a92a4af6b324a9030ea2ac3648b82 Author: VMware, Inc <> Date: Tue Mar 29 13:13:30 2011 -0700 Fix UtilGetHomeDirectory to check for NULL pointer UtilGetLoginName also has this problem. Fix both. Signed-off-by: Marcelo Vanzin commit c7fec13b3bc117ccd06b57afe3d9af46adb3d6f7 Author: VMware, Inc <> Date: Tue Mar 29 13:13:01 2011 -0700 Make VMCI Stream Sockets use control packet destination for binding. When creating a VMCI stream socket connection, the protocol calls VMCI_GetContextID() to set the local CID of a connection. However, in the nested VM case, this may no longer be correct, since a given connection can either be a host CID endpoint or a guest CID endpoint. Instead, we can use an incoming control packet to determine what destination CID the peer is using when sending to us, and use that as our local CID. For server side sockets, the change is simple - instead of calling VMCI_GetContextID() to set the local CID when receiving a request packet, we use the dst cid of the packet. For the client side, we delay the assignment of the local CID until we receive the negotiate packet from the server side. Until then, a connecting socket will continue to have the local CID of any - just like a listening socket. Since all sockets share the same port range regardless of their CID, no additional port conflicts will arise from this. Signed-off-by: Marcelo Vanzin commit 62e6b470b78ba152397e954915a534481aa5872b Author: VMware, Inc <> Date: Tue Mar 29 13:12:29 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9449140afa9db0848148ebe55e91d801ce571987 Author: VMware, Inc <> Date: Tue Mar 29 13:12:01 2011 -0700 Re-commit of VMCI host/guest driver merge. Signed-off-by: Marcelo Vanzin commit 412a895282d00439376a22dcee21efe22592cd1c Author: VMware, Inc <> Date: Tue Mar 29 13:11:35 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ef9965944d670a248374f991974348da98c7aa78 Author: VMware, Inc <> Date: Tue Mar 29 13:11:17 2011 -0700 Backout of previous change. Signed-off-by: Marcelo Vanzin commit be58b1f375d38788b71d5665d0c122f031b0ef7c Author: VMware, Inc <> Date: Tue Mar 29 13:10:58 2011 -0700 Fix a crash when calling RpcIn_stop. If an RpcInLoop callback calls RpcIn_stop, then the state of the RpcIn struct becomes corrupt (we have a timer but no channel), leading to a crash the next time the RpcInLoop runs. One way this can happen on Windows VMs is if we pump the main thread's message queue from inside an RPC handler, since we will call RpcIn_stop in response to a WM_WTSSESSION_CHANGE message. To fix this, we set an inLoop var in the RpcIn struct at the start of the RpcInLoop function. RpcIn_stop checks the var, and if it is true, it sets a shouldStop to TRUE instead of stopping the channel itself. When we eventually exit the RpcInLoop function, we check shouldStop and stop the RPC channel if it is true. This obviously only works if RpcIn_stop and RpcInLoop are called on the same thread, but RpcIn is not thread-safe to being with, so there didn't seem to be any point in trying to fix this problem for that case. Signed-off-by: Marcelo Vanzin commit a016112eeea3fea2f86f708b03b19745462570d3 Author: VMware, Inc <> Date: Tue Mar 29 13:10:44 2011 -0700 Merge Linux VMCI guest and host driver code This change merges the code for the Linux specific part of the VMCI driver. The change has two parts: one is the merging of the actual code of the drivers, and the other is changing the host and guest makefiles to pick up the VMCI driver files from the same place. The actual merging of the Linux driver code is mainly a code movement from the guest driver to the host driver. Currently, the driver will still be either guest or host, based on the flag isGuestDriver which gets controlled by whether VMX86_TOOLS is defined. All code is now compiled regardless of whether the driver is guest or host. Signed-off-by: Marcelo Vanzin commit c4f4caf29246cad55af5cfdcac369638c8432e1b Author: VMware, Inc <> Date: Tue Mar 29 13:10:12 2011 -0700 Internal branch sync. Included in this change: . Handle non-UTF8 filenames in HGFS shares. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bd6563f5ab5c7f7aed2a329f375c29882a87085a Author: VMware, Inc <> Date: Tue Mar 29 13:09:38 2011 -0700 Vmblock: do not use/package dbllnklst.c The dbllnklst.c is an empty shell, there is not useable code in it as it all moved into the header file. So let's not try to compile/shipt it. Signed-off-by: Marcelo Vanzin commit 68e7d7c0e1cf544ad02e2d8f6be592012d84f0d4 Author: VMware, Inc <> Date: Tue Mar 29 13:09:25 2011 -0700 Extend vmciRoute with hypervisor to host routing. The vmci routing function was defaulting to VMCI_ROUTE_AS_GUEST, when the hypervisor is the source and the host is the destination. However, vmci events generated locally on the host are sent from hypervisor to host, and should be routed as host communication. Also, a guest would never use the hypervisor context ID as the source, so there is no ambiguity. Signed-off-by: Marcelo Vanzin commit 6be0ef2a6d5e8eb3624dd77478bb0be921de506e Author: VMware, Inc <> Date: Tue Mar 29 13:09:08 2011 -0700 Fixing deadlock that occurs when cancelling unarchiving. When MacOS mutex is acquired recursively by the same thread a deadlock occurs. Thus it is unsafe to hold a mutex that is maintained by HGFS while invoking a system call that may result in recursively calling a vnode method which may in turn try to acquire the same mutex. Particulary vnode hash table mutex should be released before invoking a HgfsFreeFile function that invokes vnode_rele which may in turn call inavtivate or reclaim vnode methods. Current implementation still calls vnode_get while holding the mutex. It is OK, since vnode_get just increases reference count and it never result in recursive call into HGFS. Signed-off-by: Marcelo Vanzin commit e6e71d88287513857a877360c8f812d676ee2060 Author: VMware, Inc <> Date: Tue Mar 29 13:08:34 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7b255973c7f4fdd805c32b60f24acf87c9e475b6 Author: VMware, Inc <> Date: Tue Mar 29 13:08:12 2011 -0700 [unity win32] Fix UAC full screen window. Connect the unity plugin to the TOOLS_CORE_SIG_DESKTOP_SWITCH signal, and use it to add/remove the 'fake' full screen window to the UnityWindowTracker when UAC prompt is visible. Signed-off-by: Marcelo Vanzin commit cfa19829a5c5e72bd72c34b1aeb19d99c479d524 Author: VMware, Inc <> Date: Tue Mar 29 13:07:51 2011 -0700 Un*x session management integration via desktopEvents So we have this guest agent, vmusr, which runs in the context of graphical desktop sessions. It's intended to run for the duration of the session, which is normally fine, but it has a nasty habit of overstaying its welcome. Our gracious host, the session manager, politely asks its guests to leave, but vmusr just doesn't wanna listen. Rather than stick around until the X server terminates, this change introduces integration with XSM-compliant[1] session managers such that, in response to a heads-up from the manager, we can exit cleanly. libSM and libICE are used to get the job done. libICE clients use their own connections, and they're managed via a custom GSource. For now, this desktopEvents feature is the only libICE client, so rather than go overboard and deal with ICE in a separate provider plugin, all ICE-GLib connection management is handled here. Additionally, I changed up the Desktop Events features' mini API to keep a GHashTable as the plugin's private data. Each mini feature may add its own private data to that hash using the feature's name as a key. 1. http://cgit.freedesktop.org/xorg/lib/libSM/tree/doc/SMlib.xml Signed-off-by: Marcelo Vanzin commit 2e7bbe3b3f8331b63fd8e5d2c05e166c195e64eb Author: VMware, Inc <> Date: Tue Mar 29 13:07:22 2011 -0700 vmblock: fix problem with missing Panic symbol on FreeBSD We need to make sure we compile and link stubs.c so that out Panic() resolves. And since FreeBSD does not have panic that takes va_list arguments we need to implement one. Signed-off-by: Marcelo Vanzin commit ab5969419e270ddd67b351608cd28ea359ac9e7e Author: VMware, Inc <> Date: Tue Mar 29 13:06:31 2011 -0700 Return invalid handle error when hgfs guest uses stale handle. Signed-off-by: Marcelo Vanzin commit 4ea3008a6023e83c4066e12976d8357eae384764 Author: VMware, Inc <> Date: Tue Mar 29 13:05:29 2011 -0700 This is part 14 of a change to support Nested VMs. This part adds more support for the host device in the guest driver. You can now add a host device to a guest. The VMX IOCTLs will still fail, but at least we do the access checking now. This also adds all the new device names, along with the general interface, which allows things like getting the CID, attaching to vsock etc. One final change is to the wrapper for allocating kernel memory. See the comment in vmci_kernel_if for a full explanation. Signed-off-by: Marcelo Vanzin commit ff10488c6a46a8359c35ef7a818b8b5b10e335aa Author: VMware, Inc <> Date: Tue Mar 29 13:02:56 2011 -0700 lib/log: ensure decimal usage in log levels Leave things lined up but no leading zeros. Signed-off-by: Marcelo Vanzin commit 9ac41ad75d6f7e773a7187ce8839f861fc113018 Author: VMware, Inc <> Date: Tue Mar 29 13:02:26 2011 -0700 Fix Oracle Linux 6.0 identification. Oracle fixed their distro name, we need to fix our detection code. Signed-off-by: Marcelo Vanzin commit f58ca43785025959362a75e2e8228b2558882ee7 Author: VMware, Inc <> Date: Tue Mar 29 13:02:07 2011 -0700 [unity win32] Turn off unity capability on session lock/disconnect. Signed-off-by: Marcelo Vanzin commit d72f6f32b2b95f7f03900acecd3156d818b0b0d8 Author: VMware, Inc <> Date: Tue Mar 29 13:01:30 2011 -0700 GHI/X11: Strip window IDs passed to GHI_GetBinaryInfo. The query portion of these URIs confused GHI/X11 such that it didn't recognize regular .desktop files. This led to many failures to return application names and icons. Example: file:///usr/share/applications/gnome-panel.desktop?windowXID=1358157 results: friendlyName: gnome-panel.desktop?windowXID=1358157 icons: [none] Signed-off-by: Marcelo Vanzin commit 8a92197c33a707ffe6ba150d28ea438152702aaa Author: VMware, Inc <> Date: Tue Mar 29 13:01:06 2011 -0700 Unity: Fix the set desktop work area parser. The desktop work area parser code was touched when it was factored out of lib/unity/unity.c to services/plugins/unity/unityTclo.cpp. This introduced a bug where the same work area was processed repeatedly rather than parsing subsequent work areas. Signed-off-by: Marcelo Vanzin commit 441b0fcc1bc85f93127998ddd9aa57df5af4c086 Author: VMware, Inc <> Date: Tue Mar 29 13:00:52 2011 -0700 Unity/X11: Spam the vmtoolsd log less. Signed-off-by: Marcelo Vanzin commit 6ea8e38aef331ccb1cd14fecd2c6a2f3c8c7378c Author: VMware, Inc <> Date: Tue Mar 29 13:00:38 2011 -0700 fix tools build with FileIOAligned_Malloc Signed-off-by: Marcelo Vanzin commit 8fb008857d1fed6138a0e4a71813b9e2e414e84a Author: VMware, Inc <> Date: Tue Mar 29 13:00:24 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit aec6f246d23acecc76e5338aaeab38ffd67b6eb6 Author: VMware, Inc <> Date: Tue Mar 29 12:59:35 2011 -0700 GHI/X11: Scale icons to fit in GuestMsg transport. GHI/X11 used to scale icons down to fit over the backdoor. The scaling was stripped when alternate icon transport was introduced for Windows, since transport details shouldn't be handled at this level. In a perfect world, I'd leave it to GHI's TCLO layer to handle scaling to fit within GuestMsg limits, but that's more of a PITA to add than it's worth. So, instead, I'm taking the easy/lame way out and down- scaling icons at the source, relying on GdkPixbuf's scaling routines to do the heavy lifting. (NB: This is just bringing back our old scaling code.) Signed-off-by: Marcelo Vanzin commit 9940452a19f1dd26bf3af8986aaab4be830a774b Author: VMware, Inc <> Date: Tue Mar 29 12:58:26 2011 -0700 lib/file: __FUNCTION__ Signed-off-by: Marcelo Vanzin commit 4ced9c4bc1aba88dae0d772de28b0b8d9c9e8a1a Author: VMware, Inc <> Date: Tue Mar 29 12:58:14 2011 -0700 Translate EEXIST into ENOTEMPTY for Posix guests. When the user executes DeleteDirectoryInGuest api with recursiveflag set to FALSE, vix code calls File_DeleteEmptDirectory() and it internally calls rmdir() function. If the specified directory is not empty, rmdir fails and errno is set to different values on linux and solaris. To maintain consistency, modified the code to translate EEXIST into ENOTEMPTY error for Posix guests. Signed-off-by: Marcelo Vanzin commit 1d5cc78bab90be338205c2d9e0119229fd1348dc Author: VMware, Inc <> Date: Tue Mar 29 12:57:11 2011 -0700 hgfs: Clean up Fix a few comments, including misspellings. Fix a few wrapped lines. Signed-off-by: Marcelo Vanzin commit ec98d0c089d1e68d81fc8bdbb47e5054e02bc650 Author: VMware, Inc <> Date: Tue Mar 29 12:56:39 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ca3c52438d1133d3f321d542a3b266e49632f118 Author: VMware, Inc <> Date: Tue Mar 29 12:56:24 2011 -0700 lib/misc: let's have only one SystemTimer routine. SystemTimerUS becomes an inline around SystemTimerNS. Signed-off-by: Marcelo Vanzin commit de3b145342e3be5b69a4b22d02f491166330c399 Author: VMware, Inc <> Date: Tue Mar 29 12:56:04 2011 -0700 Add vmblockmounter to open-vm-tools Now that we removed code that mounts vmblock FS on Solaris/FreeBSD from vmware-user-suid-wrapper we need to package vmblockmounter in open-vm-tools. Signed-off-by: Marcelo Vanzin commit b10ee6d4834b1f7d6be7c26222dfadb2b0081928 Author: VMware, Inc <> Date: Tue Mar 29 12:53:28 2011 -0700 lib/string: broken handling of groups This caused a hang on Windows but not elsewhere. Signed-off-by: Marcelo Vanzin commit 5035d21366e5567d6b1e6e99011d5e682c146f89 Author: VMware, Inc <> Date: Tue Mar 29 12:52:51 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4ca1a673f8d4ca5bcbaea5915a42571ef28443f7 Author: VMware, Inc <> Date: Tue Mar 29 11:56:33 2011 -0700 Split VMCI_Init() into shared and host part. The initialization routine for the VMCI components in vmciDriver.c covers both components shared between guest and host, and components only relevant to the host. This change splits them into two routines, and updates the host drivers to use the new two routines. Signed-off-by: Marcelo Vanzin commit 1cbaa9e9c0ee73f1fa7565231cdd1e0d5669a1e4 Author: VMware, Inc <> Date: Tue Mar 29 11:56:01 2011 -0700 Need to exit VMCI datagram component cleanly. Verifier caught this when testing enable/disable through Device Manager. We need to call VMCIDatagram_Exit() with the unified code. Signed-off-by: Marcelo Vanzin commit 3390a550564af844ddbd310c8bd6f233ed101b88 Author: VMware, Inc <> Date: Tue Mar 29 11:55:17 2011 -0700 Internal branch sync. Included in this change: . DnD: avoid crashing when clipboard doesn't have UTF-8 data. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 212e5b78b19190da706a9e8191c8fea8aa159c70 Author: VMware, Inc <> Date: Tue Mar 29 11:54:50 2011 -0700 Do not toggle vmblock from vmware-user-suid-wrapper Utilize the new mount utility instead and perform all manipulations from the system startup scripts, thus not giving malicious users chance to exploit races between performing ownership checks and changing permissons and mounting. Signed-off-by: Marcelo Vanzin commit 992f8c38c78b0339237fda95f90bacef10ff8736 Author: VMware, Inc <> Date: Tue Mar 29 11:54:30 2011 -0700 Remove vmciGuestKernelIf.c on Linux, Windows, Solaris This change moves the functionality of vmciGuestKernelIf.c to vmciKernelIf.c on all guest platforms except MacOS. On MacOS, the functionality in vmciGuestKernelIf.cpp is more tightly coupled with the methods exported by the driver object, so that is left alone for now. Added compat_pci.h and compat_ioport.h to host driver tarball. Signed-off-by: Marcelo Vanzin commit d5e1d5fadeb599af893a3e32136301e04fc7e8a3 Author: VMware, Inc <> Date: Tue Mar 29 11:54:21 2011 -0700 Unity/X11: Gracefully handle NULL desktop work area RPCs. Should the host UI issue an RPC like unity.desktop.work_area.set 0 Unity/X11 will explode with a NULL pointer dereference, because of an incorrect assumption that there would be at least 1 parameter. Signed-off-by: Marcelo Vanzin commit 8a22f85b064640f0b1fd3c35d1a1818cb5bd2eec Author: VMware, Inc <> Date: Tue Mar 29 11:53:55 2011 -0700 lib/string: support a fixed locale for "%f" output Signed-off-by: Marcelo Vanzin commit 129fe1eff5cc6743179ef896bd9938228a2f13ba Author: VMware, Inc <> Date: Tue Mar 29 11:53:39 2011 -0700 lib/string: null is for pointers; NUL is a character Fix the comments. Signed-off-by: Marcelo Vanzin commit c7dfc23e3ccb7bae9af5b0c75ea9e8879739cde9 Author: VMware, Inc <> Date: Tue Mar 29 11:53:26 2011 -0700 lib/string: pretty up before change Make things nice for a big change coming next. Signed-off-by: Marcelo Vanzin commit d729aca40433504b7cb4b2164b9fffde3af558bb Author: VMware, Inc <> Date: Tue Mar 29 11:53:07 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e5e0ff47b8ed51f3a642f1b573f8421b88e92821 Author: VMware, Inc <> Date: Tue Mar 29 11:52:07 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6ec1a4ce5c2844f29036f354b9f23e2c6e1d3706 Author: VMware, Inc <> Date: Tue Mar 29 11:51:28 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a336498ba3b384979bcbe548e2731ecf8442165d Author: VMware, Inc <> Date: Tue Mar 29 11:51:10 2011 -0700 Unity/X11: Handle window titles encoded with COMPOUND_TEXT encoding. COMPOUND_TEXT is a string type used to encode characters outside the ASCII range, and it may be used to encode window titles. Unity/X11 ignored all such titles, so the host UI assumed there was no title. Whoops. This change employs GDK to do the heavy lifting for us. Signed-off-by: Marcelo Vanzin commit 910670c979351c6c10d0bdb14bbbd64e7dd747ed Author: VMware, Inc <> Date: Tue Mar 29 11:51:00 2011 -0700 Unity/X11: Look up KDE applications with kde4- prefix. Under OpenSUSE 11.2 (and possibly others), KDE applications' .desktop files may be installed under /usr/share/applications/kde4, so in order to find kcalc with Gio::DesktopAppInfo, we have to search for "kde4-kcalc". See http://standards.freedesktop.org/menu-spec/latest/ar01s04.html#menu-file-elements for details. Signed-off-by: Marcelo Vanzin commit a1e1ae420939e81baaeaeab7ab954eac4e016723 Author: VMware, Inc <> Date: Tue Mar 29 11:50:34 2011 -0700 Fix disagreement on buffer sizes in guest info plugin. The info cache only allowed 100 bytes (MAX_VALUE_LEN), while the buffer that held the host name allowed 255 (to follow what the man page says). Make both agree. Signed-off-by: Marcelo Vanzin commit de839f1bcfe4c3731a151d42a4fb5a3757b1f2d1 Author: VMware, Inc <> Date: Tue Mar 29 11:49:42 2011 -0700 This is part 12 of a change to support Nested VMs. This part removes vmciUtil.* and vmciInt.h from the guest driver and uses vmciDriver.* instead. I'm cheating here, by copying some of the old vmciUtil code into vmciDriver. The change after this will unify more of the code. Everything under common/guest is gone with this change. Signed-off-by: Marcelo Vanzin commit ff053276eed4e8b23358cf0d8935617826073df0 Author: VMware, Inc <> Date: Tue Mar 29 11:49:01 2011 -0700 Introduce a connection timeout for VMCI stream sockets When attempting to connect a VMCI Stream socket to a context, where VMCI Sockets isn't loaded, the connecting process will hang (or time out if the process itself has specified a timeout on the connect). This change makes all connection attempts default to time out after 2 seconds (on ESX, we should be able to do about a thousand connection attempts in that time period). For asynchronous connects, we schedule a timeout function, that changes the socket state on failed connection attempts and signals the error to the owner. The connect timeout can be changed through a new VMCI Socket specific socket option SO_VMCI_CONNECT_TIMEOUT. Testing of this socket option and the timeout in general has added to the sockoptVmciTest in the vsock test suite. This change also makes VMCI Sockets on vmkernel report socket errors in the read set on select to make UWs compatible with Linux. Signed-off-by: Marcelo Vanzin commit 022c03f5a5ed25057b1e77230e416c995a9eac6f Author: VMware, Inc <> Date: Tue Mar 29 11:48:42 2011 -0700 Make unified queue pair support compile on Solaris This change adds a few empty queue pair related declarations for Solaris, and changes the Solaris make file to pick up the unified vmciQueuePair file. The VMCICopyToUser and VMCICopyFromUser are not used on Solaris, and since they deviated from all other platforms, I retired them. Signed-off-by: Marcelo Vanzin commit 03cc89cfd2710a46f000e86a74296eb87c94b30e Author: VMware, Inc <> Date: Tue Mar 29 11:48:16 2011 -0700 Unify VMCI guest and host queue pair code. This change unifies the two VMCI queue pair implementations for guest and host. The main part of the change is moving the guest functions to the host module, and add the use of the VMCI routing function in the vmciQPair module to correctly select either guest or host routes. For vmkernel, we still disable most of the guest functionality, since the vmkernel has its own implementation of much of the queue pair code anyway. To reduce the vmkernel only part of the queue pair code is left as a future clean up task. Other notable changes were that for both Linux and Mac, the host and guest tracked queue pairs differently (VMCIQueueKernelIf). For Linux, it was straight forward to combine the two at the cost of adding a pointer to the VMCIQueueKernelIf structure in the guest. For Mac OS, the host and the guest take completely different approaches, so the unified VMCIQueueKernelIf is now a union of the host and guest versions. Signed-off-by: Marcelo Vanzin commit 5acdf3a4083dcf59d6b60d859d1b070912bbaf98 Author: VMware, Inc <> Date: Tue Mar 29 11:47:07 2011 -0700 Fix unresolved symbols in Fusion VMCI kext A few symbols where used but not defined in the Fusion VMCI kext. Signed-off-by: Marcelo Vanzin commit 82ad01c30206937ac363da70fc2555e6f4798788 Author: VMware, Inc <> Date: Tue Mar 29 11:46:25 2011 -0700 Register new HgfsSeek function in file_operations structure. Please check bug 667029 for more details. On Ubuntu 2.6.37, seek() functions for any file residing in HGFS share fail with an error. We are not registering any explicit function for llseek operation in file_operations structure. This could be an issue with Ubuntu latest release. Modified the code to design a new HgfsSeek function [ a thin wrapper over generic_file_llseek()] and register that for llseek operation in file_operations. Signed-off-by: Marcelo Vanzin commit 55e3133345e97d05d9d5d99e6e975ab3f3567cec Author: VMware, Inc <> Date: Tue Mar 29 11:45:42 2011 -0700 This is part 11 of a change to support Nested VMs. This unifies the doorbell code. We use the host doorbell code, with resources and contexts, for both drivers. The decision about where to deliver a doorbell is made using the routing code that was added with the datagram unification. The majority of the changes are in vmciDoorbell.c. Signed-off-by: Marcelo Vanzin commit 0e5163e0c8c2337b1bf8035bcd1c8b30b55bdd13 Author: VMware, Inc <> Date: Tue Mar 29 11:44:49 2011 -0700 Do not install mount.vmhgfs as suid binary There is no reason for mount.vmhgfs to be a uid binary, since it is being called: - by system startup scripts (so naturally we have enough privileges); - by the system instance of vmtoolsd on behalf of vix api, and vmtoolsd is running as root so does have enough privileges as well. Signed-off-by: Marcelo Vanzin commit 4a51d7f4b07227415884cb2a5164ef9a7f318f60 Author: VMware, Inc <> Date: Tue Mar 29 11:44:30 2011 -0700 Add a config option to disable the perf monitor. Signed-off-by: Marcelo Vanzin commit 0e5ef9a0a8b64007ede78dc43f7d830063157b44 Author: VMware, Inc <> Date: Tue Mar 29 11:44:07 2011 -0700 Make Linux reference count vsock module on file ops. Bug 681873 reports that the linux vsock module can be removed while the vsock device is opened. The vsock file operations registered with the device do not specify the module itself as the owner, and therefore the kernel file operation code cannot correctly reference count the module on open/close. This change adds the vsock module as owner, which fixes the issue. All other function tables registered, e.g., the socket operations, do set the owner field (as does the VMCI kernel module). Signed-off-by: Marcelo Vanzin commit e6c8e666379c2577c56ef1238e17dc97d5091e80 Author: VMware, Inc <> Date: Tue Mar 29 11:43:36 2011 -0700 Release VMCI context when determining route. Forgot to release the context when we try to route to a VM (which has a context) on a host. Release the context so we do not leak it. Otherwise VMK will panic when we destroy the heap. Signed-off-by: Marcelo Vanzin commit fcef30ee01c74282282df6b09df33148ba9c8c23 Author: VMware, Inc <> Date: Tue Mar 29 11:43:13 2011 -0700 Publish Mac OS's short name in sync with VMX value. Signed-off-by: Marcelo Vanzin commit d2ed2f249e20386528d0872940336545f3052997 Author: VMware, Inc <> Date: Tue Mar 29 11:41:19 2011 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 268b62ba5a2ed3824e45d8afd0bc60ac39ef15ff Author: VMware, Inc <> Date: Tue Mar 29 11:40:50 2011 -0700 Update News/ChangeLog for open-vm-tools 2011.02.23. Signed-off-by: Marcelo Vanzin commit f11a7b56d3cf8088765e175e87e84bc960c7afe6 Author: VMware, Inc <> Date: Tue Mar 29 11:40:27 2011 -0700 lib/string: simple cleanup Trivial cleanup before a change. Signed-off-by: Marcelo Vanzin commit 5606c8b0d641a8a6c6fc517dc4b694753e3e0490 Author: VMware, Inc <> Date: Tue Mar 29 11:40:08 2011 -0700 VIX: don't allow process ID reuse to confuse ListProcesses. Signed-off-by: Marcelo Vanzin commit ac85f94c6afd22e063f6690618155adc9004a413 Author: VMware, Inc <> Date: Tue Mar 29 11:39:23 2011 -0700 Replaced deprecated functions with new ones. Replaced stat64 and lstat64 with stat and lstat in Mac OS specific code. Signed-off-by: Marcelo Vanzin commit 27f5736926f622dcd7a6d0f0b9048cc5ea292270 Author: VMware, Inc <> Date: Tue Mar 29 11:37:00 2011 -0700 Cleanup some VMCI logging Standardize the format we use for logging IDs and handles, along with some other cleanup. This just covers the common code. Signed-off-by: Marcelo Vanzin commit ea58d4b5262d2e0141a54c74b4c2466851326dd7 Author: VMware, Inc <> Date: Thu Feb 24 15:43:53 2011 -0800 Updating open-vm-tools version for release 2011.02.23-368700. Signed-off-by: Marcelo Vanzin commit 96cf4718ac0aff1743e50a2165599306ba442fe1 Author: VMware, Inc <> Date: Thu Feb 24 15:02:04 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d2cd5451060a51c17501afb03dff9b337327a083 Author: VMware, Inc <> Date: Thu Feb 24 15:01:43 2011 -0800 open-vm-tools: cleanup rpcgen invocations. Create a new script that hides most of the mess involved in executing rpcgen from outside the source directory. Signed-off-by: Marcelo Vanzin commit 864bf2f5d47bce54fdba3fedbbe5ca0ffe5262e7 Author: VMware, Inc <> Date: Thu Feb 24 15:01:12 2011 -0800 Unify the VMCI datagram code. We now use the host datagram code, with resources and contexts, for both drivers, with only a few tweaks. We have a new component that performs routing, and using the decision from that, we dispatch to host or guest as appropriate. There are obviously still some TODOs. We don't yet create a context for the guest itself when acting as a guest, and this is necessary to get the privs flags right; for now, we steal the original guest code for that. And getting the context ID is still determined by which driver we build. Most of this change is in vmciDatagram.c and vmciRoute.c; the rest was necessary to get the files to compile for both drivers, on all platforms. Bleh. Also cleaned up a bunch of whitespace/tabs. Signed-off-by: Marcelo Vanzin commit 97632de98fa3f29fd3b207c7b10d21bef0899de8 Author: VMware, Inc <> Date: Thu Feb 24 14:59:38 2011 -0800 open-vm-tools: minor compilation fix. Avoid unused warning. Signed-off-by: Marcelo Vanzin commit 9f759486c257ef2c48b81cf74038b92520f7d1f5 Author: VMware, Inc <> Date: Thu Feb 24 14:59:27 2011 -0800 Allow VMCI Socket connections between VM and host app of same user VSockets created by a host process should be trusted to talk to a VM started by the same user. This change implements this by: 1) Storing a user identification of the user that created the socket (the owner). 2) Making child socket inheret the owner. 3) Modify the notion of trusted in the VMCI Socket world to include sockets created by the same user as the owner of the VM. Concerning step 3: Since the VMCI Socket modules notion of trusted is now more inclusive than that of the VMCI kernel module, all datagram handlers on the host are now registered as trusted by the VMCI Socket module. The datagram handlers themselves now perform the trusted check, and discards datagrams accordingly. This was already the case for the control datagrams for VMCI sockets, but now regular VMCI Datagram sockets do the same. Since the check is not free (the VMCI kernel module is likely to access hash tables and grab locks to determine the owner of a context) - a one entry "trust" cache has been created for each socket. Signed-off-by: Marcelo Vanzin commit 0575d4e88da065c039d554fb22f4f50775c6d947 Author: VMware, Inc <> Date: Thu Feb 24 14:58:32 2011 -0800 Prepare guest VMCI queue pair code for unification This change has no functional change but prepares the merging of the guest and host queue pair code by: 1) renaming guest queue pair functions. 2) make the queue pair list functions take an argument, so they can be used for both host and guest lists. Signed-off-by: Marcelo Vanzin commit 0e62d59ad136af98c41e38c3bb8b919094cb8b04 Author: VMware, Inc <> Date: Thu Feb 24 14:58:14 2011 -0800 open-vm-tools: add vmtoolsd translations. Also fix catalog name for the toolbox cli. Signed-off-by: Marcelo Vanzin commit b35b35643299a9f62bb57290585ecb27d98ba1bb Author: VMware, Inc <> Date: Thu Feb 24 14:57:32 2011 -0800 open-vm-tools: propagate --with-linuxdir value to makefiles. Signed-off-by: Marcelo Vanzin commit 34e2001cbdbc3456ecfa234d1f4a670759171983 Author: VMware, Inc <> Date: Thu Feb 24 14:57:13 2011 -0800 Fix KDE file copy and paste. There were a couple of bugs in how we respond to paste requests. First, we can be called multiple times. So we needed a guard to check if we are already in the process of transferring files. Second, we should never clear the selection data unless we see an error or fail case of some kind. While it does not affect GNOME environment, looks like KDE can get really confused by this (the symptom is a prompt for path name which has been reported often in bugs over the past year I have been involved with DnD.) Signed-off-by: Marcelo Vanzin commit ac16e64964a17158fd735e9a2e679c9b70ecce24 Author: VMware, Inc <> Date: Thu Feb 24 14:56:58 2011 -0800 Make the VMCI host driver remember the owner of a context ID. Signed-off-by: Marcelo Vanzin commit ab758f4fab40fd41de63de5b9a861e0b85395e6a Author: VMware, Inc <> Date: Thu Feb 24 14:55:25 2011 -0800 unity: Set 'taskbar' capability for Linux & Win32. This capability really is supported by both implementations. :) Signed-off-by: Marcelo Vanzin commit 420d3ab90b2a558da43bcf520be883b8a6066449 Author: VMware, Inc <> Date: Thu Feb 24 14:55:09 2011 -0800 Fix closing of open handles for searches on "Shared Folders". Our HGFS server callback from the vmdb for UI updates always force closes any open handles that are not on any shares. This was done even if no shares had been added or removed. This had the side-effect of alwasy closing the handles of searches for the base of the name space i.e. "Shared Folders" folder. This meant a race where those clients could end up getting invalid handle returned for a directory read of the virtual folder. It is better to return possibly stale (unlikely) shares for that directory read than always fail even if no shares changed. Signed-off-by: Marcelo Vanzin commit d391e1df8c5f4d9a957500a36c6beadc61029f06 Author: VMware, Inc <> Date: Thu Feb 24 14:54:13 2011 -0800 toolbox-cmd: show full path to current scripts Let's show full path to scripts when executing vmware-toolbox-cmd script XXX current Scripts with relative paths are assumed to be under tools install dir. Signed-off-by: Marcelo Vanzin commit fa46e78ae9b9858e296b325ec9221ef78e544cab Author: VMware, Inc <> Date: Thu Feb 24 14:53:40 2011 -0800 Add constant predicates to help gcc improve lssb and mssb code generation. Signed-off-by: Marcelo Vanzin commit 536f128191a743d90f6c9070d52ba3bc36754467 Author: VMware, Inc <> Date: Thu Feb 24 14:52:41 2011 -0800 Pick up a review comment A defined for the unicode sustitution character seemed in order. Do it and use it. Signed-off-by: Marcelo Vanzin commit cd889fcdab2c1924416386640e36b784ea93420b Author: VMware, Inc <> Date: Thu Feb 24 14:49:26 2011 -0800 Remove Hostinfo_HTDisabled The function is no longer used. While there, keep going and rip out some old COS code. Nowadays, the vmkcall will always work. Signed-off-by: Marcelo Vanzin commit 113f3a90878b19b49ba9eee3fb51d1807dffbbeb Author: VMware, Inc <> Date: Thu Feb 24 14:48:58 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 336796e20fb19b2ddb37b3becba645b0515475b7 Author: VMware, Inc <> Date: Thu Feb 24 14:48:09 2011 -0800 Retire VMCIQueuePair_AllocPriv Nothing uses VMCIQueuePair_Alloc anymore, since we got rid of the non-privilege public version (VMCIQPair_Alloc always takes privilege flags). This change deletes the old version of VMCIQueuePair_Alloc and renames VMCIQueuePair_AllocPriv to VMCIQueuePair_Alloc. Signed-off-by: Marcelo Vanzin commit 17442101bb309fc431542154522c1455f8260bf8 Author: VMware, Inc <> Date: Thu Feb 24 14:47:29 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit edc550f9f7bdd4d076dccbe636f208e7a6de4d78 Author: VMware, Inc <> Date: Thu Feb 24 14:46:53 2011 -0800 lib/file: Don't Panic More UTF8 conversion panic protection. Signed-off-by: Marcelo Vanzin commit 761c65b5f87baeb8075e8c8be19a3cf945b93d85 Author: VMware, Inc <> Date: Thu Feb 24 14:46:34 2011 -0800 lib/file: Don't Panic! When reading a directory, don't panic if the file name is not repesentable in the default encoding. Signed-off-by: Marcelo Vanzin commit 5b313bd6dfe5ca78518bc00d482324ef290177cf Author: VMware, Inc <> Date: Thu Feb 24 14:46:20 2011 -0800 Condition some code on the glib version. So open-vm-tools can compile with older glib (since its baseline is glib 2.6.0 still). Signed-off-by: Marcelo Vanzin commit 747b17890de05180fd4494dd7a1695d5e7bdd16d Author: VMware, Inc <> Date: Thu Feb 24 14:46:03 2011 -0800 lib/misc: fix a comment Trivial comment alignment Signed-off-by: Marcelo Vanzin commit 7d40a9f5b6ffb32d758e432cd322e2a21ac80cb1 Author: VMware, Inc <> Date: Thu Feb 24 14:45:50 2011 -0800 lib/file: remove dead code I see dead code. Signed-off-by: Marcelo Vanzin commit 5b45995659a290b4e3dd05f8ada0f31aa98234e0 Author: VMware, Inc <> Date: Thu Feb 24 14:45:38 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 71dbd58327d9b1091a28558b82c1db9df22250e5 Author: VMware, Inc <> Date: Thu Feb 24 14:45:07 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 20f77ad638117d7d6d342b7d8e9c60c775f3ae3b Author: VMware, Inc <> Date: Thu Feb 24 14:44:45 2011 -0800 Remove unused VMCI buffer routines. Signed-off-by: Marcelo Vanzin commit ee7bdea1d7cc2567914b34dcb860788181b5fe3e Author: VMware, Inc <> Date: Thu Feb 24 14:42:29 2011 -0800 GHI/X11: Don't pass NULL to strcmp. Xdg_DetectDesktopEnv may return NULL, so its return value shouldn't be passed to strcmp unchecked. Rather than checking ourselves, we'll just g_strcmp0 do it for us. Signed-off-by: Marcelo Vanzin commit 1f1c0f394e69ac7faaa89dfbf50c4adde96820be Author: VMware, Inc <> Date: Thu Feb 24 14:42:10 2011 -0800 Ensure POSIX errno decode is done portably In cross platform code we must use POSIX strerror to ensure that a POSIX errno value is translated to a string portably. Signed-off-by: Marcelo Vanzin commit 441a0f386fd22585e65294db2e95ba9d9df7aa03 Author: VMware, Inc <> Date: Thu Feb 24 14:41:52 2011 -0800 Fix Linux tools build breakage Do a compile-time check instead of a run-time check for Mac OS. Signed-off-by: Marcelo Vanzin commit d089df57fa6afb174dff884a8fa2386030d4ed1d Author: VMware, Inc <> Date: Thu Feb 24 14:41:11 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 84f2b4f501c2bace4d3dcaff6838a7c3a41b4c21 Author: VMware, Inc <> Date: Thu Feb 24 14:39:23 2011 -0800 Implement capabilities for DnD/CP. Implement capabilities exchange and add support for new isolation settings in VMX. The general idea is that each side (host, guest) transmits to the controller its capabilities (DnD/CP support, ability to provide certain clipboard types) in a PING request. VMX file settings can be used to disable a variety of clipboard content, direction combinations. For example, RTF DnD in the guest to host direction can be disabled. In the PING response, controller will provide a requisition to the request, telling the host or guest what types of DnD/CP content are allowed on the clipboard. When preparing the clipboard for transmission, the host or guest checks this requisition and will not supply formats that are not allowed. The controller will enforce this by removing any clipboard contents that do not match the published requisition, so in case the guest or host does not do the right thing, or ignores the requisition in the ping reply, the controller will catch it. If any of this processing causes the clipboard received by the controller to be empty, the DnD or CP operation does not continue. Signed-off-by: Marcelo Vanzin commit bcd25e4914e07d89650e104a3ada954c5a0dbd51 Author: VMware, Inc <> Date: Thu Feb 24 14:38:21 2011 -0800 Internal branch sync. Included in this change: . DnD text from Windows guest to Linux guest is not working. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5f8c2cada9e7fa7c9cf7505309b58a56bc42b3de Author: VMware, Inc <> Date: Thu Feb 24 14:05:06 2011 -0800 Tools version updates. Signed-off-by: Marcelo Vanzin commit 894b5dcf36b8025c145fa48c5966fb7e123dfd17 Author: VMware, Inc <> Date: Thu Feb 24 14:04:22 2011 -0800 Hang in VMCISockets caused by uninitialized notification state. It turns out that a recent unload/shutdown fix broke the notification code. We don't call the notification functions when the qpair is invalid, to guard against touching the qpair after the device has shutdown, but some of those functions need to be called *before* a qpair is actually attached. There are actually a few of them, so rather than introduce a new macro for notifications that don't need qpairs, I've removed the qpair check from the macros and embedded it as necessary in the notification code. We also uncovered a problem where if the notification write window is less than a page we can underflow. Fixed on all platforms. Signed-off-by: Marcelo Vanzin commit 43c35c66f655d9ed7573b51e504607befd25224b Author: VMware, Inc <> Date: Thu Feb 24 14:02:17 2011 -0800 Remove processor counts from Hostinfo_GetCpuid We were calculating processor counts incorrectly, and the log message has been annoying folks. Signed-off-by: Marcelo Vanzin commit f7bd0935998908b427d4ab45f648d940e28274d2 Author: VMware, Inc <> Date: Thu Feb 24 14:01:31 2011 -0800 Get mac version from system_profiler. Signed-off-by: Marcelo Vanzin commit 5d6758d39c3d23e5f904126914ad319264b372de Author: VMware, Inc <> Date: Thu Feb 24 14:00:49 2011 -0800 Cosmetic change. Signed-off-by: Marcelo Vanzin commit f9bf8d1a1a472cb728b86448c1dc1b8789ab6edf Author: VMware, Inc <> Date: Thu Feb 24 13:59:59 2011 -0800 lib/unicode: simple cleanup Signed-off-by: Marcelo Vanzin commit 5ce03d50f48a1712440dd20b26530b20b7e02bd0 Author: VMware, Inc <> Date: Thu Feb 24 13:59:47 2011 -0800 Reference count the VMCI device. We must reference the device when we have clients attached, for example HGFS or vsock. Changed VMCI_DeviceGet() and VMCI_DeviceRelease() so that they reference count, and added new function VMCI_DeviceInUse() so that we can tell when the device is referenced during a query-for-stop IRP and fail if necessary. Signed-off-by: Marcelo Vanzin commit 490ddcabec4b32b76b124fb57495ab691767d0dd Author: VMware, Inc <> Date: Thu Feb 24 13:57:36 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cca3dbfd77ca2c20c2eac403fe29403a9c9c6fa3 Author: VMware, Inc <> Date: Thu Feb 24 13:52:22 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 739f80d67a6e3fc4832ee57a4bdd6fa18cbcd570 Author: VMware, Inc <> Date: Thu Feb 24 13:51:46 2011 -0800 Delete the vixUser plug-in (part 2). Signed-off-by: Marcelo Vanzin commit 4ea8f6eda60282588cde6146da366dda93c977f0 Author: VMware, Inc <> Date: Thu Feb 24 13:51:18 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4a55260e6c9dee255687ec3641d44a29239895ce Author: VMware, Inc <> Date: Thu Feb 24 13:50:36 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8a91f009bef541f8d120351b0d45636652a9fe47 Author: VMware, Inc <> Date: Thu Feb 24 13:49:12 2011 -0800 Always register VMCI Socket control message handlers on Linux The VMCI Socket code on Linux only registers an address family with the kernel as long as there are active sockets. As part of registering/unregistrering the address family, the VMCI Socket module also registers/unregisters the stream protocol control message handlers. This results in no control message processing being done, when there are no active sockets. For peers attempting to connect this results in control messages being silently dropped, and in the case of a connect, the connect will just hang. This change moves the registration of the control messages to the vsock module initialization, such that control messages will always be handled even if there are no active sockets. Note that this change also makes the VMCI Socket module loading fail, if the VMCI device isn't available. This isn't strictly necessary, but the vsock module isn't all that useful without the VMCI device. Signed-off-by: Marcelo Vanzin commit 12bae50fe09b1deb57012568f5180e4fb1a822b4 Author: VMware, Inc <> Date: Thu Feb 24 13:48:22 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 98047ea094cc59b463ed4a7615d21db74cc89862 Author: VMware, Inc <> Date: Thu Feb 24 13:47:58 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 84efb1cb393b03030af7f0fd2a2f65b25e505e3c Author: VMware, Inc <> Date: Thu Feb 24 13:47:15 2011 -0800 Wrap VMCI list operations Both the guest and the host VMCI drivers use list operations, that clash with other header files, e.g, circList.h. This change wraps all list operations in the common modules, such that we can decide on which list implementation to use on a per platform basis. Signed-off-by: Marcelo Vanzin commit 00f470c89b2b75eac9f0e2f3a6f7a386ee81a46a Author: VMware, Inc <> Date: Thu Feb 24 13:46:13 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d89bd990bedbf922c60227c23c631d6e0bfafa6d Author: VMware, Inc <> Date: Thu Feb 24 13:45:55 2011 -0800 [ghi] Remove trash folder RPCs. It was decided not to add the corresponding elements to the Fusion UI, and AFAIK no host has ever used these RPCs, or plans to. Signed-off-by: Marcelo Vanzin commit 9490ec49f0eb15bf6d16a35879999a52839a71ca Author: VMware, Inc <> Date: Thu Feb 24 13:44:55 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 93f213e8175fc4acd92512493047c652d1bd2305 Author: VMware, Inc <> Date: Thu Feb 24 13:43:33 2011 -0800 Add lib/lock to two open-vm-tools automake files lib/PanicDefault now needs lib/lock, so adding it to the two tools binaries that link PanicDefault. Signed-off-by: Marcelo Vanzin commit c34a4d39b9c991e926085d3c6fc2f655cf640537 Author: VMware, Inc <> Date: Thu Feb 24 13:43:04 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0b92e47e745a3ce433eb694026466ad9e090a343 Author: VMware, Inc <> Date: Thu Feb 24 13:42:38 2011 -0800 open-vm-tools: remove vixUser plugin. Plugin has been deprecated and removed from Tools. Signed-off-by: Marcelo Vanzin commit 9857f74e133fb1659874d80bfe56c033fa296291 Author: VMware, Inc <> Date: Thu Feb 24 13:41:32 2011 -0800 Panic_Panic needs to set mxInPanic flag The userlock module relies on this flag to not get into a panic loop from lock rank violation when we are trying to dump core. This is the default Panic() implementation used by UI and other apps. For other apps that stub out Panic(), they are not likely to use MXUser locks. Signed-off-by: Marcelo Vanzin commit 68bc4b2b19e4ed23937f2146cdd5a2ddae4d42c6 Author: VMware, Inc <> Date: Thu Feb 24 13:41:03 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 95fff42e8a3efbd82117dd3698083829158e973b Author: VMware, Inc <> Date: Thu Feb 24 13:39:56 2011 -0800 Remove PCPU log message Signed-off-by: Marcelo Vanzin commit 55bb927352e08722cc24c3a58d091643c147f3c3 Author: VMware, Inc <> Date: Thu Feb 24 13:38:53 2011 -0800 TechPubs message edits Signed-off-by: Marcelo Vanzin commit 88b3f0343b60905267a1440aa7e01cda9a9708b2 Author: VMware, Inc <> Date: Thu Feb 24 13:38:26 2011 -0800 Bump tools version to "next unstable". Signed-off-by: Marcelo Vanzin commit 6a3baf65ac2a601bd879caf4a32b11bcf188cbf6 Author: VMware, Inc <> Date: Thu Feb 24 13:37:42 2011 -0800 Fix error code check. This was also causing a compiler optimization that masked the fact that the localized message was missing in the catalogs. Signed-off-by: Marcelo Vanzin commit 1933c5ea7c76e2bede6486d6caca63510d58b202 Author: VMware, Inc <> Date: Thu Feb 24 13:37:17 2011 -0800 Internal branch sync. Included in this change: . make quiescing error messages more generic. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f8069ac3705045a295844cd488ac08796f43b0e4 Author: VMware, Inc <> Date: Thu Feb 24 13:36:27 2011 -0800 lib/lock: simplify rank checking while panicing If we detect a rank violation in the locking code and we're not already panicing, making a list of the locks held is quite appropriate; the locking code will then explcitly panic. If we panic due to a non-locking cause, rank violation checking and list printing (but not panicing) can get pretty noisy - we have ranks screwed up as we try to panic and/or coredump. If the locking code is the source of a panic due to a rank violation only print the first list; other things are highly likely to be noise. Signed-off-by: Marcelo Vanzin commit 0aa8ba0629e6ae01c678404749ea3120f4701274 Author: VMware, Inc <> Date: Thu Feb 24 13:35:47 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a17e39ca6f4910520eb3fe7ab258251d7230af7e Author: VMware, Inc <> Date: Thu Feb 24 13:35:15 2011 -0800 lib/misc: make DynBuf_Destroy not have a nasty side effect Dynbuf_Destroy doesn't quite put a dynbuf back as it would be after initialization and may lead to strange problems. Fix this. Signed-off-by: Marcelo Vanzin commit 628850dded6baca82c57f459489ba3bed36ca964 Author: VMware, Inc <> Date: Thu Feb 24 13:34:31 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0e295dc0a8a169bffee2e69bba21bc08f1b52c70 Author: VMware, Inc <> Date: Thu Feb 24 13:31:21 2011 -0800 Ignore get/set hidden attribute on Linux host. This is required to allow applications like svn to function. Signed-off-by: Marcelo Vanzin commit 2e85dc9dee15f4134f53f434aed21e2015f04f56 Author: VMware, Inc <> Date: Thu Feb 24 13:28:58 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ac06e68b6c5c69f896da28ed39bed6ee84ccf175 Author: VMware, Inc <> Date: Thu Feb 24 13:28:10 2011 -0800 lib/lock: fix stdDev The standard deviation computation is incorrect when then there are multiple observations and they are all 0. Signed-off-by: Marcelo Vanzin commit de8a2d1ed3dfcf9bec3a2ed3ecb19d873e2731f9 Author: VMware, Inc <> Date: Thu Feb 24 13:27:51 2011 -0800 vmblock-fuse: use glib's atomic operations Instead of using our implemenation of atomic operations from lib/misc which has a ton of dependencies, let's use glib's implementation. Signed-off-by: Marcelo Vanzin commit c110ce5cd1fdbc90a13a999e3d793c6c317ba6b0 Author: VMware, Inc <> Date: Thu Feb 24 13:27:04 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 11bef6c40bc20b6bace35628c25adb30299c238d Author: VMware, Inc <> Date: Thu Feb 24 13:25:41 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit dd22234abf8255cac6db95fe8358d3fef3035930 Author: VMware, Inc <> Date: Thu Feb 24 13:25:21 2011 -0800 Internal branch sync. Included in this change: . VIX: properly check file permissions before overwriting. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 614013b453f6ede4bc3a08bb62da6b05d152444d Author: VMware, Inc <> Date: Tue Jan 25 18:13:55 2011 -0800 Updating open-vm-tools version for release 2011.01.24-354108. Signed-off-by: Marcelo Vanzin commit 60c470337c8932a6d9564130dcaf06c7a1a3df53 Author: VMware, Inc <> Date: Tue Jan 25 18:08:01 2011 -0800 Integrating fixes to unlocalized text in JP files. Signed-off-by: Marcelo Vanzin commit 341c55657289963f56a3888fb92b67f7653a38b3 Author: VMware, Inc <> Date: Tue Jan 25 18:07:25 2011 -0800 Support dnd/fcp with gvfs/kio This change implemented support for non-file scheme (smb, sftp ...) for DnD/FCP. Because it needs some glib functions, some code has to be repeated 4 times :(. Signed-off-by: Marcelo Vanzin commit 86b1a00758c257bf45579fba0b92f8bdf25b3d70 Author: VMware, Inc <> Date: Tue Jan 25 18:06:59 2011 -0800 lib/unicode: remove static in inline function We're wasting space with an static in an inline function in the .h. Relocate it to a safe location. Signed-off-by: Marcelo Vanzin commit 7fe1f126ff21cc4ae0fa032eeb73f7cb256344fb Author: VMware, Inc <> Date: Tue Jan 25 18:06:01 2011 -0800 Corrected typographical errors in file guard. Signed-off-by: Marcelo Vanzin commit ed349ce848438bf6fc9f681237701a450981f549 Author: VMware, Inc <> Date: Tue Jan 25 18:05:25 2011 -0800 powerOps: fix handling non-ascii power scripts on Ubuntu/Suse If conversion of script name to current locale fails try using original string (which should be UTF-8) and hope that shell will understand it. Note that conversions to system locale succeed on Fedora and RHEL (which set G_BROKEN_FILENAMES=1) and fail on Open SUSE and Ubuntu which expect everything to be pure UTF-8. Also Ubuntu is quite funky because when I switched system language to Russian LANG in terminals still was set as en_US.UTF-8; /etc/default/locale has to be edited manually. Signed-off-by: Marcelo Vanzin commit 2e56392c723807ffa5f0af6eeca0e6a433976498 Author: VMware, Inc <> Date: Tue Jan 25 18:05:14 2011 -0800 open-vm-tools: install catalogs in the right place. Add a script to help with the task since automake / POSIX make don't really help much when your rules are anything other than super trivial. Also rename / relocate the catalogs in open-vm-tools to follow the layout in the perforce tree more closely. Signed-off-by: Marcelo Vanzin commit 8697043e1d5bbec2a07753c461f7a6f5594ffcf7 Author: VMware, Inc <> Date: Tue Jan 25 18:04:35 2011 -0800 Handle VMCI device shutdown when clients are still attached. When Windows reboots/halts, it sends the VMCI device a shutdown PnP event. This event is sent even if the device is still referenced. Clients are supposed to handle IRP_MJ_SHUTDOWN (or similar) and detach, but if they don't, then it's possible for them to call us after the device is gone, at which point we can explode. Fixed so that we gracefully handle this. On a shutdown event: 1) Fail VMCI handle creation from this point on, but allow other calls, so that handles can be closed. 2) Inform vsock that the device is going away. 3) VSock fails DGRAM/STREAM creation from this point on. 4) VSock informs all open sockets that the device is going away. The sockets close their handles and their wait list is kicked so that they wakeup from recv() etc. 5) VSock closes the control channel. 6) VSock fails all creation calls from this point on, but allows other calls, so that sockets can be closed etc. Signed-off-by: Marcelo Vanzin commit 48d899b988fc5072b93b7130a4c9c228e3e793cd Author: VMware, Inc <> Date: Tue Jan 25 18:02:38 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e4fc5b62ed7937c984db1ceb0017b28b71ac63ca Author: VMware, Inc <> Date: Tue Jan 25 18:02:18 2011 -0800 TBB: missed file for Linux kernel module reap The vmblock build had references to skas1.c that I missed. (The symbol that skas1.c affects, VMW_SKAS_MMAP, is not used in our modules.) Signed-off-by: Marcelo Vanzin commit 4d3af908912a8b3e1c5d6a9c1a80b4af4fed9c4b Author: VMware, Inc <> Date: Tue Jan 25 18:01:59 2011 -0800 Limit VMCI queue pair memory to 128MB per device In the future, we will rewrite how the VMCI device allocates queue pairs, so that they will be located "on the device" and be exposed through the PCI address range. We should be able to provide up to a maximum of 128MB queue pair memory, so this change enforces that limit now. Signed-off-by: Marcelo Vanzin commit a79fe4e24e360b7cec277c97423f65aa101ebfb4 Author: VMware, Inc <> Date: Tue Jan 25 18:01:28 2011 -0800 Fix the build Check in the other file too Signed-off-by: Marcelo Vanzin commit f4ed00787d459e74dba1b6a9df7c92f17ed68120 Author: VMware, Inc <> Date: Tue Jan 25 18:01:17 2011 -0800 Cleanup some old Linux kernel code. Briefly: - VMW_HAVE_SK_WMEM_ALLOC wasn't even used. skas1.c is no longer needed - Aggressive trimming of compat files. Signed-off-by: Marcelo Vanzin commit e5a28fe9da8c0892cb6a1a22ed9e595c5e6653d2 Author: VMware, Inc <> Date: Tue Jan 25 18:00:38 2011 -0800 lib/misc: explain clearly about thread name that are too long Don't simply assert, help the developer. Signed-off-by: Marcelo Vanzin commit 67c1890360ae051b7b576bfb9dec26abc0f48294 Author: VMware, Inc <> Date: Tue Jan 25 18:00:10 2011 -0800 Fix log error path. I can't hit the crash, but the code looks pretty wrong. Call the right function in the log error path. Signed-off-by: Marcelo Vanzin commit ae30dbe1d9b0c8677958861c18e5100593c399d7 Author: VMware, Inc <> Date: Tue Jan 25 18:00:01 2011 -0800 Update VMCI guest files after internal code move. Signed-off-by: Marcelo Vanzin commit 964992fb750524532744a8ed09cf765278b79a78 Author: VMware, Inc <> Date: Tue Jan 25 17:59:43 2011 -0800 Fix a crash in rpcin error handling. Signed-off-by: Marcelo Vanzin commit de0fa33d87bc8acef201c29d6b2ecd1cde5e0711 Author: VMware, Inc <> Date: Tue Jan 25 17:58:59 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2bd8f752ce1f65ef60012d914893fc92fea0d09c Author: VMware, Inc <> Date: Tue Jan 25 17:58:20 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c0238e98a2e25087883c21129c526b88c86186a0 Author: VMware, Inc <> Date: Tue Jan 25 17:57:58 2011 -0800 Toolbox GTK: use pixbufs instead of pixmaps Function gdk_pixmap_colormap_create_from_xpm_d() is deprecated and GTK/GDK documentation suggests using GdkPixbuf and gdk_pixbuf_new_from_xpm_data() instead. Signed-off-by: Marcelo Vanzin commit fda8f5c0cbea36d13350513f0c9d2adf7a3f846a Author: VMware, Inc <> Date: Tue Jan 25 17:57:20 2011 -0800 DnD of non-ascii-text fails from gedit The reason is that in our acceptable target list, we did not put utf8 as most wanted target, and gedit just provided unicode (as string) instead of utf8 string. The fix is to move utf8 to top of acceptable drop target list. Signed-off-by: Marcelo Vanzin commit edec2ed2da223651b4ed4eb7171816f11e1779ab Author: VMware, Inc <> Date: Tue Jan 25 17:50:02 2011 -0800 Override regular gobject constructor (instead of "constructed" callback). It seems some older gobject libraries don't have the "constructed" callback. So override the regular gobject constructor instead. Signed-off-by: Marcelo Vanzin commit 2e5c7281d95dc55b49c315b34c5c4c18e0ceea1d Author: VMware, Inc <> Date: Tue Jan 25 17:48:08 2011 -0800 Clipboard gets cleared if pasting a file again The reason for the bug is that we used to rely on ClipboardClear signal to check if we are still the clipboard owner. But that signal is not reliable, and some unexpected ClipboardClear signal may cause us clearing clipboard data unexpectedly. The fix is to rely on our own private format like other implementation did. Signed-off-by: Marcelo Vanzin commit e1e981265b72049b586aee0205e4e6b0ab175ec0 Author: VMware, Inc <> Date: Tue Jan 25 17:47:49 2011 -0800 open-vm-tools: link libvmtools to librt.so on Linux. Signed-off-by: Marcelo Vanzin commit 500961f28aec844e483281fc0a0798972c308966 Author: VMware, Inc <> Date: Tue Jan 25 17:47:36 2011 -0800 Updates to translation catalogs. Signed-off-by: Marcelo Vanzin commit d4b1cd674206b6d6a262f3670de90064fb275e01 Author: VMware, Inc <> Date: Tue Jan 25 17:47:05 2011 -0800 Fix power script handling on non-UTF-8 locales Since we are not using script name retrieved from the config file in glib file operations, but rather spawn a new process with it as executable, we should convert the string to current (system) locale, not glib filename representation. Signed-off-by: Marcelo Vanzin commit c757727efb7d0c6c4d1bef7619150d8576772cf1 Author: VMware, Inc <> Date: Tue Jan 25 17:46:42 2011 -0800 lib/file: Reduce log noise I spotted this in a log file in the PR. It is possible for one thread to open a lock file on POSIXen and by the time it tries to stat the lock file another thread has already deleted (unlinked) the file because it is stale. Had the other thread not done this, the first aforementioned thread would have done the unlink. If this occurs, suppress an warning/error message; it's just noise. Signed-off-by: Marcelo Vanzin commit a91a80eb5fbda46eab09a1b8309566bd3958e694 Author: VMware, Inc <> Date: Tue Jan 25 17:46:03 2011 -0800 Internal branch sync. Included in this change: . dnd: implement SrcCancel/DestCancel for DnD V4 (fixes issue with copying files when not needed). . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 00a9d39abed51b0e0c6d720ec55d93e75cc41447 Author: VMware, Inc <> Date: Tue Jan 25 17:45:09 2011 -0800 Internal branch sync. Included in this change: . VIX: more solaris fixes. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 60014fc142d9797f1dc58f79fab294d8a4744241 Author: VMware, Inc <> Date: Tue Jan 25 17:44:27 2011 -0800 Tools Logging: fix overzealous redirecting to console on Windows The change that introduced automatic redirect of standard output and standard error streams to a console on Windows completely broke use of "vmtoolsd --cmd " in scripts: redirect to files stopped working. Change VMTools_AttachConsole() to check if stdout/stderr point to an on-disk file or a pipe before redirecting them to CONOUT. Signed-off-by: Marcelo Vanzin commit 2761cf534e4376f7620b521f7cb2f1083c2ed1f4 Author: VMware, Inc <> Date: Tue Jan 25 17:44:14 2011 -0800 DnD: close connection to vmblock upon receiving SIGUSR1 Our install scripts expect that vmusr process (on non-Windows platforms) will close connection to vmblock service upon receiving SIGUSR1 and will not reopen it until next restart. Install USR1 handler in DnD/CP plugin; also move block handling from CopyPasteDnDX11 class and instead create a inew singleton class for managing block connection state. Signed-off-by: Marcelo Vanzin commit fbbebdc9f1110026123e69311cdd0e99ac5b3697 Author: VMware, Inc <> Date: Tue Jan 25 17:43:57 2011 -0800 vmci: replace kernelStubs with driverLog. kernelStubs has been replaced with driverLog, which is what we already use for the host driver. Checked that there are no missing symbols (for example, Panic). Signed-off-by: Marcelo Vanzin commit 8b1f10314c387b432934e03a4e066547f812a667 Author: VMware, Inc <> Date: Tue Jan 25 17:41:00 2011 -0800 Text copied from OO Calc is pasted as image The reason for the bug is that on Linux after we got image data, we did not try to get other format of data like Windows implementation did. The fix is to try to get other formats of data after we got image data. Signed-off-by: Marcelo Vanzin commit a14843b705ff70df01a9ee81f469bd87e9088d48 Author: VMware, Inc <> Date: Tue Jan 25 17:40:23 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 80bd3679db4ce4d79d9fd81d029d539e2f449e9e Author: VMware, Inc <> Date: Tue Jan 25 17:39:58 2011 -0800 Internal branch sync. Included in this change: . updates to translation catalogs. . VIX: fix some code to also compile for solaris. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e59abfd7242f3f4ffd1975d288d9def74cb282ef Author: VMware, Inc <> Date: Tue Jan 25 17:37:27 2011 -0800 The HGFS leaks session objects when disabling Shared Folders The HGFS server session was referenced with the session create request handler in response to a new session request call from the guest. Unfortunately, since there is no corresponding destroy session request from the guests so the HGFS server session will not get destroyed due to this reference. Furthermore, there is more work required for the handling of the disabling of Shared Folders feature wrt to session support. This is also coming later on. Also, once the channel is destroyed and disconnects from the HGFS server in response to a UI disable command of the shared folders feature, the HGFS server session is lost and therefore leaked. Additional consequence of this is that any open handles with that session also then remain open as they will not be closed until the VMX process is destroyed. Fix is to remove the session referencing from the create session and destroy session handlers until session support is completed and correctly handled. Signed-off-by: Marcelo Vanzin commit aa2d7225954a03e8c0c7975a6303833c5e7fed50 Author: VMware, Inc <> Date: Tue Jan 25 17:37:03 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f39d7b636bb4a9bee947eebdf64a92c48d59a83e Author: VMware, Inc <> Date: Tue Jan 25 17:35:36 2011 -0800 Prevent unexpected guest UI DragEnter In some cases there may be some unexpected UI DragEnter after DnD finished, which may disturb our state machine. With this change, guest DragEnter is not allowed within 0.5 second after each DnD. Signed-off-by: Marcelo Vanzin commit b648b13ae84dc4f1746a9c9ee1cda5be29c50c6f Author: VMware, Inc <> Date: Tue Jan 25 17:34:43 2011 -0800 Rewrite the ResolutionSet RandR12 code V2 The code was rewritten and added in a new file, resolutionRandR12.c. The rewrite addresses a number of issues: 1) The RandR12 code was never enabled if the server supported the VMwareCtrl extension. 2) If the RandR12 code was trivially enabled by moving the check for the VMwareCtrl extension, vmtoolsd would deadlock and freeze the X server. This issue is still not fully investigated, though, but commented fixes in this changeset seems to work around it. 3) If the old RandR12 code was enabled together with the deadlock fixes, resolution wasn't set right. In fact mostly it wasn't set at all, perhaps due to races with other resolutionset mechanisms. Typically the added autofit modes were never used. 4) Error checking and recovery in the old code was not very elaborate. 5) DPI calculation was incorrect since only the pixel dimensions of the first output were considered, and in that case only on resolution increases. 6) The rather long function made bugfixing and error recovery implementation hard. It's now split up. Together with a minor change in the modesetting kernel these changes appears to remove the need for using VMWareCtrl with the vmwgfx driver, This has only been tested with two monitors, though. V2. Fix broken builds when NO_MULTIMON was set to true. Signed-off-by: Marcelo Vanzin commit 64d9be43e479692aea750026b2930baf9ea24262 Author: VMware, Inc <> Date: Tue Jan 25 17:34:10 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3a22e8cf804a2b698f433fd28f32256343b67ebb Author: VMware, Inc <> Date: Tue Jan 25 17:33:25 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit aea94e360591b053031d6597fa3eda019fab5674 Author: VMware, Inc <> Date: Tue Jan 25 17:32:55 2011 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0ff690ad2a44b77a561671e79dc9c2a999ee58cf Author: VMware, Inc <> Date: Mon Dec 20 14:33:10 2010 -0800 Updating open-vm-tools version for release 2010.12.19-339835. Signed-off-by: Marcelo Vanzin commit 5aef2b20a519788613350752575bcba0ac71df79 Author: VMware, Inc <> Date: Mon Dec 20 14:23:41 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 413a29297c9d4fb6f53ad678b3e75dbcfb872151 Author: VMware, Inc <> Date: Mon Dec 20 14:23:29 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3992c83b5d73aa5c4f64881bbae7e54364c4156c Author: VMware, Inc <> Date: Mon Dec 20 14:23:13 2010 -0800 vmblock: do not open-code getname (linux) Now that the module is GPL-ed we do not have to re-implement getname() in our module. Signed-off-by: Marcelo Vanzin commit 8f6706eb92bbb5ccacdb3a13768a6ea53e6f404a Author: VMware, Inc <> Date: Mon Dec 20 14:22:35 2010 -0800 Delete VMCI discovery service. We keep threatening to remove it and then never do. Executive Decision(TM) time. Removed from all targets and code deleted. Signed-off-by: Marcelo Vanzin commit 42f8af6e8d592345733a68b3e4654e3be76cd1fe Author: VMware, Inc <> Date: Mon Dec 20 14:22:16 2010 -0800 tools: minor cleanups. . remove lib/conf; Conf_Load() was only used in one place for legacy reasons, so move the code there. . remove some unneeded files from open-vm-tools. Signed-off-by: Marcelo Vanzin commit bb7a78ed86cfc1583576e5b3edcc55c2b201f3e1 Author: VMware, Inc <> Date: Mon Dec 20 14:21:55 2010 -0800 Give checkvm some love. Clean up our favorite useless app: . use lib/backdoor and lib/checkvm instead of inline asm . don't reimplement getopt on win32 since we already have it in lib/misc . fix some code standard nits Signed-off-by: Marcelo Vanzin commit 028df4f75b9bd891304f36730549574597571b0a Author: VMware, Inc <> Date: Mon Dec 20 14:21:37 2010 -0800 util.h: pick up review comments Review comments: a nice optimization Signed-off-by: Marcelo Vanzin commit b7bcd42e498beaf0787d3b1373e5ce6a7f6d4324 Author: VMware, Inc <> Date: Mon Dec 20 14:21:25 2010 -0800 Internal branch sync. Included in this change: . VIX: don't truncate cmdline . VIX: Convert process command lines and owners' names to UTF-8 in ListProcesses. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit be01f2e8e038ea618f506b6d931cf93c20f13cd7 Author: VMware, Inc <> Date: Mon Dec 20 14:18:35 2010 -0800 util: pick up review comments More review comments to pick up. Signed-off-by: Marcelo Vanzin commit b4ab9fa0296d769979b99a9757ca484710566ef4 Author: VMware, Inc <> Date: Mon Dec 20 14:18:23 2010 -0800 util.h: review comments Tweek the previous change; improve correctness. Signed-off-by: Marcelo Vanzin commit 14d492ec7524612ed89b7d2de3d65827eaa11416 Author: VMware, Inc <> Date: Mon Dec 20 14:18:13 2010 -0800 improve Util_BufferIsEmpty performance Use some better inlining... Signed-off-by: Marcelo Vanzin commit 4172f24e7726ab21c6c5fea94f2f137544f872a9 Author: VMware, Inc <> Date: Mon Dec 20 14:17:51 2010 -0800 Fix log statement in HGFS server for Fusion hosts Log statement was using a string pointer after it was freed. Signed-off-by: Marcelo Vanzin commit f8c9ee8779f29d2dbb9a333a8ed569d8484557a6 Author: VMware, Inc <> Date: Mon Dec 20 14:17:31 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4df41acaa2db6d587539647dc0795c092de6d7f4 Author: VMware, Inc <> Date: Mon Dec 20 14:17:15 2010 -0800 Fix conflicting Bool types when using X11. Some distributions'* X headers seem to cause conflicts that our current checks weren't catching. It sucks that we have this conflicting type name and that they are of different types in the first place, but what are you gonna do... Anyway, checking upstream's version of Xdefs.h, it seems to check for _XTYPEDEF_BOOL when defining the type. So both check for that before defining our type, and define it so that Xdefs.h won't try to re-define it. * See: http://sourceforge.net/tracker/?func=detail&atid=989708&aid=3118268&group_id=204462 Signed-off-by: Marcelo Vanzin commit 5acf75e0e3cb0c1eb0e54bb5b6544808525bac00 Author: VMware, Inc <> Date: Mon Dec 20 14:16:49 2010 -0800 Replace an ASSERT with a debug message. Signed-off-by: Marcelo Vanzin commit 88cb790575c8cfef6cc5291b4c0b90ec21e3ceaa Author: VMware, Inc <> Date: Mon Dec 20 14:15:43 2010 -0800 Fix Guest Hgfs server interface for multiple callers Code does not quite cope with multiple callers for the same process which leads to memory leaks. The guest channel uses two globals: a channel data object and a server data object both are shared for all registered connections that use the internal HGFS RPC. The channel data and server data objects are reference counted, initialized on the first reference and torndown on the final reference removal. At some point in the future if a client requires its own private callback which will call HGFS server, then the channel code will allocate a new channel which will in turn get its own private HGFS server session. Currently this is not supported. Signed-off-by: Marcelo Vanzin commit 7962756d838ed69ad29eba4669712001ba284efc Author: VMware, Inc <> Date: Mon Dec 20 14:14:59 2010 -0800 lib/file: style match a few lines Signed-off-by: Marcelo Vanzin commit 85ddf4583db1075a913e8833eae38fe8e36bfd65 Author: VMware, Inc <> Date: Mon Dec 20 14:14:10 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 098fc22fdbf225ba0722e5a1b217e5826b03d175 Author: VMware, Inc <> Date: Mon Dec 20 14:13:46 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e15ecaec78f2f1c1ad68fa23dce9959aac4d0204 Author: VMware, Inc <> Date: Mon Dec 20 14:13:22 2010 -0800 Make VSOCK reset connection during connect on QP detach If the peer of a stream connection detaches from an already allocated queue pair while the connection state is still "connecting", we should treat it as a reset. The peer may detach for a number of reasons, the two primary ones are 1) the VM got killed, 2) the QP busmem invalidation failed. This case is already handled by the common code, but not the linux specific implementation. This change also resets the VMCI datagram handle allocated by the stream sockets to VMCI_INVALID_HANDLE when it is destroyed, since the validity of the handle is used to determine whether we should call destroy on the handle when the module is unloaded. Signed-off-by: Marcelo Vanzin commit 59b923e56289d42dee8aac14f22312075c60fe66 Author: VMware, Inc <> Date: Mon Dec 20 14:12:44 2010 -0800 Hgfs Over VMCI. Asynchronous. Start supporting Async operations on Hgfs over vmci for Mac. - Right now when you suspend the VM, change vmx file to disable vmci - it will correctly fallback to backdoor however it will not upgrade to vmci when one is available since transport change is only triggered when you see that current channel is not working. This logic should go away when session change is implemented which should detect change in session and restart detection of which channel is available. Signed-off-by: Marcelo Vanzin commit 8f6c22e7495d0f7a78793d8256ad7da97b89da6d Author: VMware, Inc <> Date: Mon Dec 20 14:11:36 2010 -0800 vmblock: fix order of filesystem cleanup operations (linux) We should not destroy kmem cache until after we successfully unregistered the filesystem. Signed-off-by: Marcelo Vanzin commit 54805316de5c648255160d4ce646534258d3a136 Author: VMware, Inc <> Date: Mon Dec 20 14:11:12 2010 -0800 Toolbox-cmd: fix UOM for ballooning stats Amount of ballooned memory is measured in MB, not MHz. Signed-off-by: Marcelo Vanzin commit f20573db3bdde6bae19c8fb2b4c0d04b9177e0f1 Author: VMware, Inc <> Date: Mon Dec 20 14:10:54 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7ae1c594eed23e11dd0e07e2ec6063b6402e1ac2 Author: VMware, Inc <> Date: Mon Dec 20 14:09:30 2010 -0800 Implement LogV() in tools. This allows apps that use the fancy new log-level aware functions in lib/log to also link against vmtoolslib. Signed-off-by: Marcelo Vanzin commit 4ce58e23de05cbbea10e4a6c6aee0e25f62c576d Author: VMware, Inc <> Date: Mon Dec 20 14:08:54 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fe0e2977026a80d2a693f93f1934208f201b5a94 Author: VMware, Inc <> Date: Mon Dec 20 14:08:20 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bd68240921a44b1aafe2b425ce5e9752494cb607 Author: VMware, Inc <> Date: Mon Dec 20 14:08:03 2010 -0800 open-vm-tools: remove unused file. Signed-off-by: Marcelo Vanzin commit d913251d79594e8ff9e34dab2d8408aad7d39a12 Author: VMware, Inc <> Date: Mon Dec 20 14:07:52 2010 -0800 vmtoolsd: add a worker thread pool. The thread pool allows both for pooled requests and for non-pooled requests, where the pool just manages the thread lifecycle and makes sure the task is notified of things such as service shutdown. Signed-off-by: Marcelo Vanzin commit bfc1779b99380612a724463dadc7d1a900f6fa48 Author: VMware, Inc <> Date: Mon Dec 20 14:07:30 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8422ea2e4638e9304d6aa42887a9d164d26939f7 Author: VMware, Inc <> Date: Mon Dec 20 14:07:07 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 716f776cb61f9d0dfa7d43ef3f18eb272387e3e0 Author: VMware, Inc <> Date: Mon Dec 20 14:06:46 2010 -0800 Clean up from comments and code. Signed-off-by: Marcelo Vanzin commit 8b1189f1801267a1bd9f6bedda3ae27a7fd76e5d Author: VMware, Inc <> Date: Mon Dec 20 14:05:51 2010 -0800 Tear down file transfer object if init called multiple times. GuestDnDCPMgr persists during the lifetime of the guest/plugin. But we may be initialized multiple times during that lifetime via Init() call. Init() should release any previous file transfer object and create a new one each time it is invoked. Also added code to cleanup the CopyPasteDnDWrapper singleton on receiving shutdown signal from vmusr. Though I am not seeing that signal at all either on Windows (tried setting bp in windbg) or Linux. So, when the process exits, we will likely still have one dangling init call. Signed-off-by: Marcelo Vanzin commit 575d96e945d6f2f64d67891820ec9abf0da350ef Author: VMware, Inc <> Date: Mon Dec 20 14:05:30 2010 -0800 Host part of directory change notification. Initial implementation of directory change notification support for Mac OS. 1. Parse set notification watch request from the guest and pass it down to platform specific library. 2. Parse remove change notification watch and call plaform specific library. 3. Call platform specific library when shared folder is being added/removed and enumerate all shared folders during initialization. 4. Implement callback to send notifications back. 5. Integrated with Mac OS specific directory notification code. 6. Implemented prototype of change directory notification support for WIndows host. Signed-off-by: Marcelo Vanzin commit dd6406c4b3328fc8c5c329c414c99978f560c1fc Author: VMware, Inc <> Date: Mon Dec 20 14:04:19 2010 -0800 vmxnet: fix build break The previous change moved the definition of ETH_MIN_FRAME_LEN from net.h to eth_public.h. I had followed through with the appropriate refactoring in the vmkernel, but forgot to scour the rest of the codebase for references, and missed one in the Linux build of vmxnet. Signed-off-by: Marcelo Vanzin commit 9ac69771341f4db0def193cd5cde925d76f975d2 Author: VMware, Inc <> Date: Mon Dec 20 14:02:53 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7d6011d83d2cbb8ad4a97ace007adbdb5f38e4e6 Author: VMware, Inc <> Date: Mon Dec 20 14:02:20 2010 -0800 open-vm-tools: fix compilation without ICU. Move functions that don't need ICU from codeset.c into a new file. Signed-off-by: Marcelo Vanzin commit b49df47af4f06f3a52310bfe864eb558563ac3c5 Author: VMware, Inc <> Date: Mon Dec 20 14:00:03 2010 -0800 Remove unused user space support from VMCI guest drivers In ancient times, there existed a user level library for VMCI. It talked to the VMCI guest driver through ioctls. Also, it needed infrastructure in the guest driver to keep track of user level processes and their datagram handles. For all of the modules except windows, we should also be able to get rid of the character device. I'll do that as a separate change. Signed-off-by: Marcelo Vanzin commit 8ecbfdba28178213bb26c36cf53b7dd1b888d335 Author: VMware, Inc <> Date: Mon Dec 20 13:58:46 2010 -0800 Clean up leftover references to VM_ASM_PLUS. VM_ASM_PLUS was removed because it's always true now. This change gets rid of a few leftover references in the 64-bit code that were generating compiler warnings. Signed-off-by: Marcelo Vanzin commit 6d5b94383c43b6e4ebc857dd44164fb6cfc45747 Author: VMware, Inc <> Date: Mon Dec 20 13:58:10 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 63fa51d4a3dde82203372667ff68fc1550ee35d6 Author: VMware, Inc <> Date: Mon Dec 20 13:57:01 2010 -0800 lib/unicode: optimize/simplify Unicode_FindLastSubstrInRange It's a bit complex. Make the code faster and simpler. Signed-off-by: Marcelo Vanzin commit 7d7e14b98e65f880084b0f3b592050c89ad7c57e Author: VMware, Inc <> Date: Mon Dec 20 13:56:21 2010 -0800 lib/unicode: review comment Length in code points function description can be improved Signed-off-by: Marcelo Vanzin commit 7c52ec04589192420ba3c9b902d94c5dc66e5f1e Author: VMware, Inc <> Date: Mon Dec 20 13:54:42 2010 -0800 lib/unicode: stop using lengths in code units wherever possible Most of the time code should be "thinking" in code points, not code units. Signed-off-by: Marcelo Vanzin commit 19d8820f14cae2526fb1db7f94477d639aa9a739 Author: VMware, Inc <> Date: Mon Dec 20 13:54:22 2010 -0800 lib/unicode: fussy compiler Make a fussy compiler happy. Signed-off-by: Marcelo Vanzin commit 92c0a25956b4c63d1c8e589e4b35077760395cf3 Author: VMware, Inc <> Date: Mon Dec 20 13:54:10 2010 -0800 lib/unicode: better comment Signed-off-by: Marcelo Vanzin commit e0c6a05e9cd7c76a9c893f46f61a6d8c155e30d9 Author: VMware, Inc <> Date: Mon Dec 20 13:53:59 2010 -0800 lib/unicode: add review comments Signed-off-by: Marcelo Vanzin commit 189afa464f28d6aa16510f6217ae9670c2f94f9b Author: VMware, Inc <> Date: Mon Dec 20 13:53:24 2010 -0800 lib/unicode: The last of the internal correctness fixes Fix the last function. Add a code point length function. Remove a now unused routine. Signed-off-by: Marcelo Vanzin commit 5aec778c91cdb5b13b1f44f1a236e3ebc9bca462 Author: VMware, Inc <> Date: Mon Dec 20 13:53:12 2010 -0800 Internal branch sync. Included in this change: . VIX: try to use bash for starting processes on Solaris. . VIX: escaping strings in XML VMAutomation responses. . vmxnet: allow changing MAC address in FreeBSD. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e7f66cdd744ed3fd0d38762353c23bde2470587f Author: VMware, Inc <> Date: Mon Dec 20 13:48:02 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d07a82d3925e2c9540fe07368a611fdd07d1bd03 Author: VMware, Inc <> Date: Mon Dec 20 13:47:42 2010 -0800 Unity/X11: Free desktop mappings when exiting Unity. When last hacking this code, I added two ASSERTs making sure that the host:guest desktop map pointers were NULL when entering Unity and numDesktops == 0. This is true when first entering Unity in a single session, but not for subsequent entrances in the same session. Rather than keep the mappings until the plugin is destroyed, we'll now flush them upon exit. Signed-off-by: Marcelo Vanzin commit 6806f502d964c3d20d6d10f58f31263516f7d712 Author: VMware, Inc <> Date: Mon Dec 20 13:47:08 2010 -0800 Trivial: add some logging to trace events on detection window Fairly low bandwidth logging of events occuring on detection window. Also small tweeks to move positioning of button presses away from border of window. Signed-off-by: Marcelo Vanzin commit 35b45e40cfb7d8472c4db864cdd0a51c92fb700f Author: VMware, Inc <> Date: Mon Dec 20 13:46:53 2010 -0800 Bump VMCI version on devel branch Signed-off-by: Marcelo Vanzin commit 0cc0b98ce9cedd322c4d2fe11aafe8fca5e9d165 Author: VMware, Inc <> Date: Mon Dec 20 13:46:41 2010 -0800 lib/unicode: optimize Unicode_FindLastSubstrInRange Signed-off-by: Marcelo Vanzin commit f8ff503a9cef72f7c49dc32352b76e3fdb0e6302 Author: VMware, Inc <> Date: Mon Dec 20 13:46:19 2010 -0800 lib/unicode: simplify and improve Unicode_FindLastSubstrInRange No need to be peeking under the hood at the physical implementation in Unicode_FindLastSubstrInRange. This makes things much easier to understand and removes possible problems with physical handling issues Signed-off-by: Marcelo Vanzin commit a057db5c449b3f06c2fb2c70ef288c90dc98a37f Author: VMware, Inc <> Date: Mon Dec 20 13:46:10 2010 -0800 lib/unicode: the bug fixing continues Unicode_CompareRange does not need to pin it's indices; that's done within Unicode_Substr. Signed-off-by: Marcelo Vanzin commit 9b66e98fb89370e7fc97c2fdc7af94c8872881bb Author: VMware, Inc <> Date: Mon Dec 20 13:45:28 2010 -0800 Align VMCI guest driver and library versions Signed-off-by: Marcelo Vanzin commit decd9354f63e941cfe729617af2c9cee80af577d Author: VMware, Inc <> Date: Mon Dec 20 13:45:14 2010 -0800 lib/unicode: fix Unicode_ReplaceRange Continuing the lib/unicode bug hunt, Unicode_ReplaceRange gets fixed. Make Unicode_Join not use Unicode_Append so there is no potential recursion problems between routines. Signed-off-by: Marcelo Vanzin commit fd327a1c98b9dea1414888ee8a5de4cb944e95e9 Author: VMware, Inc <> Date: Mon Dec 20 13:44:25 2010 -0800 lib/unicode: Unicode_Substr is broken There is a confusion of code points and code units within lib/unicode that needs to be cleaned up. Here I fix Unicode_Substr using the technique I plan to use across most of the function in unicodeSimpleOperations.c. More changes will ensue until the base PR is fixed. Signed-off-by: Marcelo Vanzin commit 8188e45f42cbbb75b62eedab4aa4e62348b8b7df Author: VMware, Inc <> Date: Mon Dec 20 13:44:11 2010 -0800 lib/misc: fix a comment Function name in header is wrong Signed-off-by: Marcelo Vanzin commit 48fb68fa20f5b640911ce6fb41956f0a91da1b4c Author: VMware, Inc <> Date: Mon Dec 20 13:43:16 2010 -0800 lib/misc: expose a useful function There are some serious problems with lib/unicode; exposing this function will make the fixes rather easy and fairly obvious. Signed-off-by: Marcelo Vanzin commit 6452ed85f0652075a392c20f8783bdb3412d9f3d Author: VMware, Inc <> Date: Mon Dec 20 13:42:42 2010 -0800 Undo HGFS memory leak fix. It seems to cause issues with registering apps. I'll let the HGFS guys fix the leak as part of cleaning up this channel registration code (bug 638446). Signed-off-by: Marcelo Vanzin commit 6cedb1fa57425140d8f8aef1b849a80ba8dbb80e Author: VMware, Inc <> Date: Mon Dec 20 13:42:23 2010 -0800 Address feedback in vm_basic_types.h The gcc-3.3 enforcement preprocessor error has a &&/|| precedence problem. Add appropriate parens. Signed-off-by: Marcelo Vanzin commit eb1f215a2519db6d802606503b3bcc003bc7a2f8 Author: VMware, Inc <> Date: Mon Dec 20 13:41:51 2010 -0800 vmtoolsd: introduce service properties. Service properties are a way for plugins to share data without having link-time dependencies. A plugin can export a property in vmtoolsd's service object (the same object used currently to send signals), and that property can be retrieved at any time. Thanks to GObject's property system, there's also notification of changes, using glib signals. The properties are not ref counted by the service, so plugins need to agree on the lifecycle of the property for things to work safely. Extra: fix an issue in pluginMgr.c where invalid memory was being used after an array reallocation. Signed-off-by: Marcelo Vanzin commit 0a4eedccda657bfd8f2210487afca3d08429e47f Author: VMware, Inc <> Date: Mon Dec 20 13:41:42 2010 -0800 Remove pre-gcc-3.3 crud from our headers gcc-3.3 itself is ancient, but some linux driver builds use it. Everything else is even more modern. This change strips out a bunch of the pre-gcc-3.3 preprocessor magic from some of the very common header files. Most notable: VM_ASM_PLUS is vacuously true. So it's gone. Signed-off-by: Marcelo Vanzin commit e07d4f8b7eefbb2c1db8b17e2327f5948d065347 Author: VMware, Inc <> Date: Mon Dec 20 13:40:01 2010 -0800 Make VMCI logging use SYSLOG importance levels This change converts the VMCI logging macros to using the following three importance levels; debug, info and warning. Signed-off-by: Marcelo Vanzin commit 3ff41f0c5d3421d09c35d42ea757a535556f1aef Author: VMware, Inc <> Date: Mon Dec 20 13:39:45 2010 -0800 lib/misc: cleanup from backouts One little piece was left lying around. Remove it. Signed-off-by: Marcelo Vanzin commit e2c146117151356bfaaeff6d7af5f955ded7e275 Author: VMware, Inc <> Date: Mon Dec 20 13:39:35 2010 -0800 Fix return code of HGFS channel activation function. HgfsChannelActivateChannel should return TRUE if channel has already been initialized. Signed-off-by: Marcelo Vanzin commit c3f8084e019a67ce1cf861d872267dab20cf0a35 Author: VMware, Inc <> Date: Mon Dec 20 13:39:19 2010 -0800 Unity: Reformat incomplete, unused plugin Doxygen comments as VMW style. Signed-off-by: Marcelo Vanzin commit 0d6da88e62eeb94dde6075e5a293a3b151ac95d1 Author: VMware, Inc <> Date: Mon Dec 20 13:39:09 2010 -0800 remove lib/region and lib/raster compiler warnings for type conversion Signed-off-by: Marcelo Vanzin commit 3ec4ba272cd23634a53236813871dbd232eb4c2a Author: VMware, Inc <> Date: Mon Dec 20 13:36:55 2010 -0800 Run all debug plugin callbacks within a cunit context. This allows cunit asserts in a debug plugin's shutdown function. Signed-off-by: Marcelo Vanzin commit c662e3dcad58f71b03f1a82d86b8793c456645eb Author: VMware, Inc <> Date: Mon Dec 20 13:36:47 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5808c1b14cc3f24a115f4b841734d6856c237d9f Author: VMware, Inc <> Date: Mon Dec 20 13:36:31 2010 -0800 lib/unicode: simple cleanup Some trivial cleanups Signed-off-by: Marcelo Vanzin commit 8e39dc6f1cf5436a124959dbf238d891bec1e99c Author: VMware, Inc <> Date: Mon Dec 20 13:36:21 2010 -0800 Fix vsock connect on listening socket A switch statement in Linux vsock was having a case outside the enum value range. On closer examination, we are testing for a value, that is never set. I verified that calling connect on socket in the listen case will fall through and hit the default case, since sock->state is still in the SS_UNCONNECTED state but sk->sk_state is SS_LISTEN. Looking at other protocol implementations, sk->sk_state is used for the procotol specific state, so this change simply catches the SS_LISTEN state in the default case entry, instead of trying to assign SS_LISTEN to the sock->state when the socket is put in listening state. Signed-off-by: Marcelo Vanzin commit 0d78bc11705ea7e11e0f056e1df251178518cda8 Author: VMware, Inc <> Date: Mon Dec 20 13:36:11 2010 -0800 Internal branch sync. Included in this change: . work for new version of DnD protocol is merged into open-vm-tools. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 65fd39cc4b672dab24e82f8f534c408182725e79 Author: VMware, Inc <> Date: Thu Nov 18 15:04:00 2010 -0800 Updating open-vm-tools version for release 2010.11.17-327185. Signed-off-by: Marcelo Vanzin commit 11c0273ed4269f6f7a92f82f6c822df7da4c8720 Author: VMware, Inc <> Date: Thu Nov 18 14:57:25 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 170aec5b0ae2d8811fe30e1109beba2a5a529335 Author: VMware, Inc <> Date: Thu Nov 18 14:57:01 2010 -0800 Don't use g_atomic_int_set in old glib versions. Also use the correct version check macro. In old versions, emulate set() with an assignment + explicit fence. Signed-off-by: Marcelo Vanzin commit 253439849a1472e3364e2a467e9f31dcf1f79f4f Author: VMware, Inc <> Date: Thu Nov 18 14:56:41 2010 -0800 lib/log: trivial style consistency change Make the ifdefs the same style throughout the file. Signed-off-by: Marcelo Vanzin commit a8f80db04c2e9121807ddf08602a51d88209f992 Author: VMware, Inc <> Date: Thu Nov 18 14:56:00 2010 -0800 fix guestd crashes when Solaris GOS has vlan/vmxnet3 nic configured. For the vlan/vmxnet3 interface, libdnet return its link address type as ADDR_TYPE_NONE and addr_ntoa converts it to NULL, which causes crash in ReadInterfaceDetails(). Signed-off-by: Marcelo Vanzin commit 2704283592dee665f94999da1490344968074f7c Author: VMware, Inc <> Date: Thu Nov 18 14:55:15 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 730c3817a80fe280a9b0287b105aa0aa7a75ce56 Author: VMware, Inc <> Date: Thu Nov 18 14:54:52 2010 -0800 Fix minor memory leaks. . release a reference to a timeout source so it's properly freed. . in the HGFS channel handling code, only initialize the channel's connection once, since the channel is a static struct. This avoid allocating a second transport-specific connection object (in the init() callback) which would then be leaked. Note that the HGFS fix is, for now, just a fix for the leak. There are more issues with the static channel approach and the current code: for example, the first app calling HgfsServerManager_Unregister() will shut down the channel, instead of the last one, since the channel itself is not ref counted. Signed-off-by: Marcelo Vanzin commit 56e966013be7bebfc271b14099d9a854adb70d07 Author: VMware, Inc <> Date: Thu Nov 18 14:54:20 2010 -0800 lib/lock: trivial cleanup Signed-off-by: Marcelo Vanzin commit e19d1e60145b10ff446172894f2773faf5d9a46b Author: VMware, Inc <> Date: Thu Nov 18 14:54:11 2010 -0800 lib/lock: clarify how condVars work MXUser condVar waits may return before the condition is signaled or an explicit timeout occurs due to spurious wakeups. Make this clear in the requirements and code itself. Fix the one place where there was a dependency on the old implementation. Signed-off-by: Marcelo Vanzin commit f109b18d078c454ddbd76060ab7a59787c2bca75 Author: VMware, Inc <> Date: Thu Nov 18 14:53:57 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b121c42ffb05d2e1f4d383def9fd61ff05bd94cf Author: VMware, Inc <> Date: Thu Nov 18 14:53:26 2010 -0800 Minor comment tweek; review comment Signed-off-by: Marcelo Vanzin commit aa062d788c03ac6f371036f7ccf741467a2e64a8 Author: VMware, Inc <> Date: Thu Nov 18 14:53:14 2010 -0800 lib/lock: code barriers to deal with spurious wakeups A condVar wait may be subject to a spurious wakeup; code against this. Signed-off-by: Marcelo Vanzin commit 59517c9bb15165c992df39f323c78e49fc4be12c Author: VMware, Inc <> Date: Thu Nov 18 14:53:04 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b9a19209613b1bf6ddadbd73480c3f688b5ad193 Author: VMware, Inc <> Date: Thu Nov 18 14:48:51 2010 -0800 Internal branch sync. Included in this change: . VIX: handle oversize ListProcess results . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2d26ee7857c963d2a20f25f0add67fa6024c7a14 Author: VMware, Inc <> Date: Thu Nov 18 14:42:05 2010 -0800 Unity/X11: Initialize host:guest desktop mappings before use. As written there existed a race between entering Unity and receipt of the host's desired desktop layout such that certain guest X11 events lead to accessing random, uninitialized memory and consequently receiving ye olde SIGSEGV. This change works around the issue* by initializing the host:guest virtual desktop maps based on the guest's current configuration. That is, if the guest had 8 desktops, we'll just create an identity mapping of 8 desktops where desktop 0 in the guest is desktop 0 in the host, guest1 = host1, and so on. * Other things should be considered more fully later, such as not even registering for events until the host UI issues -ALL- initialization RPCs. Signed-off-by: Marcelo Vanzin commit e14efb67b0f1420e373d6b546ed971eb2e2d24e2 Author: VMware, Inc <> Date: Thu Nov 18 14:40:48 2010 -0800 Prohibit use of Atomic_Read64() and Atomic_Write64() on misaligned vars. This is necessary since the functions do not provide any atomicity guarantees in the misaligned case. Add new functions, Atomic_ReadUnaligned64() and Atomic_WriteUnaligned64(), and use these instead. For the time being this change applies just to the VMM. Signed-off-by: Marcelo Vanzin commit 8ce44a13e49c927c8d34342d9664e9a29d126982 Author: VMware, Inc <> Date: Thu Nov 18 14:38:41 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8a2c6616758954ad9e26af59c0be4f46b7c6d5bf Author: VMware, Inc <> Date: Thu Nov 18 14:38:11 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 896f6f12832248b336f6394d31dc14131929c3fb Author: VMware, Inc <> Date: Thu Nov 18 14:37:39 2010 -0800 vmtoolsd: relax VMware hypervisor restriction. Allow vmtoolsd to run anywhere if not running one of the known Tools services, or running in debug mode. Also ignore the plugin path not existing if running in debug mode (so that we can easily run with just a debug plugin driving everything). This makes it easier to run vmtoolsd under valgrind, since valgrind doesn't emulate our backdoor and the code always thinks we're not running on VMware. Signed-off-by: Marcelo Vanzin commit f52e4bc8b682a7e531bb04afca8affebc42b0b6c Author: VMware, Inc <> Date: Thu Nov 18 14:35:34 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6339f57fb874772464b9b55455712d7be3f7311c Author: VMware, Inc <> Date: Thu Nov 18 14:35:18 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ce84f0858ca8affd0f607cc27dfe3710c7aa2ae8 Author: VMware, Inc <> Date: Thu Nov 18 14:33:49 2010 -0800 Address some issues identified by Coverity. Signed-off-by: Marcelo Vanzin commit 77e8ec035a5c5423181815c89e872f5b1b9c36b6 Author: VMware, Inc <> Date: Thu Nov 18 14:33:03 2010 -0800 Introduce VMCI Events for guest memory access For VMCI users in the vmx, we know generate events when access to the guest memory changes, i.e., when bus mastering is enabled/disabled. These events are available through the same API as the VMCI Event API which is part of the VMCI kernel API. The events are delivered synchronously, such that actions can be taken at the point where memory access is disabled/enabled. The events are delivered with the VMCI device lock held - the same way that VMCI datagrams are delivered, so any code that can run in a datagram callback should be able to run in the event callback as well. For HGFS, using VMCIEvent_Subscribe during initialization to subscribe to the event VMCI_EVENT_MEM_ACCESS_OFF will provide a synchronous callback to the HGFS vmx module whenever the guest is soft reset or the VMCI driver is unloaded. Signed-off-by: Marcelo Vanzin commit 058353cb3b62825030d0228feb13754e9aad3e9b Author: VMware, Inc <> Date: Thu Nov 18 14:32:26 2010 -0800 lib/lock: trivial comment cleanup Signed-off-by: Marcelo Vanzin commit d966325ed9573a83331988d756955def6ea14c6b Author: VMware, Inc <> Date: Thu Nov 18 14:30:55 2010 -0800 lib/lock: commonize some code Make better use of the available code. Signed-off-by: Marcelo Vanzin commit ec4a1dd723eeac6764af829621dc2ee2f88d9092 Author: VMware, Inc <> Date: Thu Nov 18 14:29:52 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2c4951830e7653969c87c2e62897d2dad0b02424 Author: VMware, Inc <> Date: Thu Nov 18 14:29:17 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 24108bc4ae929ed02ffe791f7310472c47b72d81 Author: VMware, Inc <> Date: Thu Nov 18 14:28:57 2010 -0800 Improve cleanup handling in Unity & GHI code. Allow cleanup to be called even if Init hasn't been called (or cleanup has already happened). Signed-off-by: Marcelo Vanzin commit 8367f01a7d433f9643ccc03b84ba2c40c2b9751d Author: VMware, Inc <> Date: Thu Nov 18 14:28:22 2010 -0800 Internal branch sync. Included in this change: . Fix incorrect MXUserNativeRWRelease read/write mode. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fd8872203259d5fa6ab9abfe62087dad48138dab Author: VMware, Inc <> Date: Thu Nov 18 14:18:04 2010 -0800 OVT: a few build fixes. . support ICU > 3.8 correctly (not just 3.8) . clean up generated rpcgen files so "make distclean" works more like it should. Signed-off-by: Marcelo Vanzin commit 3a9eb5edf4a4ae342f13bc34d25838e9e749cee4 Author: VMware, Inc <> Date: Thu Nov 18 14:17:46 2010 -0800 Reorder the resolution/topology capability list. Set the 'can do topolgy' ahead of the 'can do resolution' capability to avoid a host side race condition. Signed-off-by: Marcelo Vanzin commit 9f10e63470076e5e0ab015a08d19370e95170b44 Author: VMware, Inc <> Date: Thu Nov 18 14:17:18 2010 -0800 lib/file: stylist commonality Some code was moved from lib/log to lib/file. Make the code stylistically identical to the rest of lib/file. Signed-off-by: Marcelo Vanzin commit 390bb8ab054fc0a6a45056bab1ca98f2f2252ba3 Author: VMware, Inc <> Date: Thu Nov 18 14:16:50 2010 -0800 Move kmap outside of critical section in VMCIHost_GetUserMemory While calling get_user_pages, we grab current->mm->mmap_sem. However, we do not need to hold on to it while doing kmap, and since kmap may sleep, it seems like a genuinely bad idea. Signed-off-by: Marcelo Vanzin commit b910e4c74503efe86a066efcc48437f97cf0c94c Author: VMware, Inc <> Date: Thu Nov 18 14:16:06 2010 -0800 Bring comments in backdoor_def.h up to date. Some of the backdoor commands have been commented in backdoor_def.h indicating if they are devel only or if they are now unused. I went through the whole list and udpated the comments to match the current code. (I also lined up the numbers.) No functional change. Signed-off-by: Marcelo Vanzin commit bb699a591aa7c1d07930e9c9395e4adeebbdd2ea Author: VMware, Inc <> Date: Thu Nov 18 14:13:16 2010 -0800 lib/lock: concentrate the MXUSER_DEBUG code Group the debug code together, all under the same ifdefs. Signed-off-by: Marcelo Vanzin commit bf9a5107f545432ed54fceede069aaddd1fc6c67 Author: VMware, Inc <> Date: Thu Nov 18 14:12:43 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 785958341e3d13220fc129d54b8b2e731f985d16 Author: VMware, Inc <> Date: Thu Nov 18 14:12:13 2010 -0800 Don't unregister capabilities if they were never set. This avoid an issue where a second instance of vmtoolsd would fail to claim the RPC channel to communicate with the VMX, shut down, and unregister all capabilities in the process, which would overwrite the state set by the existing instance of vmtoolsd. Signed-off-by: Marcelo Vanzin commit 88030d05ea152b118981861f8b5328c1b7ef8838 Author: VMware, Inc <> Date: Thu Nov 18 14:11:32 2010 -0800 lib/log: fix a spelling mistake Signed-off-by: Marcelo Vanzin commit 8f605d48b9bebca17bec838e9625556c523fd4ef Author: VMware, Inc <> Date: Thu Nov 18 14:11:20 2010 -0800 Use proper function to translate system error into a vix error. Signed-off-by: Marcelo Vanzin commit b3c21c67ffb328818126fb1a2409c50e54283584 Author: VMware, Inc <> Date: Thu Nov 18 14:07:48 2010 -0800 Move VMCI socket to connected state before sending attach During VMCI Stream socket connect on Linux, the server side sends an attach message before adding the pending socket to the list of connected sockets. External control messages,e.g., a WROTE message, triggered by the attach message may arrive and not find the (previously pending) socket in the list of connected sockets, and therefore will direct the control message to the parent socket which is still in the listening state. In the case of READ/WROTE messages, this will cause the listening socket to respond with a RST message. The solution is to add the pending socket to the connected socket list before sending attach message, since that will queue incoming packets for the right socket. Signed-off-by: Marcelo Vanzin commit 679ff02d81a16c70e0ebeaddc79876149c291f37 Author: VMware, Inc <> Date: Thu Nov 18 14:06:32 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f1c6b214f582aeeefa462dd4b97d5df34b0ece8f Author: VMware, Inc <> Date: Thu Nov 18 14:06:05 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit eaf68a6a6edcd90e07c3027c96a9ff05d2515ed1 Author: VMware, Inc <> Date: Thu Nov 18 14:05:50 2010 -0800 Allow an intialization failure to fail the plugin load. Relocate the initialization code into an Initialize() method so that if it fails it can return a clear status that the caller can act upon. Signed-off-by: Marcelo Vanzin commit 25381f6fb2c90a597dd14b634049b6f037dbe33e Author: VMware, Inc <> Date: Thu Nov 18 14:05:26 2010 -0800 Unity/X11: Integrate WindowPathFactory. Signed-off-by: Marcelo Vanzin commit 7f9f5b4b9627a65ecbd6958a400429f7fea3ea57 Author: VMware, Inc <> Date: Thu Nov 18 14:05:09 2010 -0800 Unity/X11: Hack/convert from C to C++. With the introduction of WindowPathFactory, the core Unity/X11 needs to grok C++. Here's a change that does that by renaming a bunch of files followed by signedness and typecasting fixes. Signed-off-by: Marcelo Vanzin commit 206b92be293081b25cce10efa11b2a1665c887d2 Author: VMware, Inc <> Date: Thu Nov 18 14:04:15 2010 -0800 GHI/X11: Add fixed menu item monitors. This change adds a Gio::FileMonitor to watch over $HOME/.gtk-bookmarks and connects a slot to Gtk::RecentMgr::signal_changed() to watch for updates to the recent documents menu. When an update is detected, the existing relevant submenu is purged and repopulated. Then the MenuItemManager emits its menusChanged signal, alerting the GHI platform code of the change. Signed-off-by: Marcelo Vanzin commit ca030dffff3c226ddefc40e6b0e2a7e18cc6f6de Author: VMware, Inc <> Date: Thu Nov 18 14:03:34 2010 -0800 GHI/X11: Move "DetectDesktopEnv" to lib/xdg. This takes the static deskeop environment detection logic out of lib/ ghIntegration and places it a shell script and wrapper in lib/xdg. We'll now distribute with Tools a vmware-xdg-detect-de which contains the "detectDE" routine used in many of Portland's xdg-* scripts. Keeping this logic in a script has a few motivations: 1. No D-Bus (or similar) dependency added to library code. 2. Allows users to hack as time goes on in case any of the methods currently employed stop working. Signed-off-by: Marcelo Vanzin commit 31fb0d37b4826ff7dbd89aad6e054c7e1860a7a4 Author: VMware, Inc <> Date: Thu Nov 18 14:01:08 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 647629cd6f13b51bbaee063edf82fa1b037c8c7e Author: VMware, Inc <> Date: Thu Nov 18 14:00:20 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8cb0825b8ff25eff7b79fd08bb8a14f933b81ec7 Author: VMware, Inc <> Date: Thu Nov 18 13:59:51 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ed19725db25de1201350ba555aad7f24ebeca606 Author: VMware, Inc <> Date: Thu Nov 18 13:57:24 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 66cb8868f6b3781660ddbb91425b7494088e82b9 Author: VMware, Inc <> Date: Thu Nov 18 13:56:46 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 556db9581d5089e804f3d7ce705ae7035dcae8a0 Author: VMware, Inc <> Date: Thu Nov 18 13:54:14 2010 -0800 Remove unused function declaration (trivial) HgfsServer_ProcessPacket no longer exists so removing. Signed-off-by: Marcelo Vanzin commit 3cc4d12b7a31b02c5a326e239860c81815d57907 Author: VMware, Inc <> Date: Thu Nov 18 13:53:48 2010 -0800 GHI/X11: Fork, reinitialize environment when spawning applications. Okay, new school GHI leaves a lot of heavy lifting to GLib, because GLib is awesome. Unfortunately, its GAppInfo launch handler, g_app_info_launch, is slightly less awesome in that it doesn't take an environment vector as an argument. That makes me sad. To work around this, I whipped up a wrapper function which does the following: - fork() - reinitialize the environment using clearenv and putenv* - g_app_info_launch - Child exits 0 upon success, non-zero on failure. - Parent blocks until child exits, using child's exit status to determine success or failure. * Sort of dirty, but it saves me a parsing step, since nativeEnviron is composed of strings of key=val, and that's the format accepted by putenv. Conversely setenv takes the variable and value strings separately. I'm going to file a feature request bug against GIO and provide some patches. If accepted upstream, we'll be able to get rid of this function. Signed-off-by: Marcelo Vanzin commit c3508b705ea9449a0292dc649864e1d91bf15eb6 Author: VMware, Inc <> Date: Thu Nov 18 13:51:55 2010 -0800 lib/file: File_Rename becomes File_Move The File_Rename function is really the equivalent of the unix/Linux "mv" command - it may atomically rename or copy the file. Unfortunately there is no nice way to know what actually happened, as cleanup may be necessary upon failure. Fix this. While we're at it, make the GetLastError/errno make sense. Signed-off-by: Marcelo Vanzin commit c6f0261ed2d63e7d2bbfa161003aa1975714580d Author: VMware, Inc <> Date: Thu Nov 18 13:50:06 2010 -0800 Unity: Fix SetDesktopConfig handling. The work which factored TCLO handling out of lib/unity introduced a regression whereby Unity_SetDesktopConfig no longer updated the unity.virtDesktopArray state variable. This caused all subsequent calls relating to virtual desktops, Unity_SetDesktopActive and Unity_SetWindowDesktop, to fail. Signed-off-by: Marcelo Vanzin commit 1d8ecd65f904741dd713079764073fbbcb539b09 Author: VMware, Inc <> Date: Thu Nov 18 13:49:24 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5035cb06e932d4e18efe9806484ceae598bfffea Author: VMware, Inc <> Date: Thu Nov 18 13:44:12 2010 -0800 do not delete support tarballs in the guest vm-support script Signed-off-by: Marcelo Vanzin commit 5ac98bd99a7dfa7400e38e31e3f99dc0cc12ad07 Author: VMware, Inc <> Date: Thu Nov 18 13:43:43 2010 -0800 String updates. Signed-off-by: Marcelo Vanzin commit 4443fb4c774ce80308e2c8357a003299d40f2139 Author: VMware, Inc <> Date: Thu Nov 18 13:42:54 2010 -0800 Disable the tools upgrade UI for non-admin guest users. Signed-off-by: Marcelo Vanzin commit 069e7b4f64c7c683e94820e9fc02ee1d1fe8607d Author: VMware, Inc <> Date: Thu Nov 18 13:42:27 2010 -0800 lib/lock: ASSERTION failure during histogram collection When the acquisition or held time is *EXACTLY* 10 seconds, expressed in nanoseconds, the MXUser histogram collection code ASSERTs. A bound check wasn't quite right. Signed-off-by: Marcelo Vanzin commit e0a174c8f2134df39ff5f345bba879585d3f2bf4 Author: VMware, Inc <> Date: Thu Nov 18 13:40:05 2010 -0800 Fix build. Signed-off-by: Marcelo Vanzin commit a01318112ccbd167f84b7f95d47a42714e1a4a4b Author: VMware, Inc <> Date: Thu Nov 18 13:39:44 2010 -0800 Fix typo. Signed-off-by: Marcelo Vanzin commit 0cdeb245cb0ead5090095a5887b6457bc0239e52 Author: VMware, Inc <> Date: Thu Nov 18 13:39:23 2010 -0800 Unref the default glib context when quitting. After some digging, I found out why valgrind was complaining about memory leaks: creating a main loop using the default glib GMainContext creates an implicit reference to that context, that needs to be properly freed. This way, all GSources attached to that context are properly destroyed. Signed-off-by: Marcelo Vanzin commit aa41699c58d73b75f9274e1aab3033d7d27a2e93 Author: VMware, Inc <> Date: Thu Nov 18 13:37:16 2010 -0800 GHI/X11: Add remaining Nautilus/GNOME Places links. This change adds the following "pseudo apps" to the fixed items menu: - Computer - Network - Connect to Server... - Search for Files... All but "Connect to Server..." have regular .desktop files, so CTS now has its own entry in the pseudo app table. Signed-off-by: Marcelo Vanzin commit 50420d4f0b52cce1f5b61e82b0ebc2f230cf7175 Author: VMware, Inc <> Date: Thu Nov 18 13:36:46 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7f66a279dd739e282242f7b29e88f4b035167d22 Author: VMware, Inc <> Date: Thu Nov 18 13:35:07 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8acd6121276643aef19de1b65b4386a4addb837f Author: VMware, Inc <> Date: Thu Nov 18 13:33:09 2010 -0800 GHI/X11: Don't confuse Desktop, Documents pseudo apps. Signed-off-by: Marcelo Vanzin commit 18884d27ba3bb26fda1d1a55b003d5a73cbfd232 Author: VMware, Inc <> Date: Thu Nov 18 13:29:15 2010 -0800 Unity/X11: Initialize fakeEvent before passing off for processing. From bug 626112 update 8: "During init when querying all windows, Unity/X11 enumerates all windows' properties and passes the properties down to the property event handler via fake property events. Without initializing to 0, fakeEvent.xproperty.state may be set to "PropertyDelete", so code lower in the stack may mistakenly think that windows' initial properties are actually *removed* properties." Signed-off-by: Marcelo Vanzin commit 59e10f5293c1984026d979309fec9797929acf68 Author: VMware, Inc <> Date: Thu Nov 18 13:28:47 2010 -0800 lib/lock: dump MXUser serial numbers Each MXUser object has a serial number. Dump it when things go bad to assist in debugging efforts. Signed-off-by: Marcelo Vanzin commit 9425b440c44e3c1d435c87bd89b222818c94b678 Author: VMware, Inc <> Date: Thu Nov 18 13:27:42 2010 -0800 lib/lock: fix the build Signed-off-by: Marcelo Vanzin commit 2bb9eff4a9a277be823eb6c14f6031e89e1c6b00 Author: VMware, Inc <> Date: Thu Nov 18 13:27:25 2010 -0800 lib/lock: provide full control of statistics Allow the MXUser_Control functions to fully enable statistics on exclusive, recursive and RW locks. This allows a developer to enable statistics on a lock by lock basis should a study warrant it. Signed-off-by: Marcelo Vanzin commit c432b96bce06f477a2d474c950fa9c084e61f7ff Author: VMware, Inc <> Date: Thu Nov 18 13:26:24 2010 -0800 lib/lock: code move before change Signed-off-by: Marcelo Vanzin commit e4a4546e44d8ed731354a833b49db5a5cb8b0b8b Author: VMware, Inc <> Date: Thu Nov 18 13:26:13 2010 -0800 lib/lock: move some code around Signed-off-by: Marcelo Vanzin commit 214cf2ee3389f77141af4df62737510d8104f944 Author: VMware, Inc <> Date: Thu Nov 18 13:23:23 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3f2a148340f2f2b51e8754af4809154dba3f6709 Author: VMware, Inc <> Date: Thu Nov 18 13:22:40 2010 -0800 Hgfs Over VMCI - Mac OSX. Synchronous. This is resubmission of change that was backed out. I have changed mostly channel switching logic that was broken. Now we store the channel in every request so that we call free/allocate/send of the same channel when global hgfs channel resets to some different channel. Signed-off-by: Marcelo Vanzin commit e33f1464dc82d85bffc74781f205e419e7e2f186 Author: VMware, Inc <> Date: Thu Nov 18 13:15:11 2010 -0800 Internal branch sync. Included in this change: . VIX: code refactoring to use the same parsing code for both requests and responses. . vmxnet3: make Jumbo Frame support available in Solaris driver. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a78301962fa4a87cdbbd5b1430a06b0010661ba0 Author: VMware, Inc <> Date: Tue Oct 19 13:19:53 2010 -0700 Updating open-vm-tools version for release 2010.10.18-313025. Signed-off-by: Marcelo Vanzin commit 2162c5d770cdac3b0e275907a1a5d22ece8ce23c Author: VMware, Inc <> Date: Tue Oct 19 13:09:43 2010 -0700 Per session capabilities Signed-off-by: Marcelo Vanzin commit 7b2be81d1fc767d6a65d65adce860a83cf543982 Author: VMware, Inc <> Date: Tue Oct 19 13:09:27 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ebe50ff9b5fa93b2c019f99c70b4f86e6eb78625 Author: VMware, Inc <> Date: Tue Oct 19 13:09:05 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0bc7132eb357fd402eef0d2ce3e83a6350815984 Author: VMware, Inc <> Date: Tue Oct 19 13:08:47 2010 -0700 Fix unicode support in toolbox-cmd. On Win32, use the wide-character entry point function, and convert the command line arguments to UTF-8 on all platforms before using them. Also make sure we use UTF8-friendly g_print everywhere, instead of printf. Signed-off-by: Marcelo Vanzin commit 48d47a391ddb9eba3d0fa56c2ea00c116fa5bc1e Author: VMware, Inc <> Date: Tue Oct 19 13:08:20 2010 -0700 lib/lock: left in a line Remove unnecessary include breaking build Signed-off-by: Marcelo Vanzin commit a5a7f88215ee21e1b151e4cdae09f0ece888927f Author: VMware, Inc <> Date: Tue Oct 19 13:08:01 2010 -0700 lib/lock: MXUser statistics are available anytime All statistics memory and computation are dynamic - nothing is done unless a lock has statistics enabled. Signed-off-by: Marcelo Vanzin commit 533b97359112209900ad0b8fc1a32d5d75a05c40 Author: VMware, Inc <> Date: Tue Oct 19 13:07:20 2010 -0700 Renamed definitions. Signed-off-by: Marcelo Vanzin commit e901bec9e9753ba485592726a354cc2206be666b Author: VMware, Inc <> Date: Tue Oct 19 13:07:05 2010 -0700 Make failure to find the install path non-fatal. On Windows if the InstallPath registry key cannot be found loading an old-style configuration file raises an ASSERT. This is only because some of the default configuration options seeded into the configuration dictionary require the install path. Signed-off-by: Marcelo Vanzin commit 87bbd4de95052bbf64d520b0133c45e4a72cb1bb Author: VMware, Inc <> Date: Tue Oct 19 13:06:19 2010 -0700 unity: Remove UnityPlatformWillRemoveWindow(). Since we now get a window event whenever a window is destroyed, this function is no longer needed. Signed-off-by: Marcelo Vanzin commit 91bea1f73c1f20cee7a7b985cfaa3500c9e37425 Author: VMware, Inc <> Date: Tue Oct 19 13:05:57 2010 -0700 Make VMCI not advertise masking capability for MSI The initial MSI/MSI-X implementation for VMCI was "inspired" by the vmxnet3 one. Recently, a performance issue in certain RHEL 5.X guest for MSI was fixed in vmxnet3 emulation by no longer advertising the masking capability for MSI. VMCI suffers from the same performance problem for these guests, so don't advertise masking for VMCI either. This change also adds module parameters to selective disable MSI-X and MSI, and defaults to MSI instead of MSI-X for pre 2.6.19 linux kernels, since MSI-X has known performance issues there. Signed-off-by: Marcelo Vanzin commit 72d460c95df565f6f830699417ab8e32b6931714 Author: VMware, Inc <> Date: Tue Oct 19 13:05:11 2010 -0700 GHI/X11: Fixed item menu (places, bookmarks), DE-agnosticism o Switched back to Glib::ustring for std::string and glibmm compatibility. o Introduced "pseudo app" concept to represent fake applications shown in GNOME and KDE "Places" menus. (Still not fully populated, but I'll add those shortly.) Signed-off-by: Marcelo Vanzin commit 1ccdd5d15b9609640a29aad5114d3d0546dda9b1 Author: VMware, Inc <> Date: Tue Oct 19 13:03:19 2010 -0700 unity: Rename UnityPlatform{Start,Kill}HelperThreads. UnityPlatformStartHelperThreads -> UnityPlatformEnterUnity UnityPlatformKillHelperThreads -> UnityPlatformExitUnity Some back-ends don't need helper threads in the first place (x11), and even if a back-end does need a helper thread, the front-end should not know or care about it. Signed-off-by: Marcelo Vanzin commit 7a0815cb2917fab82d67db6977b3965190f3c30a Author: VMware, Inc <> Date: Tue Oct 19 13:02:57 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 83f77c6e908afb25f47055455e3846469707569e Author: VMware, Inc <> Date: Tue Oct 19 13:02:41 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 92d5212c4a32ee743a3ece6446f37fa79f3b3b4b Author: VMware, Inc <> Date: Tue Oct 19 12:54:37 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4893378f3f056db43e81b9b46543a43fa8a3c82a Author: VMware, Inc <> Date: Tue Oct 19 12:54:04 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c366c1f8c85448e34a3f400ed6f40ac12220d94c Author: VMware, Inc <> Date: Tue Oct 19 12:53:47 2010 -0700 unity: Clear all windows from tracker on unity exit. Since we are no longer using the REMOVE_UNTOUCHED flag in our call to UWT_RequestUpdates(), we must remove any remaining windows left in the UWT ourselves when we exit unity. Otherwise, if the windows are closed by the user while we are in single window mode, they are never removed from the UWT and show up as "blank" rectangles on the host screen the next time we enter unity. Signed-off-by: Marcelo Vanzin commit 8e46bc9b894b0139472a34e30f493442ac644260 Author: VMware, Inc <> Date: Tue Oct 19 12:53:17 2010 -0700 Internal branch sync. Included in this change: . VIX: Fix improper token allocation. . vmxnet3 / Solaris: Use ddi_intr_block_enable when DDI_INTR_FLAG_BLOCK flag is set. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 77a814cc6adcf71c16b3ce0066de9fabd0cb67f9 Author: VMware, Inc <> Date: Tue Oct 19 12:50:21 2010 -0700 VMCI QPair ops must check for valid queues. When a host (on hosted platforms) creates a VMCI queue pair, the actual queue content isn't available until a guest attaches, since the guest is responsible for creating the queue pair page files and handing them down to the host. Only at that point will pointers to queue data and queue header be valid. This works fine with VMCI Sockets in blocking mode, since connecting a stream socket only returns when both sides are attached to the queue pair. However, for non-blocking sockets, we will return earlier - while the stream socket is still in the connecting state. A subsequent poll to determine the state of the connecting stream socket may then attempt to access the queue header to figure out whether the socket has available data or free space. If the queue header is invalid, bad things happen. This change adds checks to the VMCIQPair API implementation, that detects queues with no data, and in that case reports the queues as having no available data or no free space, which is essentially true. For the operations that retrieves pointers, VMCI_ERROR_QUEUEPAIR_NOTATTACHED is now returned, since we don't want to depict a state that isn't correct. Signed-off-by: Marcelo Vanzin commit d93f55cab1a77752334846ee371ad0cafae9fcd9 Author: VMware, Inc <> Date: Tue Oct 19 12:48:46 2010 -0700 lib/log: PRINTF_DECL Signed-off-by: Marcelo Vanzin commit 2b0596e9582355527eda30ee880fcb7d5565446f Author: VMware, Inc <> Date: Tue Oct 19 12:48:31 2010 -0700 lib/lock: top N long users Signed-off-by: Marcelo Vanzin commit 4deb382860111e41a4af1200497bb491c8fef7fa Author: VMware, Inc <> Date: Tue Oct 19 12:48:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d042232513a386620c027666df388a7ba8f1bd80 Author: VMware, Inc <> Date: Tue Oct 19 12:22:20 2010 -0700 lib/log: track the top N unique lock owners Do that for both acquisitions and holdings. Signed-off-by: Marcelo Vanzin commit eb94b9c8cf4fd79edd3614bdedb6e5dfe6520bc5 Author: VMware, Inc <> Date: Tue Oct 19 12:21:58 2010 -0700 Unix Balloon: do not use ASSERT()s in kernel driver Our VMware-defined ASSERT() uses Panic() which is not available in kernel drivers. Instead of implementing stubs we better remove recently-introduced ASSERTS(). Signed-off-by: Marcelo Vanzin commit fa1fed016a72e4790e8752fb1117ecf69b66dd3a Author: VMware, Inc <> Date: Tue Oct 19 12:21:45 2010 -0700 lib/lock: missed a line in an earlier check-in Signed-off-by: Marcelo Vanzin commit cc277c8b121f90aa029a0d6a3b21224bb5917ec0 Author: VMware, Inc <> Date: Tue Oct 19 12:21:35 2010 -0700 lib/lock: capture the return address of the caller differently Right now, regardless of builds, the return address of the caller to an MXUser lock function is captured and passed around. It is only recorded in one place in a debug build. Remove the capturing, making things slightly faster in a release build and provide the ability to see all of the holders of RW lock. Signed-off-by: Marcelo Vanzin commit 388c856ddb39528ebcc2b4b2cf01ed9fff4a1599 Author: VMware, Inc <> Date: Tue Oct 19 12:20:43 2010 -0700 Fix search read error. Fix a search read issue when we fail to stat an entry but still want to return success. The entry was supposed to return a fudged entry with attributes for a regular file, but it failed to set the attribute mask field to say the type was valid. This causes the hgfilecopy operation to be canceled. Signed-off-by: Marcelo Vanzin commit c57e56b06d5fa2b5455a55ff062d3f776a4f9a3d Author: VMware, Inc <> Date: Tue Oct 19 12:19:57 2010 -0700 Lazily attach console when logging to stdout. Instead of attaching a console when configuring the logger, do it when the first log message is written. This ensures that a console only pops up when the application actually tries to use it. The console is also detached when the last log domain using it is shut down. This avoids an issue where consoles would pop up when you configured std logging for a different application, but all applications sharing the tools config file ended up attaching a console to their process. Also fix an issue where an invalid handler was set up for the app's main log domain, which could cause an ASSERT to be hit. Signed-off-by: Marcelo Vanzin commit 707585355ebebee76d68f2b42b35424d7cf2d155 Author: VMware, Inc <> Date: Tue Oct 19 12:19:37 2010 -0700 Tools l10n: relocate the vmsg catalogs to a "l10n" directory. This makes the vmsg-based apps more consistent with the other apps we have. Also rename the Chinese files to "zh_CN" (simplified Chinese) as per l10n team's instructions. Signed-off-by: Marcelo Vanzin commit 8f8cf6acf57a4bb1de0aa939bd94f46f3dbbe1d0 Author: VMware, Inc <> Date: Tue Oct 19 12:19:09 2010 -0700 Minor changes to the Tools plugin API. While working on a VMCF provider plugin, I ran into some issues that are better solved by making some slight modifications to the API. Since the incompatible changes are not really used by any production code yet, and the API is not yet public, these should be OK without the need to change the current "API version". The changes are: . provide a pointer to the plugin that owns an app registration to the app provider's callback. This allows app providers to call the plugin's error callback directly at their own convenience. . add an inline function that plugins can use to print state information in a consistent manner. . add a convenience macro to make calls to VMTools_WrapArray look less cluttered. . stop app providers before sending the SHUTDOWN signal, so plugins can then safely free their internal state without causing issues with app providers that reference that data. Also only call a provider's shutdown handler when it was successfully activated. . allow debug plugins to also export a regular plugin interface. This should make it safer for these plugins to register for signals at the right times, and to also test more complicated applications. . allow debug plugins without a send function. Signed-off-by: Marcelo Vanzin commit 1c090fbb4bcfcb877e92635726464df422a1ea49 Author: VMware, Inc <> Date: Tue Oct 19 12:18:37 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7b7b5d8b018a4a5c9d2e24ec0779b134e7bb6262 Author: VMware, Inc <> Date: Tue Oct 19 12:18:17 2010 -0700 comment cleanups Signed-off-by: Marcelo Vanzin commit fe8bdc3b7569220ba362a8723373adbccfdf18b4 Author: VMware, Inc <> Date: Tue Oct 19 12:18:01 2010 -0700 lib/lock: loose the internal const The internal const lead to a cast in every destroy function. This crept in early on and hasn't been cleaned out. Do so now. Signed-off-by: Marcelo Vanzin commit 1b87515c907f04fb95104d0d9af687e7a1ea518e Author: VMware, Inc <> Date: Tue Oct 19 12:17:30 2010 -0700 lib/lock: add Rank locks One can think of these as read-write locks always acquired for read-shared and the lock is uncontended. Recursive acquisitions are permissible. Another way to think of these "locks" are entities that do rank-checking like a lock but do not provide any form of exclusion. Signed-off-by: Marcelo Vanzin commit 53bcbecd579a353c9e74fe0252557fabb1a1a4c7 Author: VMware, Inc <> Date: Tue Oct 19 12:17:02 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit afd70b6ac6a612eec302320078925868431dd7f4 Author: VMware, Inc <> Date: Tue Oct 19 12:16:47 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8a3dffc5d858fc06a138da38066e72be6ceb4e1f Author: VMware, Inc <> Date: Tue Oct 19 12:16:30 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fbf3f52bea1b0a1a807015fa422fc59e55e71b19 Author: VMware, Inc <> Date: Tue Oct 19 12:16:16 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ae4465fe00255973f468b519e550139e3fd9eb86 Author: VMware, Inc <> Date: Tue Oct 19 12:15:49 2010 -0700 Remove pre-2.6.9 compatibulity code from compat_pci.h Most of the copatibility code is not needed on the newer kernels. Signed-off-by: Marcelo Vanzin commit 71145f452610f0b88b53b89f26c934cc6e2bd615 Author: VMware, Inc <> Date: Tue Oct 19 12:15:30 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1d26e1c2c9e2f109422dfb5755a3ba0ff1cd38ed Author: VMware, Inc <> Date: Tue Oct 19 12:15:08 2010 -0700 String const-ness fixes. Signed-off-by: Marcelo Vanzin commit 7f3591090e9d9d4454eb4167ba0e2ca6d41e6f26 Author: VMware, Inc <> Date: Tue Oct 19 12:13:13 2010 -0700 OVT: fix build. Signed-off-by: Marcelo Vanzin commit 4282418621d9d7d5351ad4e6f450053d411d1f40 Author: VMware, Inc <> Date: Tue Oct 19 12:12:47 2010 -0700 OVT: Unity/GHI depends on GLib/GIO 2.24+. New icon handling code relies on GAppInfo/GDesktopAppInfo from GIO 2.24. Enforce this by having configure.ac test for the library unless user disables Unity, and then make use of the appropriate cppflags/libs macros when building the plugin. Signed-off-by: Marcelo Vanzin commit 4cc9495a67f0a8362f1c9ea2ba67047a4f21a2fa Author: VMware, Inc <> Date: Tue Oct 19 12:12:00 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1ec203766b54c055062b9b16d9ef740698c5609a Author: VMware, Inc <> Date: Tue Oct 19 12:11:41 2010 -0700 Unix Balloon: fix chunk memory allocation handling CS 1162826 introduced regressions in error handling of memory allocation for chunks: - page was not unlocked/freed when we could not get a new chunk to store the page; - we were returning hard error instead of memory allocation error causing inflation cycle to stop prematurely instead of retrying with "sleep" allocation. Signed-off-by: Marcelo Vanzin commit 209891f9a8cc47c76443606550f7978047e56b14 Author: VMware, Inc <> Date: Tue Oct 19 12:11:24 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a72cfc6701385c499da181a3a2508767cb565192 Author: VMware, Inc <> Date: Tue Oct 19 12:11:02 2010 -0700 Internal branch sync. Included in this change: . VIX: Ensure strings are valid UTF-8 when deserializing property lists. . VIX: Don't overflow buffer in list processes. . VIX: Provide the facility to set any single arbitrary attribute for a guest file. . VIX: Fix Authentication Issues. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 43e969ecdfccf20d1064636518ce517844cdb416 Author: VMware, Inc <> Date: Tue Oct 19 12:04:23 2010 -0700 GHI/X11: Reimplement menus, icons using gnome-menus & GIO. This change replaces GHI/X11's handling of launch menus by using libgnome-menu as its XDG menu-spec implementation. As written, this code only works with Ubuntu 10.04 GNOME and KDE guests. (This will be fixed soon.) Signed-off-by: Marcelo Vanzin commit 8091906ec29ab0014eefb0916e330958fd4108f1 Author: VMware, Inc <> Date: Tue Oct 19 12:03:53 2010 -0700 OVT: fix packaging of vmxnet3 driver for Solaris We forgot to copy vmxnet3s.conf into the package and also were looking for it in wrong place. Signed-off-by: Marcelo Vanzin commit 17d6ef275124c17d77932b956c3b3ca780ce9191 Author: VMware, Inc <> Date: Tue Oct 19 12:03:38 2010 -0700 Invalidate the handle data upon failure in VMGuestLib_UpdateInfo. Signed-off-by: Marcelo Vanzin commit 90b662478572bd0fc7bb52a319c1d0086654a2dd Author: VMware, Inc <> Date: Tue Oct 19 12:03:27 2010 -0700 Remove unneeded ghIntegrationInt.h include Signed-off-by: Marcelo Vanzin commit 74d31dc8fe6520e541c4fd4a81d718b042f48fdb Author: VMware, Inc <> Date: Tue Oct 19 12:02:57 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 44d7752de5091b2d74e217d43a246563f67fceaa Author: VMware, Inc <> Date: Tue Oct 19 12:02:33 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 41c5b2e0b350622a84c03a958fbe31676c77b4f8 Author: VMware, Inc <> Date: Tue Oct 19 12:01:06 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 214e3e1eb02f8d2680be38c9b1a8476fcdf8c6df Author: VMware, Inc <> Date: Tue Oct 19 12:00:27 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6e39eb25d84ef5a110a29c67acc176ff96ed67a7 Author: VMware, Inc <> Date: Tue Oct 19 12:00:06 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f5022b18cc6c91e9a4991c8b2228fe066c1f949e Author: VMware, Inc <> Date: Tue Oct 19 11:59:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d9d08b28032b56e1896b20c9fa28ac827a25dea8 Author: VMware, Inc <> Date: Tue Oct 19 11:59:32 2010 -0700 unityCommon.h: Fix GET_LAUNCHMENU_ITEM return value definition. Document flags param to UNITY_RPC_OPEN_LAUNCHMENU. Signed-off-by: Marcelo Vanzin commit 6ac24fc83a37fd9afab90632a42eb7aafc57b0eb Author: VMware, Inc <> Date: Tue Oct 19 11:59:00 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 533d6101d35b94120af0eed64b74d2ebe98685d5 Author: VMware, Inc <> Date: Tue Oct 19 11:58:39 2010 -0700 Unix Ballon: recognize BALLOON_ERROR_PPN_NOTNEEDED condition To avoid trying to lock the pages repeatedly when balloon target was decresed while balloon is being inflated recognize BALLOON_ERROR_PPN_NOTNEEDED status returned by the hypervisor and interrupt the cycle immediately. Also cleaned up the ballon inflation code to match the version used in mainline Linux kernel. Driver version is updated to match upstream version (which will be 1.2.1.2-k). Signed-off-by: Marcelo Vanzin commit d1c23abcd2604bf850a92a4320e15d5f53b6202d Author: VMware, Inc <> Date: Tue Oct 19 11:58:02 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bce03b7ed6b0da3545b801e1a1c636a54a63a180 Author: VMware, Inc <> Date: Tue Oct 19 11:55:20 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 98525b65bb566a06af54445274cb859473733e09 Author: VMware, Inc <> Date: Tue Oct 19 11:55:08 2010 -0700 Remove ifdef GTK2 mess from ghIntegrationX11.c. Signed-off-by: Marcelo Vanzin commit 0b6198f58e0c05f65a153b28c78bb996bd06c7f4 Author: VMware, Inc <> Date: Tue Oct 19 11:54:45 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e1bcc7dd4d669072a160bc58c60e6866c724b209 Author: VMware, Inc <> Date: Tue Oct 19 11:54:15 2010 -0700 Cleanup rpcin interface. Now that vmware-user is gone, there's no code left that needs to work both with the old RpcIn interface and the new RpcChannel interface. So we can do some cleanup: (i) remove the new-style callbacks from the old-style RpcIn interface. The spots in the old code that used the new API were reverted to use the old API. So now code using the old RpcIn interface directly is stuck with the old API. (ii) Remove the RpcInRet type, which was used by VIX code when it needed to compile both in vmtoolsd and vmware-user. That type was added in change 946632. (iii) Remove some debug logging that was ifdef'd out anyway, and didn't make sense in this day and age of mostly binary RPCs. Signed-off-by: Marcelo Vanzin commit 716e7525d944bc7623ccaab52b3b210b867a2005 Author: VMware, Inc <> Date: Tue Oct 19 11:53:49 2010 -0700 Implement "xdr_setpos" in the DynXdr stream. Signed-off-by: Marcelo Vanzin commit 447be025a0ec99f0b210747a99a4a19a8b6dad2f Author: VMware, Inc <> Date: Tue Oct 19 11:53:20 2010 -0700 Extra char at the end on text more than 64K to Linux VM The reason is that the NULL terminator may be missing in this case. The fix is to always add NULL terminator to end of clipboard buffer. Signed-off-by: Marcelo Vanzin commit b419f4048dd40c913b0e7d608742bb2ee0b9bc03 Author: VMware, Inc <> Date: Tue Oct 19 11:52:49 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e27d975c09d3b965a5e5c804bde30cb7cbd0fa2f Author: VMware, Inc <> Date: Tue Oct 19 11:52:30 2010 -0700 Internal branch sync. Included in this change: . Change GHI_GetBinaryInfo to return a string and vector of icons. . Unity: Relocate and rename 'updateChannel'. Signed-off-by: Marcelo Vanzin commit 2a7051838a4ab4ac09edfc17268ff33f002911f7 Author: VMware, Inc <> Date: Tue Oct 19 11:48:18 2010 -0700 Text copy using CTRL+A from KDE fails from guests to host There are 2 different types of selections on Linux: primary and clipboard. Our internal protocol only supports 1 type at a time. The reason for the bug is that with current implementation, we almost pick primary selection if it is available. And in this bug case both primary and clipboard are available, and clipboard data is more recent, but we still pick the primary selection. The fix is to first check timestamp, and if both primary and clipboard are available, we pick the latest one. Signed-off-by: Marcelo Vanzin commit cd0e17b119cf9ff9648527b1cbcd033a128a94b1 Author: VMware, Inc <> Date: Tue Oct 19 11:47:51 2010 -0700 guest info: use common log domain. Modify the log calls in the guest info plugin to use the glib functions, and make sure G_LOG_DOMAIN is set appropriately everywhere by including the shared header file where it's defined. The duplicate guestInfoInt.h header was renamed to getlibInt.h, and a couple of things in it were cleaned up in the process. Signed-off-by: Marcelo Vanzin commit 1536bc8e904394295808b54d3137fd063eeec169 Author: VMware, Inc <> Date: Tue Oct 19 11:47:30 2010 -0700 Internal branch sync. Included in this change: . VIX: Add bounds check in the vix tools code. . VIX: Handle symlinks for file transfer guest operations. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8bffb0f3393741ec12ebdce918459f9a66eeeaea Author: VMware, Inc <> Date: Tue Oct 19 11:42:09 2010 -0700 Fix forwards compatibility with HGFS server HGFS server pack reply for operations fail to set reserved fields to zero. This means that if these reply fields need to be used in the future HGFS clients would not be able to trust the values. The reserved fields must be returned with zero until used. Signed-off-by: Marcelo Vanzin commit 67349a4f7828162706dd8ac8c69cfdd7e3af064b Author: VMware, Inc <> Date: Tue Oct 19 11:41:52 2010 -0700 Check for XDR limits when populating guest info structs. We defined some arbitrary limits for the wire protocol, but our code was not checking for them, relying instead on the serialization code to fail if that happened. The bad side is if that happened, no information was sent to the host, or an older version of the information. This change takes the inverse approach: instead of failing the whole operation, just ignore any entries that would cause an overflow of the defined limits. Then at least we provide some data to the host. Signed-off-by: Marcelo Vanzin commit 7a38caf0398838eeb9618c2b58e44061aec4fe7e Author: VMware, Inc <> Date: Tue Oct 19 11:41:25 2010 -0700 Explicitly ignore SIGUSR2 by default in vmtoolsd. It seems the default handler was making the process exit, which is not what we want. Signed-off-by: Marcelo Vanzin commit 86e1b808867688d98ea9b3c3e024375c7813f543 Author: VMware, Inc <> Date: Tue Oct 19 11:41:10 2010 -0700 Incorrect error code while sending dgram in nonblock mode to host. Actually this error was occuring on both ends. We were incorrectly mapping VMCI_ERROR_INVALID_RESOURCE to EINVAL, which is wrong. It really means we cannot find the destination endpoint. Fixed the mapping. Also discovered a bug in the Linux driver, where we would hit an ASSERT when the length of the buffer passed to recv() was zero. This is a valid case on Linux, recv on a zero-length should pass, so fixed that too. Signed-off-by: Marcelo Vanzin commit abc1c267810c6662f61723a1bf25988892a3716a Author: VMware, Inc <> Date: Tue Oct 19 11:40:37 2010 -0700 Hack in ICU 4.4 Signed-off-by: Marcelo Vanzin commit bbc7934c8fd9b7cf111348fb77de7aeb4bf0fd7d Author: VMware, Inc <> Date: Tue Oct 19 11:39:52 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9fd721df907ffbac3b2616ace26779de32a4bd1e Author: VMware, Inc <> Date: Tue Oct 19 11:39:36 2010 -0700 guest info: ignore interfaces with invalid MAC address. When the OS is messing with interfaces (such as bringing them up or down), the guest info plugin may see an interface with an invalid MAC address, at least on Solaris. Trying to write that iface's data to the nic info structure causes the plugin to crash (probably because addr_ntoa doesn't understand the address and is returning garbage, that we then try to read when writing it as a string). So just skip those. When the gather loop runs again, we'll pick up any changed interfaces. Signed-off-by: Marcelo Vanzin commit 96941cb2f364d938543d11a0102bc86e83763e25 Author: VMware, Inc <> Date: Tue Oct 19 11:39:07 2010 -0700 Extend VMCI kernel interface on Windows to full API. We also add API versioning. There is now vmciKernelAPI1.h and vmciKernelAPI2.h, specifying version 1 and 2 of the API, respectively. vmciKernelAPI includes both of them and thus exports the latest API. Clients can include that file or a specific version. We define VMCI_KERNEL_API_VERSION in each header as appropriate. Signed-off-by: Marcelo Vanzin commit cc807d88d7ba16d591342d6a57f4f608fed400a5 Author: VMware, Inc <> Date: Tue Oct 19 11:37:35 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e6be1d69e4b3741fc5b1b4b0f76312c7b345045a Author: VMware, Inc <> Date: Tue Oct 19 11:37:11 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0ba3c9f789f352e67eae67f453ae16a0b430cc0c Author: VMware, Inc <> Date: Tue Oct 19 11:36:46 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 21f8dd2a001f526f0afd854f2c60885f882979fd Author: VMware, Inc <> Date: Tue Oct 19 11:36:28 2010 -0700 lib/lock: two minor changes Make a run-time check for release (unlock) appear in all builds. Be a bit paranoid about compiler rearranging code. Signed-off-by: Marcelo Vanzin commit 878870c90a8c32a01886a8756db9551066f209dd Author: VMware, Inc <> Date: Tue Oct 19 11:36:02 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 285b40228e6f1c318968246f35023a7fe943dda2 Author: VMware, Inc <> Date: Tue Oct 19 11:35:43 2010 -0700 Relocate the TCLO RPC handlers for Unity & GHI into the plugin layer. This change relocates the TCLO/RPCChannel code from within the Unity & GHIntegration libraries to the Tools Core Services plugin. This gives the Unit & GHI libraries a 'transport neutral' interface so that they can be called from any effectve transport between host and guest. Signed-off-by: Marcelo Vanzin commit 267ae47cdf1def884f3a3b7db60dcc375c5aff13 Author: VMware, Inc <> Date: Tue Oct 19 11:29:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ae5455c77d0f5fcaa3422cef7f25ccbdf9105288 Author: VMware, Inc <> Date: Tue Oct 19 11:29:27 2010 -0700 Retire VMCIQPair_Init Queue pairs allocated with VMCIQPair_Alloc are initialized by either the hypervisor or the VMCI driver (for local queue pairs) and has been doing so since the initial release of VMCI with queue pairs (ws65), so VMCIQPair_Init isn't necessary (and may not do what you think, since it only initializes half a queue pair). So retire it. Signed-off-by: Marcelo Vanzin commit 1d055c9043ee5c42889ddacb0a82df903b664f45 Author: VMware, Inc <> Date: Mon Sep 20 11:30:54 2010 -0700 Updating open-vm-tools version for release 2010.09.19-301124. Signed-off-by: Marcelo Vanzin commit c92a8bfbb406a906bcd2fb9ef6801f92c5b64d1f Author: VMware, Inc <> Date: Mon Sep 20 11:25:42 2010 -0700 Internal branch sync. Included in this change: . VIX: add new opcodes for TerminateProcess, DeleteFile, DeleteDirectory. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 346e544a23a088333fd7c5e2ec43a7843d203160 Author: VMware, Inc <> Date: Mon Sep 20 11:21:58 2010 -0700 open-vm-tools: create a separate vmusr .desktop file. Also install the desktop file into $(sysconfdir)/xdg/autostart. Signed-off-by: Marcelo Vanzin commit 30dbb17af40a3db47c32265d406cd5e96e65614b Author: VMware, Inc <> Date: Mon Sep 20 11:21:07 2010 -0700 Implement Windows hibernation support This change improves the VMCI Windows guest drivers handling of hibernation. Before this change, any device state that is partly or fully mirrored in the device driver as well, would become out of sync when coming out of hibernation, e.g., queue pairs would no longer be allocated on the hypervisor side but the guest driver would still believe that they were active. This change deals with such state in two ways: 1) For queue pairs, all non-local queue pairs are converted to local ones when going into hibernation. This part utilizes the exisiting support on the Windows host side for converting queue pairs to local memory (on the Windows host side it is used when the VMX goes away). 2) For doorbells, we simply reregister any doorbells when leaving hibernation. Signed-off-by: Marcelo Vanzin commit efa7a0d2baec0c0fbf1a5a7d841c48f2b925f49b Author: VMware, Inc <> Date: Mon Sep 20 11:19:39 2010 -0700 Bump tools version. Signed-off-by: Marcelo Vanzin commit 81441f38d722331edff6b1314e754808fe9a9255 Author: VMware, Inc <> Date: Mon Sep 20 11:19:22 2010 -0700 Fix compiler warning. Some versions of gcc complain about this code. Signed-off-by: Marcelo Vanzin commit 939ee57b945f12f9c4f56c8c3bfcd9b2ceb6581d Author: VMware, Inc <> Date: Mon Sep 20 11:19:13 2010 -0700 Remove comment from open-vm-tools. It looks weird without the context. Signed-off-by: Marcelo Vanzin commit 51f836075e94d4d7f43d2759f3d8745881f7e806 Author: VMware, Inc <> Date: Mon Sep 20 11:19:00 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 847d7baff99f91f3cbf2eb8aeb600e8abdc133d6 Author: VMware, Inc <> Date: Mon Sep 20 11:18:41 2010 -0700 Bump Tools version. Signed-off-by: Marcelo Vanzin commit b1258681cc02b126b1384c2ab800f71ce7e5be1a Author: VMware, Inc <> Date: Mon Sep 20 11:18:25 2010 -0700 Linux VMCI: get rid of BKL BKL is being removed from the kernel and we should not be using it either. Unstead of trying to use lock_kernel()/unlock_kernel() acquire vmci_dev.lock mutex when entering IOCTL code and make sure that we fully initialize device state before registering the character device. Also rename old locked IOCTL handler into vmci_legacy_ioctl() and vmci_unlocked_iocctl() into vmci_ioctl() and add some __init/__exit/__devinit/__devexit markings. Signed-off-by: Marcelo Vanzin commit 53155a810b18c81bc87bb7fcbfa812fb76bb5351 Author: VMware, Inc <> Date: Mon Sep 20 11:17:34 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit da62421d40818ad3d92e9dc2db87bd5058d08581 Author: VMware, Inc <> Date: Mon Sep 20 11:17:19 2010 -0700 Remove VMCISock_XXX wrappers. Signed-off-by: Marcelo Vanzin commit 96cec70284ccc77251586f51bbe13fd58efbeaf2 Author: VMware, Inc <> Date: Mon Sep 20 11:16:50 2010 -0700 Fix doc. Signed-off-by: Marcelo Vanzin commit 63e5f943fa8a0e2264ae90365d6491e5d8ca9db5 Author: VMware, Inc <> Date: Mon Sep 20 11:16:21 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 604b3ce0926c567e9d8df176c15ff2b698f9eeaf Author: VMware, Inc <> Date: Mon Sep 20 11:15:59 2010 -0700 vmbackup: provide better errors to the host. Allow providers to set an error message in the backup state object, which is then used to construct the full error message. The "errorMsg" field could probably have been done in a cleaner way, but right now that would require too much churn in the plugin's internal API (which needs some more thorough cleanup at some point). Signed-off-by: Marcelo Vanzin commit 7578527c3a9ffd35df86d1a2317b0b3a98a275e0 Author: VMware, Inc <> Date: Mon Sep 20 11:15:33 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2d84f814615ed081fd652e5d37294bfde1b040a0 Author: VMware, Inc <> Date: Mon Sep 20 11:15:19 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 366f9cc5d87a57d722b9cfc7c2b048ace084bffe Author: VMware, Inc <> Date: Mon Sep 20 11:15:00 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 375e78ddd204fad1bd90a9b46c3ebbe4c8fe874c Author: VMware, Inc <> Date: Mon Sep 20 11:14:19 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6173b61146c18d094ceb83a03e529c579d2bb3c2 Author: VMware, Inc <> Date: Mon Sep 20 11:13:40 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1dfbf49d2fcdbc6501fb357968097c0011a9a35e Author: VMware, Inc <> Date: Mon Sep 20 11:11:52 2010 -0700 ghIntegration: introduce internal gnome-menus-2.30.2. Includes our hacked in ghIntegrationX11.c, guarded by REDIST_GMENU macro. Signed-off-by: Marcelo Vanzin commit 81b25eca0265b41b73bae325e8dc6159a05592d5 Author: VMware, Inc <> Date: Mon Sep 20 11:10:27 2010 -0700 Adjust Muls64x32s64 constraints to allow PIC Signed-off-by: Marcelo Vanzin commit 7807acd77dbebab24b93f170c94ec17c845d0fce Author: VMware, Inc <> Date: Mon Sep 20 11:10:00 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6ed6dd706dadf931ef05156d3b89cbe117a0e298 Author: VMware, Inc <> Date: Mon Sep 20 11:09:32 2010 -0700 Fix minor memory leak. Signed-off-by: Marcelo Vanzin commit 0b166ce0540a87985168880282499e1af04201c2 Author: VMware, Inc <> Date: Mon Sep 20 11:09:20 2010 -0700 open-vm-tools: fix FreeBSD build. Can't use GNU make commands: open-vm-tools has to build with non-GNU make also. Signed-off-by: Marcelo Vanzin commit 22cee117bd899e5d9de3735d7aa54f57bb4e2424 Author: VMware, Inc <> Date: Mon Sep 20 11:09:04 2010 -0700 open-vm-tools: remove SLPv2Parser. No code seems to use it anymore. Signed-off-by: Marcelo Vanzin commit 84cb383de0658e27f3597379c83e77d3b275ccfd Author: VMware, Inc <> Date: Mon Sep 20 11:08:42 2010 -0700 lib/file: dump EXTERN from header file It's unnecessary. Signed-off-by: Marcelo Vanzin commit 78921c3e4f9ab4b0eb876c36d886555f3852bc30 Author: VMware, Inc <> Date: Mon Sep 20 11:08:26 2010 -0700 Internal branch sync. Included in this change: . VIX: refactor error translation code. . VIX: properly recognize symlinks to directories . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit de7fa1adcda6791d46117218c1ce0360db6c9e51 Author: VMware, Inc <> Date: Mon Sep 20 11:07:51 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c2752e7e881585914a47b827e54a37f64dac097f Author: VMware, Inc <> Date: Mon Sep 20 11:07:28 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e5bfd6a2c25485b2fbaac1617784cacffab3917d Author: VMware, Inc <> Date: Mon Sep 20 11:07:07 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7fd6651b573032fbc496ce0733764b6333ad01d2 Author: VMware, Inc <> Date: Mon Sep 20 11:06:52 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 93751808da3ae239402c91203886de95b8ed0f59 Author: VMware, Inc <> Date: Mon Sep 20 11:06:15 2010 -0700 Changes to add guestlib ioctl handlers. Signed-off-by: Marcelo Vanzin commit 666492c0eb38a0944e2387e947e43b8038407ba2 Author: VMware, Inc <> Date: Mon Sep 20 11:05:36 2010 -0700 Internal branch sync. Included in this change: . VIX: properly set username and use working dir for StartProgram . VIX: refactor the message parsing code so that the Tools endpoints can use it. . DnD: remove performance regression workaround. . Unity: register the RPCs for Window Commands. . VIX: Pass the user environment block when starting a child process while impersonating. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 333ce66e089072a2b58f849819b8e8864cdeba05 Author: VMware, Inc <> Date: Mon Sep 20 11:04:52 2010 -0700 More HGFS-over-VMCI backouts. Signed-off-by: Marcelo Vanzin commit e5f7bd135aa7b8b7a047770c51668749b5ef5ec9 Author: VMware, Inc <> Date: Mon Sep 20 11:04:36 2010 -0700 More HGFS-over-VMCI backouts. Signed-off-by: Marcelo Vanzin commit ea635fc5fa09b43962bdacb7192712cec6d82208 Author: VMware, Inc <> Date: Mon Sep 20 11:04:22 2010 -0700 More HGFS-over-VMCI backouts. Signed-off-by: Marcelo Vanzin commit 5295cade5df872517605627bd7eac5ee10039360 Author: VMware, Inc <> Date: Mon Sep 20 11:04:05 2010 -0700 Move HGFS-over-VMCI backouts. Signed-off-by: Marcelo Vanzin commit 08bc05699fc4b79d6671b34ae33ab50cbf9d149f Author: VMware, Inc <> Date: Mon Sep 20 11:03:49 2010 -0700 Backing out all the stuff related Hgfs Over VMCI. Signed-off-by: Marcelo Vanzin commit dddf5ecaca6d5e9a177b7af97e42f18ceb41d2df Author: VMware, Inc <> Date: Mon Sep 20 11:03:29 2010 -0700 Unregister legacy backdoor in X11 UI class destructor. The legacy backdoor copy paste (used by ESX) is registered in an Init function of the X11 UI class. We should only unregister the legacy copy paste when this class is destructed. Up to now, were were doing it as a side effect of resetting dndcp version 3 and higher in response to a reset signal from the plugin framework. This would cause the backdoor copypaste code to unregister at reset without being registered once again because the registration only happened in Init. Signed-off-by: Marcelo Vanzin commit f7ca197a633b06fa90fe10412dce41859f74dc58 Author: VMware, Inc <> Date: Mon Sep 20 11:03:04 2010 -0700 Don't crash tools if backdoor is disabled. Four fixes: . the provider list is empty when we don't detect the backdoor, so need to check for NULL when cleaning it up. . check if backdoor is available before trying to execute a command when invoking "vmtoolsd --cmd". . unity plugin shouldn't initialize itself if rpc channel is not available. . ditto for dnd. Signed-off-by: Marcelo Vanzin commit 8600e0481903174a0bda46433e384d121b1770dc Author: VMware, Inc <> Date: Mon Sep 20 11:02:13 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 74df9d079e357ff9b71336ffd326eee9a5c66dad Author: VMware, Inc <> Date: Mon Sep 20 11:01:49 2010 -0700 Fix open-vm-tools builds. Signed-off-by: Marcelo Vanzin commit 7f1866540e3045d4b64561c26c732bd23033dd19 Author: VMware, Inc <> Date: Mon Sep 20 11:01:41 2010 -0700 Don't panic when shared folders are disabled. Recent code changes to allow hgfs to function over multiple transport (backdoor, vmci) introduced some asserts and channel switching logic which was broken. When Shared folders are disabled there are no channels present and this lead to few problems: a) Each channel has allocator functions that allocates memory in the form it requires. When there are no channels - it panics. Bad. b) Earlier when channel connection failed we would try to re-establish connection in send. We can't do that now since each send relies on its allocator functions to do the right thing. c) Don't bail out when you do not find any channel, since user can enable shared folder any point in time and expects it to work. Signed-off-by: Marcelo Vanzin commit 5bb19b4278b72234fc9d4c6a5b90bb6d44c24d89 Author: VMware, Inc <> Date: Mon Sep 20 11:01:19 2010 -0700 Guest side changes corresponding to host side cleanup. Signed-off-by: Marcelo Vanzin commit fc5b91404342d93140f718acb4c058459c491ed5 Author: VMware, Inc <> Date: Mon Sep 20 11:00:42 2010 -0700 Instantiate mac implementation in copyPasteDnDWrapper::Init(). Signed-off-by: Marcelo Vanzin commit 578c5e1578ee60640d87b4383770fd2a626f096c Author: VMware, Inc <> Date: Mon Sep 20 11:00:08 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 488304cac2469db4f9e838c749b30a6be88e8497 Author: VMware, Inc <> Date: Mon Sep 20 10:59:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 963767fe62ac2ab01b70f34c2118c62451da8e61 Author: VMware, Inc <> Date: Mon Sep 20 10:59:17 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 68bf08078a7dc23ed818cd251f62f9391f8e88c8 Author: VMware, Inc <> Date: Mon Sep 20 10:58:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2b0ef4cba181a4088a2bc377e427c087390320c2 Author: VMware, Inc <> Date: Mon Sep 20 10:58:31 2010 -0700 VMCI support for Hgfs in Mac OS X. Only Synchronous. Now that abstraction is done, let's introduce VMCI channel. This change only implements synchronous case. Next change will be for async case. Signed-off-by: Marcelo Vanzin commit 6fd9e15fd24acf0635e0f956a88f778d3986ff3f Author: VMware, Inc <> Date: Mon Sep 20 10:58:00 2010 -0700 Remove ASSERT. Close can be called twice on us. Relax few asserts to DEVEL only. Signed-off-by: Marcelo Vanzin commit 9e5c67bb2945baf25ae9328a0b9ba983c0e3ebe6 Author: VMware, Inc <> Date: Mon Sep 20 10:57:21 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d126277f153eaf3773b7ae317d590157c06731fb Author: VMware, Inc <> Date: Mon Sep 20 10:56:16 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b54c22b7d481587ac9e16d379080935997067649 Author: VMware, Inc <> Date: Mon Sep 20 10:55:41 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f7aa86487e367e29593f3e29cbd1061f215ff88b Author: VMware, Inc <> Date: Mon Sep 20 10:55:22 2010 -0700 OVT: do not package snippets of Microsoft KB code MS does not like us distribute their KB code in our open source products so fiolter it out before packaging - we do not ship Win32 in open-vm-tools anyway. Signed-off-by: Marcelo Vanzin commit 8d5a060986eec5a714db5cc66d1e9b911d3e6baa Author: VMware, Inc <> Date: Mon Sep 20 10:54:59 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d4ad55b377e3c92070a0a32937db18257804d206 Author: VMware, Inc <> Date: Mon Sep 20 10:54:37 2010 -0700 lib/log: trivial cleanup Signed-off-by: Marcelo Vanzin commit 3588b1ca6649b89ddf79fd61f88332f47ec30f7f Author: VMware, Inc <> Date: Mon Sep 20 10:54:23 2010 -0700 Support getopt_long for toolbox-cmd on Win32. Seems the function was added after toolbox-cmd was written, so we can use it now. Signed-off-by: Marcelo Vanzin commit 9a4de64ca3fdab877fe7e176ac79e67e4733eec4 Author: VMware, Inc <> Date: Mon Sep 20 10:53:35 2010 -0700 Internal branch sync. Included in this change: . relocate the Unity operations enums into unityCommon.h. . fix File_DeleteDirectoryTree to not fail when asked to delete a dir that doesn't exist. . refactor VIX code that deals with environment variables. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1cf18ea7c30d9de3567a887a7a8f8207d7ed8ba8 Author: VMware, Inc <> Date: Mon Sep 20 10:51:05 2010 -0700 Remove GLIBC_VERSION detection from configure.ac. Change 1133525 added support for detecting the glibc version using features.h, so there's no need for the configure-time checks. Signed-off-by: Marcelo Vanzin commit 5ebc047b987936e7184ad07d75b498bf0025f9cf Author: VMware, Inc <> Date: Mon Sep 20 10:50:52 2010 -0700 open-vm-tools: move guestlibV3.x to libguestlib directory. Signed-off-by: Marcelo Vanzin commit ed2a3d6b0f5cdb8a6637020df823f2b33be56f07 Author: VMware, Inc <> Date: Mon Sep 20 10:50:34 2010 -0700 Hide VMCI symbols and only export that are needed. Hiding all the VMCI symbols by default and only exporting the ones that are needed. Also changed few usage of private symbols in vsock with public ones. I mostly tried to export all the symbols that were exported for linux. Signed-off-by: Marcelo Vanzin commit f1895e6f6c1fba2f2fd984830b07ddc84a2e325b Author: VMware, Inc <> Date: Mon Sep 20 10:50:01 2010 -0700 Fixing obsolete HGFS protocol support Payload size must be at least siZeof HgfsReply. HgfsServer returns payload size 0 on error for obsolete HGFS versions. Fixing to return at least header size. Signed-off-by: Marcelo Vanzin commit 12961b2440679a086106a6fd91c1a048a8b5b085 Author: VMware, Inc <> Date: Mon Sep 20 10:49:47 2010 -0700 Only enter gtk_main_iteration when Tools app main loop is active. If vmtoolsd mainloop is, or becomes, inactive, we need to stop issuing pointer grab clipboard checks. It was advised the way to do this was to look at the main loop field of the tools app context and see if it is active, and only enter gtk_main_iteration() if so. Signed-off-by: Marcelo Vanzin commit 11fc2c99ac3cebbdf3121a40009d175e3f4de564 Author: VMware, Inc <> Date: Tue Aug 24 12:59:21 2010 -0700 Updating open-vm-tools version for release 2010.08.24-292196. Signed-off-by: Marcelo Vanzin commit 94e63742d734b41638d37580602de4232da5ece6 Author: VMware, Inc <> Date: Tue Aug 24 11:49:31 2010 -0700 open-vm-tools: fix build of HGFS module for FreeBSD. Signed-off-by: Marcelo Vanzin commit 6be57c8356ea109f167894469000a355f77e0ca8 Author: VMware, Inc <> Date: Tue Aug 24 11:49:14 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6b51ece25f6d92612b6214dbfee09a71d27fd2dd Author: VMware, Inc <> Date: Tue Aug 24 11:48:58 2010 -0700 Add const to a static variable. Signed-off-by: Marcelo Vanzin commit 3c2bd94c652ee37ce7301bd17861ebe7d69b3c33 Author: VMware, Inc <> Date: Tue Aug 24 11:48:04 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cc0b010c915feabc5b547767cf51605f987d8a60 Author: VMware, Inc <> Date: Tue Aug 24 11:47:48 2010 -0700 lib/log: moved defines where they belong These defines have nothing to do with the log. Put in the "right" place. Signed-off-by: Marcelo Vanzin commit 1d1ae3a5766dcfc1bafde26e7c398bb9e63a7207 Author: VMware, Inc <> Date: Tue Aug 24 11:47:28 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fb1ef5bc273f9c8ca0064ddf779cf39e1f074453 Author: VMware, Inc <> Date: Tue Aug 24 11:46:55 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 94787e6db135433f95b7a88e44eacf4fd2e5b174 Author: VMware, Inc <> Date: Tue Aug 24 11:46:23 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2a2ab8c70b5c3f1a59dc0dc8267fdf904e16a684 Author: VMware, Inc <> Date: Tue Aug 24 11:46:07 2010 -0700 Check for return value from VMCIMemcpy in Enqueue/Dequeue. The EnqueueLocked() and DequeueLocked() functions were not checking for the return code from the platform specific VMCIMemcpy funtions. Because of the they were returning success, despite the mem copy failing. Fix: Check for the return value of VMCIMemcpy funtions and update the produceTail/consumeHead pointers only if mem copy succeeds. Also return error code if mem copy fails. Signed-off-by: Marcelo Vanzin commit 80a47b5055f37088d270648f422eea096bd5c78a Author: VMware, Inc <> Date: Tue Aug 24 11:45:54 2010 -0700 lib/log: Log_WriteLogFile -> Log_WriteBytes Make the name fit the function - no formatting, written to log (may not be to a file anymore). Signed-off-by: Marcelo Vanzin commit 228b9d87460fda4abf8d18ce5d476d2cface4415 Author: VMware, Inc <> Date: Tue Aug 24 11:45:41 2010 -0700 Fix VMCI guest driver compile use of (un)lock_kernel A recent change introduced the use of (un)lock_kernel in the VMCI guest driver. We need to include linux/smp_lock.h to get the definition on certain kernels. This change adds that. Signed-off-by: Marcelo Vanzin commit 632637581d6665970d6c3b706e59e88749dfc3be Author: VMware, Inc <> Date: Tue Aug 24 11:45:24 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ee3cb0b66323bd411a440384c82f002c66f44e51 Author: VMware, Inc <> Date: Tue Aug 24 11:45:10 2010 -0700 Add a monotonic glib timer to Tools. While investigating bug 600636, I noticed that glib timers sometimes would get into a funny state where they'd ask the main loop to sleep for a very short time, even though they weren't ready to be fired. I couldn't figure out why they were doing that, but anyway, we can't easily modify glib. Instead, add a new timer, based on a monotonic clock, to use in preference to the glib timer. This is more important for quick firing timers such as the RPC loop or the C&P pointer poll than it is for coarser-grained timers such as the guest info gather loop. Along with it, change the rpcin library and the dnd plugin to use the new timer in place of the glib one, and avoid re-creating the timer on every iteration of the rpcin loop - do it only when the delay has changed. I was only able to reproduce the original issue on a 32-bit Win XP VM. I tried a 64-bit Win 7 VM and a 64-bit Linux VM, and both seemed to behave fine. Signed-off-by: Marcelo Vanzin commit fbf114b040763febcb512b63801bce52a0f19a02 Author: VMware, Inc <> Date: Tue Aug 24 11:44:49 2010 -0700 Channel abstraction for Mac OS. In preparation for Hgfs over vmci, let's abstract the channel for Mac OS i.e remove all the assumptions of backdoor so that it can transparently over both backdoor and vmci. Signed-off-by: Marcelo Vanzin commit 0a199b5245cfcf996c1181549867aeb3f4965f3f Author: VMware, Inc <> Date: Tue Aug 24 11:44:34 2010 -0700 Fixing reporting reply size for obsolete (V1 and V2) HGFS protocol versions. HGFS V1 and V2 protocol structures do not have a separate header. The reply size must be just sizeof reply structure, should not add size of the header to calculate total reply size. Signed-off-by: Marcelo Vanzin commit 0ccd508b924a02b770c5f3846720511d7eeefd06 Author: VMware, Inc <> Date: Tue Aug 24 11:44:10 2010 -0700 Get vmci module to work on 2.6.36-rc1 vmci had no idea that ioctl is going away, and that for supporting 32bit apps on 64bit hosts it should provide compat_ioctl. Even for devel-only functionality. Fixed. Signed-off-by: Marcelo Vanzin commit c613e3ba77b4e30af7a88cd5b682808e6e8afdd6 Author: VMware, Inc <> Date: Tue Aug 24 11:42:57 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit be7d327333ae0a72d59ca0e4876a3fdb9f25780d Author: VMware, Inc <> Date: Tue Aug 24 11:42:42 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c722c4a706d5a59e09298e237a600b9639329451 Author: VMware, Inc <> Date: Tue Aug 24 11:42:23 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8fcfa39decfe1a8534645b088d82675fed0e344b Author: VMware, Inc <> Date: Tue Aug 24 11:41:49 2010 -0700 Internal branch sync. Included in this change: . vix: add new opcodes for intiateFileTransfer[To|From]Guest operations. . add new vmbackup entry point that allows more configurability of the quiescing operation (only enabled on Win32 currently). . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit eafe5aed439bd28901e1aa8bc88a327a05d9cf6e Author: VMware, Inc <> Date: Tue Aug 24 11:38:14 2010 -0700 Handle resourcePoolPath overflow situation (host side). We enforce the maximum size of resourcePoolPath on both ends of guestlib wire protocol (both versions 2 and 3). We handle larger buffers by not sending them in the existing protocols. This change is also a minor revision to the guestlib v3 protocol (host side only) to add another field to the v3 layout to send the larger resourcePoolPath buffer as a byte array. The guest client side is omitted here. Signed-off-by: Marcelo Vanzin commit ffdd805633537a294e20d22e62db2096aeb3836b Author: VMware, Inc <> Date: Tue Aug 24 11:37:18 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 78d7278d69d3adbc34ea914b06933bb2bebfb816 Author: VMware, Inc <> Date: Tue Aug 24 11:37:05 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 20a648b4cb7e502e96ad039f2fb654815540cf2e Author: VMware, Inc <> Date: Tue Aug 24 11:36:19 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3f12a8a166fdd54aae7585a81a300676914bf844 Author: VMware, Inc <> Date: Tue Aug 24 11:35:58 2010 -0700 Open Solaris is back to Solaris 11 Signed-off-by: Marcelo Vanzin commit 9bb42d3dd4e371ba607957e5edd0861fd45f9eb4 Author: VMware, Inc <> Date: Tue Aug 24 11:35:42 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9d7e4d53d269e4624f7a725693802aa0b10f5ae9 Author: VMware, Inc <> Date: Tue Aug 24 11:35:23 2010 -0700 Internal branch sync. Included in this change: . vix: add per-API configuration . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ab6f8fb904b0c72abec30bcb4dba93851cc0cdfa Author: VMware, Inc <> Date: Tue Aug 24 11:33:08 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6de95d869a79f8279d2be0f62b55858752ff0cb3 Author: VMware, Inc <> Date: Tue Aug 24 11:32:48 2010 -0700 vixTools: Init userArgs before passing it to ProcMgr_ExecAsync. Signed-off-by: Marcelo Vanzin commit 4d2090a09faa3225e33c300af66683466da9ae14 Author: VMware, Inc <> Date: Tue Aug 24 11:32:30 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5fb7f000b6a42d0bac005b1c8c0675c7679b04fb Author: VMware, Inc <> Date: Tue Aug 24 11:32:07 2010 -0700 Null Pointer Check 1. Modified all exported functions to validate the input parameter for non-null. 2. Modified VMCIQPair_Detach to return a result (instead of void) based on success/failure of the detach operation. 3. Bumped the guest driver version. Note: Functions calling VMCIQPair_Detach (like vsock module) should probably start checking the result now. However, this would most likely not affect existing calls. Signed-off-by: Marcelo Vanzin commit 4dab5e6420348c156835ac5b2cf9100c23c91736 Author: VMware, Inc <> Date: Tue Aug 24 11:31:44 2010 -0700 Fix some escaping issues with HGFS file path names Fix the following: - HGFS clients call HgfsEscape_Undo twice for each name - HGFS server incorrectly calls HgfsEscape_Undo on names returned to clients as part of a directory listing. - HGFS escaping code has an assert inappropriately placed - Fix HGFS server from unescaping share names which cannot have been escaped. They should only be escaped if required by a client. Signed-off-by: Marcelo Vanzin commit 795097f6eff5a7489dd685303fad13f40c685680 Author: VMware, Inc <> Date: Tue Aug 24 11:31:27 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 33074daff9938d87bfe9197278453969ac49feb3 Author: VMware, Inc <> Date: Tue Aug 24 11:31:05 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fbf80980d4d9a61b02ef00bbcbd45e3d7938b8b7 Author: VMware, Inc <> Date: Tue Aug 24 11:30:42 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4429cd150d26b7f339f5f7d9846a3ed994f69274 Author: VMware, Inc <> Date: Tue Aug 24 11:30:20 2010 -0700 Fix bug #355531 by removing kill-switch for Solaris guest operations. This changeset removes the VIX_ENABLE_SOLARIS_GUESTOPS macro to enable Solaris guest operations by default. Signed-off-by: Marcelo Vanzin commit e1a59704e5e22d4db4c5735535a3ec9576fec096 Author: VMware, Inc <> Date: Tue Aug 24 11:29:58 2010 -0700 Autodetect glibc version in vm_basic_defs.h For a long time, we have been passing GLIBC_VERSION_NN macros via compiler command line. These options can be autodetected without too much work. The header provides full version information, provided we skip this header for kernel compiles. This makes it a lot easier to upgrade glibc versions... Signed-off-by: Marcelo Vanzin commit e44e028f57188204f3987ba7feff8a14b2f1f653 Author: VMware, Inc <> Date: Tue Aug 24 11:28:59 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 93f2901deb2fe6478ff63c3bff9c624f679cab5e Author: VMware, Inc <> Date: Tue Aug 24 11:28:31 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b3ac8db2f079a58c428ccaf000494b881026fa10 Author: VMware, Inc <> Date: Tue Aug 24 11:28:15 2010 -0700 Fix renames on non-Windows hosts The check if the target file exists and the rename was not to replace an existing target was badly coded. The logic left the status field incorrectly set to file not found which was fine for not replacing the target but then the rename was missed due to a check on the status being successful for the existance check. Signed-off-by: Marcelo Vanzin commit e029057084a55e38b33b5388f012671395ab6849 Author: VMware, Inc <> Date: Tue Aug 24 11:27:16 2010 -0700 GuestInfo: DiskInfo: Skip lib/wiper and call Win32 APIs directly. Rather than deal with the wiper library and its filters, this change instead makes Win32's GuestInfo_GetDiskInfo call directly against Win32 volume management APIs. POSIX guests will (for now) continue to use the wiper library. Signed-off-by: Marcelo Vanzin commit 90bd2deee3452c0bb69dab6d4ccc96ec170095e2 Author: VMware, Inc <> Date: Tue Aug 24 11:26:34 2010 -0700 GOS table: add new definitions Add Open Solaris (solaris 11) and Debian 6 entries. Signed-off-by: Marcelo Vanzin commit 692dba69d25ae9f40c8b22281f07d0e52b2a0875 Author: VMware, Inc <> Date: Tue Aug 24 11:25:50 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8b06403cc797d269b96eae1845b29595a0275ee1 Author: VMware, Inc <> Date: Tue Aug 24 11:25:35 2010 -0700 Call FileIO_Invalidate() before FileIO_Open() We need to call FileIO_Invalidate() before calling FileIO_Open(). Otherwise FileIO_Open() ASSERTS on obj and beta builds. Signed-off-by: Marcelo Vanzin commit fe2ba7f4289784dc85b16e3558b239f084d2b705 Author: VMware, Inc <> Date: Tue Aug 24 11:25:19 2010 -0700 Update the Hgfs server interface for tools The Hgfs server interface was redone to work with multiple transports however the tools side was left fudged. Now upgrade the tools side interfaces into the Hgfs server. The server interface is now hidden within the HgfsServerManager library. The tools clients of the HGFS server now use the HgfsServerManager interfaces directly: HgfsServerManager_DataInit HgfsServerManager_Register HgfsServerManager_Unregister HgfsServerManager_ProcessPacket An HgfsServerManager guest is now built into the hgfs library with the server and other related HGFS library code. The Hgfs server guest does not do any RPC handling now as the library would have required building with both RPC libraries and as such the RPC registering and callbacks are pushed back into the caller. At some future point when only one RPC library is used and all callers are built in the same way, the HGFS RPC calls can be pushed back into the HGfsServerManagerGuest to remove duplication of code. Signed-off-by: Marcelo Vanzin commit e42806e82ac995976a928f2c6f978736bb0f7397 Author: VMware, Inc <> Date: Tue Aug 24 11:24:28 2010 -0700 Use dentry with valid d_count When we do getattr on a file, let's use dentry with a valid d_count. This matters when you have more than one dentry for an inode. You want to use dentry with valid d_count. Signed-off-by: Marcelo Vanzin commit 024c3fc21ecb7f7b15c54cf49007b8ff583193ff Author: VMware, Inc <> Date: Tue Aug 24 11:24:13 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2c576b27528da1a5329dde97c7caab99ed821a72 Author: VMware, Inc <> Date: Tue Aug 24 11:23:48 2010 -0700 lib/file: remove a wasted test Util_SafeMalloc can't fail, no need to check for it. Signed-off-by: Marcelo Vanzin commit 260d0cb8076b056f422f1f2cb89c0c65664c02c1 Author: VMware, Inc <> Date: Tue Aug 24 11:23:31 2010 -0700 lib/file: stringify errors The lib/file is very good about stringifying an error code but two places were missed. Signed-off-by: Marcelo Vanzin commit 6efd5b7500ea215da653e3597f03815e84364481 Author: VMware, Inc <> Date: Tue Aug 24 11:22:55 2010 -0700 Internal branch sync. Included in this change: . ghi: use the base glib types for main loop and service objects rather than passing the ToolsAppCtx pointer around. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c74ef5aeeeba28ae876a866458de7f653032451d Author: VMware, Inc <> Date: Tue Aug 24 11:20:35 2010 -0700 Fail entire operation in case of an error while reading agruments. In the function ReadArgsFromAddressSpaceFile we should fail the entire operation instead of just breaking while comparing offsets. Otherwise, we might get a DynBufArray with some elements having a NULL for the buffer. This may lead to a NULL pointer dereference in ExtractCommandLineFromAddressSpaceFile. Signed-off-by: Marcelo Vanzin commit 381efce35fb04961c8dc22d66b2731388541b904 Author: VMware, Inc <> Date: Tue Aug 24 11:20:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5a5fd1a52d5c4547047b29e2c24690bcddb2d83e Author: VMware, Inc <> Date: Tue Aug 24 11:19:52 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7f274e70941555ee15b38e17d2be7b24ccbd561e Author: VMware, Inc <> Date: Tue Aug 24 11:19:22 2010 -0700 Fix StrUtil_StartsWith. When the two strings diverge at the last non-NUL byte of the prefix string, or at the byte preceding a trailing path separator, the functions incorrectly return TRUE. Signed-off-by: Marcelo Vanzin commit f220bac40ac15a4bc22206390791552b615fdfe7 Author: VMware, Inc <> Date: Tue Aug 24 11:18:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6588aa5211daaac56688f33c7fd7dfca4e58a4bf Author: VMware, Inc <> Date: Tue Aug 24 11:17:42 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ceba0015617713f9522ac1956581302ff2350f87 Author: VMware, Inc <> Date: Tue Aug 24 11:17:00 2010 -0700 Distinguish openSUSE from SuSE. Workstation had a single "opensuse" key (as opposed to "opensuse10" and "opensuse11") in guest_os_common.c. This was moved to guest_os.h and used in lib/misc. Signed-off-by: Marcelo Vanzin commit 8fdef3e9853520ed10913e7b8e77c6951383e601 Author: VMware, Inc <> Date: Tue Aug 24 11:16:07 2010 -0700 Fix System_Uptime. This change keeps the POSIX impl. of System_Uptime as a new function, System_GetTimeMonotonic. This was done in order to keep around a cheap routine suitable for use by the EventManager library. Signed-off-by: Marcelo Vanzin commit 107a60874a13541210d60c420e758a13113c7234 Author: VMware, Inc <> Date: Tue Aug 24 11:15:33 2010 -0700 Bug 590562: vmtoolsd consumes 15% cpu all the time In old VMwareUser we have a pointer loop which runs 10 times per second. With new vmtoolsd we mistakely set the time interval to be 10 ms, which means the pointer loop runs 100 times per second, and consumes lot of cpu. Changing the time interval to 100 ms fixes the bug. Signed-off-by: Marcelo Vanzin commit a14f1c01080e4fe8eda08d34fce94008dd560249 Author: VMware, Inc <> Date: Tue Aug 24 11:15:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5ac0fb0661ac71e632e16f3a628c19f7c5a3f6ad Author: VMware, Inc <> Date: Tue Aug 24 11:13:31 2010 -0700 VMCIDoorbell_Destroy: Assert when destroying non existent handle. The VMCINotificationUnregister function in the vmci guest driver was asserting FALSE when destroying a doorbell handle that does not exist in the internal hash. This was causing the guest kernel to panic when trying to destroy a handle that was already destroyed. We should probably just return VMCI_ERROR_NOT_FOUND here instead of asserting. Signed-off-by: Marcelo Vanzin commit 6d18ce7930b78b4e70e91be4b030ba92dc3aa378 Author: VMware, Inc <> Date: Tue Aug 24 11:10:34 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9e1978450075f6b90e0ef97f52c86b46e523ae2b Author: VMware, Inc <> Date: Tue Aug 24 11:09:47 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7c30596936727c7b7c79470f9e225f436a1d0563 Author: VMware, Inc <> Date: Tue Aug 24 11:09:28 2010 -0700 Make hgfs build on 2.6.35 without warnings. 2.6.35 ChangeLog http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.35-rc1 mentions this: "drop unused dentry argument to ->fsync". Fix hgfs to accomodate that. Signed-off-by: Marcelo Vanzin commit 41534c815f78467447af04b493142415bd90bb31 Author: VMware, Inc <> Date: Tue Aug 24 11:09:10 2010 -0700 Add a couple more tests to the vmtoolsd basic tests. . add more fields to the test XDR struct to really make sure auto marshaling / unmarshaling is working. . validate the result of the "msg3" RPC so we check that auto marshaling is working when returning data. Signed-off-by: Marcelo Vanzin commit 8415a8472988a61e16458c6e6721a3f7ea34ab3c Author: VMware, Inc <> Date: Tue Aug 24 11:08:55 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7c8c75a82a7fcd98fbdeb62180259e51fea3afd3 Author: VMware, Inc <> Date: Tue Aug 24 11:04:43 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 596ec23f931cee54cca98346f590842d20a5700b Author: VMware, Inc <> Date: Tue Aug 24 11:03:51 2010 -0700 PollDefault: Log lock data before ASSERT to aid debugging Add a function to print out an MXUserRecLock's internal data, and use that before an ASSERT in PollDefault that checks for real-time callback that is starved by a lock. This is necessary as for some reason the hostd cores that were generated due to this ASSERT never have the state of the lock and the lock owner at the time of the ASSERT (the lock is always free in the core and the thread that probably held the lock is not anywhere such lock is held). Signed-off-by: Marcelo Vanzin commit fc1b2ac506635e412c17c4e9d20f75811c05cd4c Author: VMware, Inc <> Date: Tue Aug 24 11:03:27 2010 -0700 Fix a possible buffer overrun. Remove an extra space character. We want argBufPtr to point to the end of the argBuf buffer, where the '\0' character is. So argBufPtr should be set to argBuf + strlen(argBuf). Otherwise, if the argument string fully fills up argBuf, we could have a buffer overrun when *argbufPtr = '\0' is performed. The other change removes the extra space character at the end of cmdLine in the ExtractCommandLineFromAddressSpaceFile function. Signed-off-by: Marcelo Vanzin commit 0172b1a7aa5ce42adf2c43d70bda1add8b11b6f6 Author: VMware, Inc <> Date: Tue Aug 24 11:03:07 2010 -0700 lib/misc: fix a commment Signed-off-by: Marcelo Vanzin commit e171ba21c4ddb09e6f9c1dadf90eaabf2355a1c8 Author: VMware, Inc <> Date: Tue Aug 24 11:02:54 2010 -0700 Internal branch sync. Included in this change: . VI process guest op support: RunProgram, ListProcesses and ReadEnvVariables . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 46e6170bf4acc8f314e2529d5c23e08e67534656 Author: VMware, Inc <> Date: Tue Aug 24 10:56:49 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a04b116b0fa7525e8880d8de15d6f48dc25aae36 Author: VMware, Inc <> Date: Tue Aug 24 10:56:26 2010 -0700 Address Memory leak and Kernel panic. This change fixes 3 problems: 1) Memory leak - linux kernel module once unloaded did not return pages back to the guest. 2) sizeof incorrect value. Instead of getting size of a structure I was getting size of a pointer. Fix is obvious. 3) Unlink elements on the host, so that list is in sane state after all the elements are removed. Signed-off-by: Marcelo Vanzin commit 66c5fde536a5659e8f85598b314b1c276373b3f1 Author: VMware, Inc <> Date: Tue Aug 24 10:56:02 2010 -0700 Move cpFileContents.x to dndcp plugin directory in open-vm-tools. This is a plugin-specific definition and should be built by the plugin itself. Also add a license file for the plugin, which I forgot previously. Signed-off-by: Marcelo Vanzin commit 3225e5e0ef726b07a998cc1eddb35645edf514b5 Author: VMware, Inc <> Date: Tue Aug 24 10:54:34 2010 -0700 When a handle being passed down to VMCIDoorbell_Create() was not initialized to VMCI_INVALID_HANDLE, a doorbell was being created with context id 0 (hypervisor id) and a large resource id (likely the garbage value in handle.resource). On the guest side, modified VMCINotifyHashAddEntry so that if the handle passed down is not VMCI_INVALID_HANDLE and if the context id of the handle is not the context id of the VM, VMCI_ERROR_INVALID_ARGS will be returned. Signed-off-by: Marcelo Vanzin commit 7810434f0b376e9f74f6f3259233346935761fcb Author: VMware, Inc <> Date: Tue Aug 24 10:53:55 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 590557918256a9384842d6ae12d24590a278ae37 Author: VMware, Inc <> Date: Tue Aug 24 10:53:35 2010 -0700 unity: remove deprecated code. Signed-off-by: Marcelo Vanzin commit 250ef390c05d44791b4b30555d0b148435330b07 Author: VMware, Inc <> Date: Tue Aug 24 10:52:43 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1c558bad8c11544d450e12c6de02f331a7c8c04a Author: VMware, Inc <> Date: Tue Aug 24 10:52:22 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3ba1bec1045e92ff3914d7f65c76668dda1c27b3 Author: VMware, Inc <> Date: Tue Aug 24 10:51:59 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d2ab1b67c4f5168ae004a832b813624b6aa3f575 Author: VMware, Inc <> Date: Tue Aug 24 10:51:42 2010 -0700 Changes for VIX Guest Operations support for Solaris. The changes in this changeset collectively implement guest operations support for Solaris VMs. The changes to each of the c files are described in more detail below. lib/procMgr/procMgrPosix.c, lib/procMgr/procMgrSolaris.c: new implementation of impersonation and listProcesses for Solaris lib/authPosix.c: allow user authentication to work for Solaris lib/misc/posixDlopen.c: allow Posix_Dlopen for Solaris guests lib/system/systemLinux.c: allow System_[Set,Get]Env for Solaris, required for VixVM[Write,Read]Variable service/plugins/vix/vixTools.c: Enable calling of Guest operations for Solaris Guests lib/file/fileIO.c, bora/lib/file/fileIOPosix.c Allow solaris guests to call FileIO_Pread Signed-off-by: Marcelo Vanzin commit 47b544b3f72486ddf3e78212b40af2a59c6093b1 Author: VMware, Inc <> Date: Tue Aug 24 10:50:07 2010 -0700 Remove some dead code. Signed-off-by: Marcelo Vanzin commit 0e217ba2c742e197e09b5602cb64d8594f7f0d98 Author: VMware, Inc <> Date: Tue Aug 24 10:49:44 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1af3fbc8c3a81d5d35b53b4071a76e35dd9d5e9e Author: VMware, Inc <> Date: Tue Aug 24 10:48:47 2010 -0700 open-vm-tools cleanups. . remove lib/resolution, now unused. . remove duplicated stubs. . remove checks for old glibc versions, add check for glibc 2.4. . get rid of VMWARE_USER_LDADD. . add HAVE_DNET so we don't use DNET_LIBS unless it's defined. Signed-off-by: Marcelo Vanzin commit 7d538a8d3be36543af6e98c870434e1203fd14bc Author: VMware, Inc <> Date: Tue Aug 24 10:43:28 2010 -0700 lib/misc: improve LogFixed a bit The LogFixed routines can easily provide improved output by adding a simple interpolation correction to the table lookup value. Signed-off-by: Marcelo Vanzin commit 19c481a733ad7c7cb005157eea8844dfe84722ad Author: VMware, Inc <> Date: Tue Aug 24 10:42:21 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit aeb525957b39bc1248af4392733297081e0ec21c Author: VMware, Inc <> Date: Tue Aug 24 10:42:03 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fb2a730e8250b699c5634d7854aa777c8608945e Author: VMware, Inc <> Date: Tue Aug 24 10:40:19 2010 -0700 Fix build warning. We changed all if _MSC_VER to if defined(_MSC_VER) a long time ago to quiet warnings. Some always sneak back in... Signed-off-by: Marcelo Vanzin commit 1e057064e02856cfa0e69bdfcf5db164bd2ceb2d Author: VMware, Inc <> Date: Mon Jul 26 15:07:53 2010 -0700 Updating open-vm-tools version for release 2010.07.25-280253. Signed-off-by: Marcelo Vanzin commit b15cffc7961b97129d0b77643db42b4d4d8e3da7 Author: VMware, Inc <> Date: Mon Jul 26 12:27:03 2010 -0700 open-vm-tools: link guestInfo plugin to dnet. Since the plugin now calls dnet directly, it needs to link to it. Signed-off-by: Marcelo Vanzin commit a58460dd277b35e5572f6c6344efdebbfdca23b6 Author: VMware, Inc <> Date: Mon Jul 26 12:26:18 2010 -0700 Fix Solaris open-vm-tools build. Need to include crypt.h to get crypt(3). Signed-off-by: Marcelo Vanzin commit fcfea968018d0fce362fa9a7ea6b97f031cfa4ec Author: VMware, Inc <> Date: Mon Jul 26 12:26:03 2010 -0700 ghi: use native environment from app ctx. The "environ" variable seems to be a leftover from olden vmware-user days. The ToolsAppCtx struct contains the native environent for plugins to use in vmtoolsd-land. Also add a new line at the end of unity.x to make rpcgen quiet. Signed-off-by: Marcelo Vanzin commit 406d631c991ec4ce2d2d192499f63f85ec5a28f0 Author: VMware, Inc <> Date: Mon Jul 26 12:25:29 2010 -0700 Fixing probelms with legacy guests. Making sure that accurate packet length is returned to the guest. Signed-off-by: Marcelo Vanzin commit af7fe2d9d62d9bcf5dd8262b3d56116f983bf6e2 Author: VMware, Inc <> Date: Mon Jul 26 12:24:54 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 577f712f9daccaf535c1c364a34abf2e63df4942 Author: VMware, Inc <> Date: Mon Jul 26 12:24:11 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 53f2e9563c5607a5261e6bc478cfd2711bf2dfda Author: VMware, Inc <> Date: Mon Jul 26 12:23:51 2010 -0700 Remove GLIBC_VERSION_21 and _22 Glibc version 2.2 dates from RedHat 7.1 (released 2001). Any code we have on modern branches no longer works on things that old (guest tools are frozen, hosted lost support long ago). This change removes a bunch of GLIBC_VERSION checks from our code. NOTE: GLIBC_VERSION_23 checks are still in use; we support such old OSes (RH7.1-3, RH8.0, RHEL2.x) with the guest tools build. Signed-off-by: Marcelo Vanzin commit 2151863a188dd75bd3db8f87f357e5a816b27c23 Author: VMware, Inc <> Date: Mon Jul 26 12:23:35 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f735f387ed6bbafe388425fff5328f89a347f18e Author: VMware, Inc <> Date: Mon Jul 26 12:23:17 2010 -0700 lib/log: Formally handle the maximum message length Provide a way to ask what the maximum message length is. Use it to avoid creating a line too long within the MXUser lock statistics code. With a bit of minor code rearranging, only a single, full-sized message buffer needs to be kept on the stack to log a message. Signed-off-by: Marcelo Vanzin commit a632d6dbf7281f7b4ecd277378fbc9bca64e8f71 Author: VMware, Inc <> Date: Mon Jul 26 12:22:56 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cf34910f4b90df9552319ee9c3a960ebbdf08727 Author: VMware, Inc <> Date: Mon Jul 26 12:22:34 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1ef628bbb724813f80d3acdef237fc44b0684c20 Author: VMware, Inc <> Date: Mon Jul 26 12:21:25 2010 -0700 Add the unity plugin to open-vm-tools. . stage the new sources. . move unity-specific libraries to the new plugin directory. . move unity/ghi XDR definitions to the new plugin directory. . re-enable build of a few libraries used by the unity code. . explicitly include str.h to avoid a compiler warning. . move dndGuest.h back into the lib/include directory since unity uses it. Signed-off-by: Marcelo Vanzin commit d6bf6f96b8bb690089cd6b60b57aa3511161a2d5 Author: VMware, Inc <> Date: Mon Jul 26 12:20:10 2010 -0700 Fix euidaccess call in lib/file cs 899353 added some broken code inside #ifdef GLIBC_VERSION_24. Since GLIBC_VERSION_24 was erroneously never set, this went unnoticed for a long time. This change creates a new Posix_EuidAccess() function and calls it directly instead of embedding euidaccess() inside FileAttributes() in lib/file. When Posix_EuidAccess() is unavailable, the fallback uses FileAttributes(). Signed-off-by: Marcelo Vanzin commit c9996568d8bc28116113d0cbbb194aca845facb1 Author: VMware, Inc <> Date: Mon Jul 26 12:19:38 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8f16f153110992702811a78182c0cffaa7f39e9c Author: VMware, Inc <> Date: Mon Jul 26 12:19:13 2010 -0700 Add dndcp plugin to open-vm-tools. Also stage the source for libraries only used by the plugin under the plugin's directory, instead of the top-level "lib" directory. Signed-off-by: Marcelo Vanzin commit c9fcdc3125c63c48a040b99be5b5fd4efe0bd642 Author: VMware, Inc <> Date: Mon Jul 26 12:18:45 2010 -0700 Add desktopEvents plugins to open-vm-tools. Signed-off-by: Marcelo Vanzin commit 8bcc041d1aad1e055bd9a40284644f39b69b8ba5 Author: VMware, Inc <> Date: Mon Jul 26 12:18:29 2010 -0700 Cleanup lib/guestapp. This changes removes a bunch of code that is not used anywhere in Tools. This includes: . CPName versions of RpcOut functions. . A lot of GuestDict related functions. . Some old mouse and copy/paste-related functions with no call sites. There are still other functions that we'll be able to remove once we're not building vmware-user anymore. Signed-off-by: Marcelo Vanzin commit c38d7520e4d5826d9f3f508f897a43b700fec2bf Author: VMware, Inc <> Date: Mon Jul 26 12:17:37 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit eb02af07da1b9bc2a6dd073d383a761449b37da6 Author: VMware, Inc <> Date: Mon Jul 26 12:17:14 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 65a49b32ec49c5928e88f4e18410089cd2a7f5ab Author: VMware, Inc <> Date: Mon Jul 26 12:16:48 2010 -0700 Internal branch sync. Included in this change: . bump tools version. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 55b6931ac5c82d426eb8e87cd366bab3a4f71e35 Author: VMware, Inc <> Date: Mon Jul 26 12:13:53 2010 -0700 Remove vmware-user from open-vm-tools. This change does a little bit more than just remove the sources. It also modifies the vmware-user-suid-wrapper so that it executes "vmtoolsd -n vmusr" in open-vm-tools. The desktop file is also fixed to execute the suid wrapper, which is the right thing to do. Also remove locationsdb.c from open-vm-tools, since it's not used there. Signed-off-by: Marcelo Vanzin commit 33c0c23dd6e72cb487236887976278693301e1d2 Author: VMware, Inc <> Date: Mon Jul 26 12:13:27 2010 -0700 lib/log: prepratory changes before adding syslog I've always disliked that logInt.h was in public. Fix that. Also add some missing function headers. Log and Warning functions that accept va_lists were missing so I added them, using one of them in one place to remove one logInt.h inclusion. Signed-off-by: Marcelo Vanzin commit dad20f7d44ce4e6814a390bc402e4409584bbb7b Author: VMware, Inc <> Date: Mon Jul 26 12:13:06 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 808be8161f5be3aef93b841ee3386de211a8a46d Author: VMware, Inc <> Date: Mon Jul 26 12:12:21 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4182fee9505198ece32500e354ca74e160a865c0 Author: VMware, Inc <> Date: Mon Jul 26 12:11:56 2010 -0700 GuestInfo: Init NetUtil directly. Whoops. On Windows one must call an initialization routine for netutil to be of any use. vmtoolsd handles this, but now that GuestInfo links netutil in statically, this plugin must manage its own iphlpapi resources. Signed-off-by: Marcelo Vanzin commit a5e11c0ab083b45d68bc645e6f49468fe79d5dff Author: VMware, Inc <> Date: Mon Jul 26 12:11:01 2010 -0700 Well if you're going to do that... COMPILER_MEM_BARRIERS were added for lib/file. lib/lock should get them for the same reasons... Signed-off-by: Marcelo Vanzin commit a193a67acced50d5b60521cde159373b39850fa3 Author: VMware, Inc <> Date: Mon Jul 26 12:10:11 2010 -0700 Get rid of ghIntegrationStub. The stub library is not needed anymore now that we can just choose where to compile the respective plugin. Also remove leftover unityStub sources and Makefile.am. Signed-off-by: Marcelo Vanzin commit ec1d86e20185c16f865616021d4afa82e027320b Author: VMware, Inc <> Date: Mon Jul 26 12:09:35 2010 -0700 lib/lock: review comments Don't "Ex", make the name formally "Silent". Signed-off-by: Marcelo Vanzin commit 7f8094c6d1ae51a9aa96aa99520fc8d9ba434402 Author: VMware, Inc <> Date: Mon Jul 26 12:09:20 2010 -0700 lib/lock: improve a comment Signed-off-by: Marcelo Vanzin commit c38dccd22168bb66bdf7667d5ffeda489bf5b868 Author: VMware, Inc <> Date: Mon Jul 26 12:09:10 2010 -0700 lib/lock: improve a comment and review comment Improve a review comment. One review comment from the ulRec.c change can be propogated to the other objects. Signed-off-by: Marcelo Vanzin commit 17aec297772e701a8bdaf32fef92ddb08db3f470 Author: VMware, Inc <> Date: Mon Jul 26 12:08:50 2010 -0700 lib/log: the log lock has magical properties The log facility must use a lock. If the lock acquisition routine were to use Log/Warning an infinite recursion is set up: Log -> Lock -> Log -> Lock ... It makes it imperitive that the log facility lock never have the potential to emit a message. We just don't know where a developer will place a Log/Warning. The fix for this is an alternative lock creation routine, limited to the recursive lock required for the log facility, that allows the specification of a new parameter - beSilent (damn it!). Ultimately this works because the core locking logic is inherently silent; only the statistics code, if present, has to be bypassed. Since this ultimately fixes a PR, the work-around to this issue can also be removed. Signed-off-by: Marcelo Vanzin commit 78edb75f945446d10206c0bbe30a364765fa5bda Author: VMware, Inc <> Date: Mon Jul 26 12:08:15 2010 -0700 lib/lock: Intel specific statistics are no longer true Originally the timing routines used by lib/lock were RDTSC based, making them Intel specific. Once nanosecond clocks were available from lib/misc (i.e. Hostinfo_SystemTimerNS) the RDTSC and Intel dependencies were eliminated. This is trivial... remove the ifdef preventing statistics unless they were Intel architecture. Signed-off-by: Marcelo Vanzin commit 0ebed09d12e8f0e665539993a5f4f284edb16bdb Author: VMware, Inc <> Date: Mon Jul 26 12:06:58 2010 -0700 Internal branch sync. Included in this change: . Use right Linux APIs to access multicast address list. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6a1434770ab2efb29600cd432ead8b110772cd22 Author: VMware, Inc <> Date: Mon Jul 26 12:05:45 2010 -0700 lib/lock: Detect contention in multiple ways The locking code can detect contention in two ways: a) The number of failed acquisitions divided by the total number of acquisitions. b) Detected contention while successfully acquiring. Use the larger of these two to report the contention ratio for statistics. This provides a more flexible way to detect any contention, regardless of how/what is reported. Signed-off-by: Marcelo Vanzin commit 64f2df11d25a9cec6fb8899b4f0df9cb749ac5af Author: VMware, Inc <> Date: Mon Jul 26 12:05:17 2010 -0700 lib/lock: simplified and improved barrier Based on the review comments, remove the emptying state variable and simplify the code appropropriately. Dump the context of the barrier in curContext order, as requested. Signed-off-by: Marcelo Vanzin commit c39f3e139da2e810ce61cb8efcba587f7291f036 Author: VMware, Inc <> Date: Mon Jul 26 12:04:55 2010 -0700 Move GuestInfo library code to plugin. Rather than have feature-specific code be a part of and versioned with vmtoolslib, I moved the GuestInfo library code over to the plugin directory itself. The only call into lib/guestInfo not from the plugin was GuestInfo_GetFqdn, which I moved to System_GetNodeName. Signed-off-by: Marcelo Vanzin commit b6441290a61ff462bfb969a382023ad50a7f796b Author: VMware, Inc <> Date: Mon Jul 26 12:03:56 2010 -0700 ACK! "p5 reopen does it again" Signed-off-by: Marcelo Vanzin commit 449d61991fb8e401ce5b068b3065bd8e14af5269 Author: VMware, Inc <> Date: Mon Jul 26 12:03:35 2010 -0700 lib/lock: move the stats data under a single pointer Each of the MXUser object that collects statistics has its statistical data ifdef compiled into its internal structure. Move the statistical data into a private structure accessed from a single pointer with the private structure. This cleans up a lot of MXUSER_STATS ifdefs which become unnecessary and get the code very close to being able to runtime turn on of statistics in any build. For now, statistics are for stats builds only. All this is done without introducing any overhead to speak of, only one memory read from a cache line already loaded. This is also a prepratory change to fix a problem in Log - the lock allocation cannot call anything that might Log. Signed-off-by: Marcelo Vanzin commit 12ccf4cf7fdcda491349d5f452112d0094e6497f Author: VMware, Inc <> Date: Mon Jul 26 12:02:56 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2ac5c97d56c7bb6e60928d6c2a334ca33c14a9db Author: VMware, Inc <> Date: Mon Jul 26 12:02:21 2010 -0700 lib/lock: break out your Kevlar This was pointed out in comments from the original barrier review; I had a "bullet proof barrier" change coming. Here you go. Barriers are often used like this: barrier code barrier If the code is small enough or the code has a variable amount of work and/or there are scheduler "funnies" it is possible to have a thread arrive at the second barrier while threads are still exiting the first barrier. That can lead to some very unobvious and strange bugs. The original barrier would detect this and assert. Let's do better. This version catches the threads entering and parks them separate from the threads leaving ensuring the everything works as expected; no violation of the principal of least surprise. This adds little in the way of complexity and memory use while providing a great deal of protection (~type IIa). Signed-off-by: Marcelo Vanzin commit d7d499784586267bfef9ef0042c9866347e309d2 Author: VMware, Inc <> Date: Mon Jul 26 12:01:27 2010 -0700 lib/misc: a nicer fix for codeset The uint8 ensures no signs get in the way. We're fine with them but this way is even clearer. Signed-off-by: Marcelo Vanzin commit 0fc17e2029a99aa13e5fb9379798fba954e2b822 Author: VMware, Inc <> Date: Mon Jul 26 12:00:54 2010 -0700 lib/misc: remove uint8 from codeset.c No need for uint8 in codeset, use char instead. Signed-off-by: Marcelo Vanzin commit 25f8b001257a86dd00c28c287a5b99c44a45dcb2 Author: VMware, Inc <> Date: Mon Jul 26 12:00:36 2010 -0700 lib/file: the other, other shoe drops (Martians) The file locking code returned a "void *" for the lockToken. This isn't as nice as using an opaque type. Alter the data type and fix any affected code ccordingly. Signed-off-by: Marcelo Vanzin commit 3d257fc8cb53228d2bc894761a15bada2c588cbe Author: VMware, Inc <> Date: Mon Jul 26 11:59:50 2010 -0700 lib/lock: holdStart under stats The holdStart variable is stats specific... save some space in other builds. Signed-off-by: Marcelo Vanzin commit 259c60ec2f6f5a8f1e8d0c47ead0d66a1b3fe3c7 Author: VMware, Inc <> Date: Mon Jul 26 11:59:27 2010 -0700 lib/file: the other shoe drops Remove the pathName argument from FileLock_Unlock as it is now unnecessary. This is essentially a mechanical change however the fileTrack wrapper routine had to change to convert the lockToken into a fileName so it could function properly, requiring a custom function to be created. Signed-off-by: Marcelo Vanzin commit ae1372e11b1ad196abc1dede9e635f555e10735b Author: VMware, Inc <> Date: Mon Jul 26 11:58:39 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7fcde32e60991fbe42d3ae392281141665b866bf Author: VMware, Inc <> Date: Mon Jul 26 11:58:19 2010 -0700 lib/misc: review comment Improve a comment. Signed-off-by: Marcelo Vanzin commit e58dcbea9aaa5004c613d7c072e5dfaa1b71158c Author: VMware, Inc <> Date: Mon Jul 26 11:58:04 2010 -0700 lib/file: preparatory change toward simplifying FileLock_Unlock The FileLock_Lock routine returns an abstract file lock token representing the lock on the file. There is no functional need to base the name of the file to be unlocked to FileLock_Unlock since the token should already contain the necessary information for the unlock. This change lays the groundwork. The next one will clean up all of the FileLock_Unlock callers. In the end all of this is being done because "it's the right thing to do" and because Kevin has a need for it - it will make a mainMem cleanup easier. Signed-off-by: Marcelo Vanzin commit f0a97d7dc017195ba0d1f41f8ee2faa22a515e66 Author: VMware, Inc <> Date: Mon Jul 26 11:57:43 2010 -0700 Remove compat_wait.h Another chunk of code thst is not needed on recent (2.6.9+) kernels. Signed-off-by: Marcelo Vanzin commit 53cb47e07ffdd2dbbfb40f560bc8dfb664446038 Author: VMware, Inc <> Date: Mon Jul 26 11:56:57 2010 -0700 Cleanup VIX code. Move vixTools library into the plugin directory, and clean up legacy code not used anymore. Signed-off-by: Marcelo Vanzin commit d2bf9fc41825b187742109dbf470aad466b6e811 Author: VMware, Inc <> Date: Mon Jul 26 11:56:06 2010 -0700 lib/misc: UTF8<->UTF32 conversions While doing this, provide a piece of missing functionality - determining the length of the UTF8 string in code points (unicode characters). The existing length routines return the length of the string is (physical) bytes. Signed-off-by: Marcelo Vanzin commit 162045d50435635d7a51a7e430ecdb23fe240e82 Author: VMware, Inc <> Date: Mon Jul 26 11:55:24 2010 -0700 Correctly initialize the vm_atomic.h variables. Also unrelated changes from private branch merge. Signed-off-by: Marcelo Vanzin commit 09b5de4b00a0e50a65e0f958eba9caeb4e8f6cfa Author: VMware, Inc <> Date: Mon Jul 26 11:54:04 2010 -0700 Merge common unity/ghi library changes from private branch. This change touches the shares unity/ghi libraries, making them incompatible with their current use in vmware-user. The plugin is not yet built. Signal from unity plugin to dndcp plugin to notify transitions into and out of unity state. Signed-off-by: Marcelo Vanzin commit 397796b83aca5c8769921b16f6a57ba2a5502d1a Author: VMware, Inc <> Date: Mon Jul 26 11:53:28 2010 -0700 Merge common dnd code changes from private branch. This merges common dnd code, and makes the code incompatible with its current use in vmware-user. The plugin itself is not built yet. The detWndTest test had to be removed from the build since it now fails to compile. Signed-off-by: Marcelo Vanzin commit 3df0639c4255641bbe39210f36e695a9c3ca600a Author: VMware, Inc <> Date: Mon Jul 26 11:52:41 2010 -0700 Make vmware-user an empty application. This change removes the code from vmware-user, allowing it to build, so that the installer builds still work. This allows changes in the shared libraries (such as lib/dndGuest and lib/unity) to be made to support the new plugins, before switching the installer to consume them. Drop (for now at least) the Unity features from the open-vm-tools package. Stop building vixTools as a standalone library. Signed-off-by: Marcelo Vanzin commit 2d9ddb8ac8fea1234387a3b4c4e64ad94347418c Author: VMware, Inc <> Date: Mon Jul 26 11:50:11 2010 -0700 Always define VMW_NETCREATE_KERNARG for Linux 2.6.33+ To deal with the fact that a change from Linux 2.6.33 adding an extra argument to the create field of struct net_proto_family was backported to certain earlier kernels, VMW_NETCREATE_KERNARG was introduces in change 1065091. Instead of requiring all future PBMs for 2.6.33+ kernels to specify the VMW_NETCREATE_KERNARG, we let VMCI sockets define it for the appropriate kernels. Signed-off-by: Marcelo Vanzin commit 8c422646a1f998bbef9354f038e8f3acdf9b0c24 Author: VMware, Inc <> Date: Mon Jul 26 11:49:46 2010 -0700 Solaris Ballon: fix crash on unload We should finish balloon cleanup before deleting ID space otherwise we will crash when unloading balloon module if we have ballooned pages at the time. This bug was introduced during recent balloon cleanups. Signed-off-by: Marcelo Vanzin commit dffde762df7182e0eaec9a472a81de4985fce7e1 Author: VMware, Inc <> Date: Mon Jul 26 11:49:34 2010 -0700 Bug 580142: internal compiler error: output_operand: invalid We did not touch the function for long time. I guess that some recent gcc bug caused the problem. This will work around the compiler error. Signed-off-by: Marcelo Vanzin commit 249824a661f9d436bb1a68a2f5abec9123d4f9f3 Author: VMware, Inc <> Date: Mon Jul 26 11:49:18 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 65b2421d991916a58eafd4b8fa4ce612fa8c811e Author: VMware, Inc <> Date: Mon Jul 26 11:48:58 2010 -0700 lib/lock: pretty up some code Clean up some code; make the barrier singleton look like the other singleton codes. Signed-off-by: Marcelo Vanzin commit 8c983fe68b75586060405a4a5b398de32caffa32 Author: VMware, Inc <> Date: Mon Jul 26 11:48:10 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d31b9f179d6128aff034000d10690ffa8236127b Author: VMware, Inc <> Date: Mon Jul 26 11:45:31 2010 -0700 lib/lock: standardize the singleton technique Explicitly have a lock pointer and new lock pointer and always read from the atomic storage into the lock pointer. Signed-off-by: Marcelo Vanzin commit b0f20b26f8d556d2e6887b2b05ee33986e8081e2 Author: VMware, Inc <> Date: Mon Jul 26 11:44:28 2010 -0700 . add API enabled properties for VI guest ops . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2ce11f47cd26b577f441d15718bdb6cc0345df2a Author: VMware, Inc <> Date: Mon Jul 26 11:42:31 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0ffdb80a63e542a333acd4e8d361cff247a1f7ef Author: VMware, Inc <> Date: Mon Jul 26 11:42:00 2010 -0700 lib/lock: add a basic barrier test Also formally initialize a field instead of depending on the calloc. The more obvious way will make things easier to understand. Signed-off-by: Marcelo Vanzin commit 00ebae9b80b759d8f963429308c3c12ebdbba59b Author: VMware, Inc <> Date: Mon Jul 26 11:41:22 2010 -0700 lib/lock: computational barrier I had this code lying around and decided it doesn't hurt to have it around. Signed-off-by: Marcelo Vanzin commit a0f720fdb9be4b79604d2c6873713396834c961c Author: VMware, Inc <> Date: Mon Jul 26 11:40:45 2010 -0700 vmblock: Kill stubs.h, use vm_assert.h. Ditch obj build => INVARIANTS for FreeBSD. When I ported vmblock over to FreeBSD, I set things up such that VMX86_DEVEL builds compiled kernel modules with two FreeBSD debugging features, INVARIANTS and WITNESS, enabled. These features require that the kernel also be compiled with those options, else they won't load. This isn't announced anywhere, and people were recently bitten by it. This change now wraps INVARIANTS & WITNESS inside another make variable, EXTRA_FREEBSD_DEBUGGING. Rather than use KASSERT, we'll simply rely on the vm_assert.h approach which eventually leads to Panic (still provided by stubs.c). Stubs.h was removed due to the redefinition of Panic. Signed-off-by: Marcelo Vanzin commit ea3a60a20e6ae64a4c39686f72b33668c4beefb3 Author: VMware, Inc <> Date: Mon Jul 26 11:40:10 2010 -0700 Cite PR 535343 as reason to keep disable-query-diskinfo option. Signed-off-by: Marcelo Vanzin commit ad2cd2272fa42ab019c079bac8d9a1f18821dc4f Author: VMware, Inc <> Date: Mon Jul 26 11:39:13 2010 -0700 GuestInfo: Use consistent function doc style, misc touchups. - TCS callbacks moved to "TCS goodies" block near ToolsOnLoad. - Retrofitted all functions with VMKAPI style doc blocks. - Ditched the "custom delimiter" argument to SetGuestInfo since it wasn't used. - Isolated "send uptime" behavior from the "set capabilities" callback handler. Signed-off-by: Marcelo Vanzin commit bde1798f5b0df0d6c847f5cf8f022b3874610ad6 Author: VMware, Inc <> Date: Mon Jul 26 11:38:54 2010 -0700 Merge resolution set changes from private branch. Mostly integrating change 1073447 into the plugin, but I noticed another old change for which I don't really know the original bug. Signed-off-by: Marcelo Vanzin commit f08c27bb30e4b44bfbbff182d5cf7706985ada7e Author: VMware, Inc <> Date: Mon Jul 26 11:38:01 2010 -0700 Merge vixUser plugin changes from private branch. . vixUser plugin: remove lib/printer + minor cleanups to makefile. . Remove SetPrinter functionality from vixUser plugin. Code was removed from foundryToolsDaemon.c in change 957688. Signed-off-by: Marcelo Vanzin commit f44fd520be3362badbb48bf02a25da6f002dfd18 Author: VMware, Inc <> Date: Mon Jul 26 11:37:35 2010 -0700 g_error -> NOT_REACHED(). Signed-off-by: Marcelo Vanzin commit 16b95c37dee99aa4b1ccdef56d1132739f539023 Author: VMware, Inc <> Date: Mon Jul 26 11:37:07 2010 -0700 Crossport vmtoolsd changes from CS 980554 into vmcore-main. Make sure the main loop doesn't start if a plugin has signaled it top stop during initialization, and avoid doing unnecessary plugin initialization when a plugin requests the container to quit. Signed-off-by: Marcelo Vanzin commit 6601aa522ba9d6494830d183f53397265e67dd59 Author: VMware, Inc <> Date: Mon Jul 26 11:35:47 2010 -0700 Minor cleanups. . remove function typedefs from message.h (they're not used anywhere). . remove function declarations from vixTools.h (functions don't exist). . remove socketMgr.h (not included by anyone anymore). . remove stale GuestInfo_GetSystemBitness prototype. . remove RpcIn_restart() (not used anywhere). Signed-off-by: Marcelo Vanzin commit e13a36aa0925a133a629f1fe5374e9ba765112c2 Author: VMware, Inc <> Date: Mon Jul 26 11:34:03 2010 -0700 Add libhgfs to open-vm-tools. Add the new library, and link the executables that need it to it. Signed-off-by: Marcelo Vanzin commit 42808ef794b7dbf01e4c1f421187f4fabeeb00aa Author: VMware, Inc <> Date: Mon Jul 26 11:33:08 2010 -0700 Modify the gtk toolbox to use vmtoolslib's logging backend. It can't link directly to the shared library (different rpcin implementation needed), so just recompile the needed file. This removes more calls to Debug_* functions in preparation for retiring vmware-user. Signed-off-by: Marcelo Vanzin commit a15574785a213bdfe0e2fa2ac08d421090a63ccc Author: VMware, Inc <> Date: Mon Jul 26 11:32:09 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 58131a2e5be5e8c4cc7bba0a9084b42101bd6632 Author: VMware, Inc <> Date: Mon Jul 26 11:31:00 2010 -0700 Merge changes from private branch. . vmtoolsLog.c includes a change that disables the VMX logger when not building with RpcChannel support. . Add support for Unity options to tools core services framework. Add definitions for the Unity plugin options. Add code to the config file conversion (from old to new style) to convert the Unity options. . Set MAX_SIGNALS to NSIG (not NSIG - 1). On FreeBSD (at least), NSIG is the number of the last signal. Which makes sense since the signal numbers start at 1. Signed-off-by: Marcelo Vanzin commit 02b667f6464aee172c0d22df4cc4dfc69524ef31 Author: VMware, Inc <> Date: Mon Jul 26 11:30:04 2010 -0700 Show folder icon when dragging directories When dragging a folder from the guest to the host we would show the wrong icon next to the cursor. The problem was that there was no way to tell if dragged object was a file or a folder. Fix was to incldue file attributes with the drag information. Note, this change only implements file attributes for Windows tools. Signed-off-by: Marcelo Vanzin commit 065090ac4fb0a82541482daf247f52f9401910b4 Author: VMware, Inc <> Date: Mon Jul 26 11:28:29 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 89588b779bbf2840104940435168c28ca6dbe653 Author: VMware, Inc <> Date: Mon Jul 26 11:27:45 2010 -0700 lib/misc: improve HashTable_Free comments Clearly spell out the difference between free and unsafe free. Signed-off-by: Marcelo Vanzin commit 1a7381f60de1b51a98d92c38712b6e192eea0715 Author: VMware, Inc <> Date: Mon Jul 26 11:26:45 2010 -0700 lib/lock: improve the RW lock comments The allowed usage from RW locks was not clearly spelled out in the appropriate function headers. Signed-off-by: Marcelo Vanzin commit 3f26ad307d33b676a47f5fce484bc24ae442a29f Author: VMware, Inc <> Date: Mon Jul 26 11:26:19 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 67d4c71ddecbf0b0c0c3a697149dc26986bbe42f Author: VMware, Inc <> Date: Mon Jul 26 11:24:23 2010 -0700 Remove compat_file.h Again this is not needed on 2.6.9+ kernels. Signed-off-by: Marcelo Vanzin commit bd7e997927f177f753f26e847a5b4aa7812dcfdc Author: VMware, Inc <> Date: Mon Jul 26 11:24:08 2010 -0700 Remove compat_list.h Kernels 2.6.9 and newer have all required list handling routines. Signed-off-by: Marcelo Vanzin commit 141acd1b7a0a0e2e7b8ba0cebc0eea0419b38f79 Author: VMware, Inc <> Date: Mon Jul 26 11:23:28 2010 -0700 Remove compat_completion.h Nothing from this file is needed on kernels 2.6.9 and above. Signed-off-by: Marcelo Vanzin commit ae872291e21298406ac32757da7da3c604febef8 Author: VMware, Inc <> Date: Mon Jul 26 11:23:18 2010 -0700 Add HashTable_FreeUnsafe to allow freeing of an atomic hash table The MXUser read-write lock wants to free its hash table when the lcok is destroyed, but HashTable_Free has an ASSERT that it cannot be atomic. Let's add another function HashTable_FreeUnsafe to allow freeing of an atomic hash table, but the caller has to ensure that no other thread may be accessing the hash table when it is being freed. Signed-off-by: Marcelo Vanzin commit e09ca5c67710eff931c71d567e68242fcbdd329e Author: VMware, Inc <> Date: Mon Jul 26 11:22:52 2010 -0700 Remove compat_kthread.h Nothing in this file is needed on post-2.6.9 kernels so we can remove it. Signed-off-by: Marcelo Vanzin commit 51f36f77ff0aae9d2bd92c1911f0b7210e7b2c9c Author: VMware, Inc <> Date: Mon Jul 26 11:21:37 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 820e2e929797e607f94e850d916f8e84d4df2850 Author: VMware, Inc <> Date: Mon Jul 26 11:19:38 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit abc390f61ee941ac611ec3719d2ca812415ec369 Author: VMware, Inc <> Date: Mon Jul 26 11:18:25 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ca20549aadf5f4a50606074e7ef2d66722428194 Author: VMware, Inc <> Date: Mon Jul 26 11:17:37 2010 -0700 Fix Tools build. Signed-off-by: Marcelo Vanzin commit def7b579c0a46ee6737df315354419fd41ac857b Author: VMware, Inc <> Date: Mon Jul 26 11:17:27 2010 -0700 Lock rank file cleanup 1. Lock rank defines in vm_basic_defs.h move to a new file mutexRank.h. 2. Existing libMutexRank.h moves to mutexRankLib.h. 3. Fix includes in all files that needed it. Signed-off-by: Marcelo Vanzin commit 8ac5aad5a057f9ed50aa4653fec6a0f2526daef8 Author: VMware, Inc <> Date: Mon Jul 26 11:16:29 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1572d0cf74f12c8d810907e9e7f61b1219f97aaa Author: VMware, Inc <> Date: Mon Jul 26 11:15:51 2010 -0700 Make fallback from V4 to V3 proper. FAST_V4 no longer works on linux because it requires session support and V4 headers. However, V3 fallback should have worked. Some minor fixes to make V3 fallback work. I have also changed KERN_DEBUG to KERN_WARNING, since most distros will only print WARNING messages. Signed-off-by: Marcelo Vanzin commit f68bcd200ae0f47358ad1843e4836133232eccd6 Author: VMware, Inc <> Date: Mon Jul 26 11:15:32 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c708f55b8863d007ab162f498a1e97378b67ea8e Author: VMware, Inc <> Date: Mon Jul 26 11:14:55 2010 -0700 Implement NTP style PLL time slewing This change extends tools time sync to use the core ideas (and system call) from NTP's time synchronization algorithm. I tested this using ATTS for these guests: SLES11-64, RHEL5.4-64, RHEL4.8-32, WinXP-32, Win7-64. All of the results describe are ignoring time spikes caused by apparent time falling behind and catching up (which are not expected to be corrected by tools timesync). * Win7-64 hit a bug in the testing framework. * WinXP-32 looked good (but unchaged from before). * RHEL4.8-32 looks good (I'm using a 1000Hz kernel using the TSC, so the lost tick compensation bug hits very severely and thus provides a good test case for timesync). * SLES11-64: Stayed within 1.5ms (no data for before). * RHEL5.4-64: Stayed within 300us (before change it was 25ms). Signed-off-by: Marcelo Vanzin commit 8c11fa6711fdcfe32360e6cca32c660f4b2d50ba Author: VMware, Inc <> Date: Mon Jul 26 11:13:02 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9aba4c04a1f7747060cc324d80030c8893e84e6a Author: VMware, Inc <> Date: Mon Jul 26 11:12:43 2010 -0700 Internal branch sync. Included in this change: . Implement vix and tools code for CreateTemp[File|Directory]InGuest. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 363b4b17aba4e33b2aa3de4cdc507c5e121820b9 Author: VMware, Inc <> Date: Mon Jul 26 11:12:01 2010 -0700 GuestInfo: Identify SLED as SLES. Per bug 572710 comment #8: "With respect to running of a VM, we have decided that we do not need to differentiate between SLES & SLED. So we offer only one selection for the two. I think in the future, the UI will begin to call it 'SLE' in most cases." Signed-off-by: Marcelo Vanzin commit 8645f5074c3e66b80df9a0bfcf600041142fe1e7 Author: VMware, Inc <> Date: Mon Jul 26 11:11:20 2010 -0700 lib/lock: report MXUserSemaphore timed wait success/failure Only successes were being reported for statistics. We can now properly handle success and failure reporting. Signed-off-by: Marcelo Vanzin commit 772ff235b6563cc258dc61e846f77047ba877186 Author: VMware, Inc <> Date: Mon Jul 26 11:09:20 2010 -0700 lib/lock: improved MXUser acquisition statistics We can now see the data from try operations (including timed ones) and semaphores. Signed-off-by: Marcelo Vanzin commit ecf11f852b824c427907669498b878e7cf51a0ce Author: VMware, Inc <> Date: Mon Jul 26 11:08:53 2010 -0700 lib/lock: minor preper work before statistic upgrade Minor internals changes to prepare for collecting improved MXUser acquisition statistics. Signed-off-by: Marcelo Vanzin commit 753a6d5ed66f600814067d2c7f22e2b2965dedf3 Author: VMware, Inc <> Date: Mon Jul 26 11:08:24 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 996fda056af074d78a5ed9938aa03f96db69445e Author: VMware, Inc <> Date: Mon Jul 26 11:07:38 2010 -0700 lib/file: pick up some review comments Simplify the code a bit by doing an st_dev check first. This will avoid statfs whenever possible Signed-off-by: Marcelo Vanzin commit 4e1cbf3ddb75567dfb2ad1290b1bb9bd739fd967 Author: VMware, Inc <> Date: Mon Jul 26 11:06:58 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e739259665ba131f685afa263b43d7772746bb96 Author: VMware, Inc <> Date: Mon Jul 26 11:05:52 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6c12bff5efaf4e39771ef409472a5b941a28f202 Author: VMware, Inc <> Date: Mon Jul 26 11:05:23 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3036a1740dc0e834b4e4fc479eb2db1f68ceea57 Author: VMware, Inc <> Date: Mon Jul 26 11:04:26 2010 -0700 lib/lock: MXUserSemaphore stats on TimedDown Report more statistics. Clean up TryAcquire for Excl and Rec locks. Signed-off-by: Marcelo Vanzin commit 7a179f07ca458810e113c0626a10e338b7c1e80e Author: VMware, Inc <> Date: Mon Jul 26 11:03:18 2010 -0700 lib/lock: MXUserSemaphore statistics Capture MXUserSemaphore statistics. Signed-off-by: Marcelo Vanzin commit fe2c9af09edd390277907e92645c2521fffa26c1 Author: VMware, Inc <> Date: Mon Jul 26 11:03:03 2010 -0700 Fix some lib/user stubs to address various breakages. Signed-off-by: Marcelo Vanzin commit 4c4e550992d8031a07e4b0a0668c9ccc044313da Author: VMware, Inc <> Date: Mon Jul 26 11:02:19 2010 -0700 Remove unneeded compatibility definitions from compat_sock.h Now that the cutoff for non-legacy modules is 2.6.9 we can cleanup our sources a bit. Signed-off-by: Marcelo Vanzin commit 298d28352b44996f6a4df19d8a8496592b7102d6 Author: VMware, Inc <> Date: Mon Jul 26 11:02:09 2010 -0700 Rank the lib/log lock This was a toughie. The problem here is that everyone calls Log(), Warning(), and the like while holding their own locks, yet LogWriteLogFile() calls a great deal of code itself while processing those calls. Some of this code is high-level and either already takes its own lock or is scheduled to get locking. We considered several radical solutions, but none of them seemed satisfactory. We could have LogWriteLogFile() simply dump messages on a leaf-lock-protected queue and return, but then we'd have to create a lazy-writer logging thread. We could have LogWriteLogFile() not do complicated stuff like log file rotation itself, but schedule that for later, but again we'd have to invent a lazy mechanism (either a thread or callbacks provided by the log module initializer). And so on. I settled on a practical solution: coming up with criteria for code that can be called underneath the log lock, and then moving around code in log.c to make it so. The criteria, for now, are quite simple - no code that LogWriteLogFile() calls under the log lock may take its own lock in turn. Basically this means stick with lib/misc and lib/file. Signed-off-by: Marcelo Vanzin commit 728a37655370fd8e0623436d6298ee09a40192c8 Author: VMware, Inc <> Date: Mon Jul 26 11:00:06 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 68a4c971e00f258eda1365382dcfc208e49c1c84 Author: VMware, Inc <> Date: Mon Jul 26 10:59:28 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8594c695e2245161e32480b4cf87cbdec075910e Author: VMware, Inc <> Date: Mon Jul 26 10:58:43 2010 -0700 Use inline asm in Atomic_Read64. As a reaction to the issue encountered with Atomic_Write64 (PR 541793), there's been a request to use inline asm in Atomic_Read64 as well. Signed-off-by: Marcelo Vanzin commit 4261a480d1cec4218cd0a6e08b8011f02895ddfa Author: VMware, Inc <> Date: Mon Jul 26 10:58:01 2010 -0700 Fix the build Signed-off-by: Marcelo Vanzin commit ff656cf9c844210ed9db43cf5e603969e50ce6d1 Author: VMware, Inc <> Date: Mon Jul 26 10:57:47 2010 -0700 lib/lock: got native Remove all usage of the VThreadID data type from MXUser. This includes calling VThread_CurID. This prevents a host of chicken before the egg problems that are wrapped around vthreadBase.c. In order to do this two APIs had to change: 1) The per thread contention statistics had to be removed. This is a loss since there are no tools that were interested in the data. 2) MXUser_AnyLocksHeld Changed so a VThreadID wasn't coming in. Trivial. It's MXUser_IsCurThreadHoldingLocks now. The check across everything thread case isn't necessary. Signed-off-by: Marcelo Vanzin commit 463b07e7b8fed860eb3edac400cf105ba1939da6 Author: VMware, Inc <> Date: Mon Jul 26 10:57:18 2010 -0700 Change how topology is changed with the new vmwgfx X driver Multimon has always been a bit tricky to get to stick when running a gnome-session since after we turned on multimon gnome would turn the new output off. This along with changes to the kernel driver and X driver fixes this. So now the driver exports the vmware ctrl protocol and RandR1.2 and expects vmware-user to first the set the topology via the vmware ctrl and then setup the correct layout via RandR1.2. This is closer to what the old path did but instead of just setting a single mode that covers the whole topology it setups the layout as well. The changes to the kernel driver and X driver will follow. Signed-off-by: Marcelo Vanzin commit b29859e9d28edabf4c16bf99058a0e3e08625d21 Author: VMware, Inc <> Date: Mon Jul 26 10:56:52 2010 -0700 Internal branch sync. Included in this change: . Updated Tools version. . GHI: Replace some XDR used in the platform layer with native types. Signed-off-by: Marcelo Vanzin commit 46b286631cb6f7da46cb8affa39982f340409fbc Author: VMware, Inc <> Date: Mon Jul 26 10:56:23 2010 -0700 Implement Vix code and Tools code for Move[File|Directory]InGuest guest operation. Signed-off-by: Marcelo Vanzin commit fedda66d75403a398b8bc79f245398f63d600e3c Author: VMware, Inc <> Date: Mon Jul 26 10:54:25 2010 -0700 free -> g_free when freeing glib allocated string. Signed-off-by: Marcelo Vanzin commit b6d121dff7ba8a038708db84e0238b33dc330694 Author: VMware, Inc <> Date: Mon Jul 26 10:51:09 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f397923707ea379c65257a7fc6e263470998b9ed Author: VMware, Inc <> Date: Mon Jul 26 10:50:38 2010 -0700 Fix vmxnet and vmxnet3 compilation for Linux kernel 2.6.34 APIs to access multicast address list in netdev has changed. Use the new one. Signed-off-by: Marcelo Vanzin commit 86d6022318cc3341d77aa805da75436b214bdace Author: VMware, Inc <> Date: Thu Jun 17 16:02:34 2010 -0700 Updating open-vm-tools version for release 2010.06.16-268169. Signed-off-by: Marcelo Vanzin commit ec87703fccdd0f954a118640c0b097e383994391 Author: VMware, Inc <> Date: Thu Jun 17 15:39:59 2010 -0700 Wiper: recognize HFS partitions, also FAT partitions mounted as 'msdos' A user on the forums was asking about shrinking disks in Mac OS guests. The command "vmware-tools-cli disk shrink /" currently shows an error: "Partition / is not shrinkable". This is because the wiper library does not recognize the mounted HFS partitions as wipeable. This change recognizes the "hfs" type as a new PARTITION_HFS value to support shrinking HFS partitions. It also maps the "msdos" mount type to PARTITION_FAT to support shrinking FAT/FAT32 partitions on Mac OS guests. Signed-off-by: Marcelo Vanzin commit c6f3f94109f88a7765314fb1d70b36006f9a1a0e Author: VMware, Inc <> Date: Thu Jun 17 15:39:44 2010 -0700 lib/lock: add ulSema.c to the tools build Keep open source tools source of lib/lock in sync with the bora/lib version. Signed-off-by: Marcelo Vanzin commit 2cac3e309929802e7292743e5e24a054d91a3db3 Author: VMware, Inc <> Date: Thu Jun 17 15:39:31 2010 -0700 Internal branch sync. Included in this change: . implement VIX ListFiles command. . changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4a8f0cc2ff4310b55faec3608ceeaed5393b4175 Author: VMware, Inc <> Date: Thu Jun 17 15:36:53 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2167da72671c0e1c3a42134501ee4c4b269c6d2b Author: VMware, Inc <> Date: Thu Jun 17 15:36:35 2010 -0700 Remove VIX_COMMAND_SET_HANDLE_STATE. The code that implemented it in the Tools has been if-defed out for years and the code in the VMX doesn't do anything. Signed-off-by: Marcelo Vanzin commit 753ab40b7a1cf7829071108f92f7703a46c1dce7 Author: VMware, Inc <> Date: Thu Jun 17 15:36:19 2010 -0700 lib/lock: add userland counting semaphores Add userland counting semaphores... just the basics. Signed-off-by: Marcelo Vanzin commit 579e7cae36b82efe8017b64c238da3813de03c72 Author: VMware, Inc <> Date: Thu Jun 17 15:36:05 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4324029259105f4401b1039e0e4e1d93723d1dde Author: VMware, Inc <> Date: Thu Jun 17 15:35:51 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a49d33a74265f9ca54d32098a72031e74ce3be65 Author: VMware, Inc <> Date: Thu Jun 17 15:35:36 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cb844fd1d0b282ed0ceaacb5b42f888566f8228b Author: VMware, Inc <> Date: Thu Jun 17 15:35:20 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8a3a642e40849159264ad574c43b3a5954d9511d Author: VMware, Inc <> Date: Thu Jun 17 15:34:59 2010 -0700 Minor fixes for code review comments Signed-off-by: Marcelo Vanzin commit 5c2568fc869ac7471b10bda1090cd135b8373829 Author: VMware, Inc <> Date: Thu Jun 17 15:34:42 2010 -0700 lib/lock: standardize the dump format The format of the dump object format varied a bit between object types. Fix this. Signed-off-by: Marcelo Vanzin commit dc1e5709041bb4cefb866fe150dc200e32a148c4 Author: VMware, Inc <> Date: Thu Jun 17 15:33:41 2010 -0700 lib/file: make file locking a bit more efficient When locking a symbolic link the lock file should go "next" to the symbolic link, not where the link points to. The old code for dealing with this is overkill; performing unnecessary operations to get the job done; improve this. Signed-off-by: Marcelo Vanzin commit 52d6f7af432fed005642e23cb063d735b265e7ad Author: VMware, Inc <> Date: Thu Jun 17 15:33:12 2010 -0700 Remove VIX_COMMAND_[GET|SET|]_PROPERTY. They are unused. The Tools does process GET_PROPERTY like GET_TOOLS_STATE, but I couldn't find or remember a version of the client library that sent a command with this op code for this purpose. Also, as a side benefit, remove the flag VIX_COMMAND_GUEST_RETURNS_ENCODED_STRING, since no request message sets this flag, and it is a left over remenant from the incorrect assumption that GuestRPC couldn't handle binary data. This gives an additional benefit since inspection suggests that there's a bug in the VMX code for processing responses when this flag is set: the response length is computed using the encoded string, not the decoded string (causing random VMX memory to be sent in the response). Signed-off-by: Marcelo Vanzin commit de10f0c28661826e298d62ab0f11fbef4210a2d8 Author: VMware, Inc <> Date: Thu Jun 17 15:32:35 2010 -0700 Fixing returned bytes in Linux write. HGFS POSIX server does not return correct number of bytes written on some platforms. Fixing it. Signed-off-by: Marcelo Vanzin commit 81f9f4bfe27aa52262c8b09b08eb49f00dde3f40 Author: VMware, Inc <> Date: Thu Jun 17 15:32:24 2010 -0700 Fix usleep() wrapper on Windows. Signed-off-by: Marcelo Vanzin commit a465b74677ce132b658d6855910fab964ccb6f2d Author: VMware, Inc <> Date: Thu Jun 17 15:32:14 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 39a2490688429bc78680574798a0082fcc785f0c Author: VMware, Inc <> Date: Thu Jun 17 15:31:56 2010 -0700 lib/lock: trivial cleanup Remove evil white space Signed-off-by: Marcelo Vanzin commit 848f9d425e26cbd4991832444a893673d4cc36fd Author: VMware, Inc <> Date: Thu Jun 17 15:31:47 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9f3ab1d3be7268994a4c1687dcdd2df2a11aaf02 Author: VMware, Inc <> Date: Thu Jun 17 15:31:25 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a2c3b6fdba59b34b236ab6f0a27655f5146b6c86 Author: VMware, Inc <> Date: Thu Jun 17 15:30:50 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 890aa6e8134a4c8426f0fabda432ba4d4116f893 Author: VMware, Inc <> Date: Thu Jun 17 15:30:30 2010 -0700 lib/lock: generalize the MXUserHeader The header will be used for more than locks... Signed-off-by: Marcelo Vanzin commit 5e62113d2802848121119da1fb57903013f8582a Author: VMware, Inc <> Date: Thu Jun 17 15:30:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ef876a286dd36e544909acc29e946d965377f2c2 Author: VMware, Inc <> Date: Thu Jun 17 15:29:48 2010 -0700 lib/file: a bit of cleanup before a change Signed-off-by: Marcelo Vanzin commit d16f68f8ae197522d6a51c08d485a8d558518c48 Author: Marcelo Vanzin Date: Thu Jun 17 15:28:29 2010 -0700 Remove epoll.c and setnice.c compat autoconf modules Now that the code does not use compat_set_user_nice() and compat pollwait ocde we can clean up our makefiles and remove epoll.c and setnice.c autoconf modules. Signed-off-by: Marcelo Vanzin commit 181f5dca75a8122009de9108393667c9c9203f4a Author: VMware, Inc <> Date: Thu Jun 17 15:20:10 2010 -0700 Remove Hostinfo_RawSystemTimerXX interfaces The RawSystemTimerXX interfaces used to be needed because the SystemTimerXX interfaces could become reentrant and deadlock. Since that time, we have changed SystemTimerXX implementations (no deadlock) and no longer worry about the cost of the lock (now host-native). So just always use SystemTimerXX. Signed-off-by: Marcelo Vanzin commit 9e0b8aed5bda5fb177c0ce2f1b552aee62f1bc8a Author: VMware, Inc <> Date: Thu Jun 17 15:19:55 2010 -0700 Slay thread watchdog. Signed-off-by: Marcelo Vanzin commit ae6a9fdded9807b748a7e8d079b43e6d0d3cf4d7 Author: VMware, Inc <> Date: Thu Jun 17 15:18:39 2010 -0700 VSOCK: remove compat_sk_filter Filter interface has stabilized in the kernels that we do support so we can clean up our code a bit. Signed-off-by: Marcelo Vanzin commit b83d23d784dd365e4cbb43dd2efe845592d3a3dd Author: VMware, Inc <> Date: Thu Jun 17 15:18:24 2010 -0700 Get rid of compat_pollwait definitions. We do not support kernels that do not have epoll so we can clean code up a bit. I'll remove autoconf/epoll.c in a subsequent change. Signed-off-by: Marcelo Vanzin commit 30b6b8cb6bd8584deb4f70d2b1eb59ea0d1dca9f Author: VMware, Inc <> Date: Thu Jun 17 15:18:10 2010 -0700 Remove compat_set_user_nice. All kernels that we support have set_user_nice(), no need to keep compat layer. Signed-off-by: Marcelo Vanzin commit 0ce9ac2a0c4c8fae70e101c9b3d1e2e270de84b6 Author: VMware, Inc <> Date: Thu Jun 17 15:17:53 2010 -0700 Remove pre 2.6.9 compatibility code. We do not support pre-2.6.9 kernels anymore so no need to carry around old compatibility cruft. Signed-off-by: Marcelo Vanzin commit 8db28864a57bb2fa0d8f3613f7412fdfe63be0c1 Author: VMware, Inc <> Date: Thu Jun 17 15:17:31 2010 -0700 Reshuffle Hostinfo_SystemTimerNS Core observation: the fallback is always gettimeofday(), but each Posix-y OS has a (possible) monotonic timer. So, restructure the code so we optionally try OS-specific timers (which the optimizer can prune out cheaply) then fall back to the slower microsecond timer. With two OS-specific timers already present (Visor and Apple), I'll do the work of adding the third (Posix's clock_gettime). Note that I use a weak symbol trick to avoid either librt or libdl dependencies; an app that links librt will get ns-resolution and everything else falls back to ms-resolution gettimeofday(). Signed-off-by: Marcelo Vanzin commit 4a6a9fa7a6cb282994a330c17048c78dce856a97 Author: VMware, Inc <> Date: Thu Jun 17 15:16:38 2010 -0700 VSOCK: fix compile warning on RHEL 6 Compiling vsock on RHEL6 produces following warning: /home/test/dyno/vsock-only/linux/af_vsock.c:333: warning: initialization from incompatible pointer type We tried dealing with it in CS 1017526, but RedHat backported the change to 2.6.32 making our check that relied on kernel version ineffective. Signed-off-by: Marcelo Vanzin commit 0ceebca08ccd8092f7a3e3745bcd30810fdb538c Author: VMware, Inc <> Date: Thu Jun 17 15:16:18 2010 -0700 Linux compat code: do not define KERNEL_VERSION macro KERNEL_VERSION exists in kernel sources since 2.1.90 so if we can't find it that means environment is busted and we better stop instead of defining it ourselves. Signed-off-by: Marcelo Vanzin commit 70cf7092c436e223f926917dd00c2fe8b78e5ef3 Author: VMware, Inc <> Date: Thu Jun 17 15:15:59 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1cfe647b8373a23e2488a58bb8ed60f5da54e286 Author: VMware, Inc <> Date: Thu Jun 17 15:15:40 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f72b845ea792d2c17193d38708c87d85430cf77a Author: VMware, Inc <> Date: Thu Jun 17 15:15:09 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0aa35a7060a7df8e3a15aa576e3b5dfe290b6d33 Author: VMware, Inc <> Date: Thu Jun 17 15:14:45 2010 -0700 vmmemctl: rework balloon initializtion code Balloon initialization code is way too complicated for the kernel driver code. Instead of implementing abstract "init", "cleanup" and "timer" interfaces on every OS and having call chains like: OS kernel module init code -> Common balloon module init -> OS_Init (os specific initialization code) Creatie /proc, stats, etc Balloon_Init (common balloon init code) OS_TimerStart (start balloon thread) do: OS kernel module init OS-specific initialization Balloon_Init() Start balloon thread Create /proc, state, etc which makes module initialization logic more clear in my opinion. Signed-off-by: Marcelo Vanzin commit 4e306e7b734bf883e8d22e33b920ae773bb90a76 Author: VMware, Inc <> Date: Thu Jun 17 15:14:20 2010 -0700 Style cleanup in VMCIQPair.c Delete some unwanted "()"s and ":"s. Signed-off-by: Marcelo Vanzin commit 8d28a285d9a7d52e5d14d7c5770f7e9e47027f4d Author: VMware, Inc <> Date: Thu Jun 17 15:14:11 2010 -0700 Unification of VMCI host and guest kernel API (4+5/5) The VMCI kernel API should be the same for both host and guest. Currently, that is not the case. The unification will consist of the following five changes - this is steps 4 and 5 with some additional white space clean ups: 1) Make the functions supported by the host kernel API a superset of the functions supported by the guest kernel API. This consists of adding VMCI_DeviceGet, VMCI_DeviceRelease, VMCI_GetContextID, VMCI_Version and VMCI_DsLookup. 2) Make the functions available by the guest kernel API the same as the functions available by the host kernel API. This means adding VMCI_ContextID2HostVmID and defining doorbell API on all platforms. These functions return VMCI_ERROR_UNAVAILABLE either because they don't make sense (the first one or because they aren't implemented yet). The unified header file will make clear what is supported where. 3) Integrate vmciHostKernelAPI.h to vmciKernelAPI.h. 4) Edit vmciKernelAPI.h to not refer to vmciHostKernelAPI.h and integrate the VMCIQPair.h definitions into the header file. 5) Delete old vmci*KernelAPI.h and VMCIQPair.h files, and make all host and guest references to a kernel API header file refer to the new unified header file. Signed-off-by: Marcelo Vanzin commit f142bbb91f281578438099555a977986c246f43f Author: VMware, Inc <> Date: Thu Jun 17 15:13:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6d3fad7e030baa0b9a5c34eedda5bddf8b864306 Author: VMware, Inc <> Date: Thu Jun 17 15:13:22 2010 -0700 VSOCK: fix compile error on Linux kernels past 2.6.34 Due to sock_def_readable() RCU conversion (git commit 43815482370c510c569fd18edb57afcb0fa8cab6) sk_sleep pointer in "struct sock" was replaced with pointer to a new structure socket_wq and users are forced to use sk_sleep() helper. Implement the helper for older kernels and switch our code to use it. Signed-off-by: Marcelo Vanzin commit 7fa142b52f638b7c83a905046342dc8b941b99d7 Author: VMware, Inc <> Date: Thu Jun 17 15:13:02 2010 -0700 Minor code review fixes for previous ctime_r changes. Add some newlines and comments. Change a hard-coded size to sizeof. Added an assignment to force conversion to time_t. Signed-off-by: Marcelo Vanzin commit b31cc7e99c940e8ccd83d65590e054a359d1a79d Author: VMware, Inc <> Date: Thu Jun 17 15:12:48 2010 -0700 Unification of VMCI host and guest kernel API (2/5) The VMCI kernel API should be the same for both host and guest. Currently, that is not the case. The unification will consist of the following five changes - this is step 2: 1) Make the functions supported by the host kernel API a superset of the functions supported by the guest kernel API. This consists of adding VMCI_DeviceGet, VMCI_DeviceRelease, VMCI_GetContextID, VMCI_Version and VMCI_DsLookup. 2) Make the functions available by the guest kernel API the same as the functions available by the host kernel API. This means adding VMCI_ContextID2HostVmID and defining doorbell API on all platforms. These functions return VMCI_ERROR_UNAVAILABLE either because they don't make sense (the first one or because they aren't implemented yet). The unified header file will make clear what is supported where. 3) Integrate vmciHostKernelAPI.h to vmciKernelAPI.h. 4) Edit vmciKernelAPI.h to not refer to vmciHostKernelAPI.h and integrate the VMCIQPair.h definitions into the header file. 5) Delete old vmci*KernelAPI.h and VMCIQPair.h files, and make all host and guest references to a kernel API header file refer to the new unified header file. Signed-off-by: Marcelo Vanzin commit 782f6091e354cc62d659bcad263f73aea39a5d87 Author: VMware, Inc <> Date: Thu Jun 17 15:12:29 2010 -0700 Unification of VMCI host and guest kernel API (1/5) The VMCI kernel API should be the same for both host and guest. Currently, that is not the case. The unification will consist of the following five changes - this change is step 1: 1) Make the functions available by the host kernel API a superset of the functions supported by the guest kernel API. This consists of adding VMCI_DeviceGet, VMCI_DeviceRelease, VMCI_GetContextID, VMCI_Version and VMCI_DsLookup. 2) Make the functions available by the guest kernel API the same as the functions available by the host kernel API. This means adding VMCI_ContextID2HostVmID and defining doorbell API on all platforms. These functions return VMCI_ERROR_UNAVAILABLE either because they don't make sense (the first one or because they aren't implemented yet). The unified header file will make clear what is supported where. 3) Integrate vmciHostKernelAPI.h to vmciKernelAPI.h. 4) Edit vmciKernelAPI.h to not refer to vmciHostKernelAPI.h and integrate the VMCIQPair.h definitions into the header file. 5) Delete old vmci*KernelAPI.h and VMCIQPair.h files, and make all host and guest references to a kernel API header file refer to the new unified header file. Signed-off-by: Marcelo Vanzin commit 108a1d9cb8c11b524612301b18ec810c09ded332 Author: VMware, Inc <> Date: Thu Jun 17 15:11:50 2010 -0700 vmmemctl: remove Solaris 9 support We do not support Solaris 9 and stopped generating PBMs for it, let's remove references to it in the code. Signed-off-by: Marcelo Vanzin commit 10bc1a491ee21a2c224feb40e004ba2bbedd7795 Author: VMware, Inc <> Date: Thu Jun 17 15:11:38 2010 -0700 vmmemctl: do not require userspace component on Solaris Instead of using userspace program to provide a separate thread on Solaris create a proper kernel thread. This removes vmmemctld and the need to start/stop and muck around with it. Signed-off-by: Marcelo Vanzin commit 6914334ccc926e1cd047f7ecf47d178f5f227c5b Author: VMware, Inc <> Date: Thu Jun 17 15:11:14 2010 -0700 vmmemctl: do not try to prevent multiple initializations We are kernel drivers, we should have at least some idea what is going on and what gets called when. Signed-off-by: Marcelo Vanzin commit c44774aa477e5266a6eb34340c752f4fcf4d028d Author: VMware, Inc <> Date: Thu Jun 17 15:11:01 2010 -0700 vmmemctl: do not store driver name in "state" It is quite silly to pass and maintain name of the driver in global "state", let's simply use proper "defines" where needed. Signed-off-by: Marcelo Vanzin commit 889ed70dea05750eb135da9a8d8cbd4522f14281 Author: VMware, Inc <> Date: Thu Jun 17 15:10:46 2010 -0700 Simplify and consolidate VThreadBase ID allocation Now that VTHREAD_UI_ID has been removed, there is only one caller of VThreadBase_InitThread. So inline the behavior. Add a TLS destructor too, to ensure SimpleID- allocated memory gets freed. Signed-off-by: Marcelo Vanzin commit b7ce305c42a4400d96977a3c009576c57e7dc805 Author: VMware, Inc <> Date: Thu Jun 17 15:10:12 2010 -0700 Tweak Atomic_Init to better occur by default Turns out vobd never called Atomic_Init, which tripped up an ASSERT that verifies Atomic_Init isn't initialized racily. Two fixes: 1) Atomic_Init really is idempotent. So let's remove the ASSERT and deal with the race a different way. 2) Any code that uses Atomic_Init is Really Likely to be using VThreadBase too, so let's stick an Atomic_Init in anytime we see a new thread. This should cover 99% of self- initialization. Nominally this *slightly* weakens our Atomic_Init check - one could end up with two threads (that don't use bora/lib but do use atomics) running without correct atomic initialization. In reality, forgetting Atomic_Init entirely is far more likely than doing Atomic_Init racily, so this tweak ought to cover more cases than the old ASSERT. Signed-off-by: Marcelo Vanzin commit 719c1726b8dfd7add103610f3e2e38ba37f526cf Author: VMware, Inc <> Date: Thu Jun 17 15:09:09 2010 -0700 Remove FileIO Stats. The FileIO stats are not thread-safe (PR 488887), but no one ever looks at them anyway (PR 563363). This change removes stats from FileIO. Signed-off-by: Marcelo Vanzin commit 9858bc6c21945e4f227460c51aa1fcf808c99f3b Author: VMware, Inc <> Date: Thu Jun 17 15:07:22 2010 -0700 Add MSI/MSI-X support to VMCI This change adds MSI/MSI-X support to VMCI. The device is now MSI/MSI-X capable, and supports up to 2 vectors in MSI-X mode, one for datagrams and another for the notification bitmap. The Windows and Linux drivers have been updated to use MSI/MSI-X when running on the new device. The drivers only support one vector for now, for datagrams. Verified on Windows guests by checking the Device Resources. MSI-X is selected on Win7, while on Win2K, it correctly falls back to legacy mode. The old Windows driver runs correctly on the new device. Verified on Linux by checking lspci. MSI-X is selected on newer kernels where CONFIG_PCI_MSI is defined, otherwise it falls back to legacy mode. The old Linux driver runs correctly on the new device. Verified on v7 and v8 hardware. On v7, the new driver falls back to legacy mode. Suspending on v7 and resuming on v8 works correctly, it will use legacy and continue to fire interrupts as expected. On v8, it will use MSI/MSI-X if possible. Signed-off-by: Marcelo Vanzin commit 6cf3c4ef6c2a1e5df698766dd74e3d178dd206fe Author: VMware, Inc <> Date: Thu Jun 17 15:06:36 2010 -0700 Don't call pthread_kill on exited pthread_t's Nominally, man pages say that pthread_kill on an exited thread return ESRCH. Unfortunately, man pages lie; glibc bounds the space allowed for dead thread stacks and munmaps memory once past that bound, so pthread_kill's implementation ends up hitting a SEGV. The only way to avoid this is to know when threads exit. The manual way (VThreadBase_ForgetSelf) is pretty good, but not good enough: roll-your-own threading code (VMHS, in this bug) exits without telling anyone. So also do an automatic hook: install a Posix TLS destructor. Doing so removes the need to call pthread_kill at all, so remove it. The cleanup needed: remove the pthread_t from the global list of active threads (used to recycle VThreadIDs). Signed-off-by: Marcelo Vanzin commit f2c698be6bac5ddfb4b2d05dc770d50ae2a6cf9c Author: VMware, Inc <> Date: Thu Jun 17 15:06:10 2010 -0700 bit functions: a little nicer implementation Signed-off-by: Marcelo Vanzin commit 0af060be7627ecfd0cd97e87d9fb4f4bfa793c18 Author: VMware, Inc <> Date: Thu Jun 17 15:05:52 2010 -0700 Report correct error from POSIX version of "HgfsPlatformFileExists" Current implementation always reports -1 when the file does not exist. Fixing it to report actual error - usually ENOENT. Signed-off-by: Marcelo Vanzin commit ac509cdb866a7817e57e58c584ecdf4d6f98783b Author: VMware, Inc <> Date: Thu Jun 17 15:05:31 2010 -0700 least and most significant bit set functions: support !x86* Since the chances of not using a GNU compiler for ARM or any other architecture we'll use is very small (we know GNU well and "like" it), code the least and most significant bit set functions such that they should work "anywhere" via the GCC intrinsic functions. This is a cautious beginning to possibily using the instrinics outside the monitor and vmkernel and possibly within. For now the X86* support is left unmodified. Many experiments will soon follow this change... Signed-off-by: Marcelo Vanzin commit 06bd730d4a50413414305f70b2320fe92edab240 Author: VMware, Inc <> Date: Thu Jun 17 15:05:00 2010 -0700 Fix error on creating new files/folders in root share When a user or inadvertently tries to create a new file or folder or overwrite a folder in the root share fail with the correct error. Previously the Windows hgfs client always failed with name not found which is not the correct error and confuses some applications which then mislead the user. Signed-off-by: Marcelo Vanzin commit e494a2f41056b6284ee620ae06bc2668290afff4 Author: VMware, Inc <> Date: Thu Jun 17 15:04:47 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d24bca8f9ee5ca61c15c51c13b00a49bc1049ac0 Author: VMware, Inc <> Date: Thu Jun 17 15:04:33 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e6111dccc2e600820568ce9abd1cffb3d99379e1 Author: VMware, Inc <> Date: Thu Jun 17 15:03:49 2010 -0700 Adding create/destroy session support. 1. Implementing handlers for creating and destroying sessions in server. 2. Implementing sending create/destroy session requests in the Windows client. Signed-off-by: Marcelo Vanzin commit 905cd545436983ed9a64c6f915c5530c36093017 Author: VMware, Inc <> Date: Thu Jun 17 15:03:32 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4dc0e650929a7dd8932aec872ccac20c1ee60f40 Author: VMware, Inc <> Date: Thu Jun 17 15:03:13 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9b88977283acf307c517402dc93fd931a41a2225 Author: VMware, Inc <> Date: Thu Jun 17 15:03:00 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 245405030d0d4b738793c90a022c4f3e0a5b7806 Author: VMware, Inc <> Date: Thu Jun 17 15:02:35 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit bf8e95f69b4d7b2a91f14c32ceb1643ae91192d7 Author: VMware, Inc <> Date: Thu Jun 17 15:02:19 2010 -0700 vmmemctl: switch to using OS-specific methods to format stats The common routine to output ballooning statistics does not work for Solraris (which uses kstats) and is awkward on Linux/BSD, where we need to allocate additional memory, introduce a wrappers around snprintf and so on. Let's leave it to every OS to generate stats in the most natural way for that particular OS. Signed-off-by: Marcelo Vanzin commit 01165c5709e5951cd732c6c17eed00b291afa439 Author: VMware, Inc <> Date: Thu Jun 17 15:00:54 2010 -0700 lib/lock: clean up and simplify Too much class name data being pushed around. Inherit the name whenever possible. Signed-off-by: Marcelo Vanzin commit ce2975392fc4881bf48294aad72081761b518e0c Author: VMware, Inc <> Date: Thu Jun 17 15:00:35 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 317a8748ae9aa8b01ddda7bed965609eb68d4394 Author: VMware, Inc <> Date: Thu Jun 17 15:00:21 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d26e8c4e05086d80909f22ef75b93b9f9b9101a2 Author: VMware, Inc <> Date: Thu Jun 17 14:59:58 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9a3de849e4419e774f87b83d183b3c1b92e5b696 Author: VMware, Inc <> Date: Thu Jun 17 14:58:47 2010 -0700 Change ctime() to ctime_r() in lib/misc/timeutil.c ctime() is not thread safe because it uses an internal static buffer. Use ctime_r() instead. The man page says a buffer of length 26 is sufficient. Signed-off-by: Marcelo Vanzin commit 4b028b0a98d48fad5956199f4a27cfcb11f9b6b2 Author: VMware, Inc <> Date: Thu Jun 17 14:58:33 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 31d4cfc4e2c18596e624f746970e877d47bf9ba8 Author: VMware, Inc <> Date: Thu Jun 17 14:58:12 2010 -0700 Fix open-vm-tools build Signed-off-by: Marcelo Vanzin commit 846652a9116ae42aa66e824439803b22b57e4289 Author: VMware, Inc <> Date: Thu Jun 17 14:57:49 2010 -0700 Make change notification pretty. I am splitting the original change notification change because there are just too many minor changes that needs to be done with the existing code. This will make things easy to review. Hopefully. Signed-off-by: Marcelo Vanzin commit c0a71bf90db1bc3d5523f133fff5b37fe1e978fb Author: VMware, Inc <> Date: Thu Jun 17 14:57:22 2010 -0700 More bora/lib lock ranking. Signed-off-by: Marcelo Vanzin commit 2d5f60d63aec4f391d7695bebcd70a6f71ebdecc Author: VMware, Inc <> Date: Thu Jun 17 14:56:45 2010 -0700 We've discovered a race in MXUserWaitCondVar, where waiting threads may miss a signal. Backing out until this is addressed. Signed-off-by: Marcelo Vanzin commit aaa1a7d277c30852dd42f79b87e17e9c429caec9 Author: VMware, Inc <> Date: Thu Jun 17 14:56:27 2010 -0700 Fix a couple of gsource handle leaks in the vmbackup plugin. Signed-off-by: Marcelo Vanzin commit 953067574ba70f3571b2dddfd4375bfbeba395d3 Author: VMware, Inc <> Date: Thu Jun 17 14:56:08 2010 -0700 Soft power ops: changes for Mac OS X support. Signed-off-by: Marcelo Vanzin commit 985278c27ccfa95f3ff5ab869426daa1f4022c3f Author: VMware, Inc <> Date: Thu Jun 17 14:55:40 2010 -0700 HGFS: Shared memory support for linux guest Support for Async operations is now present. We use shared memory mechanism to notify guest. Shared memory support is very minimalistic. There is no flow control here. Here is how it works -- 1) Guest on startup allocates 16 pages and sends it to the hgfs Server. Number of pages are fixed in the system. Guest always recycles between those pages. 2) Host will use up those pages and send notifications. When host wants to send stuff and it doesn't find memory, it sends datagram to the guest asking for more memory. 3) Guest happily obliges and sends number of free pages. 4) This process repeats. Note that one page can contain many requests while one request can span many pages. When request spans many pages we need to chain pages together. Here is how page chaining looks - First iov from which the chain starts sets chain (Bool) to true. Last iov sets chain to false. First iov len contains total length of the chain. Minor - While I was here - I did some minor cleanup to remove HgfsReceiveFlags that nobody was using. Note that currently all the requests are still processed sync. I have added terminate session request so that host doesn't touch any guest pages after the module is unloaded or it will end up corrupting guest. Signed-off-by: Marcelo Vanzin commit 3039ed645c8ab9201ec47d8ea6626fa487865c8d Author: VMware, Inc <> Date: Thu Jun 17 14:54:16 2010 -0700 Delete vsockLookup. Signed-off-by: Marcelo Vanzin commit c95595f97627216b7f38c23f113854eaa5b218f7 Author: VMware, Inc <> Date: Thu Jun 17 14:53:17 2010 -0700 Internal branch sync. Included in this change: . fix bug where VM was unable to grab input after GH DnD. . Unity changes that don't affect open-vm-tools. Signed-off-by: Marcelo Vanzin commit ce6684002b5654e13f3798d0d3eb8088f3715253 Author: VMware, Inc <> Date: Thu Jun 17 14:43:18 2010 -0700 Backout previous change. Signed-off-by: Marcelo Vanzin commit 18aef51f2b0b34c8f84c5d4c601f32d259777561 Author: VMware, Inc <> Date: Thu Jun 17 14:42:25 2010 -0700 Thread fixes for HostinfoOSVersionInit Make HostinfoOSVersionInit atomic. Clean it up some while we're in there. Signed-off-by: Marcelo Vanzin commit 0706ad0557d3c3acfb64f87bfbe66ff155c6a179 Author: VMware, Inc <> Date: Thu Jun 17 14:42:07 2010 -0700 Thread fix for TimeUtil_DaysAdd TimeUtil_DaysAdd was not thread safe because it kept the number of days in each of the 12 months in a static array, and set the value for February based on whether the function was operating on a common year or a leap year. A simple fix is to keep two arrays, one for common years and another for leap years. Signed-off-by: Marcelo Vanzin commit dce13aed608b008bb4e4a2f74fc8a60894bc40bd Author: VMware, Inc <> Date: Thu Jun 17 14:41:49 2010 -0700 OVT: remove Linux vmmemctl (balloon) driver Now that the balloon driver has been accepted upstream there is no need to distribute it in open-vm-tools package. Signed-off-by: Marcelo Vanzin commit 3b256ca01b21f82b29a44c99200fd650868c9770 Author: VMware, Inc <> Date: Thu Jun 17 14:41:28 2010 -0700 restore condvar related lock changes Signed-off-by: Marcelo Vanzin commit c09afe3bf1b6b4457f49a5b208e7bc88cdf3335c Author: VMware, Inc <> Date: Thu Jun 17 14:41:14 2010 -0700 lib/misc: more cleanup Signed-off-by: Marcelo Vanzin commit b37637e9536821a7f668dc2ae54861b46bb8e8c9 Author: VMware, Inc <> Date: Thu Jun 17 14:41:04 2010 -0700 lib/misc: a little cleanup Signed-off-by: Marcelo Vanzin commit 6928a6fa9259f85c90c726a706bceb6e145f9bd1 Author: VMware, Inc <> Date: Thu Jun 17 14:40:55 2010 -0700 lib/misc: more review comments Cache the mac timer scaling information; make things have a little bit lower overhead. Signed-off-by: Marcelo Vanzin commit 0067d84464df5c50bda71f55823c803c19fceba7 Author: VMware, Inc <> Date: Thu Jun 17 14:40:35 2010 -0700 lib/misc: more review comments Picking up even more review comments... Signed-off-by: Marcelo Vanzin commit f2a8b8e15d56ef34f3d92722173139dec72bcf7e Author: VMware, Inc <> Date: Thu Jun 17 14:40:26 2010 -0700 lib/lock: pick up review comments Signed-off-by: Marcelo Vanzin commit c767ef4246f22e1a03f58a81156da94144ebb1c8 Author: VMware, Inc <> Date: Thu Jun 17 14:40:15 2010 -0700 lib/misc: hostinfo timer functions Pick up a bunch of comments. Signed-off-by: Marcelo Vanzin commit f79a9cd36b03a1edd3f80b251aaac5b34e99a358 Author: VMware, Inc <> Date: Thu Jun 17 14:39:57 2010 -0700 temp revert of various ulCondVar usages/changes Signed-off-by: Marcelo Vanzin commit a426c4564d5a237f0a1ba9c3ac19c67ab5cd6616 Author: VMware, Inc <> Date: Thu Jun 17 14:39:32 2010 -0700 lib/lock: MXUser needs to use the lib/thread watchdog On long MXUser condVar wait operations periodically call the lib/thread watchdog so as to allow panics and crashes to be caught. Signed-off-by: Marcelo Vanzin commit aa54712d0486521fe15e3894a2cf07b2f9cde3ba Author: VMware, Inc <> Date: Thu Jun 17 14:37:51 2010 -0700 lib/thread and lib/lock: cleanup the cooperation The watchdog routine needs to be used by both MX and MXUser however planting the callback in only done in userland - move ownership of the callback (and planting it) to MXUser. Signed-off-by: Marcelo Vanzin commit 90bf2232d5422676cd85ce87a1bafd9ec92916f2 Author: VMware, Inc <> Date: Thu Jun 17 14:37:31 2010 -0700 lib/lock: use the new lock routines Signed-off-by: Marcelo Vanzin commit 8243d8cd8d90b977bc432e737aad4ad956587d21 Author: VMware, Inc <> Date: Thu Jun 17 14:37:22 2010 -0700 lib/misc: create a hostinfo time base with ns units Provide nanosecond reporting routines; microseconds are getting a bit "long in the tooth" for some timing applications. Refactor the existing code to have the lowest overhead possible based on the platform. Obtain the best we can from the existing clock sources. The quest for better timer sources will come next... Signed-off-by: Marcelo Vanzin commit 0a24fcd032abbb3952923884117a9c01050a3d3e Author: VMware, Inc <> Date: Thu Jun 17 14:36:57 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 675b8a7c3d1a58547ef2e8c9de0c36473929193e Author: VMware, Inc <> Date: Thu Jun 17 14:35:28 2010 -0700 lib/lock: establish the condVar idiom A condVar should be destroyed before the lock it is associated with. Signed-off-by: Marcelo Vanzin commit dd7503385a9a85cec8ac709d4e07c27bc96a4994 Author: VMware, Inc <> Date: Thu Jun 17 14:35:14 2010 -0700 Add a "VMX logger" to Tools. This logger using the "log" RPC to log to the host's vmware.log. It's useful when enabling file logging in the guest is not possible (such as for backup tests) or to make it easier to collect logs when debugging some VMX -> Tools interaction. Signed-off-by: Marcelo Vanzin commit 98eb09e996ae85e06a387e58a01eb6cce12bf0a4 Author: VMware, Inc <> Date: Thu Jun 17 14:34:42 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 223f0e2a8cb368b2eafb7cee4ef40488ab22efeb Author: VMware, Inc <> Date: Thu Jun 17 14:34:21 2010 -0700 lib/lock: fix an ifdef An ifdef sneeked in that is not in the style of the rest of the code. Signed-off-by: Marcelo Vanzin commit 3a897515571700219363fb20c59160a1331a797f Author: VMware, Inc <> Date: Thu Jun 17 14:34:08 2010 -0700 minor lock-related cleanup As a result of review comments that didn't make it in time for the previous checkin. Signed-off-by: Marcelo Vanzin commit d9710647f83f15ebe323ef1787cdc0eb51fe7cc5 Author: VMware, Inc <> Date: Thu Jun 17 14:33:53 2010 -0700 Use the new bit function names. Signed-off-by: Marcelo Vanzin commit dd790bac7f8be70de6dff5bc363912d3c274454d Author: VMware, Inc <> Date: Thu Jun 17 14:33:18 2010 -0700 more bora/lib ranking, condvar usage Signed-off-by: Marcelo Vanzin commit e24a651a8283aa715fe2681a45b7052368e5f9a0 Author: VMware, Inc <> Date: Thu Jun 17 14:32:54 2010 -0700 lib/lock: maintain the lock header information for condVars This makes the code cleaner and it will be possible to look for other run time conditions if we decide to do so. Signed-off-by: Marcelo Vanzin commit ff64bc80ee2e5c97042b1bcd8109bab394fc3997 Author: VMware, Inc <> Date: Thu Jun 17 14:32:28 2010 -0700 lib/lock: generalize MXUser condVar support The MXUser condVar code dealt only with a lock count of 1, something that is OK for exclusive locks and recursive locks with that lock count but not correct for recursive locks in the general case. Fix this by properly preserving the lock count. Signed-off-by: Marcelo Vanzin commit 681824ec0f8aee55db0172cd9e367db7bb68d663 Author: VMware, Inc <> Date: Thu Jun 17 14:32:15 2010 -0700 vmmemctl: remove some old FreeBSD code We are not shipping modules for FreeBSD 5 so no need to handle anything lower either. Signed-off-by: Marcelo Vanzin commit 7b5c9fcf97184eb2c5995cd641e2e6bf3b7220a8 Author: VMware, Inc <> Date: Thu Jun 17 14:31:29 2010 -0700 lib/lock: clean up Finally getting around to simplifying the logic based on review comments. Signed-off-by: Marcelo Vanzin commit b0c33afa4a22e67c669913ba9ff54cbecd35abf6 Author: VMware, Inc <> Date: Thu Jun 17 14:31:14 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 24330ecb6cb88288c8821049a40f9fd5a1a2daf1 Author: VMware, Inc <> Date: Thu Jun 17 14:30:43 2010 -0700 lib/lock: add an assert No condVar operations with bound locks Signed-off-by: Marcelo Vanzin commit 092db7cd4e8b957cbd748fde2583f30d2babf348 Author: VMware, Inc <> Date: Thu Jun 17 14:30:32 2010 -0700 lib/lock: a bit of cleanup Use a few defines. Signed-off-by: Marcelo Vanzin commit 8fe5ea2ec8b6e24bcb660c6a95ad4734e55059f9 Author: VMware, Inc <> Date: Thu Jun 17 14:30:23 2010 -0700 lib/lock: pick up a few changes from review comments Signed-off-by: Marcelo Vanzin commit 70b2bbc2fd3f1de64d1b8836cf8b49e237744d2e Author: VMware, Inc <> Date: Thu Jun 17 14:30:02 2010 -0700 Replace RpcOut API with RpcChannel_Send() in vmtoolsd plugins. This doesn't cover all existing cases, but the others can't switch just yet. Signed-off-by: Marcelo Vanzin commit e15b24ee297227a7d0fa7a6e212b91aee11149f8 Author: VMware, Inc <> Date: Thu Jun 17 14:29:52 2010 -0700 Don't use GHI XDR definitions in vmtoolsd test code. Use the test's own XDR structures instead, and avoid exporting the GHI functions in vmtoolslib. Signed-off-by: Marcelo Vanzin commit 1d5ffac00f004a814694a29ecae698ccb7aa3e57 Author: VMware, Inc <> Date: Thu Jun 17 14:29:32 2010 -0700 lib/lock: allow condVar timeouts Pass the timeout value through now that timeouts are possible Signed-off-by: Marcelo Vanzin commit f1bb3f25c33e8aec76834ac4187b7b7af8cb59ce Author: VMware, Inc <> Date: Thu Jun 17 14:29:23 2010 -0700 lib/lock: give each lock type a unique signature The signature word in the MXUser header had the same value for all of the lock types. Make the signature unique to each lock type. This helps, a bit, when poking around memory. Signed-off-by: Marcelo Vanzin commit 9ec9095523ef4ba7c4e13e98c08de15711334343 Author: VMware, Inc <> Date: Thu Jun 17 14:29:11 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6c279da56737390f78231007c67a9d6185e00e07 Author: VMware, Inc <> Date: Thu Jun 17 14:28:54 2010 -0700 Fix the Fusion build Caught a typo... Signed-off-by: Marcelo Vanzin commit d3a6db36f5efddc085afacaa41ee07106bb7dbe1 Author: VMware, Inc <> Date: Thu Jun 17 14:28:40 2010 -0700 lib/lock: timed condVar waiting Signed-off-by: Marcelo Vanzin commit 7244559a02d6e4694bff8c804c4fe288c469d68a Author: VMware, Inc <> Date: Thu Jun 17 14:28:27 2010 -0700 Fix the Windows builds Typo... Signed-off-by: Marcelo Vanzin commit b2a663187e92b75ad31cbeb760090abffd5b1570 Author: VMware, Inc <> Date: Thu Jun 17 14:28:13 2010 -0700 lib/lock: refactor condVar code before large change Refactored the MXUser condVar code to make it much easier to read and maintain. Doing this before a big change so as to make the change and code read easy. Signed-off-by: Marcelo Vanzin commit e8dd62dd1b7d26c13cef012d87d16522ad4ff2a7 Author: VMware, Inc <> Date: Thu Jun 17 14:27:47 2010 -0700 lib/lock: assertion failure The assertion with the tryLock failed... in the wrong place. Signed-off-by: Marcelo Vanzin commit 830503d4ac09a119a935d2b5c8db1e937c76f72c Author: VMware, Inc <> Date: Thu Jun 17 14:27:36 2010 -0700 lib/lock: lock creation error on XP The code needs to return an error number, not a bool. Signed-off-by: Marcelo Vanzin commit aab1ff7f7d018737dd150f0fa0fe39d7bd44fd3f Author: VMware, Inc <> Date: Thu Jun 17 14:27:25 2010 -0700 lib/lock: cleanup before change Undo an earlier change since the code isn't headed in the way first anticipated. Signed-off-by: Marcelo Vanzin commit 3456af5e7d2bb48980813a2d1a230a4ad9f2249f Author: VMware, Inc <> Date: Thu Jun 17 14:27:15 2010 -0700 lib/lock: assertion failure due to MXUser condVar If an attempt was made to acquire the lock involved with a condVar (on one thread) while the lock had been freed as part of a condVar wait (on another thread), an assertion failure would occur on the acquisition. The problem is caused by the implicit unlocking and relocking of the lock involved with the condVar. The MXUser lock reference count was not in sync with the locked/unlocked state. Decrement and increment the reference count before/after the native condVar wait. Signed-off-by: Marcelo Vanzin commit 4bd6012160e1b9fc93661fc88798f61c0ce3e95b Author: VMware, Inc <> Date: Thu Jun 17 14:26:37 2010 -0700 Fix the build Signed-off-by: Marcelo Vanzin commit 14512abc681106efcd61f0c5090e02eeb176b118 Author: VMware, Inc <> Date: Thu Jun 17 14:26:27 2010 -0700 Fix the build Signed-off-by: Marcelo Vanzin commit ac93ddc3ff84acecb1ca13f23ae9c41d9dc6fdc0 Author: VMware, Inc <> Date: Thu Jun 17 14:26:17 2010 -0700 lib/lock: RW lock assertion failure The MXUser RW lock release code has a bug in it... it asserts on an unexpected reference count. The bug was caused by not decrementing the reference count before the assertion. Signed-off-by: Marcelo Vanzin commit edc221b4bc755966ec2bed51f20e682ff8d08868 Author: VMware, Inc <> Date: Thu Jun 17 14:26:05 2010 -0700 lib/lock: cleanup/simplify before change Clean up a bit before a change to fix a bug Signed-off-by: Marcelo Vanzin commit eae40328e8d7000755a164743444a171a52fdf6a Author: VMware, Inc <> Date: Thu Jun 17 14:25:50 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6d51c7105d3b9f817c174671fac943c608830a22 Author: VMware, Inc <> Date: Thu Jun 17 14:25:38 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 27766229be8826ea4f97182b8eae24ede28f38d0 Author: VMware, Inc <> Date: Thu Jun 17 14:25:09 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 78028513ee871dfac2bf8730e149256b8c446c60 Author: VMware, Inc <> Date: Thu Jun 17 14:24:49 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c41bd85f25d6ba0369277adb692335122bc4b011 Author: VMware, Inc <> Date: Thu Jun 17 14:24:26 2010 -0700 lib/lock: cleanup Cleanup a bit... Signed-off-by: Marcelo Vanzin commit 40e94ada739ae5e69ccd1e8adf59ca977b936110 Author: VMware, Inc <> Date: Thu Jun 17 14:23:24 2010 -0700 lib/lock: minor cleanup and optimization Use the Windows native "lock" directly... it's a bit faster Signed-off-by: Marcelo Vanzin commit c31012e5466010773e228bee762d9f05c5a2f6cd Author: VMware, Inc <> Date: Thu Jun 17 14:23:03 2010 -0700 Remove some old bit functions. Signed-off-by: Marcelo Vanzin commit 0e91aeaede040d88364775235eff3d11f4e20579 Author: VMware, Inc <> Date: Thu Jun 17 14:21:31 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2df6785c870e539e74b372f579460569f3b697b6 Author: VMware, Inc <> Date: Thu Jun 17 14:20:59 2010 -0700 bit functions: an easy change These are trivial and easy changes. Signed-off-by: Marcelo Vanzin commit ca6ca71cbe60497de0a6fbcf111e02835fd9836c Author: VMware, Inc <> Date: Thu Jun 17 14:20:49 2010 -0700 Start using the new, unambiguous and consistent bit functions Signed-off-by: Marcelo Vanzin commit 221f45e1f7e4eaef989c5226ea0419775b76d954 Author: VMware, Inc <> Date: Thu Jun 17 14:20:34 2010 -0700 Consistent, unambiguous, non-colliding bit function names We don't have complete set of find most/least significant bit set functions available throughout the source base. Create them. I created these functions by taking the monitor's complete set of functions, moving them to vm_basic_asm.h and renaming them such that they have consistent, unambiguous names that don't collide with ANSI, Linux or MacOS functions or differ in data types. The immediately problematic functions were ffs, fls, ffsl, flsl and fls64. Here is a table to assist with reviewing the change: NAME FUNCTION BITS ON ZERO MONITOR NAME ----- -------- ---- ------- ------------ lssb32 LSB set (uint32) 1..32 0 ffs lssb32_0 LSB set (uint32) 0..31 -1 ffs0 lssb64 LSB set (uint64) 1..64 0 ffs64 lssb64_0 LSB set (uint64) 0..63 -1 lssbPtr LSB set (uintptr_t) 1..32|64 0 ffsl lssbPtr_0 LSB set (uintptr_t) 0..31|63 -1 ffs0l mssb32 MSB set (uint32) 1..32 0 fls mssb32_0 MSB set (uint32) 0..31 -1 fls0 mssb64 MSB set (uint64) 1..64 0 fls64 mssb64_0 MSB set (uint64) 0..63 -1 mssbPtr MSB set (uintptr_t) 1..32|64 0 flsl mssbPtr_0 MSB set (uintptr_t) 0..31|63 -1 fls0l This change is the first of several. It establishes the functions and make one use of them in an obvious, easy place. I'll start converting the source base to use these functions in pieces. The monitor will be the last piece touched and there I'll demonstrate no size or performance changes - and correctness too. In the end the entire source base will be using the one consistent set of bit functions. Signed-off-by: Marcelo Vanzin commit 75837a469e262e71bdcf9b99d6acf80809322a1b Author: VMware, Inc <> Date: Thu Jun 17 14:20:09 2010 -0700 lib/lock: add RW lock singleton function The exclusive and recursive locks have a singleton function... Signed-off-by: Marcelo Vanzin commit f46c0321658a6f412a2b60d25fb802854a0537aa Author: VMware, Inc <> Date: Thu Jun 17 14:19:54 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 2a6761ef57d6593cab6483fe490a298b70376b6e Author: VMware, Inc <> Date: Thu Jun 17 14:19:02 2010 -0700 Let hgfsServer use MXUser locks directly hgfsServer avoided pulling in MXUser locks when VMTOOLS_USE_GLIB was set. Mark Bellon put together a change to split MX and MXUser locks so MXUser can be used in tools. This follow-on change lets hgfsServer use MXUser locks directly. Signed-off-by: Marcelo Vanzin commit 597835393435c3bb197d8630d9a853d00eaf1910 Author: VMware, Inc <> Date: Thu Jun 17 14:18:23 2010 -0700 Upper-bound some gcc workarounds in public/vm_basic_* Put an upper bound on a few gcc workarounds. vm_basic_defs.h / GetFrameAddr() See bug 554369 for details; this bug was fixed in gcc-4.2.0, so apply that upper bound. vm_basic_types.h / INLINE_SINGLE_CALLER Verified that it occurs for gcc-4.4.3. This attribute is now well-documented; it is no longer necessary to check at each compiler bump. Signed-off-by: Marcelo Vanzin commit ded1308955b7f1a4299ac5917b3f2be9b254f08e Author: VMware, Inc <> Date: Thu Jun 17 14:17:58 2010 -0700 Bump tools version. Signed-off-by: Marcelo Vanzin commit 1fbc7f6b523d7d4759a67af48deed997bfc5a2b8 Author: VMware, Inc <> Date: Thu Jun 17 14:17:42 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 48b0ec0dce6c81e75bfcaa70ca8388b81eae9251 Author: VMware, Inc <> Date: Thu Jun 17 14:17:24 2010 -0700 vmmemctl: use Solaris kernel native ASSERT Do not include vm_assert.h in the kernel driver code and instead rely on kernel-provided ASSERT (which does not require Panic() and others). Signed-off-by: Marcelo Vanzin commit 4461ca494b193e3d23ad3f5c77b393b2e1f61b4a Author: VMware, Inc <> Date: Thu Jun 17 14:17:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 15c4d33a02508cd77f63976a11f4c558ab24ad15 Author: VMware, Inc <> Date: Thu Jun 17 14:16:53 2010 -0700 lib/lock: missed a few pieces for tools usage Adding lib/lock to the tools build didn't quite have all of the pieces necessary. Here are the rest... Signed-off-by: Marcelo Vanzin commit 8a6200f30fb719b94b4a0c461f099162e1b50184 Author: VMware, Inc <> Date: Thu Jun 17 14:16:33 2010 -0700 Try to alloc from lower 4GB rather than lower 16 MB Could call pci_set[consistent_]_dma_mask but the defaults already seem to fit what vmxnet supports and I have no idea when these functions first appeared in the kernel. Signed-off-by: Marcelo Vanzin commit 75b4c397f0ab2777d11cea872d57ff4413997a3a Author: VMware, Inc <> Date: Thu Jun 17 14:14:27 2010 -0700 Use new print functions in remaining toolbox cli commands, add i18n. . use ToolsCmd_Print / ToolsCmd_PrintErr everywhere they make sense, to make the "quiet" flag consistent. . i18n'ize all user-visible messages (except the ones coming from external libraries). . all commands that have boolean output can have the output suppressed, and the status can be figured out from the exit value (EXIT_SUCCESS for TRUE, EX_UNAVAILABLE for FALSE). . fix stat command error messages which all printed the same thing. . a few minor stylistic changes to messages. Signed-off-by: Marcelo Vanzin commit eae1c902cc794a1a1a29d758491eaf6bad0a45c4 Author: VMware, Inc <> Date: Thu Jun 17 14:14:06 2010 -0700 Don't crash when reconfiguring file log handler. The log code has a log statement that prints info about the core dump config; when using the file handler, and swithing between "no logging" and "log enabled", the new log data would then open the log file; later, when restoring the previous log config, that would cause an assert. Fix is easy: just change the order in which those things are done. Signed-off-by: Marcelo Vanzin commit 9d1ae5c79f7464127095ac450d59cad90435020e Author: VMware, Inc <> Date: Thu Jun 17 14:13:54 2010 -0700 Fix crash when log domain has no level configured. Sourceforge bug: https://sourceforge.net/tracker/?func=detail&atid=989708&aid=2994264&group_id=204462 Signed-off-by: Marcelo Vanzin commit 57d4ee97aa6450883c54ccb582a3256ad56647ef Author: VMware, Inc <> Date: Thu Jun 17 14:13:38 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ac61109601d354822f84ab441bc97eb053461700 Author: VMware, Inc <> Date: Thu Jun 17 14:13:15 2010 -0700 lib/lock: propogate rank inform when binding to MX The binding MX to MXUser functions need to propogate the rank information into the MXUser lock header since the MXUser "get the rank" function takes the rank information from there. Some code gets the rank (for asserts and other sundry things) from the MX lock directly and some from the MXUser lock. Signed-off-by: Marcelo Vanzin commit 3a9e43cffbe62d4efa6ac984bd4a669a5687a1f6 Author: VMware, Inc <> Date: Thu Jun 17 14:12:49 2010 -0700 Fix open-vm-tools compilation. Looks like this code was triggering a bug in some GCC versions. Work around it. Also avoid two format string-related warnings. Signed-off-by: Marcelo Vanzin commit fdbf0beefa48677a0fcf14aea3b07b95a0a0d9c7 Author: VMware, Inc <> Date: Thu Jun 17 14:12:27 2010 -0700 Change Linux kernel version check to 2.6.32 to fix build error. While creating PBMs for Ubuntu 10.04 RC, which is a 2.6.32-21.32 kernel, we were getting a compile-time error due to type mismatch for the setsockopt prototype. An earlier change to this file assumed that the error would occur on 2.6.34 or later, but in fact it is a problem starting with 2.6.32-rc3. Signed-off-by: Marcelo Vanzin commit 1cd72f3754eebf158ea53f05010eab24eb3b9e5e Author: VMware, Inc <> Date: Thu Jun 17 14:12:05 2010 -0700 Fix the build Signed-off-by: Marcelo Vanzin commit 62a8a5d9ea475453cdaf12841f29b5a893e3101d Author: VMware, Inc <> Date: Thu Jun 17 14:11:54 2010 -0700 lib/lock: press for a harder MX/MXUser separation Since there is a function for MX to register hook functions with MXUser, enhance it to provide additional function that allow removing even more MX references throughout MXUser. This change makes it possible to expose the bind MX to MXUser functionality to userland - we can use that functionality outside the VMX now. The mutex.h and userlock.h include files are tweaked so that things work properly if either of them comes first and the userlock.h file is able to stand on its own inside and outside the VMX. Signed-off-by: Marcelo Vanzin commit 7eed5107237a83cdbc30cb1f7fbec2f2060970f7 Author: VMware, Inc <> Date: Thu Jun 17 14:10:57 2010 -0700 lib/lock: assertion failure The new hook function implanting function caught a panic when it was invocated a second time. Make the function tolerate multiple invocations, only panicing if the later invocations attempt to plant hook functions different than the first time. Signed-off-by: Marcelo Vanzin commit 0b37f68456b146d0dba235687811362f64f8d9ea Author: VMware, Inc <> Date: Thu Jun 17 14:10:13 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 173dfc1f9f17561803d8d648a8a5ad40b9ce7bd9 Author: VMware, Inc <> Date: Thu Jun 17 14:06:24 2010 -0700 Fix tinderbox: missing includes. Signed-off-by: Marcelo Vanzin commit 29eb8bb15b665e162ad5857dd8919c99303ef750 Author: VMware, Inc <> Date: Thu Jun 17 14:06:14 2010 -0700 Make code use new shared definitions from tclodefs.h. Better than hardcoding the same string in several different places. Signed-off-by: Marcelo Vanzin commit 4b1ac046170c00fe232df83f03b03d2f1192d9fc Author: VMware, Inc <> Date: Thu Jun 17 14:05:56 2010 -0700 Add auto-upgrade command to toolbox CLI. This change adds a new "upgrade" command to the toolbox CLI on Win32 and Linux (non-open-vm-tools), which are the only platforms where we have auto-upgrade. Add a few utility functions to the common toolbox CLI code to do a few useful things: . print messages based on the status of the "quiet" flag. . send RPCs to the host using the RpcChannel API. On top of that, put some common definitions of commands and replies in a shared header to avoid having duplicated strings in different parts of the source code. Signed-off-by: Marcelo Vanzin commit 1bb60f3ee8d893c2396526003973860d4f3539f1 Author: VMware, Inc <> Date: Thu Jun 17 14:05:13 2010 -0700 lib/lock: make the userland portion available for tools We're using MXUser (userland) locks all over bora/lib. Some of these libraries are showing up in the open source tools build. Make only the MXUser portion of lib/lock available to the tools. We're OK with open sourcing this. Once this change goes in bora/lib changes that depend on it will start showing up almost immediately. I've elected to a a minimumally invasive approach to ulRec.c, one that optimized out the conditional for acquisition and release (by far the largest usage) and leaving the farless used TryLock and IsLocked routines using the same conditional as before this change. Signed-off-by: Marcelo Vanzin commit 296b5e2e72a6dfba8d119485052355d3d9fe4342 Author: VMware, Inc <> Date: Thu Jun 17 14:04:35 2010 -0700 OVT: detect presence of procps-3.2.8 3.2.8 is the latest version of the package and distributions are switching to it. While it is impractical to have configure script test for every version of the package, testing for 2 latest versions should be OK. Signed-off-by: Marcelo Vanzin commit 329de219c2264e88973c3c57acb22f54676fda16 Author: VMware, Inc <> Date: Thu Jun 17 14:04:21 2010 -0700 OVT: allow compiling against libpng 1.4 Direct usage of png_ptr->jmpbuf, which had been deprecated in libpng 1.0.6, finally produces compile error when using libpng 1.4; we need to use png_jmpbuf() instead. This is import of a patch from Dominique Leuenberger who has a signed contribution agreement with VMware. Signed-off-by: Marcelo Vanzin commit 566eadd7d147003fbe078207af7565da879bd064 Author: VMware, Inc <> Date: Thu Jun 17 14:02:51 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8d64b39700f74d02d897f482b1010a895b3cc24e Author: VMware, Inc <> Date: Thu Jun 17 14:02:34 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3fc38895652ec483387bf8705af1798239fdd7a6 Author: VMware, Inc <> Date: Thu Jun 17 14:02:02 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit aa739c6fcd46fecd71c4f287e413a6129f4b6489 Author: VMware, Inc <> Date: Thu Jun 17 14:01:47 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d029a8b7a20e90b4a7b28e72045c14bba11ef9d4 Author: VMware, Inc <> Date: Thu Jun 17 14:01:22 2010 -0700 Fix packet header validation. Validation assumes that all HGFS V4 requests must come with V4 header and all HGFS V3 requests come with V3 headers. At the moment it is not true for FAST_READ_V4/FAST_WRITE_V4. Besides V3 requests may come with V4 headers. Fixing validation function to remove assumption that header type depends on operation and use explicit information about header version instead. Signed-off-by: Marcelo Vanzin commit 7d2cdeeade7c2df53abd5671347bd8312e05832f Author: VMware, Inc <> Date: Thu Jun 17 14:01:05 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f21a5c2a5bd73378377e040c7108ed18e36bf9cd Author: VMware, Inc <> Date: Thu Jun 17 13:59:46 2010 -0700 Thread fixes for Hostinfo_MachineID Hostinfo_MachineID caches its results. Make the cache atomic. This uses atomic pointers because zero is a valid value for both the name hash and hardware ID. Signed-off-by: Marcelo Vanzin commit bf0c377273319127c99ee79f7329b696c6a7cfc0 Author: VMware, Inc <> Date: Thu Jun 17 13:59:25 2010 -0700 thread fixes for gmtime and localtime in bora/lib Change gmtime and localtime calls to the _r versions. Signed-off-by: Marcelo Vanzin commit af273b89714fb6e3cf99ef7531805e1bc8f317e6 Author: Marcelo Vanzin Date: Mon Apr 26 20:50:45 2010 -0700 Updating open-vm-tools version for release 2010.04.25-253928. Signed-off-by: Marcelo Vanzin commit 693937f4c3149d3c52f372dd7ed1236cd94ed24e Author: VMware, Inc <> Date: Mon Apr 26 11:42:50 2010 -0700 Unity,GHI/X11: Attempt better mapping of "window" paths to executables. GHI/X11's unity.get.window.path handler was flawed w.r.t. its intended purpose in that it may frequently return a path of no use to the host. As an example, while a Firefox window belongs to the executable installed at /usr/lib/firefox-3.6.3/firefox-bin, knowing the latter does us no good, because the binary is meant to be started from a wrapper script rather than executed directly. This change introduces some fuzzing whereby vmware-user will try to associate plain pathnames with their regular GHI menu item entries. Put differently, when the host UI asks for the window path of a random Firefox window, instead of returning file:///usr/lib/firefox-3.6.3/firefox-bin (busted) we'll return file:///usr/bin/firefox?DesktopEntry=%2fusr%2fshare%2fapplications%2ffirefox.desktop When the host UI then uses the latter path to launch Firefox (say, from a docker [Fusion] or pinned start menu item [Workstation for Windows]), it will provide enough information to vmware-user to use the correct launcher. Signed-off-by: Marcelo Vanzin commit 1d4412760ff7ac7e97fd6bb903fc57f0a3007dc0 Author: VMware, Inc <> Date: Mon Apr 26 11:42:17 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f9afbb636443aa000ef7f7c5d5a083ba9337d5f3 Author: VMware, Inc <> Date: Mon Apr 26 11:41:54 2010 -0700 Fix open-vm-tools build on FreeBSD. Signed-off-by: Marcelo Vanzin commit 10b9750de2412ad3f6f2383a3112ac2b4756053c Author: VMware, Inc <> Date: Mon Apr 26 11:41:44 2010 -0700 Refactor toolbox-cmd command handling. This is mostly a mechanical change to have the sources better organized. The change moves the command / help handlers to the command-specific source files, so that there is a clear interface between the main() function and the command handlers, and also so that it's less messy to add new commands. On top of that, a couple of minor issues (missing parameters to vararg calls) were fixed, and the translations were updated to match the new help messages (which have the command as a parameter, instead of hardocded in the message). Signed-off-by: Marcelo Vanzin commit a71df4c6bed673239faea6dd2ab9744586be68e5 Author: VMware, Inc <> Date: Mon Apr 26 11:41:18 2010 -0700 Fix copyrights in tools-for-linux This CSet updates the copyright markings in tools-for-linux to 2010 Signed-off-by: Marcelo Vanzin commit f160849d8ef1ccfda3a45728d2d0ea3faf2d166e Author: VMware, Inc <> Date: Mon Apr 26 11:40:54 2010 -0700 Change lib/file to use Posix_Getmntent_r for I18n and thread-safety. lib/file calls the thread-unsafe getmntent. It also ignores the local I18N encoding. Change it to call Posix_Getmntent_r, which takes care of both problems. On UTF-8 based systems, our Posix variant is defined to the underlying getmntent_r call, so check for cases where the supplied buffer is exhausted. Signed-off-by: Marcelo Vanzin commit 7042dad27b7766be9bf7115fa218921843c8366c Author: VMware, Inc <> Date: Mon Apr 26 11:40:34 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a29eb21e2c97054c477500f50cacbcdbf367014b Author: VMware, Inc <> Date: Mon Apr 26 11:40:14 2010 -0700 multi thread fix for evct and fcvt use in bsd printf Can't use mxuser locks for this because they'll pull in lib/lock all over the place. On Windows use the thread-safe functions _ecvt_s and _fcvt_s instead of having to dynamically allocate a mutex. There are thread-safe versions for Linux, too, ecvt_r and fcvt_r, but they are not available on Mac. Since there was going to be a mutex in this code for Mac, might as well use it for Linux, too. Signed-off-by: Marcelo Vanzin commit cc8d50e77e47be9a97a5bc7a6a4be633b0123527 Author: VMware, Inc <> Date: Mon Apr 26 11:39:38 2010 -0700 Power scripts: Refactor as PI statechange.sh and PD network scripts. [2/2] This is a follow-up to my previous change whereby the packaging targets are updated to consume the new scripts. Signed-off-by: Marcelo Vanzin commit 1f1a372ae401d9a5606d92cf07c0a67916d0e618 Author: VMware, Inc <> Date: Mon Apr 26 11:33:01 2010 -0700 Fix vmhgfs-local target to reflect vmci dependency. Signed-off-by: Marcelo Vanzin commit ca33751fccc16adda4d999b27c2a7c00c645f8de Author: VMware, Inc <> Date: Mon Apr 26 11:31:44 2010 -0700 Fail more gracefully on unrecognized I18N encodings Unicode_Init has a check for unsupported local character encodings, but the code that prints the unsupported encoding name calls Unicode_EncodingEnumToName(), which assumes that the enum passed into it is valid. Since the encoding name wasn't found, the enum is STRING_ENCODING_UNKNOWN, which results in a not particularly graceful or informative NOT_REACHED() down inside lib/unicode. The fix is to use the string that codeset gave us instead of trying to convert STRING_ENCODING_UNKNOWN back into an encoding name. Also add an ASSERT to Unicode_EncodingEnumToName() to check that STRING_ENCODING_UNKNOWN is not passed to it. Signed-off-by: Marcelo Vanzin commit cf353e2cabc5b87a4c0a7efbbaf8b993f3551ba6 Author: VMware, Inc <> Date: Mon Apr 26 11:31:16 2010 -0700 [RC Fix] Fix bug 548177. When user deletes a share on the host, nautilus (ubuntu file manager) does not like us sending -EIO on a share. We detect this error and map it to success and create minimal fake attributes. In future we this client will this mask new error codes that we add to the server as well, which is sad. Signed-off-by: Marcelo Vanzin commit c4abd20f82f104fa5dbba14390202887c7c9d7a0 Author: VMware, Inc <> Date: Mon Apr 26 11:30:24 2010 -0700 A few changes to make Tools more test-friendly. . tweak vmtoolsd so that it allows any container name when running in debug mode (GuestRPC is still restricted to the two "blessed" names). Also fix the hgfsServer plugin to handle the debug case without crashing. Signed-off-by: Marcelo Vanzin commit b3ba14c9ac7ee5e4d83c56bd7e1938e1e6d9134c Author: VMware, Inc <> Date: Mon Apr 26 11:29:57 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 123c89f65d42c8d745b0fda267934f454d08cc54 Author: VMware, Inc <> Date: Mon Apr 26 11:29:22 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8eb4355e9683c6547798c2842682b172b70d759f Author: VMware, Inc <> Date: Mon Apr 26 11:28:24 2010 -0700 VMCI support for Windows client. Implementing VMCI support for HGFS Windows redirector. Signed-off-by: Marcelo Vanzin commit 101ba03726e5e944c4750b130ab14805745754a2 Author: VMware, Inc <> Date: Mon Apr 26 11:27:06 2010 -0700 vmballoon: switch to using DblLnkList Instead of creating homegrown double-linked-list implementation use the standard one provided by dbllnklst.h Also throw in some formatting changes and remove the logic preventing reinitialization - we are a kernel driver and should know better whether we called init or not. Signed-off-by: Marcelo Vanzin commit 2819f1fddc7d782cbdff074356d18e164a48d015 Author: VMware, Inc <> Date: Mon Apr 26 11:26:50 2010 -0700 Fix renames across volumes for HGFS Windows guests For non-Windows hosts, the HGFS server will not be able to handle cross volume renames returning the error HGFS_STATUS_GENERIC_ERROR. A new error should be returned and mapped to the Windows system status STATUS_NOT_SAME_DEVICE and EXDEV by the guest file system client. This will cause the application (Windows Explorer, Posix mv) to break the move file operation into a copy and delete file operations. Windows HGFS server does not currently return this error at all, and furthermore, handles the cross volume rename operations internally. However, since non-Windows hosts and guests both use the new HGFS_STATUS_NOT_SAME_VOLUME error for this rename error, the Windows server could be later modified to return this too for consistency and then all guest clients can let the guest application handle it accordingly. Signed-off-by: Marcelo Vanzin commit bf1a7765924d977d6c0eae98a6c943f9de0aeba6 Author: VMware, Inc <> Date: Mon Apr 26 11:26:35 2010 -0700 lib/file: comment cleanups Signed-off-by: Marcelo Vanzin commit 1a80de7707767c037680a5b9bd7954d907f9ee6e Author: VMware, Inc <> Date: Mon Apr 26 11:26:19 2010 -0700 lib/file: general cleanup Some comment and message cleanup, nothing serious. Signed-off-by: Marcelo Vanzin commit e927e65f349c85c8b72d978f8da43ad156baac00 Author: VMware, Inc <> Date: Mon Apr 26 11:26:11 2010 -0700 vmbackup: add null provider, do late initialization of sync provider. This change adds a null provider so that systems that don't have either VSS nor the sync driver (or have them disabled) can still execute at least backup scripts when taking a quiesced snapshot. This should bring feature parity to the previous quiesced snapshot approach, which would use the VIX path if the vmbackup protocol wasn't supported by the Tools. Also initialize the sync provider late, only when starting a backup operation. This allows the users to change the Tools configuration and not have to restart the Tools service to get the new settings, making it easier to switch between VSS / sync driver / null provider. Signed-off-by: Marcelo Vanzin commit 9e18c6335460f6baad99685bf4fe9caa2203bad2 Author: VMware, Inc <> Date: Mon Apr 26 11:25:33 2010 -0700 lib/file: add parameter comments Some function parameter clean ups. Signed-off-by: Marcelo Vanzin commit 7cba805092db268c791de98aff210b2e1aad9956 Author: VMware, Inc <> Date: Mon Apr 26 11:25:23 2010 -0700 lib/file: clean up Remove evil tabs, clarify a comment, add an assert. Signed-off-by: Marcelo Vanzin commit 75074c6a9f00504c8420d0dfb358759207859490 Author: VMware, Inc <> Date: Mon Apr 26 11:25:16 2010 -0700 Fix the Tools build. Signed-off-by: Marcelo Vanzin commit 0b73b7f5e7012b8da77231cf479afae8d287a82d Author: VMware, Inc <> Date: Mon Apr 26 11:25:07 2010 -0700 suidWrapper: Ignore SIGUSR1, SIGUSR2. Ubuntu 9.10+'s Upstart may result in the services script and vmware-user launching concurrently. When this happens, the services script may deliver SIGUSR1 and/or SIGUSR2 to vmware-user while it's still executing inside the suidWrapper or appLoader. Neither were handling SIGUSR1/2, and so they'd terminate. This change sets the handler to SIG_IGN for these signals. Note that SIG_IGN persists across fork() and execve(), so we don't need to block the handles again inside the appLoader driver (toolbox/linux/vmwareuser/loader). As a setuid application, classically we avoided pulling in other libraries, but the vmsignal library is safe. It's tiny and doesn't use bora/bora-vmsoft at all, so its use here is okay. Signed-off-by: Marcelo Vanzin commit f0b37c5a467f4877e333ff1bf39962dc34a05f4f Author: VMware, Inc <> Date: Mon Apr 26 11:24:30 2010 -0700 lib/misc: use a proper context for Random_Quick The Random_Quick context pointer is "void *" when it should be "struct rqContext *". Use the not having to define the structure trick so as to not expose the contents of the context. Signed-off-by: Marcelo Vanzin commit e86c79e3f9d71e8a317b84357812567ce9cc13c1 Author: VMware, Inc <> Date: Mon Apr 26 11:24:12 2010 -0700 lib/misc: fix function name An RNG was added without the appropriate prefix. Fix this. Signed-off-by: Marcelo Vanzin commit bc8c77febf3f2d3290b8beb33ca15b5210f8bf85 Author: VMware, Inc <> Date: Mon Apr 26 11:23:57 2010 -0700 lib/file: pick up some review comments Picking up a few review comments from the last lib/file change review. Signed-off-by: Marcelo Vanzin commit 441d2c38143213140bb7ce3006986e9f07573244 Author: VMware, Inc <> Date: Mon Apr 26 11:23:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fd2c32ed531116c825ecf4ba0519a7c380853a1f Author: VMware, Inc <> Date: Mon Apr 26 11:23:32 2010 -0700 lib/file: fix the build Signed-off-by: Marcelo Vanzin commit ac66d3001ae18df4787cb82fd14f0939504237ac Author: VMware, Inc <> Date: Mon Apr 26 11:23:25 2010 -0700 Fix the build Signed-off-by: Marcelo Vanzin commit d39c8be3968cd88b8b2faaa39f4bf92165252c25 Author: VMware, Inc <> Date: Mon Apr 26 11:23:16 2010 -0700 lib/file: fix a spelling mistake Signed-off-by: Marcelo Vanzin commit 1701f9b16dc796954ef2e1b8884664540a2a6e1e Author: VMware, Inc <> Date: Mon Apr 26 11:23:04 2010 -0700 lib/file: tolerate Windows better Windows doesn't have a way of being deterministically correct when handling files as some file operations may return a "busy" even when not no thread/process is operating on the targetted file. This is due to the parent directory being used by another thread/process at the time of the file operation. The only recourse is to retry. The good news is these problems are rare. Unfortunately we're seeing more of this on Vista++ than in the past. The old code did a fixed number of retries while it slightly wobbled the amount of time slept between retries to try to fight its way through these kinds of problems. This proved insufficient. The new way is to fully wobble the retries, using a highly variable sleep duration after a failed attempt and bounding the retries based on the total time waited rather than a fixed retry count. Signed-off-by: Marcelo Vanzin commit 79a46799e052d4ae31b3bf6d96353df9604e9ed4 Author: VMware, Inc <> Date: Mon Apr 26 11:22:47 2010 -0700 lib/misc: cleanup code standard cleanup Signed-off-by: Marcelo Vanzin commit 176370fa24e56c09eac4510a5e9edf3af03aaba8 Author: VMware, Inc <> Date: Mon Apr 26 11:22:36 2010 -0700 open-vm-tools: fix Solaris/FreeBSD hgfs module compilation. Need to add vmk_exports.h (needed by sha1.c). Also remove duplication of the sha1 sources. Signed-off-by: Marcelo Vanzin commit 7451a95e35a2ab34ebd1757446c8331b3f47c4b5 Author: VMware, Inc <> Date: Mon Apr 26 11:22:16 2010 -0700 lib/file: pretty up structures Silly alignment of variables... Signed-off-by: Marcelo Vanzin commit ed0813e340435e985d008b8136c7d6f2ec413126 Author: VMware, Inc <> Date: Mon Apr 26 11:22:02 2010 -0700 HGFS node cache from causing the VMX to go into an infinite loop If the HGFS server node cache becomes full and all the nodes are of the type that cannot be foreclosed and so cannot be removed the removal goes into an infinite loop. Fix it by only checking the number of entries in the list and then exiting with failure. Signed-off-by: Marcelo Vanzin commit f577945078a714c36761b42c273113e978b46652 Author: VMware, Inc <> Date: Mon Apr 26 11:21:41 2010 -0700 Power Scripts: Refactor power-off, power-on default scripts. The default power-off and power-on scripts are identical across all of the POSIXy platforms, so there's no need to have a separate instance for each. Signed-off-by: Marcelo Vanzin commit 1b78549270f3c66e5bfb7ffffc144887651b2de8 Author: VMware, Inc <> Date: Mon Apr 26 11:21:23 2010 -0700 Unity/X11: Ignore decoration widget windows. KDE 4's kwin provides decoration windows by creating independent windows of _NET_WM_WINDOW_TYPE_NORMAL and reparenting them to a top-level/frame window. This window and the application's client window become siblings. The problem is that Unity/X11 never had this case in mind. Whenever we saw a new top-level window, we expected it to either (a) stay as a top- level window / become an override-redirect window, or (b) be reparented to a different window and receive the WM_STATE property (which identifies *this* window as the client window). Usually a window manager would create its decorations immediately as children of the frame window, not graft the decorations into the frame's tree. This caused Unity/X11 to treat these windows independently, expecting them to eventually become a client window. This might not normally be a problem, but as window coordinates are relative to one's parent, Unity/X11 thought these windows' coordinates were relative to the root window rather than some regular frame window. A correct fix for this would be to associate this window and its frame, such that once the frame is ever associated with a client window, any remaining client window "candidates" would be ignored. (They are, after all, unimportant children of the frame. The only child relevant to us is the application's client window.) Unfortunately I don't have enough time to work on that, so I'm instead sticking in a safe hack in order to meet C&C RC stability requirements. Signed-off-by: Marcelo Vanzin commit 549f0b6babdfec3cf4da61796d10ee61f2b24c1c Author: VMware, Inc <> Date: Mon Apr 26 11:20:09 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 02360fcf8e5e400807d5c8d0a99cba910d91dd0b Author: VMware, Inc <> Date: Mon Apr 26 11:17:35 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a68014e17362a70d182363b6d1e9f550507fac9e Author: VMware, Inc <> Date: Mon Apr 26 11:17:02 2010 -0700 Linux Guest driver support for VMCI doorbell notifications This change introduces three new functions to the VMCI guest kernel API dealing with the HW v8 support for doorbell notifications. The actual implementation of these doorbell calls are embedded in a new notification module, that handles allocating notification bitmap indexes, registration/unregistration of callbacks for a given index, and firing the handlers for a given index. The Linux device initialization now opts in to use notification, if the hardware supports it. Signed-off-by: Marcelo Vanzin commit f99d77452e4876e46d3e230c8a5c271be5ec4c81 Author: VMware, Inc <> Date: Mon Apr 26 11:16:40 2010 -0700 Unity/X11: Work area struts are [x1,x2) and [y1,y2). The region code defines a 25x25 rectangle with its upper left corner at the origin as (x1,x2,y1,y2) = (0,25,0,25); upper bounds are exclusive. However, the strut code works with inclusive coordinates, so we should instead use (0,24,0,24). Without doing this, we run into problems. Consider a multihead setup of 2 displays at 1600x1200 in a horizontal configuration. There should be a single 25px top strut attached to the left display. By adding a pixel, we have a strut that ranges from [0,1600], occupying a single pixel on the right display. The guest will now reserve the top 25px on the right display while the host does not. Should someone maximize a window on that display, the guest places the window's upper left corner at (0,25) while the host places it at (0,0), and all hell breaks loose. Signed-off-by: Marcelo Vanzin commit 3e539cd0f2fa121540b1c47addd29ed468d131d8 Author: VMware, Inc <> Date: Mon Apr 26 11:15:52 2010 -0700 rpctool: exit with failure if RPC command failed. Some recent change overwrote the return value of the RPC call, making the tool return success (0) even if the RPC failed. Signed-off-by: Marcelo Vanzin commit 033c5dd896ca92e901c1eb490aa6c8663d2b8ea9 Author: VMware, Inc <> Date: Mon Apr 26 11:15:18 2010 -0700 vmware-user: Eliminate racy exit situation. Vmware-user's signal handler was destroying RPC channels when it shouldn't have. Rather than having a few cases where we decide to call VMwareUserCleanupRpc before exiting the main loop, this change simply places a call to VMwareUserCleanupRpc /after/ the main loop has exited. (The X I/O error handler is a special case, as apps are -not- supposed to return from that handler.) In the case of bug 542135, vmware-user received SIGUSR2 while still initializing, destroying gRpcIn, before control was returned to the initialization and eventmanager routines which expected gRpcIn to still exist. Signed-off-by: Marcelo Vanzin commit 98cde65ed38d576274d1ec83078a80f08aadb6b4 Author: VMware, Inc <> Date: Mon Apr 26 11:14:55 2010 -0700 Install toolbox-cmd's translations in open-vm-tools. Add the translation catalogs to the open-vm-tools package, and install them when performing a "make install". Signed-off-by: Marcelo Vanzin commit 0eb586f45257b188eb26b74d06d50da9f1a69aca Author: VMware, Inc <> Date: Mon Apr 26 11:14:24 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 50dc0a87e9fc5b1814cc7925264827c436443797 Author: VMware, Inc <> Date: Mon Apr 26 11:13:55 2010 -0700 Internal branch sync. Included in this change: . Add debug domain to resolutionSet plugin. . Reset Unity options when exiting unity. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b8e0afc32f312c962a90911894da0bd7d3985076 Author: VMware, Inc <> Date: Mon Apr 26 11:09:15 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 29310afaf31c070c31e8a55c7da4d047e5d56f62 Author: VMware, Inc <> Date: Mon Apr 26 11:08:50 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9db6f9779b520801edd822ec7cbe882d3c5254ac Author: VMware, Inc <> Date: Mon Apr 26 11:08:12 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ad43aa23fb23fbd554ff1c5afd4d319003170e12 Author: VMware, Inc <> Date: Mon Apr 26 11:07:53 2010 -0700 Atomic_Write64 is not atomic for 64-bit immediate operand There is no move instruction for 64-bit immediate to memory, so unless the immediate value fits in 32-bit (i.e. can be sign-extended), GCC generates two movl instructions. Use asm instruction to make GCC load the immediate value into a register first. Signed-off-by: Marcelo Vanzin commit 26547bca7a7c40ef8ad8fe11dfd720e1c48a1e65 Author: VMware, Inc <> Date: Mon Apr 26 11:04:49 2010 -0700 Trivial: Fix warning Signed-off-by: Marcelo Vanzin commit a8b9bfcdd054837dd6cd2e09fc8189960472cf36 Author: VMware, Inc <> Date: Mon Apr 26 11:04:36 2010 -0700 Trivial: Remove hgfsServer.h dependency Signed-off-by: Marcelo Vanzin commit 8ccc52081814414a5e6c446b05c0bf50a7889bab Author: VMware, Inc <> Date: Mon Apr 26 11:04:17 2010 -0700 Unity/X11: Avoid sending spurious & incorrectly terminated updates. CLN 1022282 introduced a regression whereby Unity/X11 began sending spurious and sometimes incorrectly terminated updates. 1022282 was correct, but it exposed a bug elsewhere in Unity/X11's update code. 1. The initial buffer update buffer should not start with a nul, so trim it at init. 2. Don't append the terminating double nul unless we actually have an update to send. Signed-off-by: Marcelo Vanzin commit 9e702a4a828973b9f83615e51434571358dd8c90 Author: VMware, Inc <> Date: Mon Apr 26 11:03:30 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3b463de5cf514d85b8b5664070ad259dd7a4cd79 Author: VMware, Inc <> Date: Mon Apr 26 11:02:13 2010 -0700 Update the PAM modules for vmguestd to include pam_unix.so Ubuntu 10.04 does not include either the pam_unix2.so nor the pam_unix_auth.so module for PAM. As a result, none of our authentication is working. This CSet adds pam_unix.so to our list of pam_modules to use for accounts and auth. Signed-off-by: Marcelo Vanzin commit 7e2a3b1380ef5ed8c56fa6fbe7616cd5c87365c0 Author: VMware, Inc <> Date: Mon Apr 26 11:01:54 2010 -0700 Unity: Purge update buffer after successful send. The Unity/X11 code to handle the "new" update channel code was broken, but problems didn't surface until CLN 953276 in November. When single "remove" updates were sent, the update buffer should've been purged but wasn't. As a result, the update buffer might look something like this (! = nul): > remove 01234567!!add 712456 windowPath=file:///foo/bar!move 712456...!! When the VMX parses the update, it stops at the first double nul, discarding everything afterward. The result on QA's VM was that windows created before entering Unity never appeared after entering Unity, while all windows created afterward did. Signed-off-by: Marcelo Vanzin commit 7cc34285e544e6e41f61cde9d0543afcc7ade1af Author: VMware, Inc <> Date: Mon Apr 26 10:59:48 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c5b8b7d36c0772043d2ef9a7dd4d503bc80ce016 Author: VMware, Inc <> Date: Mon Apr 26 10:57:52 2010 -0700 Toolbox GTK: make file selection dialog modal Otherwise crafty users may switch back to main window and wreck havoc upon us. Signed-off-by: Marcelo Vanzin commit 5121ca5e24d7942a955a4808ea3913969b5ef540 Author: VMware, Inc <> Date: Mon Apr 26 10:57:21 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d88a4ddc1d20e5a8ee2c4623e233220f78c98ba1 Author: VMware, Inc <> Date: Mon Apr 26 10:56:20 2010 -0700 Fix vmguestlib pkgconfig file. See sourceforge bug: https://sourceforge.net/tracker/?func=detail&aid=2971429&group_id=204462&atid=989708 Signed-off-by: Marcelo Vanzin commit 19186660a8a23bf633b0ce6e04996dd7e65a5fc7 Author: VMware, Inc <> Date: Mon Apr 26 10:56:09 2010 -0700 Guest/Host Interface for VMCI. This change consist of 2 part. Part-1: Hgfs VMCI Interface for linux Guest. Guest VMCI Interface: Every request will pass meta Packet as contiguous buffer and data packet as set of struct pages. This is linux guest only. Note that even contiguous buffer will be sliced down into many pages when passed to the host. Use req->bufferSize instead of HGFS_PACKET_MAX so that each transport can allocate packet of variable size. Part-2: Hgfs VMCI Interface for linux host. Implement new interfaces for communication between hgfsServer and transport layer. Earlier hgfsUtil.c was implemented which was thought to be too complicated. Now a less(?) complicated version hgfsServerPacketUtil.c has been added. Removed memcpy from backdoor, tools code. Write reply directly into guest memory. I thought about reference counting but realized that it is not required. It would have been useful if the system could hold onto memory for long time but we are guaranteed to release all the memory at packet Send, so I am not too worried about it. Signed-off-by: Marcelo Vanzin commit 1cfa535753d518611673881b8d324c236129a713 Author: VMware, Inc <> Date: Mon Apr 26 10:38:38 2010 -0700 lib/file: clean up a few comments Signed-off-by: Marcelo Vanzin commit 79d64f6d9eaa7f7e53f8c4c57b0da2dbfc57de11 Author: VMware, Inc <> Date: Mon Apr 26 10:38:27 2010 -0700 Vmfs_IsVMFSFile and Vmfs_IsVMFSDir go bye-bye Use HostType_OSIsVMK instead... Signed-off-by: Marcelo Vanzin commit c11ceac1267f522f6af334c04c2671ad6904fb9f Author: VMware, Inc <> Date: Mon Apr 26 10:38:16 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 92ca1903d6204f392d3b010d9765a77203f53635 Author: VMware, Inc <> Date: Mon Apr 26 10:37:22 2010 -0700 OVT: remove pvscsi linux driver Now that PVSCSI is in mainline kernel (since 2.6.33) we should not be distributing it here but rather have users get it with their kernels. Signed-off-by: Marcelo Vanzin commit a1301618b15ba50f0d60cca210c94baa003a9bf3 Author: VMware, Inc <> Date: Mon Apr 26 10:36:56 2010 -0700 Remove File_OnVMFS All files on ESX - with the departure of the COS - are on VMFS. Remove File_OnVMFS. Use HostType_OSIsVMK instead. Signed-off-by: Marcelo Vanzin commit 2dc0f874901ee0847454e6d9868a413493a62154 Author: VMware, Inc <> Date: Mon Apr 26 10:36:38 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1da06b95067cb8ebbffaa4713df6f655c2e74fdc Author: VMware, Inc <> Date: Mon Apr 26 10:36:01 2010 -0700 Support legacy freeze / thaw scripts in the vmbackup plugin. The old "sync driver path" used by hostd manually invoked these scripts during a quiesced snapshot. Since that code is being removed from hostd, add code in Tools to at least cover the default case. (hostd allowed the paths to be configured, but we can't read that from inside the guest). Signed-off-by: Marcelo Vanzin commit 355495ca58d2280a2ecb27be73aea0aa4c80e8b2 Author: VMware, Inc <> Date: Mon Mar 22 15:37:59 2010 -0700 Updating open-vm-tools version for release 2010.03.20-243334. Signed-off-by: Marcelo Vanzin commit 7cdbb623125729b41bf54068568dfbcc2dd58733 Author: VMware, Inc <> Date: Mon Mar 22 15:30:08 2010 -0700 Internal branch sync. Included in this change: . Unity: 'Interlock' minimize operations through the host. . Close up va_list before exiting. . Shutdown Linux Copy Paste and DnD on X IO error properly. Signed-off-by: Marcelo Vanzin commit d18c51d3e7073202e088ae46e83063850c064908 Author: VMware, Inc <> Date: Mon Mar 22 15:19:25 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a9c62cafba3cb398d7fd3c3f95ee34a46ecd8fb9 Author: VMware, Inc <> Date: Mon Mar 22 15:19:01 2010 -0700 VSOCK: fix compile warnings on recent kernels During 2.6.33 merge window net_proto_ops->create() method was changed - a new 'kern' field, signalling whether socket is being created by kernel or userspace application, was added to it. During 2.6.34 merge window type optsize of argument to proto_ops->setsockopt() method was changed from 'int' to 'unsigned int'. Here we are trying to cope with the changes. Signed-off-by: Marcelo Vanzin commit b0f5404f27c3eefe0c298a9eab9cf1e1a45f7cee Author: VMware, Inc <> Date: Mon Mar 22 15:18:50 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit daf5a32ec61603a483a45c3bb2bb520be6840e8c Author: VMware, Inc <> Date: Mon Mar 22 15:18:14 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a3a3262bbff6b1b72f058b886c34f0b7e9db9d2e Author: VMware, Inc <> Date: Mon Mar 22 15:17:57 2010 -0700 VMXNET: Fix compilation on kernel 2.6.34-rc1+ change_mtu() method was removed from netdevice and moved into net_device_ops. HAVE_CHANGE_MTU was removed as well which caused vmxnet_change_mtu to be omitted but it is still needed. Signed-off-by: Marcelo Vanzin commit cb225a952a4c461581ae83c2c03211abbef3c649 Author: VMware, Inc <> Date: Mon Mar 22 15:17:37 2010 -0700 Rework the "disksFrozen" hack to be more generic. CS 1010838 added a hack to work around an issue with the Win32 sync driver. The hack is simpler than the more generic solution, which is fine for the release branch it was targeted at, but changing the public plugin API for such things is in general a bad idea. This change implements it so that the current (i.e. before that patch) public API is maintained but the same functionality can be achieved. It requires a little bit more code, though, since it requires creating a new gobject signal to notify of the state change. Signed-off-by: Marcelo Vanzin commit 2890560c899ce82b829204287825562e2ac6e48a Author: VMware, Inc <> Date: Mon Mar 22 15:17:17 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6b8e99d8c7751d089a0ed56180b6f5805bc2ec3d Author: VMware, Inc <> Date: Mon Mar 22 15:16:29 2010 -0700 Pass VMX86_{DEVEL,DEBUG} to FreeBSD kernel drivers Pass VMX86_* flags down to the FreeBSD drivers using DEBUG_FLAGS. To get things to build I had to add some #ifdef around Mac OS X specific code, change some %lld to FMT64, then due to that fix uint64 definition in vm_basic_types.h (anyone knows why it was 'unsigned long long' for 64bit FreeBSD? Should I change FMT64 for FreeBSD instead?) Signed-off-by: Marcelo Vanzin commit bbfb543abc1ec825a0a19f688d28210f9a3c75e0 Author: VMware, Inc <> Date: Mon Mar 22 15:16:09 2010 -0700 Add initial host side support for request/confirm/ack unity operation. Add RPC names and XDR definitions for requesting, confirming and acknowledging unity operations via the host. A limited number if operation types are defined, we currently only care about 'minimize'. Signed-off-by: Marcelo Vanzin commit 006d063b67e059c2419c5cad95569627c8de2e4b Author: VMware, Inc <> Date: Mon Mar 22 15:15:15 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6daa37f55a74492d9239cc85456f2e757b4c74cf Author: VMware, Inc <> Date: Mon Mar 22 15:14:59 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6d68b683ef991152930fae5ececcc5cc8f72891e Author: VMware, Inc <> Date: Mon Mar 22 15:14:24 2010 -0700 Bump driver version for CLN 1010036 Bump the guest driver version Signed-off-by: Marcelo Vanzin commit 2b4c6fa986d8085dd77d91adb10f4d8beb980500 Author: VMware, Inc <> Date: Mon Mar 22 15:14:18 2010 -0700 Backin Decoder CPUID change Signed-off-by: Marcelo Vanzin commit 3b7c7adc1d7ef3ace1a713d0d6776cd7c206d118 Author: VMware, Inc <> Date: Mon Mar 22 15:13:56 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 368213fb5efe90e8410f0621d2d87385fcbdd3a9 Author: VMware, Inc <> Date: Mon Mar 22 15:13:38 2010 -0700 Backout previous change. Signed-off-by: Marcelo Vanzin commit dbc7bb81bbbe835ce66a3190875e2512edc4fb49 Author: VMware, Inc <> Date: Mon Mar 22 15:13:19 2010 -0700 Backout previous change. Signed-off-by: Marcelo Vanzin commit f6f485cf75fac883716317280a2c293fd5f66a32 Author: VMware, Inc <> Date: Mon Mar 22 15:12:59 2010 -0700 Simple multi-threading fix for wcrtomb Our printf and msg code uses wcrtomb, but on Windows wcrtomb is #defined to wctomb, which is not thread-safe. The call sites think they are getting wcrtomb, and are coded to be thread-safe. The #define has a comment that wcrtomb is not available in Windows, but sandbox builds seem to work just fine with the #define removed, so let's try taking it out. The resulting code will still not be completely thread-safe, wcrtomb is vulnerable if another thread calls setlocale while it is executing, but callers are supposed to using Unicode_Init, not setlocale, so let's ignore that problem for now. Signed-off-by: Marcelo Vanzin commit 7957bf4d907cd58066eb22ae8cd76c1b4a55b18c Author: VMware, Inc <> Date: Mon Mar 22 15:12:49 2010 -0700 Bump Tools version for RC release. Signed-off-by: Marcelo Vanzin commit 44704ee73e677aad1cb2da697bf0d9a9810e1d8c Author: VMware, Inc <> Date: Mon Mar 22 15:12:39 2010 -0700 Fix tools build Signed-off-by: Marcelo Vanzin commit ed7f41a95925f1d3865dfd4e0fb85293841cf660 Author: VMware, Inc <> Date: Mon Mar 22 15:12:27 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a97ec76bc4dbe41faa82579f0ef022b22bff1e85 Author: VMware, Inc <> Date: Mon Mar 22 15:12:04 2010 -0700 Fix sync driver support in vmbackup plugin. The cause of the hangs seen while investigating the bug is that the Legato sync driver doesn't like even when people are doing read-only operations like stat(2); so it would block the calling thread, which just happened to be the Tools service's main thread, and things would go to hell. The fix is to add a flag to the shared app context that lets code knows when it's safe to access the disk. The two instances of the hang I was able to capture in the kernel debugger (the log file check task and the guest info gathering task) now check this flag and just bail out if it's set. This is the "quick & less intrusive" version of the fix, which will be modified once it hits vmcore-main to be more generic and more in line with the Tools Core API. This *may not* fix all instances of such hangs. I've actually been able to hang a VM while performing a quiesced snapshot with this fix, but the frequency is much, much, much lower (it happened once in a few hundred tries). I haven't yet been able to catch this hang in a debugger. But, code-wise, we're at least on par with K/L (in fact, better, since K/L does not have the guest info workaround). A flag was added that allows disabling the sync driver without having to uninstall it, in case of emergency. The driver is enabled by default. Also fix the sync driver support in the vmbackup plugin. The propagation of the sync driver handle through the different operations was busted, so querying the handle status was not working as expected. Also make sure resources are properly freed and errors are correctly handled. Signed-off-by: Marcelo Vanzin commit d704f64487f28b0312ddf9b8aad02acb065554da Author: VMware, Inc <> Date: Mon Mar 22 15:11:21 2010 -0700 Internal branch sync. Included in this change: . Allow the host to configure unity behaviour in the guest. . Avoid warnings when compiling with gcc 4.2. Signed-off-by: Marcelo Vanzin commit e23e01d95d3980d6bceaf04ccde7372d8128d77e Author: VMware, Inc <> Date: Mon Mar 22 15:08:32 2010 -0700 Get rid of functions that don't have any callers. Signed-off-by: Marcelo Vanzin commit 1aae69cec6cb36e4e9a9e49bccfbff78d7b849c0 Author: VMware, Inc <> Date: Mon Mar 22 15:08:07 2010 -0700 Fix frobos build error Oops, forgot to build frobos tests for change 1010036 Add VMCIQPair interface to VMCI. The ASSERT is nice but it breaks the build. I'm removing it for now. Signed-off-by: Marcelo Vanzin commit 3baa961af4eebe062a7eafe56dbb922c743d6340 Author: VMware, Inc <> Date: Mon Mar 22 15:07:41 2010 -0700 Add VMCIQPair interface to VMCI VMCIQPair is a new interface that hides the queue pair internals. Rather than access each queue in a pair directly, operations are now performed on the queue as a whole. This is simpler and less error-prone, and allows for future queue pair features to be added under the hood with no change to the client code. Signed-off-by: Marcelo Vanzin commit 45473288e4a9e3c437c8c24667c9e7eac316bfb4 Author: VMware, Inc <> Date: Mon Mar 22 15:07:05 2010 -0700 User level multi-threading fixes for gethostbyname gethostbyname is not always thread safe. While it uses thread local storage on some platforms, such as Mac, it does not on Linux. Add a non-Windows version of Posix_GetHostByName and use it where appropriate. Also replace some code calling uname and gethostbyname in HostInfoPopulateHostname with a call to Hostinfo_HostName, since all it was trying to determine was the host name. Signed-off-by: Marcelo Vanzin commit 9c3354f7419718ea37ee4f8b8071c28ab441fb70 Author: VMware, Inc <> Date: Mon Mar 22 15:06:08 2010 -0700 Make the tools file logger thread-safe. This change uses a rw lock to protect the shared data in the logger. This allows a multi-threaded environment to safely use file loggers, even with the current features it has (lazy open of log files, log file rolling). Note this does not protect multiple threads from writing to the file at the same time (we just "leak" the thread-safety characteristics of the underlying system call, if any). Signed-off-by: Marcelo Vanzin commit 2e7e2456df26ee7bd1c8c9b1c8051ba38220d635 Author: VMware, Inc <> Date: Mon Mar 22 15:05:15 2010 -0700 Internal branch sync. Included in this change: . Changes in shared code that don't affect open-vm-tools functionality. . Add RPCs for transferring Unity window contents. Signed-off-by: Marcelo Vanzin commit 5c972fa538df2beec33afaae90a00350ec4e682a Author: VMware, Inc <> Date: Mon Mar 22 12:24:52 2010 -0700 Add syslog support to Tools logging. Signed-off-by: Marcelo Vanzin commit a93511ed0ba31045d12972216144d572d241c5a9 Author: VMware, Inc <> Date: Mon Mar 22 12:24:30 2010 -0700 Tweak System_GetTimeAsString(). . simplify the Win32 implementation to use static buffers and to avoid doing several redundant charset conversions. . tweak the formatted string a bit, removing non-date/time-related characters. Signed-off-by: Marcelo Vanzin commit aecf255bb2c7d6ee7bd108c1569b6ddabc53d907 Author: VMware, Inc <> Date: Mon Mar 22 12:24:13 2010 -0700 Modify toolbox-cmd to use the new i18n support in Tools. Move all messages to the places in their source where they are declared, create translation catalogs based on the data currently in the Win32 rc file, and get rid of the now unneeded code. Signed-off-by: Marcelo Vanzin commit 59d8a20e24a9c1be7c32772946431b7cc9620ecd Author: VMware, Inc <> Date: Mon Mar 22 12:23:45 2010 -0700 Use new i18n infrastructure in vmtoolsd. Initialize the user's locale properly, and use the new macros to retrieve the strings used in the command line help. (Don't localize the command line switches themselves, though, since that's confusing.) When initializing plugins, automatically bind them to a text domain based on their name. Signed-off-by: Marcelo Vanzin commit 6d8d76d44e2d2e4382b041beb828f4fce996f2b6 Author: VMware, Inc <> Date: Mon Mar 22 12:18:59 2010 -0700 Add a message catalog infrastructure to vmtoolslib. It is based on the Msg_* infrastructure but modified to make it easier to use in Tools. The main differences are: . it only provides message catalog-related functionality, no message queues or anything like that. . it supports more languages (Msg_* seems to be restricted to en/ja on Win32), and has fallbacks (e.g. en_US -> en) similar to how gettext does it. . properly implements message domains so that different binaries (i.e., plugins) can be loaded into the same process and have different message catalogs, avoiding message id conflicts. . the message catalog format extends the dictionary format to allow for continuation lines, so that long messages can be broken into multiple lines in the catalog file. . it doesn't use Dictionary_* functions which are way too encumbered. . it provides easier accessors for wide strings (Win32 only) (at the cost of some memory overhead). Signed-off-by: Marcelo Vanzin commit 4ba91a90bc2db17c468e8d42f1409ad4d65b29a7 Author: VMware, Inc <> Date: Mon Mar 22 12:17:18 2010 -0700 Implement log file rotation for Tools. Extend the Tools file logger to support configurable log rotation. Add tests to make sure rotation is working as expected, and update the documentation to reflect the new config options. Bonus: fix an issue where "double-newlines" (caused by VMware code that embeds newlines in log messages) weren't being fixed by the logging code unless the logger requested charset conversion (which is not the case for file loggers). Signed-off-by: Marcelo Vanzin commit feae32b972fd1ee304b06ba5e11312689f0e48c6 Author: VMware, Inc <> Date: Mon Mar 22 12:16:45 2010 -0700 Update File_IsRemote() comment. From now on File_IsRemote() returns FALSE on ESX because we want that, not because statfs() sucks. Signed-off-by: Marcelo Vanzin commit 321cf45c21c2d117d145828b5e7d3729b619abad Author: VMware, Inc <> Date: Mon Mar 22 12:16:25 2010 -0700 Change strerror calls to use Err_Errno2String strerror is not thread safe. Err_Errno2String is. In some cases "err.h" needed to be included, but otherwise this is a straight substitution. Signed-off-by: Marcelo Vanzin commit 3aee0ffbb800221e299bb2831653dc67b771a6f8 Author: VMware, Inc <> Date: Mon Mar 22 12:16:01 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8f40f5e389c9133011116bf0cae895dbaa1c1eea Author: VMware, Inc <> Date: Mon Mar 22 12:15:27 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5a1f7d1da4cf39b009af7fbe0551916c88c4dc82 Author: VMware, Inc <> Date: Mon Mar 22 12:15:08 2010 -0700 lib/file: remove more unnecessary COS support code A few more COS support pieces that can be removed. Also remove an "ifdef VMX86_SERVER" as a dynamic check can now be used. With this change all of the COS support pieces are out and quite a few improvements are in (i.e. far less "ifdef VMX86_SERVER"). Signed-off-by: Marcelo Vanzin commit 6e8c2f84a75ac937ce355b196abab3db973414a5 Author: VMware, Inc <> Date: Mon Mar 22 12:14:48 2010 -0700 lib/file: minor cleanup Signed-off-by: Marcelo Vanzin commit 058e436f8048cf34ca08aa059e9f17a92fdd7183 Author: VMware, Inc <> Date: Mon Mar 22 12:14:38 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0ea66e34e843d7aae8194986a7f63ac5403761af Author: VMware, Inc <> Date: Mon Mar 22 12:13:04 2010 -0700 lib/file: minor cleanup Signed-off-by: Marcelo Vanzin commit 0ccd88507a3a7eb3948882999412bc667e1b92b2 Author: VMware, Inc <> Date: Mon Mar 22 12:12:54 2010 -0700 Fix the tools build Signed-off-by: Marcelo Vanzin commit c7fbfb0689722d2d53657cd391e734c323a0d687 Author: VMware, Inc <> Date: Mon Mar 22 12:12:37 2010 -0700 Fix the build Signed-off-by: Marcelo Vanzin commit 7a67f0340b6beb378505a9f89f04c9cf30221d77 Author: VMware, Inc <> Date: Mon Mar 22 12:12:22 2010 -0700 lib/file: remove unnecessary COS code No COS, no need to check for some things. Pick off some low hanging fruit. Additional related changes will follow. Signed-off-by: Marcelo Vanzin commit d17d52c33e774b3fdea4aeadfb3413a900c5755b Author: VMware, Inc <> Date: Mon Mar 22 12:12:08 2010 -0700 lib/file: remove some now unnecessary COS entanglements With the demise of COS there is no longer a need to deal with magic pid initializations for file locking. Remove a great deal of stale code. Signed-off-by: Marcelo Vanzin commit 43d4fb33eed901374ccb8b03be7865e03812b368 Author: VMware, Inc <> Date: Mon Mar 22 12:11:34 2010 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f8d6358e2e2fda1ca2736b23ccf693fa22cfe27b Author: VMware, Inc <> Date: Mon Mar 22 12:10:11 2010 -0700 open-vm-tools: remove unused npa_defs.h file. Signed-off-by: Marcelo Vanzin commit 41751bd5e8486ebadd0a4d898c41e712d7b94304 Author: VMware, Inc <> Date: Mon Mar 22 12:09:52 2010 -0700 Unity/X11: Disable Unity when running under vmwgfx. From bug 527219: "Unity/X11 and the new (and experimental) vmwgfx driver don't yet play nicely together. We don't expect this to be ironed out anytime soon, so for Cobalt & Cheerios we'll instead disable Unity/X11 unless vmware-user knows it's running with the legacy vmware_drv.so X11 video driver." Signed-off-by: Marcelo Vanzin commit a08c54e1e58a84580b0ae042f4d1eb54b4804e36 Author: VMware, Inc <> Date: Wed Feb 24 14:44:13 2010 -0800 Updating open-vm-tools version for release 2010.02.23-236320. Signed-off-by: Marcelo Vanzin commit 8baa8588d5fd4cf64efb17164cb70c86c758d0c6 Author: VMware, Inc <> Date: Wed Feb 24 14:36:34 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 051727561b69b7e01322817b04e1ec0476052794 Author: VMware, Inc <> Date: Wed Feb 24 14:36:17 2010 -0800 Fix vmblock compilation in open-vm-tools. dbllnklst.c is no more. Signed-off-by: Marcelo Vanzin commit 2170eb477eeb82e413102c1e066eddeb46b61d8f Author: VMware, Inc <> Date: Wed Feb 24 14:36:04 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 379e9c801967be054c527170686f6ce5e73dee04 Author: VMware, Inc <> Date: Wed Feb 24 14:34:37 2010 -0800 Unity/X11: Account for guest-Compiz's window decorations. Compiz does not reparent windows from the root window, but rather adds its decorations to a completely separate peer window. (Unity/X11 tracks only a client window, indicated by whichever window holds the WM_STATE property, and its top-level (child of the root) window for determining window geometry.) Fortunately it makes use of the _NET_FRAME_EXTENTS property to specify the approximate sizes of the frame around its managed windows. (I say approximate in that this property specifies a single width for each window edge, so that doesn't handle things like rounded corners.) This change adjusts the bridge between Unity/X11 and the window tracker such that the tracker is given a window's coordinates including the frame sections. As mentioned above, the caveat is that the guest always provides single rectangles, breaking the prettiness of rounded corners. This will be addressed some other time. Signed-off-by: Marcelo Vanzin commit 9516993e16c12ce8e0ab6c5078cdf8c8454217ee Author: VMware, Inc <> Date: Wed Feb 24 14:34:22 2010 -0800 Unity/X11: Don't assume override redirect windows are tooltips. While not 100% correct for the Linux case, this makes bug 522796 slightly less debilitating. Signed-off-by: Marcelo Vanzin commit 2920329731e70285bdd94aa6c50db87a09fbe5bf Author: VMware, Inc <> Date: Wed Feb 24 14:34:10 2010 -0800 Toolbox CLI: fix help string for 'device' command Change 'device is the name of the device' to 'dev is the name of the device' in the help message. Signed-off-by: Marcelo Vanzin commit 9ad68945dd79c56aa801e8b4e890fa964d7f7e15 Author: VMware, Inc <> Date: Wed Feb 24 14:33:42 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1fe3dbf538b7e0104ce991389e8a6fafc55fbdf1 Author: VMware, Inc <> Date: Wed Feb 24 14:29:20 2010 -0800 Unity/X11: Populate UnityWindowTracker with initial window state. Description says it all. When investigating why xterms weren't appearing in Unity, jkasper noted that Tools wasn't indicating a window type. Turns out that Unity/X11 wasn't informing UWT of the window's initial type, and that we were only hella lucky by other events eventually causing us to update the type. Signed-off-by: Marcelo Vanzin commit 32a676c81fdc45ec696c6daefdf7d1aed004b6ed Author: VMware, Inc <> Date: Wed Feb 24 14:29:09 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 281595597122bd0b8bcc49045758cddbfefa4c5a Author: VMware, Inc <> Date: Wed Feb 24 14:27:19 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d35359b5e3d353742b5de0b09349b02706b4e865 Author: VMware, Inc <> Date: Wed Feb 24 14:26:53 2010 -0800 Fix Windows Tools build break Introduced by CS 998846: apparently 'except' is #defined to be '__except' (used in C exception handling) for WDK builds, so it's unsuitable as a struct member. Renaming 'except' to 'exceptions' ought to fix this problem. Signed-off-by: Marcelo Vanzin commit c1abcc04903deaaeb07f02e32108cf33185d1b15 Author: VMware, Inc <> Date: Wed Feb 24 14:26:27 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8fee1970bb54a45de5f814b6e7245accbdcd4442 Author: VMware, Inc <> Date: Wed Feb 24 14:26:12 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 53e11639737479210fb37d44e372c9a029cd69c2 Author: VMware, Inc <> Date: Wed Feb 24 14:25:59 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4e76231ffe909e6d45a1776231102af7e7b41127 Author: VMware, Inc <> Date: Wed Feb 24 14:25:33 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 347c5a396a1f372ba3937073f0a7ff51acd65a3a Author: VMware, Inc <> Date: Wed Feb 24 14:24:43 2010 -0800 (01/05) Rename some mode page fields in scsi_defs.h This patch is a trivial rename of 'pageLength' to 'len' and 'pageCode' to 'page' in some mode page structures. The latter is purely cosmetic, but the former is useful to me: I want to use a macro that references 'len' for every mode page (later in the series). Signed-off-by: Marcelo Vanzin commit 7d71b9832093bfca55a022316cd4fccf7b8dcc50 Author: VMware, Inc <> Date: Wed Feb 24 14:24:16 2010 -0800 Linux vmware-user: set the hibernation-safe flag. * ryanb .oO( I told you so. ) So, like, remember that hibernation hack I put in place last May? Turns out it was hella racy. This became evident when QA noticed on SLED 11 that the post-thaw wakeup signal might take a while to arrive. Until that happened, vmware-user may have already run through the RpcIn event loop and errored out, as its RpcIn state is out of sync with the VMX's. So this change introduces another hack. Luckily for me, mvanzin is doing the carnaval thing and isn't here to interfere. Mwahaha, etc. In short, this change modifies the RpcIn error handler, only if called after RpcIn had been working, to set the "reload yo'se'f" bits. (That test is to avoid needlessly/endlessly reloading itself should there really be another vmware-user instance running (or a similar terminal case).) After this change is submitted, a subsequent changeset will back-out CLN 852538. Signed-off-by: Marcelo Vanzin commit a61f6ba7979c94873f2de69c3d68668efa910092 Author: VMware, Inc <> Date: Wed Feb 24 14:22:48 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4e22734376d7a2ae29d6a7689fce8d894440087e Author: VMware, Inc <> Date: Wed Feb 24 14:22:20 2010 -0800 OVT: do not ship dbllnklst.c The file is just a shell of its former self and does not contain any compilable code anymore (all meat was moved into the header file) so there is no point in shipping it. Signed-off-by: Marcelo Vanzin commit 16e2d517e24bfa464175329bec1cc69223aa6751 Author: VMware, Inc <> Date: Wed Feb 24 14:22:01 2010 -0800 Message string updates for 519854 Fix message strings based on techpubs input. Signed-off-by: Marcelo Vanzin commit 3b40292252c813be3755f872497893daa1ff6512 Author: VMware, Inc <> Date: Wed Feb 24 14:21:45 2010 -0800 Unity: Strengthen Tools' "unity.desktop.work_area.set" handler a smidge. Once again, manual marshalling has bitten us in the ass. While working on bug 522656, I discovered that vmware-user was crashing in the region code, because it was creating regions with invalid dimensions. Said regions were created from bogus coordinates like this: Breakpoint 1, UnityTcloSetDesktopWorkArea (result=0x7fff2ed6e980, resultLen=0x7fff2ed6e978, name=0x2768d90 "unity.desktop.work_area.set", args=0x275a1fb " 1 , 0 -195 1600 1200", argsSize=21, clientData=0x0) at /mts/dbc8-a/rbeasley/p4/hosted09/bora-vmsoft/lib/unity/unity.c:854 854 { This change adds a test s.t. x and y must be >= 0, and width and height must be >0. Signed-off-by: Marcelo Vanzin commit 4ea7b130ac6ba9a62cabd1cc5c2d562593252b04 Author: VMware, Inc <> Date: Wed Feb 24 14:20:53 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3f82273de12fbcc1f5bddefaac216e11e52f8e98 Author: VMware, Inc <> Date: Wed Feb 24 14:18:51 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8ea6119d5eafa6cafc803d7ae9a23d6243d4ab67 Author: VMware, Inc <> Date: Wed Feb 24 14:18:34 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 501b0f4a3c68fa8be3573c78d8f0bec8c33fc4c9 Author: VMware, Inc <> Date: Wed Feb 24 14:17:55 2010 -0800 Fix a couple of issues with the tools file logger. . if the log level is "none", the code optimizes things a little bit and never sets the file path in the logger data. This was causing an assert later on. . while logging the assert, the log function was asserting that the log file path was set, which caused a second assert because of the same situation. Signed-off-by: Marcelo Vanzin commit 18ff1c71b85baa9d3dca191ed89143fde3630b6f Author: VMware, Inc <> Date: Wed Feb 24 14:17:23 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 792f44bdcb9715169a1163a28ccc2961d2718df8 Author: VMware, Inc <> Date: Wed Feb 24 14:17:04 2010 -0800 Update Tools version. Signed-off-by: Marcelo Vanzin commit e1cbc1a58c375ac1011e5587e41ac1b72dc65958 Author: VMware, Inc <> Date: Wed Feb 24 14:16:46 2010 -0800 Move foundryThreads.c from lib/foundryMsg to apps/lib/foundry It is only used by the client library code. Signed-off-by: Marcelo Vanzin commit d8f6145eb4d845be1fcf170e3a8f23fc03965871 Author: VMware, Inc <> Date: Wed Feb 24 14:16:32 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 8789d2a8629fd31eb23b015c3029fa1d0b4560e4 Author: VMware, Inc <> Date: Wed Feb 24 14:15:46 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b059a3734b05b91ec72e7a1acc4a93db021dbb0b Author: VMware, Inc <> Date: Wed Feb 24 14:15:26 2010 -0800 Reorganize the logging code in vmtoolslib. This change is a preparation for some enhancements I'll work on for the file loggers. It does the following: . separate each logger implementation into their own source file. . provide an abstraction for loggers so that, if wanted, we can add new logger implementations in the future (e.g., syslog) more easily. The main goal, though, is just to better organize the code and separate the logger implementations from the common logging code. This change does introduce a change from the previous behavior: log files are always written in UTF-8. stdout and OutputDebugString logs are, like before, in the local user encoding. Signed-off-by: Marcelo Vanzin commit d454259fd2210344c928d1a3ff77141338f4a041 Author: VMware, Inc <> Date: Wed Feb 24 14:14:41 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1e313291c1b285efca4cb8b9beef8f3c01c01754 Author: VMware, Inc <> Date: Wed Feb 24 14:14:18 2010 -0800 Internal branch sync. Included in this change: . Fix crash in vmware-user: always provide valid data in clipboard data. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 0d2b8ec50fb5dee419d386394025d6696c590a96 Author: VMware, Inc <> Date: Wed Feb 24 14:11:12 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b7d4fee4909c2d87bd097f94c415c37769ff5799 Author: VMware, Inc <> Date: Wed Feb 24 14:10:47 2010 -0800 vmblock: remove pre-2.6.9 compatibility bits from Linux driver Signed-off-by: Marcelo Vanzin commit 2415f34cbb6061be0dc8b1280be6ef921ae439f5 Author: VMware, Inc <> Date: Wed Feb 24 14:10:31 2010 -0800 Move platform specific time sync code into separate files. timeSyncPosix.c contains three slewing implementations: Linux, Adjtime, and None. This change splits them out into separate files to reduce the number of #ifdefs required. Also remove TimeSync_IsTimeSlewEnabled. Signed-off-by: Marcelo Vanzin commit caf0c9f40dc26fa7e817c7c2242e6c930eb57b84 Author: VMware, Inc <> Date: Wed Feb 24 14:09:57 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f488710bf893e88ced4606f171929593d4678791 Author: VMware, Inc <> Date: Wed Feb 24 14:09:37 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d3a869983af1f8f04df5efb8c7b50d09eab0d2b7 Author: VMware, Inc <> Date: Wed Feb 24 14:09:13 2010 -0800 Cleanup timesync in preparation for further slewing changes. These are a couple of changes that I pulled out of my tree that implements NTP style time synchronization. * TimeSyncStepTime now handles everything involved in stepping the time. Before this change I think we would call BDOOR_CMD_STOPCATCHUP in cases where we hadn't stepped the time. * TimeSyncSlewTime handles all of the steps of slewing the time. This will be expanded in future checkins. * Add a comment explaining the landscape at the top of the file. * Keep slewing enabled when the periodic time sync is enabled. If slewing isn't supported leave the slew at nominal. This makes things more uniform and removes the need for TimeSyncDisableWinTimeDaemon. * Cleanup some of the logging a bit (more to follow). Signed-off-by: Marcelo Vanzin commit 85a8a9ac105168943dd4ad97f56731d71fc71498 Author: VMware, Inc <> Date: Wed Feb 24 14:07:32 2010 -0800 Correctly inherit vsock QP sizes on child connected stream sockets. This change makes it so we return the correct values for getsockopts on a child connected socket when querying actual / max / min QP sizes. Signed-off-by: Marcelo Vanzin commit fc5dc505dee2447da0d7f741250ed516ef1eefb5 Author: VMware, Inc <> Date: Wed Feb 24 14:07:05 2010 -0800 Internal branch sync. Included in this change: . Patch backdoorGcc64.c to trick Apple's GCC into not thinking we clobber the PIC register. This allows us to build lib/backdoor on mac64. . Do not use new NAPI poll in Linux kernel < 2.6.24. . Avoid tx hangs while running NDIStest. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fbb8ae8bdbdec67c4bfba8e0eb990c5ccb4deabc Author: VMware, Inc <> Date: Wed Feb 24 13:56:34 2010 -0800 Unity/X11: Avoid infinite loops. When fielding a moveresize request, the guest is expected to return the window's resulting coordinates, even if the request failed. The Unity/ X11 code was written such that after issuing the moveresize request to the X server, it'd recursively & manually pump the event loop until receiving a configurenotify event for the window in question. Unfortunately, there is no guarantee that such an event will ever arrive. Since our implementation is synchronous with respect to the X server, that logic isn't at all needed. Instead, we'll simply flush the X channel and make sure all requests have been handled (using XSync), and query the X server again for the new coordinates. Now, in theory, this could introduce some latency to the moveresize operation, but correctness trumps performance right now. If performance is ever important, this code will need a rewrite, anyway. Signed-off-by: Marcelo Vanzin commit 71cba2f53ce3e9e2d3d36609d5813c6f549d7798 Author: VMware, Inc <> Date: Wed Feb 24 13:55:47 2010 -0800 Toolbox: fix black icon from Linux guests in Unity mode When switching to Unity mode icon for toolbox in Linux guests is mangled thusly: transparent pixels left as transparent and filled pixels are turned into black ones. With old logo it was not noticeable since boxes were done with transparent pixels so that logo outline was preserved. With the new logo consisting only of colored pixels (with the exception of couple transparent ones in the corners) the result is solid black square in place of the icon, which is not acceptable. The logo is currently attached to the window with gdk_window_set_icon. GDK documentation does not recommend using this function, suggesting gdk_window_set_icon_list() instead, which, coincidentally, fixes the color mangling issue. Signed-off-by: Marcelo Vanzin commit e228abb3b0f40022af9ba7314897b1f04ed218ab Author: VMware, Inc <> Date: Wed Feb 24 13:55:22 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7c7a388620e7f66699c4cc6a0aa48c27c4db0c25 Author: VMware, Inc <> Date: Wed Feb 24 13:54:54 2010 -0800 Add timeout to backup operation. This change makes the Tools backup components mimic the VC behavior and cancel the operation after 15 min (configurable in the case of Tools). Previously, VC would time out the operation but Tools would never be notified, so they'd happily keep waiting for VSS to finish its thing. This would cause problems for customers, who would then retry to take the quiesced snapshot just to get a "I'm still busy" message from Tools. To abort the operation, the old support for canceling backup operations in the vmbackup plugin had to be fixed a little bit (it was pretty much a no-op in the previous state, so was very untested). It should now be doing the right thing, and the code is simplified a little bit as a result. The VSS components themselves don't handle aborting the operation optimally; they just check from time to time (i.e., at the end of the "logical blocks" of the backup operation) whether an abort was requested, and stop if it is. So there may still be a small window between VC timing out and Tools timing out, but we'll have to live with that. Bonus: fix a regression that caused app quiescing to almost always be disabled on Windows 2003. Signed-off-by: Marcelo Vanzin commit bd6113bbfea891c1af64c05435ba08ee99f827c2 Author: VMware, Inc <> Date: Wed Feb 24 13:50:51 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit ec13f4f13d470e95fa083a4922acd5996cb62bc4 Author: VMware, Inc <> Date: Wed Feb 24 13:49:48 2010 -0800 Allow outbound-only RpcChannels, cleanup API. . allow a channel to be set up for outbound operations only. This defers creation of an RpcIn channel to until its needed, and doesn't enforce that data for RpcIn operations is available when starting the channel. This allows clients who only want to send outbound messages to more easily use the channel. Before, because of the code enforcing the call to the setup() function, these apps could run into issues like failing to properly start the channel because of some conflict caused by the RpcIn channel name (among other possible issues). . make the private data in the RpcChannel structure private to the lib/rpcChannel code. This only exposes the bare minimum of the structure in the header file to allow for new implementations of RpcChannel. Signed-off-by: Marcelo Vanzin commit 6c940e993c4d67ab23536254d3adee37b14326f3 Author: VMware, Inc <> Date: Wed Feb 24 13:19:15 2010 -0800 Bump Tools version. Signed-off-by: Marcelo Vanzin commit 1dc6935e3c061f3be4323a0941e0e5da87ba229d Author: VMware, Inc <> Date: Wed Feb 24 13:18:58 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9eaf8acf1451abdd769525fd27fb450b8116473a Author: VMware, Inc <> Date: Wed Feb 24 13:18:01 2010 -0800 Make RpcChannel's "RpcOut" channel thread-safe. Add a lock around accesses to the RpcOut channel, so that it can be safely used in multi-threaded environments. Also fix a minor memory leak when destroying the backdoor channel. Signed-off-by: Marcelo Vanzin commit 9654fdaccb3afc195137f97a11f2cc56cb8a2f95 Author: VMware, Inc <> Date: Wed Feb 24 13:16:58 2010 -0800 Internal branch sync. Included in this change: . Changes in shared code that don't affect open-vm-tools functionality. . Host/Guest shared structures, RPCs and capability definition for autologon. Signed-off-by: Marcelo Vanzin commit a58f24ec80b5d9d6a9549f71bc511fa285bcd120 Author: VMware, Inc <> Date: Wed Feb 24 13:14:32 2010 -0800 add tools version for esx40u1/esx40u2 to avoid accidently reused by future release. Signed-off-by: Marcelo Vanzin commit b5ffb4cb7e42c16ffde077f6f9ce990b21bd2234 Author: VMware, Inc <> Date: Wed Feb 24 13:12:42 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fbf74b8aa806387e7fe4e2fc80041bb94a69be80 Author: VMware, Inc <> Date: Wed Feb 24 13:11:36 2010 -0800 VMCI: Fix signedness errors When compiling with never compilers vmci causes the following errors to be reported: .../vmcrosstalk/common/vmciDs.c: In function "DsHandleMessage": .../vmcrosstalk/common/vmciDs.c:211: warning: pointer targets in passing argument 1 of "DsLookupAction" differ in signedness Fix it by changing name in from int8[] to char[] and making DsHandleMessage take size_t for "outSize" and "written". Signed-off-by: Marcelo Vanzin commit 02e2ce343e9bff032a9e7709e75820213c8c227b Author: VMware, Inc <> Date: Wed Feb 24 13:10:48 2010 -0800 Remove unused VMCID definitions The VMCI user level daemon was removed a year back or so, but a few definitions escaped this removal. Remove them since they are unused. Signed-off-by: Marcelo Vanzin commit ec9cae6ddd04fa1edfede2e4a8f934249b434a3e Author: VMware, Inc <> Date: Wed Feb 24 13:06:28 2010 -0800 Unsupported ioctls should not print log, just return -EOPNOTSUPP Remove printk's from unsupported ioctls. http://sourceforge.net/tracker/?func=detail&aid=1959582&group_id=204462&atid=989708 Signed-off-by: Marcelo Vanzin commit 8de10e3e81174582f4aaecfdd695ed83881cf324 Author: VMware, Inc <> Date: Wed Feb 24 13:06:05 2010 -0800 vmtoolsd: fix console handling on Win32. The previous code required the user to instruct the code to attach to the console manually, which was error-prone. It also had a bug where the help wouldn't show up, since the code to attach to the console was called after the help was shown. This change does three things: . auto-detects the help triggers in the command-line and attaches a console as needed. . make sure we have a console when command-line parsing fails, so that the message is shown. . attaches a console when configuring logging, whenever a log domain is configured to output to the terminal. As a result, the old "--console" command line option is not needed anymore. Signed-off-by: Marcelo Vanzin commit 96998068850accf8e9f6d4b38c666c3dceafd21f Author: VMware, Inc <> Date: Wed Feb 24 13:04:39 2010 -0800 Back out changeset: 982833 Signed-off-by: Marcelo Vanzin commit 76f22e4c2cda8bcb2e11c6153c4091eaa577fc1a Author: VMware, Inc <> Date: Wed Feb 24 13:03:30 2010 -0800 OVT: have configure check for presence of linux/unistd.h Not everyone installs kernel-headers/linux-userspace-headers package and without it compilation fails with a puzzling error. We better check that the required header is present upfront. Signed-off-by: Marcelo Vanzin commit 5350afdc657686613d0dd5badeaaf4dee47c4862 Author: VMware, Inc <> Date: Wed Feb 24 13:03:06 2010 -0800 Revised version of cs 979736 cs 979736 included changes to lib/string to call GetReturnAddress() that caused the linker to build differently. cs 979736 was subsequently backed out for pr 483076. This is the same change without the GetReturnAddress() calls. This change should not introduce any functional differences whatsoever; it merely introduces a new library function in lib/string that is currently not called. The original description of cs 979736 is: Add Str_Strerror, a thread safe version of strerror strerror is not thread safe, it reuses the memory for the error string on every call. strerror_r is thread safe, but requires callers to manage their buffers. Add a new Str_Strerror function that uses thread local storage to keep the error string. This function is only present on GLIBC_VERSION_23 and later. Signed-off-by: Marcelo Vanzin commit b834801bb21f6e32293a6c345761180f2fafaaeb Author: VMware, Inc <> Date: Wed Jan 20 13:52:06 2010 -0800 Updating open-vm-tools version for release 2010.01.19-226760. Signed-off-by: Marcelo Vanzin commit 8ee82a5774ae7badeb98ecf4dc629c7e9aac7077 Author: VMware, Inc <> Date: Wed Jan 20 13:48:00 2010 -0800 Fix errors in X11 library detection macro. Signed-off-by: Marcelo Vanzin commit 493094fb7a774131fcb6a0e8dc2f7f18d7d37f1c Author: VMware, Inc <> Date: Wed Jan 20 13:47:39 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 429c678203c8c2dd8bea1448878882d50317284b Author: VMware, Inc <> Date: Wed Jan 20 13:47:02 2010 -0800 Exclude pagemap from in-guest vm-support Newer kernels, such as those included in Ubuntu 9.04 and 9.10, export a 'pagemap' node to the proc filesystem. This node maps guest virtual to guest physical pages, allowing address look-ups for the entire valid guest virtual address space (including unmapped regions). Thus, archiving the entire pagemap for each process/task is prohibitively large (not to mention extremely slow) on 64-bit systems. More importantly, this information is not terribly useful for our debugging. So, we exclude it and vm-support in Ubuntu 9.x guests won't automatically fill the guest disk. (See also PR 399587 for the linux host vm-support fix for the same issue). As the 'Collect support data...' button now runs this script in-guest, this change is important. (Previously, to trigger this problem, customers would have had to run vm-support manually inside the guest.) Signed-off-by: Marcelo Vanzin commit 27a2ab6fe8634a251d66383805557d822d773ae1 Author: VMware, Inc <> Date: Wed Jan 20 13:46:02 2010 -0800 Backout Str_Strerror changes. Signed-off-by: Marcelo Vanzin commit 2521f34e4523f5dd4e597539d6b92782518222d6 Author: VMware, Inc <> Date: Wed Jan 20 13:44:25 2010 -0800 PVSCSI: fix signedness compile warning pvscsi_setup_msix() expects 'irq' argument to be an int but is being passed unsigned int. Unsigned int is more proper type for IRQ number so let's use it. This shuts off a compile warning with recent compilers. Signed-off-by: Marcelo Vanzin commit ffd220a157a75189aad0117093bd321ba4559e92 Author: VMware, Inc <> Date: Wed Jan 20 13:43:39 2010 -0800 Fix VMCI module build. Signed-off-by: Marcelo Vanzin commit 5ab2cc8357ec3b10927b1e7e81ef06d767241ff6 Author: VMware, Inc <> Date: Wed Jan 20 13:42:38 2010 -0800 Add guest kernel-mode support to vmci on Windows * Added new IOCTLs to create/destroy datagram handles from kernel-mode (the existing ones rely on a process context). * Removed the old shared memory IOCTLs and code. * Modified the guest driver to handle the new IOCTLs. * Modified the host driver to fail gracefully when called from kernel-mode (since not yet supported). * Added kernel-mode vmcilib that wraps the IOCTLs. Interface is exactly the same as if you linked against vmci directly. * Added a kernel-mode version of crosstalktest for all of the above. Note that it is built out of bora but will run in the guest too; it will pass on the guest but fail in the host until support is added. Signed-off-by: Marcelo Vanzin commit 6cec79f13bc6a8d096ca6aac75979907eb38bf5e Author: VMware, Inc <> Date: Wed Jan 20 13:41:43 2010 -0800 Fix VMware logo used on task bars and window decorations on Linux CS #978067 updated design of VMware logo shown in "About" tab of the toolbox program (Linux version) but neglected to update icon used by desktop environment on window decorations and task bars. Fix it. Signed-off-by: Marcelo Vanzin commit 847fedf49c6cbbef741b792c22a25d384d518a7e Author: VMware, Inc <> Date: Wed Jan 20 13:40:57 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cb34381597fbcffe9d7d079ccbd0caa8bb985e86 Author: VMware, Inc <> Date: Wed Jan 20 13:39:40 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d3afb0ca24131be7a800cef35dc51f25070883f5 Author: VMware, Inc <> Date: Wed Jan 20 13:37:07 2010 -0800 Add Str_Strerror, a thread safe version of strerror strerror is not thread safe, it reuses the memory for the error string on every call. strerror_r is thread safe, but requires callers to manage their buffers. Add a new Str_Strerror function that uses thread local storage to keep the error string. This function is only present on GLIBC_VERSION_23 and later. The change to vmm-link-vmm-to-static.make undefines GLIB_VERSION_23, which was erroneously set. Signed-off-by: Marcelo Vanzin commit b6b48f7928902d06948b11d4e5aadf12a959b332 Author: VMware, Inc <> Date: Wed Jan 20 13:35:53 2010 -0800 open-vm-tools: cleanup handling of GLIBC_VERSION_* macros. Centralize the macros in CPPFLAGS instead of having variables for individual libraries. This way everybody gets the correct flags for the glibc available on the system. Signed-off-by: Marcelo Vanzin commit abadfac79d28993a461dadde6653e3c794bc62f7 Author: VMware, Inc <> Date: Wed Jan 20 13:34:21 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 996672ffaac33d8e8b4363fc9dbc1b85a776652f Author: VMware, Inc <> Date: Wed Jan 20 13:32:20 2010 -0800 Use Solaris version number to decide MAC_VERSION to be used. The earlier fix used devo_rev to choose the MAC_VERSION to be used in mac_alloc(). That was a workaround for incomplete header files list in toolchain. Moreover it did not serve the purpose as devo_rev came from our header files itself and not as a runtime parameter from Solaris kernel. The header files for Opensolaris 2009.06 in toolchain have been restored . This change exploits the same. Some macros and structures have changed in Opensolaris since Solaris 10. Depending on the version for which the driver is being compiled, the right ones are used. Signed-off-by: Marcelo Vanzin commit a6a4e8acdb7fae76fcc28528971ea59974bec307 Author: VMware, Inc <> Date: Wed Jan 20 13:32:05 2010 -0800 open-vm-tools: build vmmemctl, vmxnet and vmxnet3 for OpenSolaris. Signed-off-by: Marcelo Vanzin commit 9f2db51fc26bc3be70468b2049e21884bab272f3 Author: VMware, Inc <> Date: Wed Jan 20 13:31:56 2010 -0800 Catch exception from backdoor access. Signed-off-by: Marcelo Vanzin commit 8932bedd1393f879d7bf89e2cfb7576ad53579d4 Author: VMware, Inc <> Date: Wed Jan 20 13:31:47 2010 -0800 Update tools logo and icons with the new design We should be using official VMware logo in tools. Note that wireless icon is not updated (was not provided) but since we do not user or advertise this feature it should be OK. Signed-off-by: Marcelo Vanzin commit c79c6f01c92995b260b32d024d9a28598ac34d76 Author: VMware, Inc <> Date: Wed Jan 20 13:31:35 2010 -0800 update to I18N encoding name cross reference table Update the I18N name to encoding cross reference table with some new names. Identify encodings that are supported by ICU even if we don't support them in our stripped down ICU data file. This doesn't actually add any encodings, but it makes it easier should we decide to do so in the future. Add new encodings that are needed for [361930], and change the ICU data path to point to the new location in toolchain. Also add some test code that can be enabled from Unicode_Init to verify the entries in the xRef table match what is expected in the ICU data file. Add a similar change to codeset to disable getting the ICU data file from toolchain if a custom file is being tested. Signed-off-by: Marcelo Vanzin commit 1f3abf0f4485d9f5af853d6d11dda11f0c6771d9 Author: VMware, Inc <> Date: Wed Jan 20 13:31:22 2010 -0800 Fix unitialized variable which can cause free of garbage Fix packout to be NULL so that in the event of receiving a search close request with a stale handle, the search close handler does not call free on a garbage pointer value. Signed-off-by: Marcelo Vanzin commit e1ce0979b7e6722fadb6b4fc4cc9b9739e943036 Author: VMware, Inc <> Date: Wed Jan 20 13:31:08 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f377641a113a0dabef2201def0a3f174d26d5ec5 Author: VMware, Inc <> Date: Wed Jan 20 13:30:53 2010 -0800 Update copyright year to 2010 So that our copyright string is current. The year in stubbed-out open_source_licenses.txt file is not changed as we expect the file to be replaced soon. Signed-off-by: Marcelo Vanzin commit 42b163cb463d4a32552e1dd3fa55bbad17723377 Author: VMware, Inc <> Date: Wed Jan 20 13:30:40 2010 -0800 Remove INCLUDE_ALLOW_VMMEXT. We no longer consider it useful. Signed-off-by: Marcelo Vanzin commit 6a63f6917208c99dc8222a2b8ffbbaf1954b10fb Author: VMware, Inc <> Date: Wed Jan 20 13:30:24 2010 -0800 Switch to using a more generic loaded-module-list func There is a not-very-generic loaded-module-list function in lib/user (which is Linux-only). For other reasons, I've written a more generic one in lib/coreDump (checked in with a previous review, cn970593) that works for Linux, Windows, and Mac. Delete the old one, and hook up the one callsite to call the new one. Signed-off-by: Marcelo Vanzin commit 79e7fc542389de35349ecf174d35a7eba0514a36 Author: VMware, Inc <> Date: Wed Jan 20 13:30:07 2010 -0800 Fix VMCI compilation on 2.6.32 and later kernels. This change fixes two compilation issues with the VMCI linux module on some 2.6.32 and later kernels. First, we now include compat_sched.h together with compat_wait.h, since linux/wait.h apparently isn't selfcontained (thanks to Petr for pointing this out). Also, we no longer include "pgtbl.h" for 2.6.0 kernels and later, since it isn't used for these kernels. Also removed includes and macros used by pre 2.6.0 kernels, since guest kernel drivers for these kernels are frozen. Signed-off-by: Marcelo Vanzin commit 1111585ab2e7ad26caf00d773894880b680aaf52 Author: VMware, Inc <> Date: Wed Jan 20 13:29:59 2010 -0800 Unity/X11: Only toggle minimization when window is on same desktop. This is a follow-on to bug 280354 / CLN 699915. While that CLN ignored bogus iconify notices upon desktop change, as written it implied that all windows were unminimized unless a state change indicated otherwise. With an already-minimized window, it ended up triggering unminmize events upon desktop change. Signed-off-by: Marcelo Vanzin commit 5310a7dd2a8aad0fccb7ce95de86cf61ef68b0a0 Author: VMware, Inc <> Date: Wed Jan 20 13:29:46 2010 -0800 resolutionX11.c: Add support for autofit via RandR >= 1.2. The new WIP Linux guest drivers no longer support the VMWARE_CTRL X11 protocol extension but instead expose multiple displays via the RandR (Resize and Rotate) extension as outputs LVDS1..LVDS. The requested topology is implemented using modes called 'autofit-WWWWxHHHH' generated as needed for each output. Signed-off-by: Marcelo Vanzin commit 0bd8494a1bc5d6090d51dde7c81bf5cc3230d13b Author: VMware, Inc <> Date: Wed Jan 20 13:29:29 2010 -0800 Unity/X11: Don't remove minimized windows from tracker. CLN 953276 introduced a regression. Unregress it. Signed-off-by: Marcelo Vanzin commit 3d64655aca14b5639f76022a467e88c2d920a460 Author: VMware, Inc <> Date: Wed Jan 20 13:29:19 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a9e03a84be8299e7d84ffbd0b9e02d64a0e9c00d Author: VMware, Inc <> Date: Wed Jan 20 13:28:53 2010 -0800 TimeSync: cleanup hanlding of the timesync loop state We used to store current state of plugin/timeloop in timeSyncState; unfortunately we were also using presence of 'timer' to infer whether the loop is running which is confusing. Make 'state' the pimary source of this information. Also we should not stop timesync loop any time sync fails, let's treat treat this as a transient condition and keep running. Signed-off-by: Marcelo Vanzin commit 9621f538091a402357395d838baf6952501bd0d9 Author: VMware, Inc <> Date: Wed Jan 20 13:28:41 2010 -0800 Make vmxnet and vmxnet3s drivers work in Opensolaris 2009.06 tools-for-solaris target should build vmxnet and vmxnet3s drivers for Opensolaris 2009.06. Signed-off-by: Marcelo Vanzin commit c45e502566e63807c46a21a0fb55e08e26fb3b31 Author: VMware, Inc <> Date: Wed Jan 20 13:28:17 2010 -0800 Try to auto-detect CUnit without having to define CUSTOM flags. Like in other cases where there's no pkg-config or config scripts, use a default to try to find the library. Add a new macro that does that in a generic way and use it in other cases where that situation occurs in configure.ac. Bonus: remove libnotify detection code since none of the open-vm-tools code uses libnotify. Signed-off-by: Marcelo Vanzin commit ac521e30ad44128e6d603f26d4f6f2db0843af17 Author: VMware, Inc <> Date: Wed Jan 20 13:28:04 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3f094aec60d5a029ea87ab5135bb677556f4be97 Author: VMware, Inc <> Date: Wed Jan 20 13:27:39 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c751e2500b022b5ba762d834fec3dcf7be734446 Author: VMware, Inc <> Date: Wed Jan 20 13:27:24 2010 -0800 Rework the vmrpcdbg library to use CUnit. CUnit provides nicer ways to track test failures than just logging or using hard asserts. So use CUnit to run vmtoolsd-based test code. This required a few changes: . to be able to use CUnit, the vmtoolsd main loop needs to be run in the context of a CUnit test. So the code in mainLoop.c was reorganized a bit so that all code that touches plugin code is run in that context, and execution of the main loop is done through the vmrpcdbg library (which sets up the CUnit context) when running in debug mode. . the interface of the vmrpcdbg library was cleaned up a little bit. . test code was changed to use CUnit asserts instead of ASSERT/g_assert/logs. Signed-off-by: Marcelo Vanzin commit d84b7349f169859e4a8efd02cc186ceb9a4335f1 Author: VMware, Inc <> Date: Wed Jan 20 13:27:02 2010 -0800 Implementing support for V4 headers in the HGFS server. Adding capability to pack/unpack V4 headers in the server and to process V4 packets with legacy, V3 payload. The change does not introduce support for any new type of operation (except HGFS_OP_CREATE_SESSION_V4/HGFS_OP_DESTROY_SESSION_V4). New types of operations and payload will be gradually added in the future. Signed-off-by: Marcelo Vanzin commit 4bf6bffc3e5f28cb1e14a70ef49aeb462659dd84 Author: VMware, Inc <> Date: Wed Jan 20 13:26:16 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 39b17ff79c7beb52dd68fce5f8dc71fcb8cc28d0 Author: VMware, Inc <> Date: Wed Jan 20 13:25:36 2010 -0800 Localize command-line Toolbox Signed-off-by: Marcelo Vanzin commit 3c95acf6ad313cead29bc377d2b11fed1aafd2ac Author: VMware, Inc <> Date: Wed Jan 20 13:25:26 2010 -0800 Fix Linux kernel modules build on 2.6.33-rc1 linux/utsrelease.h & friends moved from linux/ to generated/. Which breaks all our sources, plus all our builders. So there are two changes: (1) make sure our modules include appropriate autoconf.h, and (2) update modconf to know that utsrelease.h may live in different directory. While I was in modconf I could not resist to remove some duplicated code... Signed-off-by: Marcelo Vanzin commit 4708a8b20bd21caba0859a6654d073df4cf6d55f Author: VMware, Inc <> Date: Wed Jan 20 13:25:10 2010 -0800 Hostinfo: OS name cache stuff isn't architecture dependent. Signed-off-by: Marcelo Vanzin commit 923f3b5b099addac24b8f60abd8e26aa0423c43a Author: VMware, Inc <> Date: Wed Jan 20 13:25:01 2010 -0800 Changes made to avoid compiler problems. Signed-off-by: Marcelo Vanzin commit a36c143bdb7d53f490e4318064358c2418ce227f Author: VMware, Inc <> Date: Wed Jan 20 13:24:35 2010 -0800 open-vm-tools: remove lib/lock, lib/nothread. These libraries aren't really used in open-vm-tools code (now that hgfsServer can use glib), so we don't need to provide them. Signed-off-by: Marcelo Vanzin commit 144aa5f702dce57165af1b9653378e16f29a6653 Author: VMware, Inc <> Date: Wed Jan 20 13:24:25 2010 -0800 Allow hgfsServer to use glib mutexes instead of bora/lib/lock. This avoids having lib/lock and its dependencies having to be part of open-vm-tools. To make sure vmware-user still works in open-vm-tools, make sure the glib thread library is initialized, even though it's not used by the non-open-vm-tools version. This change only really affects the open-vm-tools build at the moment; eventually we might want to clean up the regular tools build also, so that we have one less dependency on bora. Signed-off-by: Marcelo Vanzin commit d5a4c445a25dcb6e0927cebd9530d3e7a3c2ef76 Author: VMware, Inc <> Date: Wed Jan 20 13:24:09 2010 -0800 Remove utilPosix.c from open-vm-tools. It's not used by any OVT code and also removes one dependency on lib/lock. Signed-off-by: Marcelo Vanzin commit ac8c843230ab2b7cb8b3aa8b977b36f54e98e8f4 Author: VMware, Inc <> Date: Wed Jan 20 13:23:58 2010 -0800 Hostinfo: Add OS name caching to POSIX impl. While investigating PR 479137, we noticed that the Hostinfo_GetOSName may end up holding up the Tools service for a while on a heavily loaded host. My theory is that we're starved of either CPU or disk, and this change brings the caching available in the Windows implementation over to the POSIX side. After the first invocation, we won't have to go to disk or fork any other processes in order to identify the running operating system. Signed-off-by: Marcelo Vanzin commit ab9358f46cffac641433e808b8fa177f64afe307 Author: VMware, Inc <> Date: Wed Jan 20 13:23:41 2010 -0800 A few type fixups For Util_SafeXXX functions, the __FILE__ macro is a const char*, not a char*. Signed-off-by: Marcelo Vanzin commit a1296c3f89e21284dc1ba180fbdb45460e8208f3 Author: VMware, Inc <> Date: Wed Jan 20 13:23:27 2010 -0800 Unicodify lib/system. Make sure all code is Unicode-friendly, and change System_SetProcessPrivilege's signature to not depend on the TSTR mutable type so that we catch mismatches at compile time. Also do some minor cleanup (like getting rid of obsolete code). Signed-off-by: Marcelo Vanzin commit 74c1f37739cd194f8101037be7428fd32b8f9f10 Author: VMware, Inc <> Date: Wed Jan 20 13:23:12 2010 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7495c0ccf45f188859dac3853770aab129cd4104 Author: VMware, Inc <> Date: Wed Jan 20 13:22:41 2010 -0800 Internal branch sync. Included in this change: . Fix an issue where only image data would be retrieved from the clipboard, instead of both image and text data. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 22a78f2208b3dc8db38c2e6d919340c5f431869f Author: VMware, Inc <> Date: Wed Jan 20 13:22:05 2010 -0800 Fix vm-support issue Signed-off-by: Marcelo Vanzin commit 31901ba63949d9cc9cdeb344b749f23a9df23183 Author: VMware, Inc <> Date: Wed Jan 20 13:21:34 2010 -0800 Remove bogus error checks from af_vsock.c With the new VMADDR_CID_ANY change, a datagram handle that is registered with VMCI will have a context of invalid on the guest or hosted context id on the host. This means the error check in linux vsock is no longer correct and was preventing sockets from working on the host. Just remove the checks since it is really a bug if VMCI ever returns us a handle with bad values and VMCI_SUCCESS... Signed-off-by: Marcelo Vanzin commit 0ea49461871f65a96486604a9cbbe178028390f9 Author: VMware, Inc <> Date: Wed Jan 20 13:21:26 2010 -0800 VMCI Handle array should allocate mem atomic. The VMCI handle arrays are usually appended to and copied while holding spinlocks. As these operations may/will result in memory being allocated, the memory allocations should be atomic. Signed-off-by: Marcelo Vanzin commit 529d23840ae72b5a7625a735f03470bbde8a5c62 Author: VMware, Inc <> Date: Wed Jan 20 13:21:13 2010 -0800 OVT: remove vmxnet3 linux driver Now that VMXNET3 is in mainline kernel (since 2.6.32) we should not be distributing it here but rather have users get it with their kernels. Signed-off-by: Marcelo Vanzin commit 61d3ee2e94de84434ecf1495f3f7a5862d7da129 Author: VMware, Inc <> Date: Thu Dec 17 17:27:55 2009 -0800 Updating open-vm-tools version for release 2009.12.16-217847. Signed-off-by: Marcelo Vanzin commit 0d28106da5684dc31ea52ebb5a2dc6a0af5c1d61 Author: VMware, Inc <> Date: Thu Dec 17 15:07:26 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d7080fddbf1dcd5c15f510470ff89192812bf451 Author: VMware, Inc <> Date: Thu Dec 17 15:07:00 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit e1f1ddd3e381bd1405b4a1922c4de604eadb94af Author: VMware, Inc <> Date: Thu Dec 17 15:06:40 2009 -0800 Internal branch sync. Included in this change: . lib/lock: minor performance optimizations, cleanups and other improvements. . finish removal of lib/sync. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fa13808094bfd7b86ddebb65ef1ee5121a27f7af Author: VMware, Inc <> Date: Thu Dec 17 15:01:54 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fda6eb72996b4bb3e97495e86a0cb32acfe7da61 Author: VMware, Inc <> Date: Thu Dec 17 15:01:29 2009 -0800 vmtoolsd: do not store VMX options with the rest of config VMX options are not persistent in the sense that they are not stored in tools config file in GOS but rather [re]transmitted from host at startup, resume, etc, or when they are changed. When we reload config file (which we periodically do to switch to the latest and greatest user-supplied settings) VMX options get flushed from memory so let's not put them in key file in first place and instead require plugins to store values relevant to their operation themselves. The only user who did look up VMX option in key file - timeSync - has already been changed to store value by itself. Signed-off-by: Marcelo Vanzin commit 8847efe81b7c0aef25b39ae9bc2a763fdc3cd2c9 Author: VMware, Inc <> Date: Thu Dec 17 15:00:56 2009 -0800 Timesync: fix backward sync when config file is reloaded Reloading of tools configuration file causes purging of all options, including ones that are sent via RPC by VMX. This causes issues with timesync plugin, which 'forgets' that it is supposed to perform full time synchronization when enabling time synchronization loop. Solve the problem by storing value of TOOLSOPTION_SYNCTIME_STARTUP in a private variabe instead of retrieving it from the config dictionary. Signed-off-by: Marcelo Vanzin commit c3f0d6f8a48d7af9de532d90bdd0d94603eae043 Author: VMware, Inc <> Date: Thu Dec 17 15:00:31 2009 -0800 Modify the linux vsock code to work with VMADDR_CID_ANY Previous to this change VMADDR_CID_ANY was directly mapped to a context id when it was recv'd from userland. Change this behavior to store VMADDR_CID_ANY and to register datagram handlers as any cid for: 1. The stream control channel under all conditions. 2. The datagram handler if it is being bound to VMADDR_CID_ANY. Signed-off-by: Marcelo Vanzin commit 69412c286706a0b48481322b6426bce0e51d556d Author: VMware, Inc <> Date: Thu Dec 17 15:00:06 2009 -0800 Add support for datagram handles with VMCI_FLAG_ANYCID_DG_HND. In certain situations (e.g. vsock) ... we really want to register datagram handles that are not tied to one specific context id. The goal is that these datagram handles will continue to be able to send and recv datagrams after a cid change. Without this change clients would have to go through and manually reregister all datagram handles. Signed-off-by: Marcelo Vanzin commit 020784663ff054c039917c65f154286556642fc9 Author: VMware, Inc <> Date: Thu Dec 17 14:59:47 2009 -0800 Remove x86 dependencies from a variety of files. Remove x86 dependencies from a variety of files in preparation for adding an ARM-based remotemks. Signed-off-by: Marcelo Vanzin commit b88a4ac0b09242cc69f07e8eb260ad76c2d84a82 Author: VMware, Inc <> Date: Thu Dec 17 14:58:54 2009 -0800 FreeBSD VMBLOCK: avoid crash when doing lookup in a subdirectory When trying to reconstruct path to a vnode during lookup of a file within subdirectory the driver gets confused and crashes the kernel. This can be easily triggered by doing H->G DnD of a small directory. Instead of trying to reconstruct it every time let's just store the latest lookup that lead to discovery of the vnode (similar to how Linux driver does this). Signed-off-by: Marcelo Vanzin commit 5e40841417653d9802b93755193f9c8b6074300e Author: VMware, Inc <> Date: Thu Dec 17 14:58:30 2009 -0800 Add support for delayed VMCI datagrams. This builds on top of changes 960817 and 964769. Datagrams can now be delivered in a delayed system context via a worker thread, instead of directly. Although the code is present for all platforms, this is only enabled for Windows, since we want datagrams at PASSIVE rather than DISPATCH level. Signed-off-by: Marcelo Vanzin commit 245e1fce520f8c822379ce9e2cb4fbe87093f602 Author: VMware, Inc <> Date: Thu Dec 17 14:58:07 2009 -0800 Internal branch sync. Included in this change: . Fix linux vmxnet2 driver checksum offload configuration. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7863a2d2443a52c831acfc6f9890297ea9590bf0 Author: VMware, Inc <> Date: Thu Dec 17 14:55:38 2009 -0800 Fix release build. Signed-off-by: Marcelo Vanzin commit 13b56907849b67b176358ae9613323a710e24871 Author: VMware, Inc <> Date: Thu Dec 17 14:55:27 2009 -0800 Allow plugins to respond to registration errors. This change adds a callback that plugins can register to be notified of registration errors. Plugins can use this functionality to selectively disable functionality based on the current state of the container where they are running. For example, if a plugin depends on a signal provided by another plugin, but this other plugin fails to load for any reason, the first plugin is notified that the signal connection failed, and can disable the functionality that relied on that signal. Plugins are never unloaded, though. So they should still be careful to not crash even if registration errors happen. Bonus: clarify a few spots in the API docs. Signed-off-by: Marcelo Vanzin commit ff7ec337fa589146bfbbb2ac72ace21e2502ad99 Author: VMware, Inc <> Date: Thu Dec 17 14:55:03 2009 -0800 Fix open-vm-tools build issues. . codeset.c is not compiled when using --without-icu, so we shouldn't reference symbols implemented in that file in that case. . gcc 4.3.2 complains about calling Panic() with a non-const format string. . Ubuntu 9.10 complains about ignoring the return value of chdir. Signed-off-by: Marcelo Vanzin commit f6560ac0078f4a4cc938118289778745d419d4ac Author: VMware, Inc <> Date: Thu Dec 17 14:54:27 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9ac853c62c241154a810f225b2542260d2735ae3 Author: VMware, Inc <> Date: Thu Dec 17 14:53:49 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 186cc60ab1920a0658b885681dddf3a256d6668b Author: VMware, Inc <> Date: Thu Dec 17 14:52:40 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 46af6067caaa980e84055011154c38e2bbed7010 Author: VMware, Inc <> Date: Thu Dec 17 14:52:21 2009 -0800 Make vmci, vsock, vmsync and vmnet use compat_mutex In recent rt kernels (bug 490581 reports this for 2.6.31.4-rt14), old style mutex operations are no longer supported (DECLARE_MUTEX, init_MUTEX are gone). Since we already have a compat_mutex.h, convert vmci, vsock, vmsync and vmmnet to use that instead. Since vmnet used an interruptible version of down, compat_mutex_lock_interruptible has been added to compat_mutex.h. Another option would be to extend the current compat_semaphore header, but since the new Linux mutex operations are there and are specific for mutexes, we might as well move to these. Signed-off-by: Marcelo Vanzin commit 93e1c7d7c69bf5bffdaf089bfc808cf2c8765028 Author: VMware, Inc <> Date: Thu Dec 17 14:51:38 2009 -0800 Sample guest and host time multiple times. This change adds a loop reading host and guest time. The read of the guest is always bracketed by reads of the host and if those two reads are more than 2ms apart, loop to try and get a more accurate sample. Signed-off-by: Marcelo Vanzin commit 8609338ceeb6c16c993f2f0ba4d76fb9170c1b09 Author: VMware, Inc <> Date: Thu Dec 17 14:51:24 2009 -0800 DynXdr: Implement xdr_inline operation. While working with SIGAR => XDR serialization, I ran into segfaults when the rpcgen-generated code called xdr_inline, an operation which we didn't implement. This change fixes that. Signed-off-by: Marcelo Vanzin commit 4118ee6a6a4de0a54f363eaa2f240a69d62c49a2 Author: VMware, Inc <> Date: Thu Dec 17 14:51:09 2009 -0800 Add unrestricted local encoding support to tools Tools needs to be able to use local encodings even if they are not supported in our stripped down version of the ICU. In tools builds accept any encoding as valid provided we recognize it and it is the default local encoding. If the encoding is not supported in our ICU, revert to using native OS conversions with codesetOld. Signed-off-by: Marcelo Vanzin commit 5cf1b12c58dae9f40b88e49339e71c96d87b20ef Author: VMware, Inc <> Date: Thu Dec 17 14:50:32 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fc38795548d1741bcaee29ee2a98fd274c7341ea Author: VMware, Inc <> Date: Thu Dec 17 14:50:00 2009 -0800 Internal branch sync. Included in this change: . Start using lib/lock, a new user-level lock library that supports lock ranks. . Change desktop background color when in Unity mode to light gray (not yet implemented on X11). . Remove lib/sync (replaced with lib/lock). . Sync up vmxnet3 with upstreamed driver: Use API provided by Linux wherever possible. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 87b3957c7b6fad30b09848dc1554d44a15a37f41 Author: VMware, Inc <> Date: Thu Dec 17 13:50:33 2009 -0800 char is neither signed nor unsigned As some of our code starts to be compiled on ARM, we need to improve some elements of code cleanliness. This review deals with char being neither signed nor unsigned in the gcc type system. (Confused? See this link:) http://www.trilithium.com/johan/2005/01/char-types/ This was initially found with gcc, but MSVC also makes the distinction. Signed-off-by: Marcelo Vanzin commit da3e1e5c93538f1a67b61c5520d8cef8c104fbac Author: VMware, Inc <> Date: Thu Dec 17 13:49:46 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a4ad9d70fa0114b7e84b1283cbb91465d9223857 Author: VMware, Inc <> Date: Thu Dec 17 13:48:46 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cfe7676d4f57bb136f09e0386ee7d58f0f7f565f Author: VMware, Inc <> Date: Thu Dec 17 13:48:26 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6a183706ff5a9936be999462b6d06d7b3bcf5b53 Author: VMware, Inc <> Date: Thu Dec 17 13:47:43 2009 -0800 Fix vmxnet3 linux module compilation. Signed-off-by: Marcelo Vanzin commit 922d8db3d495b578416d9423254889d1cb64bcab Author: VMware, Inc <> Date: Thu Dec 17 13:47:23 2009 -0800 Add explicit casts to int64. Signed-off-by: Marcelo Vanzin commit 63d7332bd1bf5f96d866840a7d4932559a448fd4 Author: VMware, Inc <> Date: Thu Dec 17 13:47:07 2009 -0800 Factor out reading guest and host time from TimeSyncDoSync. This change splits out reading guest and host time from the main time sync loop. At the same time, it converts to using "diff" and "interruptLag" to "gosError" and "apparentError". The polarity of these two now match NTP/adjtime: positive values mean that time is ahead, negative values mean that time is behind. The names match TimeTracker. This change shouldn't introduce any behavioral changes. The change in how errors are represented makes some of the conditions in the one time sync portion of the loop look a bit suspect, but I'll address that later. Signed-off-by: Marcelo Vanzin commit fab1d37b7e971c0c538b97472646921e94c5df77 Author: VMware, Inc <> Date: Thu Dec 17 13:46:45 2009 -0800 Make timeSync use microseconds rather than seconds & microseconds. A signed 64 bit value storing microseconds can represent up to 292471 years, so keeping a separate "seconds" value isn't necessary (and complicates calculations). Signed-off-by: Marcelo Vanzin commit 7a4aa2a5d7f0611a140a1a9dc8ba6a3a57a40313 Author: VMware, Inc <> Date: Thu Dec 17 13:46:25 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 7b98b02d08fbafc39347dd335cfc5dab0870061b Author: VMware, Inc <> Date: Thu Dec 17 13:45:52 2009 -0800 Configure core dump limit on POSIX automatically. In this change: . if core dumps are enabled in the config file, try to raise the core rlimit for the process when logging is enabled; this can still fail if the system is configured to now allow it, but it's better than not getting core dumps because the default system setting is to set the limit to 0. . on POSIX systems, try to chdir to the user's home if trying to create a core dump, but the current directory is not writable. . don't enable the Win32 exception filter automatically when loading the vmtools DLL; instead, do it when configuring logging and requesting core dumps. . avoid recursive log calls from CoreDump_CoreDump() on Win32; only Panic() was incrementing the recursive panic count, it needs to be done in the actual core dump function. This change doesn't handle SIGSEGV on POSIX; that will still create a core dump if the limit is set appropriately, but won't go through the code that sees if the current directory is writable. Signed-off-by: Marcelo Vanzin commit d9252b39f5e39a9cf1a41f03bc490a7b25072d11 Author: VMware, Inc <> Date: Thu Dec 17 13:44:59 2009 -0800 Plumb SCM control signals through vmtoolsd in a generic way. Instead of individually plumbing every possible control code the SCM sends to services through vmtoolsd, provide a generic plumbing mechanism and let plugins decide what they want to do. The only remaining issue is that a few control codes are only sent after some specific registration step (e.g., RegisterDeviceNotification); for those cases, either we'll need to have vmtoolsd blindly register for all possible control codes (which is not future proof since MS may add new ones), or, when possible (such as in the device notification example), let plugins do the registration themselves. Change the two existing control messages (SESSION_CHANGE and SHUTDOWN) to use the new mechanism, and fix all current usage sites. Signed-off-by: Marcelo Vanzin commit 64886a66f82542d2de12d1e38228177f54fa0a05 Author: VMware, Inc <> Date: Thu Dec 17 13:43:54 2009 -0800 open-vm-tools: link against libresolv on solaris. Apparently this is needed to find a few symbols on certain builds of OpenSolaris. Signed-off-by: Marcelo Vanzin commit c3d48e0bfb54ea4110966b01b463e436a8fa3e81 Author: VMware, Inc <> Date: Thu Dec 17 13:43:36 2009 -0800 Remove a duplicate comment from fileIOPosix.c. Signed-off-by: Marcelo Vanzin commit c15eb6366c0c7e6e7d7348748e17116be292bfa0 Author: VMware, Inc <> Date: Thu Dec 17 13:43:15 2009 -0800 Detect nested VM support Unless vmx.allowNested is set, VMX currently refuses to power on if it finds the backdoor. With the recent addtion of dynamic backdoor toggling, we can now test for the presence of that feature and allow nested VMs to power on when it is found. Signed-off-by: Marcelo Vanzin commit c0c78f3fd573df06d92fd292bd2e77d5b400819c Author: VMware, Inc <> Date: Thu Dec 17 13:42:21 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9b2303020773c13d42e09bb1ba55a88afa312a22 Author: VMware, Inc <> Date: Thu Dec 17 13:41:14 2009 -0800 open-vm-tools: check for libproc.so, scrnsaver.h . some newer distros apparently started to ship procps 3.2.8, so try to link against libproc.so and, only if that fails, try libproc-3.2.7.so. For other cases the user will have to manually intervene. . check for scrnsaver.h being there since our code includes it (and add a macro that simplifies doing that check for X11 libraries). Signed-off-by: Marcelo Vanzin commit d0dc859c7b5d3c6fa4c935d69b62cb2220e6c163 Author: VMware, Inc <> Date: Thu Dec 17 13:40:43 2009 -0800 Fix minor memory leak in guest info plugin. This only affected the case when the plugin decided not to be loaded (e.g. when running on a boot camp partition running on the bare metal). The service will quit soon in that case, but it's still good to have the code do the right thing. Signed-off-by: Marcelo Vanzin commit 0f7206f94468bddf6c0082f5f01aea84a059051c Author: VMware, Inc <> Date: Thu Dec 17 13:40:08 2009 -0800 Internal branch sync. Included in this change: . Hostinfo: Identify CentOS and Oracle Enterprise Linux distros. . Fix race condition with RPC callback registration and remove unnecessary SetPrinter functionality. . Get rid of dependency on X86 architecture for vmxnet3. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 4a6dd9ad78be9fd950d5df335c79350fc30c96c2 Author: VMware, Inc <> Date: Thu Dec 17 13:31:13 2009 -0800 This change was reviewed as multiple pieces but is being checked in as one big chunk to prevent build breaks since parts depend on other pieces. Add VMCILOG to the guest The guest and the host crosstalk drivers have different notions of logging macros. Really we should unify them. To keep this change from getting any larger I have instead added a temporary VMCILOG macro to the guest. ==== Add VMCI_CanScheduleDelayedWork and VMCI_ScheduleDelayedWork to all VMCI platforms This change is a precursor to supporting VMCI delayed event callbacks. It provides basic infrastructure to ask that a callback be scheduled and run in a delayed work context. Right now this is only implemented on linux and vmkernel. Other platforms currently provide dummy implementations and return VMCI_ScheduleDelayedWork() as FALSE. ==== Add support for delayed linux VMCI events. This is the intial change to add delayed event callbacks to vmciEvent.c. In particular this change: 1. Defines a flags field and requires that all callers pass in delayed or none flags when calling VMCIEvent_RegisterSubscription. 2. Changes the lock rank of the event callbacks to be above queuepairs. 3. Change the VMCIEvent cleanup routine to require all VMCI events to be unregsitered before the module is unloaded. 4. Reference count the individual vmci event subscriptions so they don't go away while callbacks can be firing. 5. Wait for all callbacks to fire before allowing unsubscription to continue. 6. Modify VMCIEvent_Dispatch to allow callbacks to be fired in a delayed work context with no locks held. ==== Pull in vmciEvent.c changes from the host into vmciEvent.c This change is a setup change to unify vmciEvent.c on the guest and the host module. This change just pulls in host side vmciEvent.c code into the guest. Followup changes will make this code actually work. ==== Remove HelperQueue VMKERNEL call from vmciEvent.c. Previous to this change the VMkernel went through the vmci event subscriber array in a helper world because it wanted to take the subscriber array lock which was lower rank than the queuepair lock. Now that the VMK always uses the delayed work mechanism ... this is no longer needed. ==== Make vmkernel work with the new vmciEvent code. This modifies the core vmkernel vmci interface code to use the new vmci event flag field. This lets vmkernel continue to compile and lets external (to the module) vmkernel clients use vmci if they desire. ==== Merge bora-vmsoft vmciEvent.c into bora vmciEvent.c Now that the vmciEvent code is in a state where it can work on both the guest and the host, merge the guest vmciEvent.c code to be 100% the same as the host code. In the future we can consider just using the same file for the host and guest. ==== Add extra VMCIEvent_Subscribe param to vsock linux build. This change just modifies the linux vsock code to pass in the new required param for Event subscribe to existing calls. This should not change anything about how linux vsock actually works. ==== Register for VMCI_EVENT_CTX_ID_UPDATE This change makes linux vsock register for VMCI_EVENT_CTX_ID_UPDATE and use the new vmciEvent delayed callback code. Right now stream sockets break if a vm's cid ever changes and vsock is not reloaded (new stream sockets will not succeed in being connected). This change fixes that by registering for the VMCI_EVENT_CTX_ID_UPDATE call and reregistering the datagram handler for the control port. ==== Make common vsock code pass in the new argument to VMCIEvent_Subscribe This change is required to have the common vsock code continue building. There should be no functional changes here. ==== Signed-off-by: Marcelo Vanzin commit 846b78b5fd99143ea5796e61afbf12f37c750bde Author: VMware, Inc <> Date: Thu Dec 17 13:30:24 2009 -0800 Linux HGFS: Fix warnings when building kernel module Fix the following compiler warnings when buildling vmhgfs module: bora-vmsoft/hgfs/linux/fsutil.c: In function 'HgfsBuildPath': bora-vmsoft/hgfs/linux/fsutil.c:1059: warning: pointer targets in assignment differ in signedness bora-vmsoft/hgfs/linux/tcp.c: In function 'HgfsSocketDataReady': bora-vmsoft/hgfs/linux/tcp.c:128: warning: pointer targets in passing argument 2 of 'set_bit' differ in signedness bora-vmsoft/hgfs/linux/tcp.c: In function 'HgfsSocketChannelSend': bora-vmsoft/hgfs/linux/tcp.c:807: warning: pointer targets in passing argument 2 of 'HgfsSocketSendMsg' differ in signe Signed-off-by: Marcelo Vanzin commit b9365f76e0c88bb3b07c60fd210e22b531b1e596 Author: VMware, Inc <> Date: Thu Dec 17 13:30:02 2009 -0800 Remove MSI depndency on kernel version. No need to worry about the suboptimal MSI implementation in older kernels. Now that we only build for 2.6.16 and higher, get rid of those MSI dependencies. Signed-off-by: Marcelo Vanzin commit c8791c64ad032e6717f7a06d70d18153795bc892 Author: VMware, Inc <> Date: Thu Dec 17 13:29:40 2009 -0800 Use kernel pages for SGL's. SGL pages don't need to reside in the scarce DMA addressable space, we can instead allocate generic kernel pages for these and use the map/unmap API's to consistently access these pages. Signed-off-by: Marcelo Vanzin commit 620fafbb47e74d30fa6563e9cca3223c1a2fc63d Author: VMware, Inc <> Date: Thu Dec 17 13:29:12 2009 -0800 Use pci_io(un)map API's Use the standard iomap API's for PCI devices. Signed-off-by: Marcelo Vanzin commit b98ca2e90cf44321d7ef4eca5dd025b0e4e6cfca Author: VMware, Inc <> Date: Thu Dec 17 13:28:53 2009 -0800 Reduce typedef usage. Userdefined typedef's are considered evil, atleast for Linux drivers. So use the struct keyword. While at it, also cleaned up some indentation glitches. Signed-off-by: Marcelo Vanzin commit 244de031c9eee9e19061a5155c93708e4dcf99a3 Author: VMware, Inc <> Date: Thu Dec 17 13:28:01 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 36e6267e45f03a539e874a1f6f63c328b662d635 Author: VMware, Inc <> Date: Tue Nov 17 15:17:50 2009 -0800 Updating open-vm-tools version for release 2009.11.16-210370. Signed-off-by: Marcelo Vanzin commit 6f4cdd0f38be020d722f2393c0b78d7cd13f04d2 Author: VMware, Inc <> Date: Tue Nov 17 14:14:36 2009 -0800 Expand "non-commsrc" in comments. Signed-off-by: Marcelo Vanzin commit 47971e6a5fc343c4eb819982d12e4c386156389a Author: VMware, Inc <> Date: Tue Nov 17 14:14:22 2009 -0800 Internal branch sync. Included in this change: . Add a module parameter to vmxnet3_shm to adjust the size of the shared memory pool. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 18990c35dbbe6aac6d70a19b21dfc92a5da9af79 Author: VMware, Inc <> Date: Tue Nov 17 14:11:42 2009 -0800 Fix the build. Signed-off-by: Marcelo Vanzin commit ac5f950a920cbfc1648678623c46acd7bb4f91c5 Author: VMware, Inc <> Date: Tue Nov 17 14:11:19 2009 -0800 GuestInfo: Fix a botched merge. Signed-off-by: Marcelo Vanzin commit 86d8a0f07b80502ab9c076ebb4522e22f590af55 Author: VMware, Inc <> Date: Tue Nov 17 14:11:10 2009 -0800 Clean up the Tools Core "utils" API. Get rid of a bunch of functions that were either sort of redundant or not really needed at all. Now an app that needs to use the vmtools.dll logging just needs to call two functions: VMTools_LoadConfig() (or load the config data some other way) VMTools_ConfigLogging() And those same functions provide all the functionality previously offered by the other, now defunt, functions. Change all call sites to use the new functions. Also, two minor improvements to the library: . the logging subsystem is not activated by default when a process loads the library. This makes it opt-in (users have to explicitly call VMTools_ConfigLogging() to enable the vmtools.dll logging code). . the log reset code now handles keeping log files opened also for sub-domains (previously only the default log domain would get that treatment). Signed-off-by: Marcelo Vanzin commit a2997edcb4aa7d21a0c9d4d5e62b951078263229 Author: VMware, Inc <> Date: Tue Nov 17 14:10:54 2009 -0800 Wiper: Recognize EXT4. Signed-off-by: Marcelo Vanzin commit 16e33760c689798e724a5f03f730c61a55f2533d Author: VMware, Inc <> Date: Tue Nov 17 14:10:19 2009 -0800 Minor improvements to vmtoolsd and public interfaces. . constify ToolsAppCapability::name. . skip files that don't end with the platform's shared library extension when loading plugins . compile with "-subsystem:windows" on Win32; to allow logging to a console, add new command line flag that attaches to the parent's console and redirects standard output streams. Signed-off-by: Marcelo Vanzin commit 0f7ebcc08eedcf15e86d1486e7405ffbdd7ad374 Author: VMware, Inc <> Date: Tue Nov 17 14:10:00 2009 -0800 Introduce COMMUNITY_SOURCE_AMD_SECRET. Signed-off-by: Marcelo Vanzin commit 874395cef6da41d910d5738cbc70e2ce3316bc2e Author: VMware, Inc <> Date: Tue Nov 17 14:09:01 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit cfede898c8aeb3ab4bef024d5a4b8081e289f0d9 Author: VMware, Inc <> Date: Tue Nov 17 14:08:31 2009 -0800 GuestInfo: Fix NicInfo caching. [1/2] NicInfoV3 introduced considerably more complex XDR types. Comparing said types is non-trivial, so this change introduces "isEqual" routines for each of the new types. The IsEqual code bodies are similar to some of the existing test code, and the latter will be refactored to use these soon. I also have a bunch of unit tests coming in a second change. Signed-off-by: Marcelo Vanzin commit 0cffe897d51ebb1d1d9afeae4741b48bbf6e9158 Author: VMware, Inc <> Date: Tue Nov 17 14:08:08 2009 -0800 Vmblock-FUSE: respond to reads from control file Because we can't implement the same control mechanism in FUSE-based vmblock module as in-kernle one (FreeBSD and Solaris use ioctl and we don't have a device node here) userspace needs to be able to detect the kind of vmblock being used and adjust accordingly. Change vmblock-fuse to allow reading from the control file and respond with a pre-defined string ("I am VMBLOCK-FUSE"). Ths change complements change 816902 that implemented fuse/legacy selector in DND code. Signed-off-by: Marcelo Vanzin commit d2d717b768f1d70ab9a5eb7c94373b7eaf431785 Author: VMware, Inc <> Date: Tue Nov 17 14:06:45 2009 -0800 GuestDiskInfo - small API cleanup Provide GuestInfo_InitDiskInfo(), GuestInfo_CopyDiskInfo() and GuestInfo_FreeDiskInfo() instead of having users muck with the data, manually freeing it. Copying will not re-allocate memoty if number of entries is the same. Also make GuestInfo_GetDiskInfo() cleanup after itself in case of failure. Reset cached disk info after resume to make sure we send the most up-to-date information to host. Signed-off-by: Marcelo Vanzin commit b10c4983a8bd0199e5575e8ace7a28280e5b5c7c Author: VMware, Inc <> Date: Tue Nov 17 14:06:35 2009 -0800 Vmblock test: fix to work with fuse-based vmblock module We need to adjust the path to blocked filesystem when using FUSE. Signed-off-by: Marcelo Vanzin commit eb18a25bec45e188b234d8217f9c24b91ba4ec05 Author: VMware, Inc <> Date: Tue Nov 17 14:06:22 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f553580a421f9b233d57cb7221ec810e41e81576 Author: VMware, Inc <> Date: Tue Nov 17 14:05:48 2009 -0800 XdrUtil: Add optional string, opaque field macros. During the NicInfoV3 mess, it was a fairly common operation to have to assign arbitrary data to optional string, opaque, and optional opaque fields. This change introduces a few macros which make it a little easier to do just that. Not sure that I'm happy with them, but they get the job done for initializers used in test code. Signed-off-by: Marcelo Vanzin commit b158be3faf11ae8188792b00e3c1f15cb44419d3 Author: VMware, Inc <> Date: Tue Nov 17 14:05:18 2009 -0800 Internal branch sync. Included in this change: . Unity/X11: Better handle plain unmapping, new window creation. . Fix unchecked returns in /lib/misc/posixPosix.c. . Adjust some assignment operators to allow copy elision. . Don't initialize resolution set plugin if we are not running in a VM. Signed-off-by: Marcelo Vanzin commit 47f5871d0cb6367cbbdd803a9786cca0969e3f74 Author: VMware, Inc <> Date: Tue Nov 17 13:56:45 2009 -0800 Internal branch sync. Included in this change: . Fix probable memory leaks in vmxnet2 FreeBSD driver. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b0bdffe127333e4ca5cc45c6de901ab51d027ebb Author: VMware, Inc <> Date: Tue Nov 17 13:54:30 2009 -0800 Posix Hostinfo_GetOSName fixes. 1. NUL-terminate osNameFull. 2. Insert a space between uts.sysname & uts.release (i.e., report Linux 2.6.18 instead of Linux2.6.18). 3. When setting the "other24linux" or "other26linux" defaults, make the decision based on uts.release /starting with/ 2.4 or 2.6. Signed-off-by: Marcelo Vanzin commit 1784011f72c5f0440dfc31379985235f5033b179 Author: VMware, Inc <> Date: Tue Nov 17 13:54:15 2009 -0800 Tools API: be nice to C++ users. Automatically wrap function declarations in 'extern "C"'. Also remove a check for a "magic" macro we were using to protect against misuses of the rpcChannel library (other things will break if you try to compile the rpcChannel without that macro; users shouldn't need to worry about it). Signed-off-by: Marcelo Vanzin commit c1472e604af45e00246b47378ceea2e592028bfb Author: VMware, Inc <> Date: Tue Nov 17 13:53:59 2009 -0800 Change xxx_GetAsString return value to be const char*. xxx_GetAsString() returns string which should not be freeed(). Let's make it clear by returning 'const char*' instead of 'char*'. Signed-off-by: Marcelo Vanzin commit 68f4359864f0f7395757da7f3b1192f8bc4d03c4 Author: VMware, Inc <> Date: Tue Nov 17 13:53:35 2009 -0800 Fix build bustage. Signed-off-by: Marcelo Vanzin commit 95e1370ab23bc79f316fada92962c5a1fe9fc5b3 Author: VMware, Inc <> Date: Tue Nov 17 13:53:16 2009 -0800 Add versioning information for resolutionSet plugin. Added rc file for windows, incorporated into build. Added embed_version.h for all platforms except Mac, using hgfsServer as an example for the change. Signed-off-by: Marcelo Vanzin commit 13672ed597a9b37f331628f5956228b53a5497ab Author: VMware, Inc <> Date: Tue Nov 17 13:53:01 2009 -0800 Make StrUtil_SectorToCapacityType more stringent about suffixes Let's change the behavior of this function so that "bad" suffixes are treated as errors (they were previously ignored). This change also fixes an overflow, without which I couldn't create a 1 TB disk. Signed-off-by: Marcelo Vanzin commit cb50bf8191ba16bde7818079a434a0971e43b632 Author: VMware, Inc <> Date: Tue Nov 17 13:52:37 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d857a4c2927eb5525bcc1ecfb2a501012b0a70cd Author: VMware, Inc <> Date: Tue Nov 17 13:52:05 2009 -0800 Internal branch sync. Included in this change: . Handle ethtool CSO operations in vmxnet2. . Sync vmxnet3 driver with upstreamed version. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 1703bea751f8d3271a76b8fe9cd710b9954e26d7 Author: VMware, Inc <> Date: Tue Nov 17 13:46:28 2009 -0800 Re-organize the Tools Core public headers (2/2). Fix all files that reference the old headers. No real code changes here. Signed-off-by: Marcelo Vanzin commit 6b37760a4f32ea768fc9dfc4db21b9aa8b19c895 Author: VMware, Inc <> Date: Tue Nov 17 13:46:11 2009 -0800 Re-organize the Tools Core public headers (1/2). These headers will form the base of the public Tools Core interface, so they need to be moved to the "fully qualified" location. This change just moves the headers to the new location. (For the perforce-minded folks, I am branching / editing the new files, so history is kept as far as where the contents come from.) Signed-off-by: Marcelo Vanzin commit 1fe9ddc1ac7446c3f46a9e2e63bf500ba7632fd8 Author: VMware, Inc <> Date: Tue Nov 17 13:45:40 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit a81b730e01da6fbf40c702f0e77ddd37c540db55 Author: VMware, Inc <> Date: Tue Nov 17 13:45:01 2009 -0800 Fix release build of tools. ASSERTS + release build = unused variable... Signed-off-by: Marcelo Vanzin commit 40eef16860939e30def815b198c47d7bebe70fbf Author: VMware, Inc <> Date: Tue Nov 17 13:44:40 2009 -0800 Fix a few issues with app provider registration in vmtoolsd. . create a fake provider for the TOOLS_APP_PROVIDER type so that when registering a provider there is no NULL dereference. . correctly detect duplicate providers by looking at the list of existing providers. . if a provider is not found when registering an app, print a log message and continue trying other app regs. . add a provider reg to the test plugin to make sure the above works. Signed-off-by: Marcelo Vanzin commit 2f48715419c1e7f7e41a8335f38e3037b31a4710 Author: VMware, Inc <> Date: Tue Nov 17 13:44:14 2009 -0800 Reject non-UTF8 user/pass. Signed-off-by: Marcelo Vanzin commit 0b1cb42fe864a27c67d5ee5f748936f701e30804 Author: VMware, Inc <> Date: Tue Nov 17 13:43:30 2009 -0800 Bump the default QP size to 256 KB Our perf results have shown that 256 KB QPs perform much better than 64KB QPs in many situations. Switch the default QP size to 256 KB. Signed-off-by: Marcelo Vanzin commit 03fde1911d1b9c39ffe68674a1871ce9f198b48c Author: VMware, Inc <> Date: Tue Nov 17 13:43:17 2009 -0800 Introduce loglevels to linux vsock This change introduces LOGLEVEL_THRESHOLD as a module param to linux vsock. By default we no longer print all vsock packets. Also some minor cleanup (make our other module param use the same case and remove some pre-2.6.9 code) Signed-off-by: Marcelo Vanzin commit 6a8d427918e1870e3d013ed01410b6438dddf622 Author: VMware, Inc <> Date: Tue Nov 17 13:42:47 2009 -0800 GuestInfo and friends: Plug some leaks. When finished with a GLib IO channel, decrement its reference count via g_io_channel_unref(). Do NOT simply g_free() it. This is the biggest source of leakaged addressed in this changeset. Also noticed that we were abandoning XDR structures during V3-to-V2 NicInfo conversion. Fixed. And, finally, lib/slashProc was leaking **file descriptors**. WTF. Signed-off-by: Marcelo Vanzin commit 92672704d7c5246e6d070ae9b4c29040ea6bc6a2 Author: VMware, Inc <> Date: Tue Nov 17 13:42:15 2009 -0800 Vmtoolsd: fix small memory leak After we collected all plugins in a given directory we were forgetting to free the directory data causing small memory leak. Signed-off-by: Marcelo Vanzin commit 36c756e3360f4f4162f16357148cc24ee77ec6ed Author: VMware, Inc <> Date: Tue Nov 17 13:41:59 2009 -0800 Update Tools version. Signed-off-by: Marcelo Vanzin commit bc8f0295423c175eefcb87be96deff6781444331 Author: VMware, Inc <> Date: Tue Nov 17 13:41:37 2009 -0800 Remove vmware internal headers from rpcChannel.h. This header will be part of the Tools Core public headers and we don't want to expose our internal headers through it. Replace the ASSERTS() we have in the code with glib checks (that can be switched to asserts at runtime). Signed-off-by: Marcelo Vanzin commit 7a7fe507600c4ff8b5eaf83f7c33b4b8f86c8049 Author: VMware, Inc <> Date: Tue Nov 17 13:41:05 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5c0c4b769a7acb5056fad7759caba568859d902b Author: VMware, Inc <> Date: Tue Nov 17 13:40:19 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 74e9c9d389d016526bdf4d295d5059b3a560d89d Author: VMware, Inc <> Date: Tue Nov 17 13:38:58 2009 -0800 Internal branch sync. Included in this change: . Attempting to get size of a device in certain Linuxes hangs. So, don't. . Check user->kernel tx ring desc availability. Also clear partial_tx if userspace writes too many frags instead of panicking. . Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 869efe5cf560fa7ff92515dc874e95ffd1ba3a19 Author: VMware, Inc <> Date: Tue Nov 17 13:31:43 2009 -0800 Remove vmrpcdbg.h's dependency on util.h. This is (well, will be) a public header and should not depend on our internal headers. So change the macro that uses util.h into a function so we hide the dependency from consumers (and fix the few existing uses). Signed-off-by: Marcelo Vanzin commit 6c1cdce35f74a9a4c1183069fa2bc26fb3bab356 Author: VMware, Inc <> Date: Tue Nov 17 13:31:14 2009 -0800 Move guestInfo library function definitions to bora-vmsoft. These functions are not part of the public interface defined in the public guestInfo.h file. Signed-off-by: Marcelo Vanzin commit 11744dbb2626db36cc64def9876dd714ebcbd5f3 Author: VMware, Inc <> Date: Tue Nov 17 13:30:53 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d3334b90e159ad2283d55840890e831d5ff06a90 Author: VMware, Inc <> Date: Tue Nov 17 13:30:15 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit afb7005c62877ac13985d95126f7747eba64866f Author: VMware, Inc <> Date: Tue Nov 17 13:29:38 2009 -0800 Use WinReg_GetSZ() to get the Tools install path. RegOpenKey() tries to open the registry key with too many permissions, which is not allowed for all users. GetSZ() uses RegOpenKeyEx() with just the needed permission to read the value, which should work for more users. Signed-off-by: Marcelo Vanzin commit f324c9c52c6b6e7ffa9a3d1fee52db34e33f08c5 Author: VMware, Inc <> Date: Tue Nov 17 13:29:06 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5f6e136243f40ec4db045ab5c4206e457eb384f2 Author: VMware, Inc <> Date: Tue Nov 17 13:27:24 2009 -0800 Remove rpchChannel.h's dependendy on rpcin.h. rpcChannel.h is part of the "public" tools core API, and shouldn't expose internal APIs (such as those in rpcin.h). This has the downside of having to duplicate some definitions from rpcin.h, since we still have code that uses the rpcin library directly. This change also standardizes rpcChannel.h's interface to use glib types and not VMware types. This is the cause of most of the churn in this change (Bool -> gboolean), and also required the definition of a new type (RpcInRet) to be used while we still have code that needs to be compatible both with vmtoolsd and vmware-user; this type can (and should) go away once vmware-user is deprecated. Signed-off-by: Marcelo Vanzin commit 27222af26a8b13f6020a54ae26e0d4cba2aa5131 Author: VMware, Inc <> Date: Tue Nov 17 13:26:46 2009 -0800 Rename nested paging controls Instead of ENTER_VMM and EXIT_VMM, let's call these what they are: RESTRICT_BACKDOOR and OPEN_BACKDOOR. Given the more narrow usage, it also makes sense to disable the nesting controls when monitor_control.restrict_backdoor is set. Signed-off-by: Marcelo Vanzin commit b78800bd2567b87d6ee8c1d5468b90aa73b38a88 Author: VMware, Inc <> Date: Tue Nov 17 13:25:52 2009 -0800 Remove guestInfoServer.h, add guestInfoLib.h. The first one is a leftover from when the tools service was monolithic and based on static libraries. The second one will hold declarations of functions from the guestInfo library; later on, some declarations currently in bora/public/guestInfo.h can be moved there. Signed-off-by: Marcelo Vanzin commit ff5b73e4b69c18b1e54c646a3079d41b9cd85293 Author: VMware, Inc <> Date: Tue Nov 17 13:25:23 2009 -0800 Add unique MODULE_ALIAS to non-PCI linux drivers To help installer figure out whether there is already a vendor-provided kernel module (with potentially different name) that should not be clobbered it was decided that we will use unique module alias string to identify modules. vmsync driver will not be upstreamed (newer kernels already have the same functionality) and so is vmblock and thus are left alone. vmxnet, vmxnet3, pvscsi and vmci are PCI drivers and don't require artificial aliases. Signed-off-by: Marcelo Vanzin commit a705204441cf133f8132d2acec6c3e74bd0039af Author: VMware, Inc <> Date: Tue Nov 17 13:24:43 2009 -0800 Move time sync-related functions to the time sync plugin. There's no use in having these functions in a public library, since they're pretty much internal functions used by the time sync feature. This change also cleans up a lot of the logging to avoid printing the function name everywhere (since now the log statements are properly identified by the timeSync log domain) and to log useful error messages where they were missing. Signed-off-by: Marcelo Vanzin commit 00e2e517d6f0970ae2111b17d856b810cd23788d Author: VMware, Inc <> Date: Tue Nov 17 13:24:05 2009 -0800 Save %rbx instead of %ebx 64bit environment must preserve whole %rbx, not just %ebx. And restrict workaround to gcc build 5493 only. Signed-off-by: Marcelo Vanzin commit ded0928d8173bdf027666447f0ba19f846c7f867 Author: VMware, Inc <> Date: Tue Nov 17 13:23:38 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit fff9e50c77c5271704bd47c1fd057c7d293b56e2 Author: VMware, Inc <> Date: Tue Nov 17 13:22:42 2009 -0800 Rename unityPlatformWin32.c to have a .cpp suffix. Add 'extern "C"' constructs where required for name mangling, and fix some (now required) type casts. Signed-off-by: Marcelo Vanzin commit b5a32611ba0f78422e9e19f0d8c459f9598c5c63 Author: VMware, Inc <> Date: Tue Nov 17 13:21:13 2009 -0800 Remove ifdefs on VMM64 from busmemInt.h and vm_basic_defs.h. Signed-off-by: Marcelo Vanzin commit 2bba3be2760358edb234e9b6b4a0d99e6974de93 Author: VMware, Inc <> Date: Tue Nov 17 13:20:57 2009 -0800 Upgrade tools at shutdown. This change is relevant to windows Os(es) Vista & up. Signed-off-by: Marcelo Vanzin commit 1fc9c415748bbdece3c16ec7e40d24638946b541 Author: VMware, Inc <> Date: Tue Nov 17 13:19:57 2009 -0800 Assign result of CPName_GetComponent to a signed variable. This is a follow up change. CPName_GetComponent returns -1 to report an error thus it can't be assigned to a unsigned variable. In the previous change most of the places where CPName_GetComponent was assigned to a size_t variable were fixed however couple of places were missed. Signed-off-by: Marcelo Vanzin commit efd34a85f94e8dca7b618c22946a19c252f6ca8d Author: VMware, Inc <> Date: Tue Nov 17 13:19:38 2009 -0800 Fix file names in source. Signed-off-by: Marcelo Vanzin commit 4735ea08f52dddb1402488f5a9e045bdfbf92633 Author: VMware, Inc <> Date: Tue Nov 17 13:19:23 2009 -0800 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 9f42d53e6f61bb87aab07b50715da8bec43bcd00 Author: VMware, Inc <> Date: Thu Oct 15 15:16:22 2009 -0700 Updating open-vm-tools version for release 2009.10.15-201664. Signed-off-by: Marcelo Vanzin commit d2f1b83daab1d7882fd651ad1cc77c729bbd9760 Author: VMware, Inc <> Date: Thu Oct 15 15:09:48 2009 -0700 Stop failing every second command on pvscsi... ... and stop logging every command with KERN_ERR... Let's revert that part of max_cmd_len change. Signed-off-by: Marcelo Vanzin commit 601c971da8aa9befd2c6ac96318ca27461d6fc95 Author: VMware, Inc <> Date: Thu Oct 15 15:09:23 2009 -0700 Print default domain info when logging to shared handlers. This makes it easier to identify log messages printed to, let's say, OutputDebugString, by also including the name of the application logging the message (aside from the log domain that generated it). Bonus: prefer glib functions in a few cases, get rid of ALL_LOG_LEVELS since glib already provides that. Signed-off-by: Marcelo Vanzin commit 9962034643c34aecbaf7ae25071efcf9725cc13a Author: VMware, Inc <> Date: Thu Oct 15 15:09:00 2009 -0700 Don't abort if log files can't be opened. glib's documentation lies about custom log handlers being able to handle G_LOG_FLAG_RECURSION. It always uses its internal handler. So what happens is that when our logging function calls g_warning() to log that a log file could not be opened, it causes log recursion, which calls glib's internal handler, which then aborts the process. Avoid that by calling the default log handler directly instead of going through the glib log system in that case. Signed-off-by: Marcelo Vanzin commit 6102c3e56f6c1680d84b64fae791b9ab875e14f8 Author: VMware, Inc <> Date: Thu Oct 15 15:08:21 2009 -0700 I had previously done a sandbox build, that succeeded, but I made a change for a review, and I didn't run another sandbox build. I'll back out my change and figure out how to fix this. Signed-off-by: Marcelo Vanzin commit ffad220643fc8931ba17b18e0c989ac649801c1d Author: VMware, Inc <> Date: Thu Oct 15 15:07:44 2009 -0700 Add log-only miRegionStr() utility to lib/region I know lib/region is much-maligned and will go away, but I needed some debugging besides the Warning()s provided by miPrintRegion(), so I made this change. With this change, I added a new VMX86_LOG-only function, miRegionStr(), which allocates a string describing the contents of a region, and stores the string inside the region structure. When the region is changed or destroyed, the string is freed. I consolidated the region initalization code duplicated in miRegionCreate and miRegionInit into miRegionInit (I accidentally modified only miRegionInit initially, and realized it was silly to have two functions that do the exact same thing, so I figured I'd save future coders the same trouble.) Signed-off-by: Marcelo Vanzin commit fc50bd896654727cf96bb3ac0a015440afc41fd3 Author: VMware, Inc <> Date: Thu Oct 15 15:07:01 2009 -0700 Internal branch sync. Included in this change: . Changes in shared code that don't affect open-vm-tools functionality. . Refactoring of functions from lib/user to lib/misc. . guest_os: Use the official defines instead of simple strings. . code cleanup and code-style related changes. Signed-off-by: Marcelo Vanzin commit e003bedfdd13684b28734161aeece8387aaed966 Author: VMware, Inc <> Date: Thu Oct 15 14:35:54 2009 -0700 Linux HGFS: remove pre-2.6.9 compatibility code Drivers for older kernels come from lindrvlegacy component so let's get rid of unneeded code on main branches. Signed-off-by: Marcelo Vanzin commit 22bab3df7879bacfbc92440257760fd0fc0c4e6e Author: VMware, Inc <> Date: Thu Oct 15 14:35:22 2009 -0700 Internal branch sync. Included in this change: . Changes in shared code that don't affect open-vm-tools functionality. . vmxnet3: free irqs & re-request them in suspend and resume respectively. Signed-off-by: Marcelo Vanzin commit 672b68f97ac47025762a5b2515e0c0a43f81aaad Author: VMware, Inc <> Date: Thu Oct 15 14:33:51 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 732d5fb5b947d32e2461e60d6cb235cd0d37c64a Author: VMware, Inc <> Date: Thu Oct 15 14:33:23 2009 -0700 Fix review comments on malloc-based aligned allocator Signed-off-by: Marcelo Vanzin commit 4274d04e7235b687aa608a310a54f93d414b05a1 Author: VMware, Inc <> Date: Thu Oct 15 14:32:48 2009 -0700 Change for future ARM version of View Open Client (plus other small fixes) Signed-off-by: Marcelo Vanzin commit 046bd4633838b11fd9d9ded4a865c4650d185439 Author: VMware, Inc <> Date: Thu Oct 15 14:31:44 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit dbcdda4f83bd0cda92afcf0464c03b308c8b6193 Author: VMware, Inc <> Date: Thu Oct 15 14:31:17 2009 -0700 Linux HGFS: disable vsock transport by default I got a bit carried away and left vsock transport enabled in my previous commit, better keep it disabled for now. Signed-off-by: Marcelo Vanzin commit ba7b44d054577ca9efee89fcd4001aa4ba6e016c Author: VMware, Inc <> Date: Thu Oct 15 14:31:03 2009 -0700 Linux HGFS: avoid unnecessary copying of buffers Instead of allocating additional memory chunk when sending over TCP/Vsock channel and using local receiving buffer in TCP/Vsock receiver thread implement per-transport memory allocation that would allow allocating all necessary memory up-front. This also lays ground work for allocating variable-size requests. Additionally rework receiving thread logic so that we don't have to wait for receive operation to time our before we can suspend or shutdown TCP/Vsock channel. Also move most of the duplicated channel handling logic in generic transport code and reduce amount of locks (we really only need channel lock). Signed-off-by: Marcelo Vanzin commit 695473db24998a4bc36f91310f237375b771d40b Author: VMware, Inc <> Date: Thu Oct 15 14:30:26 2009 -0700 Add Support for auto upgrading tools at windows xp shutdown. This feature is only enabled if toolsd on the guest alerts the vmx that upgrade at shutdown is supported and if the policy is set to upgradeatpowercycle Signed-off-by: Marcelo Vanzin commit 610449c26fb4b50fe0f4af1c9397bdde3d23da99 Author: VMware, Inc <> Date: Thu Oct 15 14:29:54 2009 -0700 Internal branch sync. Included in this change: . Refactoring of functions from lib/user to lib/misc. . lib/file: Directory tree deletion. Don't follow a symlink... Delete the contents of the tree (itself). Signed-off-by: Marcelo Vanzin commit 3056d8d64c2ddb779b54b4d8b38c76b537baa0e7 Author: VMware, Inc <> Date: Thu Oct 15 14:20:57 2009 -0700 Internal branch sync. Included in this change: . Changes in shared code that don't affect open-vm-tools functionality. . Don't linearize vmxnet3-shm tx packets. We don't need/want to linearize shm packets, and the re-estimate of the number of TX descriptors needed was too low. This led to next2fill skipping over next2comp and corruption of the TX ring. This corruption caused device resets, which uncovered a race between tq_xmit and reset_work. Finally, remove some suspicious code duplication and replace with a call to vmxnet3_dev_kfree_skb. Signed-off-by: Marcelo Vanzin commit 6e0b638f052f2b5fbf7c931c586ff213c5538fe1 Author: VMware, Inc <> Date: Thu Oct 15 14:14:17 2009 -0700 Move the CPUID-related functions out of vm_basic_asm.h into a new file, x86cpuid_asm.h. This allows us to remove the dependency between vm_basic_asm.h and x86cpuid.h. This is desirable because many of the files that include vm_basic_asm.h don't care about the CPUID functions. This is a win, because x86cpuid.h is both heavily modified and included in a very large number of files. Signed-off-by: Marcelo Vanzin commit 79601f9f54d79c102aee9f28de0e47cbea17f3c2 Author: VMware, Inc <> Date: Thu Oct 15 14:12:51 2009 -0700 Handle capabilities in VMwareUser on Vista/Win7. We can't set the guest resolution without a user session attached to the console in Vista/Win7 because of session 0 isolation. Signed-off-by: Marcelo Vanzin commit 55e9a285a8fcaabf0e11373fc29ea6b83bd51abd Author: VMware, Inc <> Date: Thu Oct 15 14:09:34 2009 -0700 Add checking errors returned by CPName_GetComponent. CPName_GetComponent returns either length of the name or -1 in case of errors. Need to check for -1 everywhere before using the result of this function. Need to make sure that returned value is assigned to a signed variable otherwise error condition is lost. Signed-off-by: Marcelo Vanzin commit d3773b671f08aecb920ff83ae8e80618e9f8d261 Author: VMware, Inc <> Date: Thu Oct 15 14:08:26 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 22715be6e0e49c3c3b0771976126e0dc915907ad Author: VMware, Inc <> Date: Thu Oct 15 14:06:00 2009 -0700 Original Description: Fix linux driver build warnings Our users gripe. I spent 15 minutes and solved gripe. Signed-off-by: Marcelo Vanzin commit 55af33a6d4fecd8b176dcbdd08b00bf0644f4c58 Author: VMware, Inc <> Date: Thu Oct 15 14:05:19 2009 -0700 Run programs in a user environment without Tools' settings. vmware-user on Linux uses the app-loader tool to set up its environment so it can use various bundled libraries. However, this cause these environment variables to be set that when VIX runs programs or scripts from vmware-user, these processes fail due to library conflicts. For example, gedit on RHEL 4 was compiled with a version of libpango that conflicts with the version of this library that ships with the Tools. The solution is to store the original, pre-app-loader environment with the VIX tools module. Some of the infrastructure was already in place to fix a similar issue when launching a web browser to view the Help from toolbox. However, this needed to be plumbed through VIX, and added to lib/procMgr. Also, one further wrinkle is that VIX allows clients to programatically change the environment. So, we keep track of the environment using a hash table, update it when processing WriteVariable commands, then serial the hashtable into a environ block when RunProgram or RunScript are called. Signed-off-by: Marcelo Vanzin commit b142e36c68b78782972b54bc21ba673344fc73ac Author: VMware, Inc <> Date: Thu Oct 15 14:04:31 2009 -0700 Pvscsi driver accepts 16 byte CDBs, emulation rejects OUT_OF_BAND_CDB flag As pointed out in bug 472258, our linux driver doesn't set host->max_cmd_len, so the guest kernel uses the default of 12. That means 16-byte long commands won't make it through to our emulation at all. Since disklib doesn't support 2TB disks yet, its not that bad, but we would like to support >2TB disks connected as s/g devices for klnext. That requires READ16 and WRITE16. One line driver fix. The other bug here is that we advertise a flag for sending OUT_OF_BAND_CDBs, a method for sending > 16 bytes of CDB. We don't implement it and silently ignore it. Thats bad -- we'd like to at least reject these commands so future revs of the driver could use this flag for something interesting without worrying about silent failures. Signed-off-by: Marcelo Vanzin commit 5c0c4b1e39586adf65f13c12297dddd6d84df03f Author: VMware, Inc <> Date: Thu Oct 15 14:03:10 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 077367fec1f444d70dd5d41ac38dcdee1561cf84 Author: VMware, Inc <> Date: Thu Oct 15 14:02:41 2009 -0700 Clean up usage of vm_app.h in bora-vmsoft. That header has been "deprecated" and replaced by more app-specific ones in the new guestABI component. This change focuses mostly on files that are part of open-vm-tools (so we can at least remove the deprecated header there). Signed-off-by: Marcelo Vanzin commit 2968f89b4cec398e083634fe637225184e24519a Author: VMware, Inc <> Date: Thu Oct 15 14:02:12 2009 -0700 Move guestCaps.h to its new location. Another change towards the goal of isolating host/guest interfaces. Signed-off-by: Marcelo Vanzin commit 41349c844a743902cf8e05ce045a5ab1b972ea17 Author: VMware, Inc <> Date: Thu Oct 15 14:01:29 2009 -0700 An __FUNCTION__ change Signed-off-by: Marcelo Vanzin commit eb9293a2d74cd12dc6673fa2287499e5f22a4b1e Author: VMware, Inc <> Date: Thu Oct 15 14:01:14 2009 -0700 Save the native environment in vmtoolsd. Save the native environment so that applications that need to execute sub-processes using it are able to retrieve it. For that, make it available in the application context structure. Signed-off-by: Marcelo Vanzin commit cdffeb45f25872099867e4453cebece5ac314404 Author: VMware, Inc <> Date: Thu Oct 15 14:00:43 2009 -0700 Make LINUX_ONLY generally available A LINUX_ONLY macro has been part of the fileTrack facility for some time. Let's make it generally available to compliment similar macros. Signed-off-by: Marcelo Vanzin commit a25f944e3a48714f5890508f67da958d69130e2b Author: VMware, Inc <> Date: Thu Oct 15 14:00:10 2009 -0700 Fix illegal symbols. These will cause builds to fail when the symbol checker is enabled. Signed-off-by: Marcelo Vanzin commit c9b5ace96f4f5dd9994f4e84d1259b88bdb0f118 Author: VMware, Inc <> Date: Thu Oct 15 13:59:21 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit eacaf3ae23fb92eff6b5825bc46b1a618b8b7f1c Author: VMware, Inc <> Date: Thu Oct 15 13:58:32 2009 -0700 Add support for a "common" plugin directory to vmtoolsd. This allows sharing the same binary for plugins that will be loaded in different containers. This will be the case for hgfsServer / vix when vmware-user is converted to use vmtoolsd, and is also useful for other cases (such as plugins providing pluggable transports). Signed-off-by: Marcelo Vanzin commit d22861c8d52d49e0c58192387ca541057cd8961c Author: VMware, Inc <> Date: Thu Oct 15 13:58:02 2009 -0700 Fix runtime glib warning. Signed-off-by: Marcelo Vanzin commit 0a4faeebda7d3b88d4acd474e1c12cce10eb8697 Author: VMware, Inc <> Date: Mon Sep 28 13:31:04 2009 -0700 Retire GuestApp_ControlRecord(). The user-visible functionality was removed a while ago at PM's request, time to kill the underlying code. Signed-off-by: Marcelo Vanzin commit 6f43bd1ac7b13500c81f03bddd77becfa5b8f7f1 Author: VMware, Inc <> Date: Mon Sep 28 13:30:51 2009 -0700 Use the pthread implementation of sync mutex in open-vm-tools. This avoids having to deal with the eventfd library used by the syncWaitQ code. For some background of "issues this change avoids", see sourceforge.net bug 2865804. Signed-off-by: Marcelo Vanzin commit b7a76526296507a3b362b0ebe9164268d1b739c3 Author: VMware, Inc <> Date: Mon Sep 28 13:30:18 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 598518498a6163157c8cf19c8c48bf39da4ad438 Author: VMware, Inc <> Date: Mon Sep 28 13:29:13 2009 -0700 Fix vmtoolsd infinitely spawning itself. If the pid file was provided using "--background=", the code failed to remove that argument from the child invocation, causing an infinite loop. Also fix behavior of running in background while providing a relative path on the command line. See sourceforge.net bug 2865784. Signed-off-by: Marcelo Vanzin commit 7a0d68118aaccb110a18b3b36cba059a3c46ef6b Author: VMware, Inc <> Date: Mon Sep 28 13:28:56 2009 -0700 Fix linking of vmmemclt linux driver (in open-vm-tools). Signed-off-by: Marcelo Vanzin commit 2375f5f3b58dadb5cb71f1c6d87950070ed3ee05 Author: VMware, Inc <> Date: Mon Sep 28 13:28:46 2009 -0700 Move a few guest rpc definitions to their new guestABI location. This change still keeps the old "vm_app.h" file (which just includes the new ones) to avoid too much code churn. Signed-off-by: Marcelo Vanzin commit ff5da4006b5262c8f9f90eda93c54b0eebc96012 Author: VMware, Inc <> Date: Mon Sep 28 13:28:16 2009 -0700 Update Tools version. Signed-off-by: Marcelo Vanzin commit eadd2786ebd2863d17020936fe0145ef16409080 Author: VMware, Inc <> Date: Mon Sep 28 13:27:57 2009 -0700 (Trivial) Correct hgfs default path to "/Volumes/VMware Shared Folders" Signed-off-by: Marcelo Vanzin commit 8dbf4098f0064a56910ea3608c567411dd9d3a4a Author: VMware, Inc <> Date: Mon Sep 28 13:27:45 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 370da949bc948aafc33cd1d7f07896cb2afa98a8 Author: VMware, Inc <> Date: Mon Sep 28 13:23:04 2009 -0700 Fix resource leaks discovered by coverity run Strings were not released at all the exit points in some dispatch handlers: HgfsServerSymlinkCreate, HgfsServerRename, HgfsServerDeleteDir. Signed-off-by: Marcelo Vanzin commit 0cf6d333c19c8ad8180242d185903b29b03c05ab Author: VMware, Inc <> Date: Mon Sep 28 13:22:44 2009 -0700 Return a better error when host fails the lowest version request. Signed-off-by: Marcelo Vanzin commit b88c8ca62ba3e26f217e96eb0ae21f730123e160 Author: VMware, Inc <> Date: Mon Sep 28 13:22:22 2009 -0700 Remove makefiles for linux 2.4 kernel modules. Signed-off-by: Marcelo Vanzin commit 8f82dc88d133f2b7f0b5817cd823d41ed3fd8ad2 Author: VMware, Inc <> Date: Mon Sep 28 13:22:15 2009 -0700 Move vmbackup definitions to the guestABI directory. Another change to isolate host/guest interfaces into their own place. Source changes just reflect the new location/name of the header file. Signed-off-by: Marcelo Vanzin commit 69a66efa04d5a8b6c67930a98d6ecc0cfc5a5dbc Author: VMware, Inc <> Date: Mon Sep 28 13:22:07 2009 -0700 OVT: Quick build fix. A comma broke free of its leash and was found wandering the streets. Signed-off-by: Marcelo Vanzin commit 84fc5cf93aa79381c2379153106747f4c5cde11f Author: VMware, Inc <> Date: Mon Sep 28 13:22:00 2009 -0700 OVT: use 1:1 threading library instead of pthreads on FreeBSD This is a followup to the chage that switches from using pthread library to 1:1 threading library on FreeBSD, but this time it affects open-vm-tools build instead of our stock build. Signed-off-by: Marcelo Vanzin commit bffe39b97cedd97b383ff57786dbbbd519d8eacc Author: VMware, Inc <> Date: Mon Sep 28 13:21:55 2009 -0700 Original Description: Add RPC to support enabling and disabling 3D in guest. Add an RPC that allows the UI to reset Aero -> essentially net stop/start uxsms. Programatically done by DCE Win32 APIs. See http://msdn.microsoft.com/en-us/library/aa969538%28VS.85%29.aspx. This is basically a fix for 467709 until a better solution becomes available (one that requires methods that are not supported right now, like PCI hotplug). The fix is a bit ugly, we need to refactor a bit in the code that spawns resolution set. Furthermore, we need to broadcast this to all user sessions, not just the active one. A loop that iterates all guest sessions will come later. Signed-off-by: Marcelo Vanzin commit e99492f5a78129a6d6fb9822c6fc69927a184d7d Author: VMware, Inc <> Date: Mon Sep 28 13:21:45 2009 -0700 GuestInfo: Let users tweak poll loop behavior. Requested nearly a year ago by Ken Barr, this change introduces a new Tools config option for the GuestInfo plugin. It is - guestinfo.poll-interval: an integer which defines the GuestInfoGather poll interval in seconds. A value of 0 disables the poll loop. This is the first plugin making use of the new tcs_conf_reload signal. Changes to the Tools config file emit this signal. In response to receiving it, iff the poll interval has changed, the GuestInfoGather timeout source is canceled, and a new one with the new interval is created and attached. A small side effect of this change is the addition of a macro, CONFGROUPNAME_GUESTINFO, which specifies the config file group for GuestInfo variables. Signed-off-by: Marcelo Vanzin commit 2367531352105e53da557eb8d0b1010827c741e9 Author: VMware, Inc <> Date: Mon Sep 28 13:21:33 2009 -0700 ToolsCore: Signal config file reloads. This change introduces a new signal, tcs_conf_reload, which is emitted in response to a successful config file reload. Signed-off-by: Marcelo Vanzin commit 4905151cf4fa8063a9ebc4bc5ab4b69c328c8c3b Author: VMware, Inc <> Date: Mon Sep 28 13:21:24 2009 -0700 Fix typo. Signed-off-by: Marcelo Vanzin commit 7e93793930094f0a6ae12adf21ccd234dfb83ed3 Author: VMware, Inc <> Date: Mon Sep 28 13:21:06 2009 -0700 Internal branch sync. Included in this change: . fix an issue with double-clicks in Unity. . drop IO channels in favor of hybrid FD, X11 queue monitoring. . detach DnD from Unity when unregistering capabilities. Signed-off-by: Marcelo Vanzin commit 8ff97558841c9d75af49767e9e0378a53ee2a8a0 Author: VMware, Inc <> Date: Mon Sep 28 13:20:42 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c9f8135d245e7bc3c61e044b378e7b95d61fe6b7 Author: VMware, Inc <> Date: Fri Sep 18 18:57:50 2009 -0700 Updating open-vm-tools version for release 2009.09.18-193784. Signed-off-by: Marcelo Vanzin commit 8bb94fbfbdf65b53b87279cf81529756dba7a2ca Author: VMware, Inc <> Date: Fri Sep 18 14:53:43 2009 -0700 rpcChannel: Add wrapper functions for start/stop. Make the RpcChannel API more obvious by providing RpcChannel_Start and RpcChannel_Stop functions instead of relying on the function pointers in the RpcChannel struct. Modify vmtoolsd code to use these functions. Signed-off-by: Marcelo Vanzin commit f147ed3d4ad797d9ae1a8af2e92c3db5f154b759 Author: VMware, Inc <> Date: Fri Sep 18 14:53:22 2009 -0700 open-vm-tools: remove reference to perl installer from README. Also link to new correct URL for getting information about packaging (had to update the sourceforge site since they killed all our old wiki content in some recent update). Signed-off-by: Marcelo Vanzin commit 6bd0f453e755b6a156f75ac50c56a589d56c2ce4 Author: VMware, Inc <> Date: Fri Sep 18 14:52:57 2009 -0700 Move the ASSERT to after the validity check. Signed-off-by: Marcelo Vanzin commit 563d2942abfd558c6ba8da9e63edd654d7c150e3 Author: VMware, Inc <> Date: Fri Sep 18 14:51:55 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit dd7285a47e2ee97d87e91ebca25bd46faef44662 Author: VMware, Inc <> Date: Fri Sep 18 14:51:09 2009 -0700 Internal branch sync. Included in this change: . reduce Solaris vmxnet3 driver logspew. Signed-off-by: Marcelo Vanzin commit fa01e29307cab155029059096e8dbabc1cc32b21 Author: VMware, Inc <> Date: Fri Sep 18 14:49:03 2009 -0700 Update Tools version. Signed-off-by: Marcelo Vanzin commit 2e915d4a5d4c2a868b49a2c2c768d088e0c598c4 Author: VMware, Inc <> Date: Fri Sep 18 14:48:34 2009 -0700 vmware-user: Fix session locking. Gtk innards broke our crazy session locking scheme. (Note to self: look into doing something sane like using D-Bus service registration.) This only became apparent after vmware-user was apploaderized, causing Gtk to retitle windows as "vmware-user-loader", while our scheme only considered windows titled "vmware-user". This change initializes Glib's "g_prgname" variable, which Gtk uses when determining new window titles, such that all top level windows will have a title of "vmware-user", regardless of the name of the binary. Signed-off-by: Marcelo Vanzin commit b6031bd6860d638cbea03cd30623f5eb81d83fed Author: VMware, Inc <> Date: Fri Sep 18 14:47:58 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 27c216513cba39f5442ea77b57d2229151ea8e5a Author: VMware, Inc <> Date: Fri Sep 18 14:47:42 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 6c9a2b95742b2cbcefe1f785c6066f76542d06af Author: VMware, Inc <> Date: Fri Sep 18 14:47:24 2009 -0700 OVT: build libSlashProc only if GLIB is recent enough libSlashProc uses features only available in glib >= 2.14.0 so don't try to build it if we detect anything older than that. Signed-off-by: Marcelo Vanzin commit 2e52b19490a3d5efdbb85d5c8f14d2d76841da7f Author: VMware, Inc <> Date: Fri Sep 18 14:47:02 2009 -0700 Internal branch sync. Included in this change: . Unity: Add {un,}stick window RPC handlers. . Complain loudly if res set or topology set is called at wrong state. Signed-off-by: Marcelo Vanzin commit 5846257207a1b9679b2b34c92b6ca877a95d712b Author: VMware, Inc <> Date: Fri Sep 18 14:44:26 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 166b87312dcbcd5a2217ef12bd3cf75d55e13765 Author: VMware, Inc <> Date: Fri Sep 18 14:44:06 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit f77444ea2fd185ecb214922e26be92639941bc01 Author: VMware, Inc <> Date: Fri Sep 18 14:43:42 2009 -0700 VMXNET,VMXNET3: fix compilation on RHEL 5.4 RedHat backported GRO patch to 2.6.18 which brought napi_sturct definition to that kernel; it conflicts with our stub. For pre-2.6.24 kernels check if NETIF_F_GRO is defined and if it is assume that struct napi_struct is present. Signed-off-by: Marcelo Vanzin commit e510ef60c7bf70a8e0e85609495e7dc7c6d89d85 Author: VMware, Inc <> Date: Fri Sep 18 14:43:24 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit c9e97bf7d7197c3317f36fe1837c69dd3cf6c7a1 Author: VMware, Inc <> Date: Fri Sep 18 14:43:09 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 3130459bb7d98e6adf7434138c7859f93edd6b14 Author: VMware, Inc <> Date: Fri Sep 18 14:42:39 2009 -0700 Internal branch sync. Included in this change: . changes to guest info to account for new info gathered on Win32 guests. . allow name other than 'work' in our compat_workqueue macro. Signed-off-by: Marcelo Vanzin commit fc089ddaf5e1f56b53779ab62f1137c26798e231 Author: VMware, Inc <> Date: Fri Sep 18 14:39:23 2009 -0700 Internal branch sync. Included in this change: . don't translate non-system errors in VIX handler. Signed-off-by: Marcelo Vanzin commit d7065e9615d95c77edffc9f015e6dc5dbb9d4bf5 Author: VMware, Inc <> Date: Fri Sep 18 14:37:19 2009 -0700 Clean up a comment Signed-off-by: Marcelo Vanzin commit 939a0c0271c40e9417fa5a275057229472ecf877 Author: VMware, Inc <> Date: Fri Sep 18 14:37:06 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 62b1d22a6f6a63da886ffdab651fa261cd0e6fb3 Author: VMware, Inc <> Date: Fri Sep 18 14:36:42 2009 -0700 Check for SYS_eventfd instead of SYS_eventfd2. The former is more common (since, well, it was introduced earlier) and eventfd.c still fails to compile if it's defined. Signed-off-by: Marcelo Vanzin commit f38bd92624cc196bc700863e358df954eb5caf9f Author: VMware, Inc <> Date: Fri Sep 18 14:36:28 2009 -0700 Toolbox: do not crash when user closes yes/no dialog window The code did not expect that user may close Yes/No dialog window by pressing "X" instead of clicking on Yes/No button. Assume that if user tried to close the window he did not want the changes to be saved. Signed-off-by: Marcelo Vanzin commit cb5eebda328fa580a5598e6ddb4ecd63e2713edb Author: VMware, Inc <> Date: Fri Sep 18 14:36:16 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit d775a839e702ea71a1dc0370e371da5997492528 Author: VMware, Inc <> Date: Fri Sep 18 14:35:59 2009 -0700 Remove pesky empty line that makes 'patch' not very happy. Signed-off-by: Marcelo Vanzin commit dda7117faf433e75a6fed1d16eac1b5861a78e81 Author: VMware, Inc <> Date: Fri Sep 18 14:35:51 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5e409ecc519476780bc019beb6c908396ac7a37d Author: VMware, Inc <> Date: Fri Sep 18 14:35:34 2009 -0700 De-duplicate vmmemctl files in open-vm-tools. These escaped my source clean up streak a few months ago. Signed-off-by: Marcelo Vanzin commit 46f5be99a7b0c65398bba425a98f3390c87c1666 Author: VMware, Inc <> Date: Fri Sep 18 14:35:03 2009 -0700 Fix a few open-vm-tools compilation issues. . rpcgen wasn't finding ghiCommonDefines.h if the build directory was not the same as the source directory, so need to copy the header file to the build directory in that case. . the new "eventfd.c" file should only be compiled in certain cases, otherwise it errors out. . VIX_DEBUG() uses symbols that are not available in open-vm-tools; instead of going and fixing this whole VIX mess, just do not compile the offending statement when in open vm tools. Signed-off-by: Marcelo Vanzin commit 29a7ebdf7381fce8ba1c403d7a4151b49044430c Author: VMware, Inc <> Date: Fri Sep 18 14:34:28 2009 -0700 Add support for rewinddir() and refresh dirent on first readdir() call. rm -rf 6.10+ breaks because it does following: 1) fd = open(); // opendir() call to Hgfs 2) unlinkat(); // Remove an entry from director 3) dirp = fdopendir(fd); 4) while() readdir() // checking if entry is deleted You may look at coreutils/src/remove.c On 1) hgfsserver gets all the directory entries, thus changes made by 2) are not reflected and rm -rf gets confused. Ideally, we would like to detect 3) and alert hgfsserver that entries are stale or reopen a directory. However, to my knowledge, we do not get call on fdopendir(). So as a workaround, we ask the server to populate entries on first readdir() call rather than opendir(). This effect is achieved by closing and reopening the directory. This change also introduces support for rewinddir(), since it suffered from the same problem. rewinddir() semantics require that directory entries should be refreshed. Thus an application doing following breaks: opendir() -> rmdir() -> rewinddir() -> while() readdir() // check entry deleted. We also get support for telldir()/seekdir() combination for free. Signed-off-by: Marcelo Vanzin commit de54043e4cfe716a2fe901cc594f2c73a9effe6d Author: VMware, Inc <> Date: Fri Sep 18 14:33:58 2009 -0700 Add comments regarding barrier usage. Add comments to explain why we use the naked barriers for PVSCSI and the races that may arise without the barrier. Signed-off-by: Marcelo Vanzin commit 392303bdd4b4bc9b7ccd593fdbdcc70a5e779131 Author: VMware, Inc <> Date: Fri Sep 18 14:33:47 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit b432486dc3b83d3ee9cd2f7bb9fda61d5ff81a85 Author: VMware, Inc <> Date: Fri Sep 18 14:33:18 2009 -0700 Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin commit 5ce1a984a38a6d09dee8a4104e6a6b7f2e03458e Author: VMware, Inc <> Date: Fri Sep 18 14:32:50 2009 -0700 Internal branch sync. Included in this change: . Use eventfd() instead of pipe() to create waitable objects in syncWaitQ. Using eventfd() has couple of benefits: in the kernel they need just 8 bytes instead of whatever size kernel allocates by default (64 bytes at the cost of some non-trivial code when pipe wants to grow), and also each syncWaitQ now consumes only one file descriptor instead of two. . fix null pointer dereference in vmxnet3_open. Signed-off-by: Marcelo Vanzin commit 3438dec5c0d312223a96fbb785e52f31fc19891a Author: VMware, Inc <> Date: Fri Sep 18 14:26:00 2009 -0700 Misc changes for getting the driver ready for upstreaming. - Added parameter definition for missing msg_ring_pages. - use the module_param_named macro for module parameters. - drop the redundant "pvscsi_" prefix from each module parameter name. - remove inline hints for all the function. Dmirty pointed out that compilers are usually smart in deciding which to inline. - use Linux defined min/max macros. - print the revision number as a integer rather than characters. - define the rev field in pvscsi_adapter as u8. - formatting cleanup (tab/spaces) and some camel naming style cleanup. - bumped the version for the driver to 1.0.0.0. Signed-off-by: Marcelo Vanzin commit 772666fc9bfe70670e65f092d411fdb25538be7c Author: VMware, Inc <> Date: Fri Sep 18 14:25:42 2009 -0700 Restructure pvscsi linux driver code. This is all just code movement, no functional changes. No function declarations are needed now, also moved the macro and struct definitions to start of the file. This is part of the cleanup/preparatory work that is being done to get pvscsi driver ready for upstreaming. Signed-off-by: Marcelo Vanzin commit 71e40a8e886b9b91dd5710bd0156876748dbf832 Author: VMware, Inc <> Date: Fri Sep 18 14:25:20 2009 -0700 Restoring assert to vmballoon Solaris OS_Snprintf Restoring assert to vmballoon Solaris OS_Snprintf that was originally there. Removing a small logging that is useless. Signed-off-by: Marcelo Vanzin commit b941f086bda6c75d3e8691e0ee75a927f7e3ec37 Author: VMware, Inc <> Date: Fri Sep 18 14:25:09 2009 -0700 Changing return type of OS_Init in vmballoon for unixes A Bool is required because initialization could fail Signed-off-by: Marcelo Vanzin commit 98d38b912cc8c60fccb3ad50e2a02ea505ace986 Author: VMware, Inc <> Date: Fri Sep 18 14:24:58 2009 -0700 Flush out stale file data before changing modification time This is to address bug 360310, where "cp -p" didn't preserve time and date. See bug 360310 for details. Signed-off-by: Marcelo Vanzin commit c4fe61ba1f80b42cf8f7a748149935a9ffb3f990 Author: VMware, Inc <> Date: Fri Sep 18 14:24:41 2009 -0700 Commenting of all Unixes vmballoon Cleaning/adding missing comment so that code looks nicer Signed-off-by: Marcelo Vanzin commit fe5a0c2f18bc65a3b266fdf1870d46816546722a Author: VMware, Inc <> Date: Fri Sep 18 14:24:30 2009 -0700 VMballoon Solaris : regression fix for bug 461152 Errors in Solaris that prevent the module to be loaded Signed-off-by: Marcelo Vanzin commit 2a08e8b3765ad6778e916bdb8b58e621593c03da Author: VMware, Inc <> Date: Fri Sep 18 14:24:10 2009 -0700 . add information about what folders changed to the launch menu RPC. . add a black list of categories that should not be exposed in the host launch menu (e.g., screensavers). . fix window stacking order in Unity. . don't ignore minimize events on sticky windows. . save the active NIC list so that it can be restored at resume time. This fixes an issue where Debian would disable certain NICs when suspending, causing them to not be restored when resuming the VM. Signed-off-by: Marcelo Vanzin commit 4f853fa9068895999cbe5236997621cf2d6bec2b Author: Marcelo Vanzin Date: Thu Sep 17 15:35:39 2009 -0700 Sync git tree with internal development branch @ 2009.08.24. commit cfead6f29409b79d6e671a1c3e1b019ea2a0fc44 Author: Marcelo Vanzin Date: Mon Aug 24 14:43:39 2009 -0700 2009.08.24-187411 commit 80b7871e367a968240c2f87ed0b58055c4e37e12 Author: Marcelo Vanzin Date: Wed Jul 22 11:02:33 2009 -0700 2009.07.22-179896 commit dfb1a3004ee570110744348110c5fc350fbcdb43 Author: Marcelo Vanzin Date: Thu Jun 18 16:57:37 2009 -0700 2009.06.18-172495 commit ef82596b96b85713b20a92373a5fe48576badb8b Author: Marcelo Vanzin Date: Fri May 22 23:30:49 2009 -0700 2009.05.22-167859 commit cf0531851994ab663fc65299be9a19f4600d508f Author: Marcelo Vanzin Date: Thu Apr 23 11:19:57 2009 -0700 2009.04.23-162451 commit 7218e81ed06d55114ccc15d1fc35962fea8355df Author: Marcelo Vanzin Date: Wed Mar 18 16:41:37 2009 -0700 2009.03.18-154848 commit 0cca30d49e85cd837819011ae06e09739b23a092 Author: Marcelo Vanzin Date: Wed Feb 18 14:16:55 2009 -0800 2009.02.18-148847 commit 4d3de5672eb28261f5a1dcc755fa1c3d49f1e515 Author: Marcelo Vanzin Date: Wed Jan 21 11:07:22 2009 -0800 2009.01.21-142982 commit 63052628549911a22df7e732de83fb8d58317e5c Author: Marcelo Vanzin Date: Wed Dec 24 11:19:17 2008 -0800 Fix the version numbers for the OVT package. commit 468f99e3d48f405cc022059fca392a71efe17042 Author: Marcelo Vanzin Date: Tue Dec 23 14:53:47 2008 -0800 2008.12.23-137267 commit 91fa010a6b7265ff87c8039a0c895140b489dbcf Author: Marcelo Vanzin Date: Tue Nov 18 17:36:49 2008 -0800 2008.11.18-130226 commit ef4a8b2d05b1c15bbe6337f3c36b1ff45402b624 Author: Marcelo Vanzin Date: Tue Nov 18 17:34:10 2008 -0800 2008.11.18-130226 commit 3754358fd32fd1b1c5a4c51646c29ac23977f8ec Author: Adar Dembo Date: Mon Oct 13 00:15:54 2008 -0700 2008.10.13-123053 commit f6fbd8d6ef4ba613b915b367c60fd45c48b69f75 Author: Yiwen Zhang Date: Wed Sep 24 15:05:50 2008 +0800 Fix according to Marcelo's comments Change parameter name of GuestApp_ControlRecord Remove root protection for record Fix mnemonic conflict in record tab commit 02adfa5d47f052d5b8519251f0d0cf679b6822e2 Merge: d593ed9 8e8c790 Author: Adar Dembo Date: Wed Sep 17 18:50:03 2008 -0700 Merge ssh://git-x.eng.vmware.com/git/opensource/open-vm-tools into yiwen-patches commit d593ed9ef6fcd2bd97254afd67c81d6a0045ff7c Author: Yiwen Zhang Date: Thu Sep 11 15:39:14 2008 +0800 Adjust comment and message. Slightly modify a few comments and messages to be more presentive and compatible. commit 6dd3c30eeab5c2911fde3fd485f7b8758c39ce92 Author: Yiwen Zhang Date: Wed Sep 10 13:35:18 2008 +0800 Add border width for toolbox record tab page Increase border width of record tab page so that its layout is more similar with existing pages. commit 694eb6e3949862d4c644fc3d9c8a0a9142c88530 Author: Yiwen Zhang Date: Wed Sep 10 11:36:00 2008 +0800 Incorporate new backdoor macro definition Add macros for StateLogger backdoors in a new header. Magic numbers in related functions are also modified. commit 9f2d0d7014ed6e9438b565863e1964ce234fa178 Author: Yiwen Zhang Date: Wed Sep 10 10:50:56 2008 +0800 Modify record error message text Error message text for recording is modified to show all possible reasons. commit c61d115dfb090923b4b2b5da517dcc64f93beb8d Author: Yiwen Zhang Date: Tue Sep 9 14:48:49 2008 +0800 Fix typo of check on RecordStop's return Return checks in stop recording procedures are mistaken, fix them. commit 16d18d8323da1f80485abdb7425a012bce679c29 Author: Yiwen Zhang Date: Tue Sep 9 15:33:11 2008 +0800 Add vmx option tip for record control Once the recording control option from vm is not set, the toolbox command line and gtk application will give message to user that they should add the option. testing done:sandbox commit a7bc1e29a205c5de6840d155fd101bad6e57ebbb Author: Yiwen Zhang Date: Thu Aug 21 18:24:51 2008 +0800 Fix mistaken file attributes Files in toolbox directory were given "x" attributes by mistake, fix them. commit 4eb6e92f8240f9f304ba5c74260f2dd66016d299 Author: Yiwen Zhang Date: Thu Aug 21 18:21:23 2008 +0800 Fix according Adar's review Fix naming convention of static routines. Change GuestApp_ControlRecord() return type to Bool. Record operations require root privilege. Fix missused comments and typos. commit 547d379935e77f2dd8abc4717a7318f021070d12 Author: Yiwen Zhang Date: Mon Aug 18 20:06:02 2008 +0800 Fix tab Fix line indent to conform to vmware code style. commit c7c97ee432cdb68761e398617d5dff381500e33a Author: Yiwen Zhang Date: Mon Aug 18 18:46:41 2008 +0800 Fix comments Fix comments' format to conform to vmware code style. commit b0f292724b0ac6a36976bcb838a5500130b02df1 Author: Yiwen Zhang Date: Mon Aug 18 16:36:30 2008 +0800 Record control Add a tab page which contains buttons of start and stop recording to toolbox. Add "record" subcommand to toolbox-cmd for the same usage. Implemented by invoking a StateLogger backdoor. commit 8e8c790024625ebd83a57da921004afb2dc10f92 Author: Adar Dembo Date: Fri Sep 12 18:46:52 2008 -0700 Remove the open-vm-tools dependency on libproc-dev by providing some procps bits and pieces in our own vm_procps.h. commit 693740f9f40ed8ddef35c901a0f1a16fa289fe18 Author: Adar Dembo Date: Thu Sep 11 16:32:19 2008 -0700 Refork xorg's miregion.c and apply open-vm-tools specific patches commit d2b7f6f340a1ed961515ea10ed2c5e1caa006b38 Merge: 23afd2d b0ef27f Author: Adar Dembo Date: Wed Sep 3 01:50:50 2008 -0700 Merge /mnt/open-vm-tools commit 23afd2ded95457c9af491da3dac4bad412ea0a35 Author: Adar Dembo Date: Wed Sep 3 01:48:33 2008 -0700 2008.09.03-114782 commit b0ef27f773c3af4b6b9c38600d9acbbc73ac6838 Merge: 34c854a 4f6b8ad Author: Adar Dembo Date: Thu Aug 28 15:58:27 2008 -0700 Merge ssh://git-x.eng.vmware.com/git/opensource/open-vm-tools commit 34c854a52fe281b4ba87d8ad10d6fd4501d6ff2e Author: Prakash Ranade Date: Wed Aug 27 15:31:22 2008 -0700 One more try to check NFS based write permission... commit eb6e0774f4c2b78d962b21f82eeca91cff735ce1 Author: Prakash Ranade Date: Wed Aug 27 14:43:55 2008 -0700 added test README to check git is working or not... prakash ranade commit 4f6b8ad9fa72bdda186504616c8f0e23b4b7a671 Author: Adar Dembo Date: Sun Aug 17 18:19:39 2008 -0700 Another fix for building open-vm-tools on Intrepid. This time, to appUtilX11.c, which wasn't covered originally because I had built with --disable-unity. commit 45f57c57137fb28dfa55c0d48f6d7259b6082f90 Author: Adar Dembo Date: Fri Aug 15 16:01:09 2008 -0700 In commit 46f4578680af93fb824942546a6cc3e31121f90d, I made some mistakes when add checks for return values of two functions. This should fix said mistakes. commit b8e3aeb878f44bac85cd252828cfc18b37ac4aed Author: Adar Dembo Date: Fri Aug 15 01:32:10 2008 -0700 Change Toolbox's Makefile.am to use COMMON_XLIBS instead of hard-coding -lX11 in LDADD. commit 4b55957b8529c3a04e605e9f03a0fc9c371371e6 Author: Adar Dembo Date: Fri Aug 15 01:27:27 2008 -0700 Redo some key X11 library checks: - Add AC_CHECK_LIB for libXext and libXrender. - Split up AC_CHEK_LIB for libXrandr so libXrender isn't checked simultaneously. - Insert X_PRE_LIBS and X_EXTRA_LIBS into COMMON_XLIBS. commit 46f4578680af93fb824942546a6cc3e31121f90d Author: Adar Dembo Date: Thu Aug 14 02:44:50 2008 -0700 Fixes for Ubuntu Intrepid: - Fix formatted string vulnerabilities. - Check return values for functions that the compiler cares about. Also some automake cleanup. commit ae0d9fbe3019fc99166346949d73066ea72a0e5e Author: Adar Dembo Date: Wed Aug 13 00:21:54 2008 -0700 I failed to add an empty includeCheck.h for modules/vsock in my earlier commit. commit 648a3e42d03b2d35946a8f4b9e8ce7bba3425eaf Author: Adar Dembo Date: Fri Aug 8 17:09:41 2008 -0700 2008.08.08-109361 commit 29aad11aa7f02c88081586f4780c1ae7da70fa4b Author: Adar Dembo Date: Tue Jul 1 16:00:52 2008 -0700 Forgot to delete a file. Here we go again. commit 589b98cb91d2505e7d6723f9e6decc5ec8b623f9 Author: Adar Dembo Date: Tue Jul 1 15:59:02 2008 -0700 2008.07.01-102166 commit c23e268d9a76a1286a5e6a40f254840699efb981 Author: Elliot Lee Date: Tue Jul 1 13:11:28 2008 -0700 Incorporate the file deletes from 2008.06.20 commit 2d9e99df1b2c7fb63cb58b12573f0b050b75d41a Author: Elliot Lee Date: Mon Jun 30 16:56:48 2008 -0700 2008.06.20-100027 commit 1f9b3d7ffdb1dbd1f9b855bcd61c98676026e85e Author: Adar Dembo Date: Tue Jun 3 01:39:53 2008 -0700 2008.06.03-96374 refresh - see ChangeLog for details. commit 861fca100f3f8df3a14738ec004dd997b082b051 Author: Elliot Lee Date: Fri May 16 18:44:28 2008 -0700 2008.05.15-93241 (fix for egg-on-face bug) commit f5f7775675cdf1abceda5e3bbc3b5ccf23afbead Author: Elliot Lee Date: Fri May 16 14:26:08 2008 -0700 2008.05.15 refresh part two. Forgot to 'add' all the modified files. commit 6731c4a5809d490efdb6c4efb82b514b3e4ff24c Author: Elliot Lee Date: Fri May 16 13:56:34 2008 -0700 2008.05.15 refresh - see ChangeLog for details. commit fcf4e67f305b1c3b3e2137d3686c10b1f1ee6457 Author: Adar Dembo Date: Fri May 2 16:17:07 2008 -0700 2008.05.02-90473 refresh. commit c52f3dbc9a90d320885cbee554e684e510bf8526 Author: Elliot Lee Date: Mon Apr 14 15:55:51 2008 -0700 2008.04.14-87812 refresh. commit f047fd14a96c825b82f466e153292d6109d0da0d Author: Elliot Lee Date: Thu Feb 21 14:00:28 2008 -0800 Initial import of open-vm-tools code into git.