getcwd.3: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-04-06 16:06:01 +02:00
parent a2ac97c78b
commit de0dd42776
1 changed files with 5 additions and 6 deletions

View File

@ -81,13 +81,12 @@ The pathname is returned as the function result and via the argument
if present.
If the current directory is not below the root directory of the current
process (e.g. because the process set a new filesystem root
using
process (e.g. because the process set a new filesystem root using
.BR chroot (2)
without changing its current directory into the new root), the returned
path will be prefixed with the string "(unreachable)". Such behavior can
also be caused by an unprivileged user by changing the current directory
into another mount namespace.
without changing its current directory into the new root),
the returned path will be prefixed with the string "(unreachable)".
Such behavior can also be caused by an unprivileged user by changing
the current directory into another mount namespace.
When dealing with paths from untrusted sources, callers of these
functions should consider checking whether the returned path starts
with '/' or '(' to avoid misinterpreting an unreachable path