MFH: r544827

Fix building emulators/virtualbox-ose-additions on head after vaccess(9) KPI
change.

Approved by:	ports-secteam (blanket, build fix)
This commit is contained in:
Jung-uk Kim 2020-08-13 18:22:22 +00:00
parent 2afc11fe92
commit fad4763883
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q3/; revision=544828

View File

@ -1,4 +1,4 @@
--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2019-10-10 18:06:51 UTC
--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2020-07-09 16:50:11 UTC
+++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
@@ -1,10 +1,6 @@
-/* $Id: vboxvfs_vnops.c $ */
@ -12,7 +12,7 @@
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -14,228 +10,1338 @@
@@ -14,228 +10,1343 @@
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
@ -502,8 +502,13 @@
+ error = vsfnode_update_stat_cache(node);
+ m = (error == 0) ? node->sf_stat.sf_mode : 0;
+
+#if __FreeBSD_version < 1300105
+ return (vaccess(vp->v_type, m, node->vboxfsmp->sf_uid,
+ node->vboxfsmp->sf_gid, accmode, ap->a_cred, NULL));
+#else
+ return (vaccess(vp->v_type, m, node->vboxfsmp->sf_uid,
+ node->vboxfsmp->sf_gid, accmode, ap->a_cred));
+#endif
}
-static int vboxvfs_link(struct vop_link_args *ap)