⬢ DragonFlyBSD Kernel Audit
DF-3135 / fix.diff
← back to finding ↓ download raw
--- a/sys/vfs/dirfs/dirfs_subr.c
+++ b/sys/vfs/dirfs/dirfs_subr.c
@@ -583,9 +583,9 @@ dirfs_open_helper(dirfs_node_t dnp)
 	if (dnp->dn_fd != -1)
 		return (0);
 
 	flags = 0;
-	if (dnp->dn_type & VDIR)
+	if (dnp->dn_type == VDIR)
 		flags |= O_DIRECTORY;
 	else
 		flags |= O_RDWR;