diff options
author | jilles <jilles@FreeBSD.org> | 2014-04-13 19:48:28 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-04-13 19:48:28 +0000 |
commit | 448f99bff387c7a251e9f111ab0173d362a871d5 (patch) | |
tree | 6684c15d02279ca1e36b837a2c278c819bbeac50 /lib/libc/stdlib/qsort.c | |
parent | b4545ba27b92f6e63b2dc0d22151ab056207f3fb (diff) | |
download | FreeBSD-src-448f99bff387c7a251e9f111ab0173d362a871d5.zip FreeBSD-src-448f99bff387c7a251e9f111ab0173d362a871d5.tar.gz |
realpath(): Properly fail "." or ".." components after non-directories.
If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.
Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.
PR: kern/82980
MFC after: 2 weeks
Diffstat (limited to 'lib/libc/stdlib/qsort.c')
0 files changed, 0 insertions, 0 deletions