git: d8cf51949252 - main - fhopen: Restore the O_CREAT check
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 13 Apr 2025 14:54:34 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d8cf519492523f6dd239ab153029db62749afa52 commit d8cf519492523f6dd239ab153029db62749afa52 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-04-13 14:54:26 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-04-13 14:54:26 +0000 fhopen: Restore the O_CREAT check Fixes: 509189bb4109 ("fhopen: Enable handling of O_PATH, fix some bugs") --- sys/kern/vfs_syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5fe2ae2e23a6..3f1462d354fd 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4683,6 +4683,8 @@ kern_fhopen(struct thread *td, const struct fhandle *u_fhp, int flags) return (error); indx = -1; + if ((flags & O_CREAT) != 0) + return (EINVAL); error = openflags(&flags); if (error != 0) return (error);