FreeBSD Bugzilla – Attachment 160727 Details for
Bug 202892
open with O_CREAT | O_DIRECTORY when path references a symlink
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
The supposed fix, do not create anything for O_DIRECTORY, also return EINVAL for O_EXCL.
1.patch (text/plain), 561 bytes, created by
Konstantin Belousov
on 2015-09-04 18:55:48 UTC
(
hide
)
Description:
The supposed fix, do not create anything for O_DIRECTORY, also return EINVAL for O_EXCL.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2015-09-04 18:55:48 UTC
Size:
561 bytes
patch
obsolete
>diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c >index 740123f..18a9ac3 100644 >--- a/sys/kern/vfs_vnops.c >+++ b/sys/kern/vfs_vnops.c >@@ -195,7 +195,10 @@ vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, u_int vn_open_flags, > > restart: > fmode = *flagp; >- if (fmode & O_CREAT) { >+ if ((fmode & (O_CREAT | O_EXCL | O_DIRECTORY)) == (O_CREAT | >+ O_EXCL | O_DIRECTORY)) >+ return (EINVAL); >+ else if ((fmode & (O_CREAT | O_DIRECTORY)) == O_CREAT) { > ndp->ni_cnd.cn_nameiop = CREATE; > /* > * Set NOCACHE to avoid flushing the cache when
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 202892
:
160720
| 160727