|Anonymous | Login||2023-03-21 04:32 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ Issue History ] [ Print ]|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001210||[1003.1(2016/18)/Issue7+TC2] System Interfaces||Objection||Error||2018-09-21 14:38||2019-11-13 10:12|
|Organization||The Open Group|
|Final Accepted Text|
|Summary||0001210: FTW_MOUNT and symbolic links to directories on other file systems|
Between the descriptions of FTW_MOUNT on the <ftw.h> page and the
nftw() page, it is clear that when a mount point is encountered it
is not reported (nftw() description) and is not crossed (<ftw.h>
However, the same is not true for symbolic links to directories on
other file systems, when FTW_MOUNT is set and FTW_PHYS is clear.
Since the <ftw.h> description only refers to mount points, the
standard requires that nftw() does not report such directories
but does descend below them (if they are not also mount points), and
that it reports symbolic links found there that point back to the
original file system.
Of course, this is not how nftw() implementations behave. They do not
cross any directory with a different device ID, regardless of how it
On page 255 line 8562 section <ftw.h>, change:
FTW_MOUNTto:The walk does not cross a mount point.
FTW_MOUNTThe walk only reports files that have the same device ID as the starting directory and does not descend below directories that have a different device ID than the starting directory.
On page 1397 line 46455 section nftw(), change:
If set, nftw() shall only report files in the same file system as path.to:
If set, nftw() shall only report files that have the same device ID (st_dev) as path and shall not descend below directories that have a different device ID than path.
On page 1400 line 46570 section nftw(), change RATIONALE from:
Earlier versions of this standard did not make clear that, as well as not reporting them, FTW_MOUNT prevents descent below directories that have a different device ID than path if they are encountered by following a symbolic link (rather than by being a mount point). This meant that if such a directory contained any symbolic links to files with the same device ID as path, nftw() with FTW_PHYS clear was required to report them. However, this was not how nftw() implementations behaved and the standard has been amended to match existing practice.
|The above does not take into account st_rdev, which is possibly necessary to disambiguate devices. A system, for example, might use st_dev to enumerate instances of SATA drives, and st_rdev to enumerate partitions on that drive.|
Don Cragun (manager)
The standard states the way in which the FTW_MOUNT flag is to be processed, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.
The description of this flag in the standard does not match the way historical implementations behaved. This changes the description in the standard to match historic behavior.
Notes to the Editor (not part of this interpretation):
Make the changes suggested in the Desired Action.
Someone please delete note 4128 ... st_rdev is provides the major/minor
for block and character device nodes, and has nothing whatever to do with
this issue, and any system which used it in the way suggested by the note
would be wildly broken. (When that note is deleted, this one can be as well.)
|Interpretation proposed: 30 Sep 2018|
|Interpretation approved: 12 November 2018|
|2018-09-21 14:38||geoffclare||New Issue|
|2018-09-21 14:38||geoffclare||Name||=> Geoff Clare|
|2018-09-21 14:38||geoffclare||Organization||=> The Open Group|
|2018-09-21 14:38||geoffclare||Section||=> nftw()|
|2018-09-21 14:38||geoffclare||Page Number||=> 1397|
|2018-09-21 14:38||geoffclare||Line Number||=> 46455|
|2018-09-21 14:38||geoffclare||Interp Status||=> ---|
|2018-09-21 14:52||geoffclare||Relationship added||related to 0001133|
|2018-09-27 15:28||shware_systems||Note Added: 0004128|
|2018-09-27 15:49||Don Cragun||Note Added: 0004129|
|2018-09-27 15:50||Don Cragun||Tag Attached: tc3-2008|
|2018-09-27 15:50||Don Cragun||Interp Status||--- => Pending|
|2018-09-27 15:50||Don Cragun||Status||New => Interpretation Required|
|2018-09-27 15:50||Don Cragun||Resolution||Open => Accepted|
|2018-09-28 03:01||kre||Note Added: 0004131|
|2018-09-30 18:25||ajosey||Interp Status||Pending => Proposed|
|2018-09-30 18:25||ajosey||Note Added: 0004138|
|2018-11-12 15:07||ajosey||Interp Status||Proposed => Approved|
|2018-11-12 15:07||ajosey||Note Added: 0004160|
|2019-11-13 10:12||geoffclare||Status||Interpretation Required => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|