Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161185514
D23479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
713 B
Referenced Files
None
Subscribers
None
D23479.diff
View Options
Index: head/sys/kern/vfs_lookup.c
===================================================================
--- head/sys/kern/vfs_lookup.c
+++ head/sys/kern/vfs_lookup.c
@@ -452,8 +452,15 @@
*/
error = fget_cap_locked(fdp, ndp->ni_dirfd, &rights,
&dfp, &ndp->ni_filecaps);
- if (error != 0 || dfp->f_ops == &badfileops ||
- dfp->f_vnode == NULL) {
+ if (error != 0) {
+ /*
+ * Preserve the error; it should either be EBADF
+ * or capability-related, both of which can be
+ * safely returned to the caller.
+ */
+ } else if (dfp->f_ops == &badfileops) {
+ error = EBADF;
+ } else if (dfp->f_vnode == NULL) {
error = ENOTDIR;
} else {
dp = dfp->f_vnode;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 2, 9:36 AM (9 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34592499
Default Alt Text
D23479.diff (713 B)
Attached To
Mode
D23479: namei: preserve errors from fget_cap_locked
Attached
Detach File
Event Timeline
Log In to Comment