1
0
forked from pool/virtualbox
virtualbox/debug_mountsf.patch

23 lines
1.0 KiB
Diff
Raw Normal View History

Index: VirtualBox-6.1.16/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
===================================================================
--- VirtualBox-6.1.16.orig/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
+++ VirtualBox-6.1.16/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
@@ -456,6 +456,7 @@ main(int argc, char **argv)
unsigned long flags = MS_NODEV;
char *host_name;
char *mount_point;
+ char options[120];
struct vbsf_mount_info_new mntinf;
struct vbsf_mount_opts opts =
{
@@ -579,7 +580,8 @@ main(int argc, char **argv)
* options you also would have to adjust VBoxServiceAutoMount.cpp
* to keep this code here slick without having VbglR3.
*/
- err = mount(host_name, mount_point, "vboxsf", flags, &mntinf);
+ sprintf(options, "uid=%d,gid=%d\n", mntinf.uid, mntinf.gid);
+ err = mount(host_name, mount_point, "vboxsf", flags, options);
saved_errno = errno;
/* Some versions of the mount utility (unknown which, if any) will turn the