vmware-user-suid-wrapper does not properly activate vmblock
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
open-vm-tools (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
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-
[The purpose of vmware-
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-
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?
Related branches
Changed in open-vm-tools (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
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.