From de0dd42776bc0dcbfece5a997eb0c53834e1115c Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 6 Apr 2015 16:06:01 +0200 Subject: [PATCH] getcwd.3: srcfix Signed-off-by: Michael Kerrisk --- man3/getcwd.3 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/man3/getcwd.3 b/man3/getcwd.3 index 6a98b8239..9e1e932ef 100644 --- a/man3/getcwd.3 +++ b/man3/getcwd.3 @@ -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