From b7262756e2f471f6481070e2473af7853506b150 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Sat, 2 Apr 2022 20:35:58 +0200 Subject: vfs: fixup WANTIOCTLCAPS on open In some cases vn_open_cred overwrites cn_flags, effectively nullifying initialisation done in NDINIT. This will have to be fixed. In the meantime make sure the flag is passed. Reported by: jenkins Noted by: Mathieu --- sys/kern/vfs_vnops.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern/vfs_vnops.c') diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 4d75c53a701b..d5234b44e5eb 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -213,6 +213,8 @@ open2nameif(int fmode, u_int vn_open_flags) res |= AUDITVNODE1; if ((vn_open_flags & VN_OPEN_NOCAPCHECK) != 0) res |= NOCAPCHECK; + if ((vn_open_flags & VN_OPEN_WANTIOCTLCAPS) != 0) + res |= WANTIOCTLCAPS; return (res); } -- cgit v1.2.3