kernel - Fix serious permissions bug for sticky directories
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 5 Aug 2017 04:38:10 +0000 (21:38 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 5 Aug 2017 04:38:10 +0000 (21:38 -0700)
commit4477e30ad9b9b43af1dacde9353043461e7cbf0d
tree0354da8c63e897cdb0a41c800c8db47a1e5667c9
parente5ef1af179d488c40e182a46843b27b22032abf9
kernel - Fix serious permissions bug for sticky directories

* An optimization improperly bypassed the sticky-bit test, creating
  a security issue with /tmp and /var/tmp.

* Fix by disabling the optimization for the second-to-last path component.
  Any prior components retain the optimization, so long directory paths
  are still well-optimized.
sys/kern/vfs_nlookup.c