URL:
  <http://savannah.gnu.org/bugs/?51926>

                 Summary: -xtype l fails on symbolic links that have a loop
                 Project: findutils
            Submitted by: jay
            Submitted on: Sun 03 Sep 2017 12:35:20 PM UTC
                Category: find
                Severity: 4 - Important
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: jay
         Originator Name: Yorick
        Originator Email: org.gnu.bug-coreut...@pooryorick.com
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None

    _______________________________________________________

Details:

find should not fail on any situation normally found in a file system, except
in cases where it cannot recover safely (e.g. someone it attempting to exploit
a file system race condition, perhaps).

Having a loop of symbolic links is "broken" in some sense, but this should not
cause find to fail.  Unfortunately, if -xtype is used, fid _does_ fail:

/tmp/test$ ls -l
total 0
lrwxrwxrwx 1 james james 1 Sep  3 13:14 a -> a
-rw-r--r-- 1 james james 0 Sep  3 13:15 b
-rw-r--r-- 1 james james 0 Sep  3 13:15 c
-rw-r--r-- 1 james james 0 Sep  3 13:15 d
-rw-r--r-- 1 james james 0 Sep  3 13:15 e
-rw-r--r-- 1 james james 0 Sep  3 13:15 f
/tmp/test$ find . -xtype l -ls
find: ‘./a’: Too many levels of symbolic links
/tmp/test$ echo $?
1

The original bug report is GNU *debbugs) bug 28079:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28079






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51926>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to