diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-12-12 07:01:44 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-12-12 07:30:16 +0100 |
| commit | e0ff749f64f666f996d068ffd2cd304911f125c1 (patch) | |
| tree | 2b37dbc3c7b6248c94079f434eb8d57ec9ab9a36 /man7/namespaces.7 | |
| parent | 58615b43fb1490afdd67544479198dbd0c28e826 (diff) | |
| download | man-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>
Diffstat (limited to 'man7/namespaces.7')
| -rw-r--r-- | man7/namespaces.7 | 4 |
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. |
