[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #54913] find: "-type"-test wrong on bind-mounted char device

From: Andreas Metzler
Subject: [bug #54913] find: "-type"-test wrong on bind-mounted char device
Date: Mon, 29 Oct 2018 13:59:33 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0


                 Summary: find: "-type"-test wrong on bind-mounted char device
                 Project: findutils
            Submitted by: ametzler
            Submitted on: Mon 29 Oct 2018 06:59:31 PM CET
                Category: find
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Mathieu Parent
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None




this was reported as https://bugs.debian.org/912180 by Mathieu Parent. He also
provided the attached to fix the issue. I have verified the bug, and that the
patch makes the issue unreproducible.

The following testcase:

mkdir foo
mknod foo/null c 1 3
touch foo/bindmntoverfile
mount --bind foo/null foo/bindmntoverfile
find foo -type f -ls
3857271640      0 crw-r--r--   1 root     root       1,   3 Oct 24
07:50 foo/bindmntoverfile

i.e "-type f" wrongly matches a char device.

The attached patch fixes this.


Mathieu Parent


File Attachments:

Date: Mon 29 Oct 2018 06:59:31 PM CET  Name:
0001-Ensure-type-is-checked-with-FTS_NSOK-and-FTS_NS.patch  Size: 1KiB   By:
Patch provided in Debian report


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]