Date: Wed, 19 May 2021 04:56:49 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: eea4a0b81aed - stable/13 - vn_open_cred(): disallow O_CREAT | O_EMPTY_PATH Message-ID: <202105190456.14J4unWq083067@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=eea4a0b81aedfdbb80245e779c92a74131c572aa commit eea4a0b81aedfdbb80245e779c92a74131c572aa Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-05-12 19:04:44 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-05-19 03:13:15 +0000 vn_open_cred(): disallow O_CREAT | O_EMPTY_PATH (cherry picked from commit 6de3cf14c47d97b423ae25d5bd1d80b896ecd9e6) --- sys/kern/vfs_vnops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 670bc4bf8fcc..8f583329f067 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -233,7 +233,8 @@ restart: first_open = false; fmode = *flagp; if ((fmode & (O_CREAT | O_EXCL | O_DIRECTORY)) == (O_CREAT | - O_EXCL | O_DIRECTORY)) + O_EXCL | O_DIRECTORY) || + (fmode & (O_CREAT | O_EMPTY_PATH)) == (O_CREAT | O_EMPTY_PATH)) return (EINVAL); else if ((fmode & (O_CREAT | O_DIRECTORY)) == O_CREAT) { ndp->ni_cnd.cn_nameiop = CREATE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105190456.14J4unWq083067>