URL:
  <https://savannah.gnu.org/bugs/?67709>

                 Summary: O_NOFOLLOW documentation is out of date
                   Group: findutils
               Submitter: jay
               Submitted: Sun 16 Nov 2025 05:00:54 PM UTC
                Category: documentation
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 16 Nov 2025 05:00:54 PM UTC By: James Youngman <jay>
The find documentation (e.g. "Changing the Current Working Directory") in the
Texinfo documentation talks about O_NOFOLLOW.  But the only place the current
find code uses O_NOFOLLOW directly is in -samefile.

oldfind also used to use O_NOFOLLOW but that code was deleted
in 5768a03ddfb5e18b1682e339d6cdd24ff721c510 (2021).  Therefore the only
directory traversal implementation in use for find is gnulib's fts(), which
uses O_NOFOLLOW, but uses HAVE_WORKING_O_NOFOLLOW to determine whether it will
work.  That's a compile-time constant, whereas find attempted to figure out
whether O_NOFOLLOW was likely to work at runtime.

So the Texinfo documentation concerned with O_NOFOLLOW is all likely out of
date.   It should be removed (or scoped much more narrowly, to describe only
-samefile).

We should also consider retiring check_nofollow().  The systems it knows about
where the binary might be running but where O_NOFOLLOW does nothing (Linuc <=
2.1.126 and FreeBSD < 3.0-CURRENT) are old enough now that the benefits likely
don't justify the complexity.

When we make these changes, we should also decide what to do about the version
output, which currently states whether the binary was configured to use
O_NOFOLLOW and whether find thinks that O_NOFOLLOW actually works on the
current system.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67709>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to