Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2025 08:57:15 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: aa8067cbe7c6 - stable/14 - open(2): allow O_PATH | O_CREAT
Message-ID:  <202501140857.50E8vFiB058878@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=aa8067cbe7c65fa30c0bf92c9e24207ed6b9f665

commit aa8067cbe7c65fa30c0bf92c9e24207ed6b9f665
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-01-06 11:01:11 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-01-14 08:56:41 +0000

    open(2): allow O_PATH | O_CREAT
    
    (cherry picked from commit cc0d806f63e833b9e011c0665905b2208b436c8b)
---
 sys/kern/vfs_syscalls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index fbb1e1cdda92..45a9a0c2bd48 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1147,7 +1147,7 @@ openatfp(struct thread *td, int dirfd, const char *path,
 	 * except O_EXEC is ignored.
 	 */
 	if ((flags & O_PATH) != 0) {
-		flags &= ~(O_CREAT | O_ACCMODE);
+		flags &= ~O_ACCMODE;
 	} else if ((flags & O_EXEC) != 0) {
 		if (flags & O_ACCMODE)
 			return (EINVAL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501140857.50E8vFiB058878>