⬢ DragonFlyBSD Kernel Audit
DF-2935 / fix.diff
← back to finding ↓ download raw
--- a/sys/kern/vfs_syscalls.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/kern/vfs_syscalls.c	2026-10-26 00:25:42.789042927 +0000
@@ -4888,7 +4888,7 @@
 	if (fmode & FREAD)
 		mode |= VREAD;
 	if (mode) {
-		error = VOP_ACCESS(vp, mode, td->td_ucred);
+		error = VOP_EACCESS(vp, mode, td->td_ucred);
 		if (error)
 			goto bad;
 	}
--- a/sys/kern/kern_fp.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/kern/kern_fp.c	2026-10-26 00:25:42.789042927 +0000
@@ -162,7 +162,7 @@
     if (flags & FREAD)
 	vmode |= VREAD;
     if (vmode) {
-	error = VOP_ACCESS(vp, vmode, td->td_proc->p_ucred);
+	error = VOP_EACCESS(vp, vmode, td->td_proc->p_ucred);
 	if (error)
 	    goto bad2;
     }
--- a/sys/vfs/tmpfs/tmpfs_vnops.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/vfs/tmpfs/tmpfs_vnops.c	2026-10-26 00:25:42.789042927 +0000
@@ -180,7 +180,7 @@
 	*vpp = NULL;
 
 	/* Check accessibility of requested node as a first step. */
-	error = VOP_ACCESS(dvp, VEXEC, cred);
+	error = VOP_EACCESS(dvp, VEXEC, cred);
 	if (error != 0)
 		return error;
 
--- a/sys/vfs/ext2fs/ext2_lookup.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/vfs/ext2fs/ext2_lookup.c	2026-10-26 00:25:42.793042876 +0000
@@ -481,7 +481,7 @@
 		 * Access for write is interpreted as allowing
 		 * creation of files in the directory.
 		 */
-		if ((error = VOP_ACCESS(vdp, VWRITE, cred)) != 0)
+		if ((error = VOP_EACCESS(vdp, VWRITE, cred)) != 0)
 			return (error);
 		/*
 		 * Return an indication of where the new directory
@@ -554,7 +554,7 @@
 		/*
 		 * Write access to directory required to delete files.
 		 */
-		if ((error = VOP_ACCESS(vdp, VWRITE, cred)) != 0)
+		if ((error = VOP_EACCESS(vdp, VWRITE, cred)) != 0)
 			return (error);
 		/*
 		 * Return pointer to current entry in dp->i_offset,
@@ -607,7 +607,7 @@
 	 * regular file, or empty directory.
 	 */
 	if (nameiop == NAMEI_RENAME && wantparent) {
-		if ((error = VOP_ACCESS(vdp, VWRITE, cred)) != 0)
+		if ((error = VOP_EACCESS(vdp, VWRITE, cred)) != 0)
 			return (error);
 		/*
 		 * Careful about locking second inode.
--- a/sys/vfs/ext2fs/ext2_vnops.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/vfs/ext2fs/ext2_vnops.c	2026-10-26 00:25:42.793042876 +0000
@@ -795,7 +795,7 @@
 	 * to namei, as the parent directory is unlocked by the
 	 * call to checkpath().
 	 */
-	error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred);
+	error = VOP_EACCESS(fvp, VWRITE, tcnp->cn_cred);
 	vn_unlock(fvp);
 
 	/*