vmware-user-suid-wrapper does not properly activate vmblock

Bug #332323 reported by William Cattey
Affects Status Importance Assigned to Milestone
open-vm-tools (Ubuntu)
Fix Released

Bug Description

Bug #302226 gives the remedy for getting vmware-user to start, but once started vmware-user is not fully functional.

This is because vmblock is not being properly started.

The man page of vmware-user-suid-wrapper leads me to believe it has responsibility for this:

[The purpose of vmware-user-suid-wrapper is to] acquire a filesystem file descriptor, drop
       superuser privileges, and then execute vmware-user(1). In particular,
       prepare the system for vmware-user means that it unmounts the vmblock
       file system, unloads the vmblock module, then reloads the module,
       mounts the file system, and opens a file descriptor that vmware-user
       can use to add and remove blocks.

Although there is a directory /tmp/VMwareDndD there is no /proc/fs/vmblock
"lsmod | grep vm" shows the other open-vm kernel modules are loaded, but not vmblock.

If I do "sudo modprobe vmblock"

The expected entries under /proc/fs/vmblock appear, and Drag and Drop starts working.

I dug into the source of vmware-user-suid-wrapper, and I see that the code to do the unload and reload
of the vmblock module is simply not there. wrapper.h defines TOGGLE_VMBLOCK only for sun
 and __FreeBSD__.

I then reviewed the source for what is going out for Jaunty. It too lacks the code to toggle vmblock.

It looks to me like the remedy here is to add the following code:

in wrapper-linux.c:

    UnmountVMBlock to call unmount(mountPoint)
    UnloadModule to call modprobe -r
    LoadVMBlock to call modprobe
    MountVMBlock to call mount (mountPoint)

And then add linux to the list of platforms that define TOGGLE_VMBLOCK

Does anyone have this code laying around? (I'm a bit frightened of just doing {system ("modprobe -r vmblock")}.

Or is there some very sensible reason why doing the toggle vmblock is still inappropriate on the Linux platform?

Revision history for this message
William Cattey (wdc-mit) wrote :

Attached is a patch that adds in the necessary code for vmware-user-suid-wrapper
to properly modprobe to remove and add the vmblock module.
I tried very hard to follow the style conventions of the existing code.

One thing that's a bit kludgy: The platform independent code thinks it should create
the vmblock directory in /proc/fs. Under linux, that's done in the vmblock kernel module
initialization. I chose to add a platform specific "if !defined(linux)" to the platform
independent code in main. Others may want a different style.

**IMPORTANT** NONE of this will work unless one more packaging mistake is corrected:

vmware-user-suid-wrapper is currently not installed suid root.
To do its work properly it must be installed suid root.

Changed in open-vm-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package open-vm-tools - 2011.03.28-387002-0ubuntu1

open-vm-tools (2011.03.28-387002-0ubuntu1) natty; urgency=low

  * Merge latest upstream git tag. This has the unlocked_ioctl change
    needed to fix dkms build failures (LP: #727342)
  * Changes in debian/rules:
    - work around a bug in toolbox/Makefile, where install-exec-hook is
      not happening. This needs to get fixed the right way.
    - don't install 'vmware-user' which seems to no longer exist
    - move /etc/xdg into open-vm-toolbox (which should be done using .install)
  * debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
  * debian/rules and debian/open-vm-toolbox.lintian-overrides:
    - Make vmware-user-suid-wrapper suid-root (LP: #332323)
 -- Serge Hallyn <email address hidden> Thu, 31 Mar 2011 14:20:05 -0500

Changed in open-vm-tools (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.