git: aa8067cbe7c6 - stable/14 - open(2): allow O_PATH | O_CREAT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Jan 2025 08:57:15 UTC
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);