]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:36:27 +0000 (20:36 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Make Linux client compile on kernels 3.11
VMware, Inc [Wed, 18 Sep 2013 03:36:04 +0000 (20:36 -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 <dtor@vmware.com>
12 years agoHGFS: Partial fix for corruption when using different file handles to the same file
VMware, Inc [Wed, 18 Sep 2013 03:35:50 +0000 (20:35 -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 <dtor@vmware.com>
12 years agoFix AssertOnCompileFailed for GCC 4.8 (kernel 3.10+)
VMware, Inc [Wed, 18 Sep 2013 03:35:40 +0000 (20:35 -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 <dtor@vmware.com>
12 years agoChange FileIO_AtomicUpdate to not close files prior to rename on Posix.
VMware, Inc [Wed, 18 Sep 2013 03:35:32 +0000 (20:35 -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 <dtor@vmware.com>
12 years agoVMCI: make guest driver work with virtual IOMMU
VMware, Inc [Wed, 18 Sep 2013 03:35:16 +0000 (20:35 -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 <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:35:10 +0000 (20:35 -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 <dtor@vmware.com>
12 years agoHGFS: Linux client logging improvements
VMware, Inc [Wed, 18 Sep 2013 03:34:44 +0000 (20:34 -0700)] 
HGFS: Linux client logging improvements

Add more logging for tracing file IO calls.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:34:33 +0000 (20:34 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoBump up tools version to 9.6.0 for WS 10 RTM.
VMware, Inc [Wed, 18 Sep 2013 03:34:28 +0000 (20:34 -0700)] 
Bump up tools version to 9.6.0 for WS 10 RTM.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Clean up and improve Linux client logging
VMware, Inc [Wed, 18 Sep 2013 03:34:19 +0000 (20:34 -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 <dtor@vmware.com>
12 years agoHGFS: Improve Linux client logging
VMware, Inc [Wed, 18 Sep 2013 03:34:03 +0000 (20:34 -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 <dtor@vmware.com>
12 years agoFix stringxx to call Unicode_Free() instead of free()
VMware, Inc [Wed, 18 Sep 2013 03:33:46 +0000 (20:33 -0700)] 
Fix stringxx to call Unicode_Free() instead of free()

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHousecleaning: VMIROM is dead
VMware, Inc [Wed, 18 Sep 2013 03:33:35 +0000 (20:33 -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 <dtor@vmware.com>
12 years agoVIX: add opcode for RemoveAliasByCert
VMware, Inc [Wed, 18 Sep 2013 03:33:20 +0000 (20:33 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:33:01 +0000 (20:33 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Fix Linux client inode 512B block count
VMware, Inc [Wed, 18 Sep 2013 03:32:57 +0000 (20:32 -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 <dtor@vmware.com>
12 years agoChange GuestLIB SDK to use new RpcChannel API.
VMware, Inc [Wed, 18 Sep 2013 03:32:52 +0000 (20:32 -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 <dtor@vmware.com>
12 years agoHGFS: Fix Linux client symlinks
VMware, Inc [Wed, 18 Sep 2013 03:32:40 +0000 (20:32 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:32:28 +0000 (20:32 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Fix a Linux client memory corruption
VMware, Inc [Wed, 18 Sep 2013 03:32:18 +0000 (20:32 -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 <dtor@vmware.com>
12 years agoAdd 4 new guestRPC commands for namespace manager.
VMware, Inc [Wed, 18 Sep 2013 03:32:13 +0000 (20:32 -0700)] 
Add 4 new guestRPC commands for namespace manager.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:32:06 +0000 (20:32 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:31:40 +0000 (20:31 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoFix parsing logic in guestInfo to parse vlan configured NICs
VMware, Inc [Wed, 18 Sep 2013 03:31:31 +0000 (20:31 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:31:22 +0000 (20:31 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Improve the Linux kernel client logging
VMware, Inc [Wed, 18 Sep 2013 03:31:10 +0000 (20:31 -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 <dtor@vmware.com>
12 years agoUse g_debug instead of g_warning in RpcChannel_Error
VMware, Inc [Wed, 18 Sep 2013 03:30:58 +0000 (20:30 -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 <dtor@vmware.com>
12 years agoRe-enable vsocket guestrpc in tools.
VMware, Inc [Wed, 18 Sep 2013 03:30:52 +0000 (20:30 -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 <dtor@vmware.com>
12 years agoAvoid logging non-fatal messages without logging system initialization.
VMware, Inc [Wed, 18 Sep 2013 03:30:43 +0000 (20:30 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:30:26 +0000 (20:30 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: clean up of server Send packet part II
VMware, Inc [Wed, 18 Sep 2013 03:30:00 +0000 (20:30 -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 <dtor@vmware.com>
12 years agoFix lspci command in vm-support.
VMware, Inc [Wed, 18 Sep 2013 03:29:52 +0000 (20:29 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server send packet callback
VMware, Inc [Wed, 18 Sep 2013 03:29:44 +0000 (20:29 -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 <dtor@vmware.com>
12 years agonternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:29:34 +0000 (20:29 -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 <dtor@vmware.com>
12 years agoBump up the tools version to 9.4.0 for RTM.
VMware, Inc [Wed, 18 Sep 2013 03:29:02 +0000 (20:29 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:28:39 +0000 (20:28 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:28:22 +0000 (20:28 -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 <dtor@vmware.com>
12 years agoHGFS: Server packet abstraction part XI
VMware, Inc [Wed, 18 Sep 2013 03:27:51 +0000 (20:27 -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 <dtor@vmware.com>
12 years agoMPN to MPN 64 conversion for Hosted.
VMware, Inc [Wed, 18 Sep 2013 03:27:44 +0000 (20:27 -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 <dtor@vmware.com>
12 years agoDisable vsocket connection temporarily to work around a bug.
VMware, Inc [Wed, 18 Sep 2013 03:27:32 +0000 (20:27 -0700)] 
Disable vsocket connection temporarily to work around a bug.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoPass RPCI channel info to guestrpc command hanlders.
VMware, Inc [Wed, 18 Sep 2013 03:27:19 +0000 (20:27 -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 <dtor@vmware.com>
12 years agoTools/DnD X11: Logging improvements and cosmetic touchups.
VMware, Inc [Wed, 18 Sep 2013 03:27:07 +0000 (20:27 -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 <dtor@vmware.com>
12 years agoFix send retry on vsocket channel.
VMware, Inc [Wed, 18 Sep 2013 03:26:35 +0000 (20:26 -0700)] 
Fix send retry on vsocket channel.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:26:30 +0000 (20:26 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoSwitch utf::string from g_utf8_validate to Unicode_IsBufferValid.
VMware, Inc [Wed, 18 Sep 2013 03:26:17 +0000 (20:26 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up of server packet send
VMware, Inc [Wed, 18 Sep 2013 03:26:09 +0000 (20:26 -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 <dtor@vmware.com>
12 years agoFix VMHSUtilFileMove and clarify comments of File_Replace
VMware, Inc [Wed, 18 Sep 2013 03:25:21 +0000 (20:25 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:25:16 +0000 (20:25 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoChange the lspci parameters to avoid crash dangerous and offer more readable information.
VMware, Inc [Wed, 18 Sep 2013 03:25:06 +0000 (20:25 -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 <dtor@vmware.com>
12 years agoReplace some RpcOut_* API using new RpcChannel API.
VMware, Inc [Wed, 18 Sep 2013 03:24:59 +0000 (20:24 -0700)] 
Replace some RpcOut_* API using new RpcChannel API.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Server packet abstraction part IX
VMware, Inc [Wed, 18 Sep 2013 03:24:08 +0000 (20:24 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:23:19 +0000 (20:23 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoLinux kernel modules: remove pre 2.6 support from makefiles
VMware, Inc [Wed, 18 Sep 2013 03:22:43 +0000 (20:22 -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 <dtor@vmware.com>
12 years agoChanged a warning log message to debug message.
VMware, Inc [Wed, 18 Sep 2013 03:22:25 +0000 (20:22 -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 <dtor@vmware.com>
12 years agoMac OS Tools: Make system-wide services launchd-compliant
VMware, Inc [Wed, 18 Sep 2013 03:22:09 +0000 (20:22 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:21:40 +0000 (20:21 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoIgnore SIGPIPE for tools.
VMware, Inc [Wed, 18 Sep 2013 03:21:32 +0000 (20:21 -0700)] 
Ignore SIGPIPE for tools.

Otherwise tools exits upon socket write error.  Found this in guest
rabbitmq proxy testing.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoReactivate guestRpc polling reduction code on the guest side.
VMware, Inc [Wed, 18 Sep 2013 03:20:35 +0000 (20:20 -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 <dtor@vmware.com>
12 years agoFix a segfault in RpcChannel_SendOutRaw.
VMware, Inc [Wed, 18 Sep 2013 03:21:26 +0000 (20:21 -0700)] 
Fix a segfault in RpcChannel_SendOutRaw.

Fix a segfault due to null pointer reference in debug code.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoUse __thread on Linux (and ESX) in vthreadBase.c.
VMware, Inc [Wed, 18 Sep 2013 03:20:27 +0000 (20:20 -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 <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:20:14 +0000 (20:20 -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 <dtor@vmware.com>
12 years agoRemove some whitespace from x86cpuid.h.
VMware, Inc [Wed, 18 Sep 2013 03:20:02 +0000 (20:20 -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 <dtor@vmware.com>
12 years agoHGFS: Server packet abstraction part IX
VMware, Inc [Wed, 18 Sep 2013 03:19:54 +0000 (20:19 -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 <dtor@vmware.com>
12 years agoVMCI: Remove VM2VM
VMware, Inc [Wed, 18 Sep 2013 03:19:48 +0000 (20:19 -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 <dtor@vmware.com>
12 years agoTools: prepare for gcc upgrade
VMware, Inc [Wed, 18 Sep 2013 03:19:40 +0000 (20:19 -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 <dtor@vmware.com>
12 years agoAdd Clamped_UAdd64
VMware, Inc [Wed, 18 Sep 2013 03:19:34 +0000 (20:19 -0700)] 
Add Clamped_UAdd64

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoFlip the kill-switch on VM2VM VMCI
VMware, Inc [Wed, 18 Sep 2013 03:19:27 +0000 (20:19 -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 <dtor@vmware.com>
12 years agoBump up tools version to 9.7.0.
VMware, Inc [Wed, 18 Sep 2013 03:19:21 +0000 (20:19 -0700)] 
Bump up tools version to 9.7.0.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoFix a spurious warning.
VMware, Inc [Wed, 18 Sep 2013 03:19:13 +0000 (20:19 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part VIII
VMware, Inc [Wed, 18 Sep 2013 03:19:06 +0000 (20:19 -0700)] 
HGFS: Clean up server packet abstraction part VIII

Simply make the pointer checks more consistent.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part VI
VMware, Inc [Wed, 18 Sep 2013 03:19:00 +0000 (20:19 -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 <dtor@vmware.com>
12 years agoAvoid a memory dereference when getting the current thread ID.
VMware, Inc [Wed, 18 Sep 2013 03:18:47 +0000 (20:18 -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 <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:18:23 +0000 (20:18 -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 <dtor@vmware.com>
12 years agoInternationalize disk shrink progress string
VMware, Inc [Wed, 18 Sep 2013 03:17:55 +0000 (20:17 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:17:44 +0000 (20:17 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part VII
VMware, Inc [Wed, 18 Sep 2013 03:17:19 +0000 (20:17 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server transport session usage
VMware, Inc [Wed, 18 Sep 2013 03:17:02 +0000 (20:17 -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 <dtor@vmware.com>
12 years agoRemove fake pthreads
VMware, Inc [Wed, 18 Sep 2013 03:16:56 +0000 (20:16 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part V
VMware, Inc [Wed, 18 Sep 2013 03:16:49 +0000 (20:16 -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 <dtor@vmware.com>
12 years agoHGFS: Fix build on Linux 3.10-rc1
VMware, Inc [Wed, 18 Sep 2013 03:16:10 +0000 (20:16 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:15:46 +0000 (20:15 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Make server use of const more consistent
VMware, Inc [Wed, 18 Sep 2013 03:15:38 +0000 (20:15 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part IV
VMware, Inc [Wed, 18 Sep 2013 03:15:31 +0000 (20:15 -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 <dtor@vmware.com>
12 years agoHGFS: Fix server check for minimum sizes of session requests
VMware, Inc [Wed, 18 Sep 2013 03:15:12 +0000 (20:15 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part III
VMware, Inc [Wed, 18 Sep 2013 03:15:05 +0000 (20:15 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up HGFS server packet abstraction part II
VMware, Inc [Wed, 18 Sep 2013 03:14:59 +0000 (20:14 -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 <dtor@vmware.com>
12 years agoHGFS: Clean up server packet abstraction part I
VMware, Inc [Wed, 18 Sep 2013 03:14:46 +0000 (20:14 -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 <dtor@vmware.com>
12 years agoHGFS: Fix the server to close sessions being invalidated
VMware, Inc [Wed, 18 Sep 2013 03:14:19 +0000 (20:14 -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 <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:14:08 +0000 (20:14 -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 <dtor@vmware.com>
12 years agoReplace BackdoorChannel_New with RpcChannel_New.
VMware, Inc [Wed, 18 Sep 2013 03:13:54 +0000 (20:13 -0700)] 
Replace BackdoorChannel_New with RpcChannel_New.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoFix for not starting RpcIn during fallback on backdoor channel.
VMware, Inc [Wed, 18 Sep 2013 03:13:42 +0000 (20:13 -0700)] 
Fix for not starting RpcIn during fallback on backdoor channel.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoBump up the tools version to 9.3.3 for RC 1.
VMware, Inc [Wed, 18 Sep 2013 03:13:35 +0000 (20:13 -0700)] 
Bump up the tools version to 9.3.3 for RC 1.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoHGFS: Fix Linux client to work with Perforce versioning
VMware, Inc [Wed, 18 Sep 2013 03:13:28 +0000 (20:13 -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 <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:13:16 +0000 (20:13 -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 <dtor@vmware.com>
12 years agoSecure GuestRPC channels
VMware, Inc [Wed, 18 Sep 2013 03:13:02 +0000 (20:13 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:12:44 +0000 (20:12 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 18 Sep 2013 03:12:08 +0000 (20:12 -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 <dtor@vmware.com>
12 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 18 Sep 2013 03:11:56 +0000 (20:11 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
12 years agoPlumb in a new VIX error code
VMware, Inc [Wed, 18 Sep 2013 03:11:40 +0000 (20:11 -0700)] 
Plumb in a new VIX error code

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>