mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
4620c36c1e
Introduced condition on virtualbox-guest-dkms.conf file to prevent building module for kernel >= 4.16 since are included in the kernel itself fix #83 [testing]
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
This ghetto patch attempts to fix shared folder automounting for guests running
|
|
Linux 4.16, and also suggests an alternative to mount.vboxsf.
|
|
|
|
diff -uprb VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
|
|
--- VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-02-26 17:57:30.000000000 +0200
|
|
+++ VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-04-07 21:00:05.785735622 +0300
|
|
@@ -346,6 +346,13 @@ static int vbsvcAutoMountSharedFolder(co
|
|
"vboxsf",
|
|
fFlags,
|
|
&mntinf);
|
|
+ if (r == -1 && errno == EINVAL)
|
|
+ {
|
|
+ /* Mainline vboxsf accepts regular mount opts. */
|
|
+ char mount_opts[1024];
|
|
+ snprintf(mount_opts, 1024, "gid=%d,dmode=0770,fmode=0770", mntinf.gid);
|
|
+ r = mount(pszShareName, pszMountPoint, "vboxsf", fFlags, mount_opts);
|
|
+ }
|
|
if (r == 0)
|
|
{
|
|
VGSvcVerbose(0, "vbsvcAutoMountWorker: Shared folder '%s' was mounted to '%s'\n", pszShareName, pszMountPoint);
|