svn commit: r366016 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Tue Sep 22 21:59:19 UTC 2020
Author: kib
Date: Tue Sep 22 21:59:18 2020
New Revision: 366016
URL: https://svnweb.freebsd.org/changeset/base/366016
Log:
lookup: Track last lookup component if it is directory.
This makes open("/a/../a", O_BENEATH) with cwd == "/a" work.
Reviewed by: markj
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25886
Modified:
head/sys/kern/vfs_lookup.c
Modified: head/sys/kern/vfs_lookup.c
==============================================================================
--- head/sys/kern/vfs_lookup.c Tue Sep 22 21:54:30 2020 (r366015)
+++ head/sys/kern/vfs_lookup.c Tue Sep 22 21:59:18 2020 (r366016)
@@ -1248,6 +1248,8 @@ success:
goto bad2;
}
}
+ if (ndp->ni_vp != NULL && ndp->ni_vp->v_type == VDIR)
+ nameicap_tracker_add(ndp, ndp->ni_vp);
return (0);
bad2:
More information about the svn-src-all
mailing list