aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-12-12 07:01:44 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-12-12 07:30:16 +0100
commite0ff749f64f666f996d068ffd2cd304911f125c1 (patch)
tree2b37dbc3c7b6248c94079f434eb8d57ec9ab9a36
parent58615b43fb1490afdd67544479198dbd0c28e826 (diff)
downloadman-pages-e0ff749f64f666f996d068ffd2cd304911f125c1.tar.gz
namespaces.7: Comparisons between fstat()ed files should be on st_dev+st_ino
The FDs returned by NS_GET_USERNS and NS_GET_PAREENT must be tested by comparing to both the 'st_dev' and 'st_ino' fields returned by fstat(2). Reported-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man7/namespaces.74
1 files changed, 3 insertions, 1 deletions
diff --git a/man7/namespaces.7 b/man7/namespaces.7
index 6dc8913806..c755545755 100644
--- a/man7/namespaces.7
+++ b/man7/namespaces.7
@@ -378,8 +378,10 @@ By applying
to the returned file descriptor, one obtains a
.I stat
structure whose
+.I st_dev
+(resident device) and
.I st_ino
-(inode number) field identifies the owning/parent namespace.
+(inode number) fields together identify the owning/parent namespace.
This inode number can be matched with the inode number of another
.IR /proc/[pid]/ns/{pid,user}
file to determine whether that is the owning/parent namespace.