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>
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.