summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/remove.c
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-10-28 02:55:05 +0000
committertholo <tholo@openbsd.org>1996-10-28 02:55:05 +0000
commit0d0abea2f400f2db456e852c34746e387939639e (patch)
treea0ac347a8f97ef506c17492c6ff91a831470672b /lib/libc/stdio/remove.c
parentSafe $HOME handling. (diff)
downloadwireguard-openbsd-0d0abea2f400f2db456e852c34746e387939639e.tar.xz
wireguard-openbsd-0d0abea2f400f2db456e852c34746e387939639e.zip
Don't strip off the last slash in the pathname "/". cp used to
stat the pathname "" in order to decide that the pathname "/" is a directory. This caused `cp kernel /' to fail if the kernel has the POSIX behaviour of not allowing the pathname "" to be an alias for ".". It presumably also caused `cp /etc/motd /' to fail in the unlikely event that "." is not stat'able. Be more careful about concatenating pathnames: don't check that the pathname fits until prefixes have been discarded (the check was too strict). Print the final pathname in error messages. Terminate the target directory name properly for error messages. Don't add a slash between components if there is already a slash. Fix from FreeBSD
Diffstat (limited to 'lib/libc/stdio/remove.c')
0 files changed, 0 insertions, 0 deletions