diff --git a/debug_mountsf.patch b/debug_mountsf.patch new file mode 100644 index 0000000..96024fc --- /dev/null +++ b/debug_mountsf.patch @@ -0,0 +1,22 @@ +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 diff --git a/virtualbox.changes b/virtualbox.changes index 9a2579b..2f12d95 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jan 14 19:26:59 UTC 2021 - Larry Finger + +- Under some circumstances, shared folders are mounted as root. File + "debug_mountsf.patch" is added to allow recovery on affected systems. + Automounted volumes are not fixed by this patch; however, manual mounting + with the uid/gid options are correct. + ------------------------------------------------------------------- Tue Dec 29 19:39:35 UTC 2020 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index 3d6e0f5..4caab60 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -1,7 +1,7 @@ # # spec file for package virtualbox # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -184,6 +184,7 @@ Patch139: linux-5.10-address-space-fixes.patch Patch140: linux-5.10-framebuffer-fixes.patch Patch141: vb-6.1.16-modal-dialog-parent.patch Patch142: fixes-for-5.11.patch +Patch998: debug_mountsf.patch Patch999: virtualbox-fix-ui-background-color.patch # @@ -497,6 +498,7 @@ This package contains the kernel-modules that VirtualBox uses to create or run v %patch141 -p1 %patch142 -p1 # make VB UI background colors look sane again +%patch998 -p1 %patch999 -p1 ### Documents for virtualbox main package ###