]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
14 years agolib/lock: ACK! Try acquire on an MXUserRecLock fails!
VMware, Inc [Mon, 26 Sep 2011 18:53:51 +0000 (11:53 -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 <mvanzin@vmware.com>
14 years agoFix asymmetric VMCI queue pair allocation
VMware, Inc [Mon, 26 Sep 2011 18:53:33 +0000 (11:53 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 18:53:15 +0000 (11:53 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix VMCI QP state transition on host detach
VMware, Inc [Mon, 26 Sep 2011 18:52:53 +0000 (11:52 -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 <mvanzin@vmware.com>
14 years agoRemove support for the VMCI domain on ESX
VMware, Inc [Mon, 26 Sep 2011 18:52:24 +0000 (11:52 -0700)] 
Remove support for the VMCI domain on ESX

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoRetire VMCI wellknown handles.
VMware, Inc [Mon, 26 Sep 2011 18:50:08 +0000 (11:50 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 18:49:23 +0000 (11:49 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoTrivial pretty up
VMware, Inc [Mon, 26 Sep 2011 18:46:02 +0000 (11:46 -0700)] 
Trivial pretty up

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoRemove obsolete compat_netif_* definitions
VMware, Inc [Mon, 26 Sep 2011 18:45:34 +0000 (11:45 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 18:43:58 +0000 (11:43 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 18:43:29 +0000 (11:43 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoVMCI queue pair quiesce support
VMware, Inc [Mon, 26 Sep 2011 18:41:03 +0000 (11:41 -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 <mvanzin@vmware.com>
14 years agoVMCI Queue Pair Rewrite
VMware, Inc [Mon, 26 Sep 2011 18:38:02 +0000 (11:38 -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 <mvanzin@vmware.com>
14 years agolib/lock: bound thread ID creation on Windows
VMware, Inc [Mon, 26 Sep 2011 18:36:32 +0000 (11:36 -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 <mvanzin@vmware.com>
14 years agoFix for Coredump in Tools when PAM fails to start.
VMware, Inc [Mon, 26 Sep 2011 18:35:42 +0000 (11:35 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 18:34:40 +0000 (11:34 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoRework VMCI lock ranks and expand semaphore usage on vmk.
VMware, Inc [Mon, 26 Sep 2011 18:34:12 +0000 (11:34 -0700)] 
Rework VMCI lock ranks and expand semaphore usage on vmk.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoPreserve hidden attribute for files copied from guest to MAC hosts.
VMware, Inc [Mon, 26 Sep 2011 18:32:09 +0000 (11:32 -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 <mvanzin@vmware.com>
14 years agoVMNET: fix compilation on 3.1 kernels
VMware, Inc [Mon, 26 Sep 2011 18:31:04 +0000 (11:31 -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 <mvanzin@vmware.com>
14 years agoOpen VM Tools: Prune Unity plugin from OVT build.
VMware, Inc [Mon, 26 Sep 2011 18:30:29 +0000 (11:30 -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 <mvanzin@vmware.com>
14 years agoSupport for VMODL Guest Operations inside a MacOS Guest OS - Part 2
VMware, Inc [Mon, 26 Sep 2011 18:27:39 +0000 (11:27 -0700)] 
Support for VMODL Guest Operations inside a MacOS Guest OS - Part 2

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoUse individual arguments for the components of opening a menu and opening a specific...
VMware, Inc [Mon, 26 Sep 2011 18:25:58 +0000 (11:25 -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 <mvanzin@vmware.com>
14 years agoopen-vm-tools: don't create /etc/vmware-tools.
VMware, Inc [Mon, 26 Sep 2011 18:24:32 +0000 (11:24 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 18:22:36 +0000 (11:22 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoshutdownStreamTest fails on RHEL6.1
VMware, Inc [Mon, 26 Sep 2011 18:21:08 +0000 (11:21 -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 <mvanzin@vmware.com>
14 years agolib/lock: trivial cleanup before a change
VMware, Inc [Mon, 26 Sep 2011 18:16:48 +0000 (11:16 -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 <mvanzin@vmware.com>
14 years agoSupport for VMODL Guest Operations inside a MacOS Guest OS.
VMware, Inc [Mon, 26 Sep 2011 18:12:55 +0000 (11:12 -0700)] 
Support for VMODL Guest Operations inside a MacOS Guest OS.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years ago[unity] Remove unused typedef for DesktopSwitchCallbackManager.
VMware, Inc [Mon, 26 Sep 2011 18:10:55 +0000 (11:10 -0700)] 
[unity] Remove unused typedef for DesktopSwitchCallbackManager.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years ago[unity] Move glib signal from lib/unity to unity plugin.
VMware, Inc [Mon, 26 Sep 2011 18:09:45 +0000 (11:09 -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 <mvanzin@vmware.com>
14 years agoRemove some ancient cruft from vm_assert.h
VMware, Inc [Mon, 26 Sep 2011 18:09:12 +0000 (11:09 -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 <mvanzin@vmware.com>
14 years agoopen-vm-tools: enable PAM check for non-Linux builds.
VMware, Inc [Mon, 26 Sep 2011 18:08:22 +0000 (11:08 -0700)] 
open-vm-tools: enable PAM check for non-Linux builds.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix non-conformant IPv6 link-local address.
VMware, Inc [Mon, 26 Sep 2011 18:08:04 +0000 (11:08 -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 <mvanzin@vmware.com>
14 years agoRemove dead code.
VMware, Inc [Mon, 26 Sep 2011 17:59:40 +0000 (10:59 -0700)] 
Remove dead code.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agolib/file: improved defensive response
VMware, Inc [Mon, 26 Sep 2011 17:59:06 +0000 (10:59 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 17:58:48 +0000 (10:58 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Sep 2011 17:58:16 +0000 (10:58 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoUse Linux ioctls for freezing filesystems.
VMware, Inc [Mon, 26 Sep 2011 17:56:51 +0000 (10:56 -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 <mvanzin@vmware.com>
14 years agoEliminate duplicate handle field from VMCI resources.
VMware, Inc [Mon, 26 Sep 2011 17:55:33 +0000 (10:55 -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 <mvanzin@vmware.com>
14 years agoUpdating open-vm-tools version for release 2011.08.21-471295. 2011.08.21-471295
VMware, Inc [Mon, 22 Aug 2011 21:23:59 +0000 (14:23 -0700)] 
Updating open-vm-tools version for release 2011.08.21-471295.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 21:18:04 +0000 (14:18 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 21:15:44 +0000 (14:15 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoRemove VIX_BACKDOORCOMMAND_CHECK_USER_ACCOUNT command.
VMware, Inc [Mon, 22 Aug 2011 20:27:38 +0000 (13:27 -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 <mvanzin@vmware.com>
14 years agoCorrect the definition of COMPAT_NETDEV_TX_BUSY
VMware, Inc [Mon, 22 Aug 2011 20:26:45 +0000 (13:26 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 20:23:56 +0000 (13:23 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix disk device detection on Mac OS.
VMware, Inc [Mon, 22 Aug 2011 20:21:37 +0000 (13:21 -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 <mvanzin@vmware.com>
14 years agoMove unity back-ends into subdirs.
VMware, Inc [Mon, 22 Aug 2011 20:21:04 +0000 (13:21 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 20:18:44 +0000 (13:18 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoSupport for VMODL Guest Operations inside a FreeBSD Guest OS - Part 2
VMware, Inc [Mon, 22 Aug 2011 20:17:56 +0000 (13:17 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 20:15:38 +0000 (13:15 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix crash caused by passing NULL to strcmp.
VMware, Inc [Mon, 22 Aug 2011 20:15:02 +0000 (13:15 -0700)] 
Fix crash caused by passing NULL to strcmp.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoMerge of tools localized files.
VMware, Inc [Mon, 22 Aug 2011 20:14:32 +0000 (13:14 -0700)] 
Merge of tools localized files.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 20:13:50 +0000 (13:13 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 20:13:22 +0000 (13:13 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFixing the build break for open-vm-tools for freebsd
VMware, Inc [Mon, 22 Aug 2011 20:12:56 +0000 (13:12 -0700)] 
Fixing the build break for open-vm-tools for freebsd

Changes are trivial:
1. included <limits.h> in procMgrPosix.c
2. added -lkvm in configure.ac

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agotools: remove the last vestige of fixed length strings
VMware, Inc [Mon, 22 Aug 2011 20:12:40 +0000 (13:12 -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 <mvanzin@vmware.com>
14 years agolib/misc: Do not constrain the OS name string
VMware, Inc [Mon, 22 Aug 2011 20:12:14 +0000 (13:12 -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 <mvanzin@vmware.com>
14 years agoDisable gcc 4.6's unused-but-set-variable warning.
VMware, Inc [Mon, 22 Aug 2011 20:11:32 +0000 (13:11 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 20:11:08 +0000 (13:11 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix OS X HGFS client access error
VMware, Inc [Mon, 22 Aug 2011 20:10:05 +0000 (13:10 -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 <mvanzin@vmware.com>
14 years agoFix glitches in the toolbox-cmd localization files.
VMware, Inc [Mon, 22 Aug 2011 20:03:51 +0000 (13:03 -0700)] 
Fix glitches in the toolbox-cmd localization files.

Some newlines seemed to have gotten lost in translation.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoSupport for VMODL Guest Operations inside a FreeBSD Guest OS.
VMware, Inc [Mon, 22 Aug 2011 20:02:44 +0000 (13:02 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 19:59:53 +0000 (12:59 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix OS X 10.7 unzip of files in shared folders using Archive Utility
VMware, Inc [Mon, 22 Aug 2011 19:57:41 +0000 (12:57 -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 <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 19:53:06 +0000 (12:53 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 19:52:31 +0000 (12:52 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 19:51:34 +0000 (12:51 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 22 Aug 2011 19:50:49 +0000 (12:50 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
14 years agoFix Mac OS tools.
VMware, Inc [Mon, 22 Aug 2011 19:48:33 +0000 (12:48 -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 <mvanzin@vmware.com>
15 years agoUpdating open-vm-tools version for release 2011.07.19-450511. 2011.07.19-450511
VMware, Inc [Wed, 20 Jul 2011 21:00:08 +0000 (14:00 -0700)] 
Updating open-vm-tools version for release 2011.07.19-450511.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoIgnore empty CPU vendor string when checking hypervisor.
VMware, Inc [Wed, 20 Jul 2011 20:52:51 +0000 (13:52 -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 <mvanzin@vmware.com>
15 years agolib/file: tolerate /proc failures
VMware, Inc [Wed, 20 Jul 2011 20:52:10 +0000 (13:52 -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 <mvanzin@vmware.com>
15 years agolib/file: fix dummy functions
VMware, Inc [Wed, 20 Jul 2011 20:50:49 +0000 (13:50 -0700)] 
lib/file: fix dummy functions

Handle a name change for the dummy function.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:50:35 +0000 (13:50 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:50:12 +0000 (13:50 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: file locking upgrade
VMware, Inc [Wed, 20 Jul 2011 20:47:43 +0000 (13:47 -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 <mvanzin@vmware.com>
15 years agolib/file: Temporary directories need to be fully accessible
VMware, Inc [Wed, 20 Jul 2011 20:47:02 +0000 (13:47 -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 <mvanzin@vmware.com>
15 years agoMove even more code out of lib/guestApp.
VMware, Inc [Wed, 20 Jul 2011 20:46:14 +0000 (13:46 -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 <mvanzin@vmware.com>
15 years agoFix comment.
VMware, Inc [Wed, 20 Jul 2011 20:44:20 +0000 (13:44 -0700)] 
Fix comment.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMove more stuff out of lib/guestApp.
VMware, Inc [Wed, 20 Jul 2011 20:44:07 +0000 (13:44 -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 <mvanzin@vmware.com>
15 years agoCode cleanup.
VMware, Inc [Wed, 20 Jul 2011 20:43:19 +0000 (13:43 -0700)] 
Code cleanup.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoopen-vm-tools: remove lib/eventManager
VMware, Inc [Wed, 20 Jul 2011 20:42:59 +0000 (13:42 -0700)] 
open-vm-tools: remove lib/eventManager

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoShut up gcc 4.6.
VMware, Inc [Wed, 20 Jul 2011 20:41:37 +0000 (13:41 -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 <mvanzin@vmware.com>
15 years agoopen-vm-tools: only build the glib version of the rpcin library.
VMware, Inc [Wed, 20 Jul 2011 20:40:22 +0000 (13:40 -0700)] 
open-vm-tools: only build the glib version of the rpcin library.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoCapture screen is not working well with CP enabled
VMware, Inc [Wed, 20 Jul 2011 20:39:24 +0000 (13:39 -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 <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:38:28 +0000 (13:38 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoLock the vmtoolsd pid file when daemonizing.
VMware, Inc [Wed, 20 Jul 2011 20:37:44 +0000 (13:37 -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 <mvanzin@vmware.com>
15 years agoLock the PID file when daemonizing.
VMware, Inc [Wed, 20 Jul 2011 20:37:20 +0000 (13:37 -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 <mvanzin@vmware.com>
15 years agoFix HgfsDirLlseek function.
VMware, Inc [Wed, 20 Jul 2011 20:36:53 +0000 (13:36 -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 <mvanzin@vmware.com>
15 years agolib/file: file locking static functions lack FileLock prefix
VMware, Inc [Wed, 20 Jul 2011 20:36:19 +0000 (13:36 -0700)] 
lib/file: file locking static functions lack FileLock prefix

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: remove coding standard violations
VMware, Inc [Wed, 20 Jul 2011 20:35:47 +0000 (13:35 -0700)] 
lib/file: remove coding standard violations

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:35:07 +0000 (13:35 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:34:34 +0000 (13:34 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:33:55 +0000 (13:33 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix uninitialized struct field.
VMware, Inc [Wed, 20 Jul 2011 20:33:29 +0000 (13:33 -0700)] 
Fix uninitialized struct field.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:33:15 +0000 (13:33 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:32:48 +0000 (13:32 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFixed a comment
VMware, Inc [Wed, 20 Jul 2011 20:31:56 +0000 (13:31 -0700)] 
Fixed a comment

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:31:20 +0000 (13:31 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMake kernel 3.0.0 supported in the platform
VMware, Inc [Wed, 20 Jul 2011 20:30:57 +0000 (13:30 -0700)] 
Make kernel 3.0.0 supported in the platform

hostinfo was asserting that kernel minor version is >= 2.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 20 Jul 2011 20:30:17 +0000 (13:30 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>