Debian Bug report logs - #912180
find: "-type " wrong on bind-mounted char device

version graph

Package: findutils; Maintainer for findutils is Andreas Metzler <ametzler@debian.org>; Source for findutils is src:findutils (PTS, buildd, popcon).

Reported by: "Mathieu Parent (Debian)" <sathieu@debian.org>

Date: Sun, 28 Oct 2018 20:18:03 UTC

Severity: normal

Tags: patch, upstream

Merged with 1008240

Found in versions findutils/4.6.0+git+20181018-1, mmdebstrap/0.7.5-2.2

Forwarded to https://savannah.gnu.org/bugs/?54913

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, anbe@debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#912180; Package findutils. (Sun, 28 Oct 2018 20:18:05 GMT) (full text, mbox, link).


Acknowledgement sent to "Mathieu Parent (Debian)" <sathieu@debian.org>:
New Bug report received and forwarded. Copy sent to anbe@debian.org, Andreas Metzler <ametzler@debian.org>. (Sun, 28 Oct 2018 20:18:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Mathieu Parent (Debian)" <sathieu@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: find: "-type " wrong on bind-mounted char device
Date: Sun, 28 Oct 2018 21:15:58 +0100
[Message part 1 (text/plain, inline)]
Package: findutils
Version: 4.6.0+git+20181018-1
Tags: upstream patch
Affects: piuparts
X-Debbugs-CC: Andreas Beckmann <anbe@debian.org>

Hi,

The following testcase [1]:

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.

Regards

-- 
Mathieu Parent

[1]: Thanks Andreas: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911334#25
[0001-Ensure-type-is-checked-with-FTS_NSOK-and-FTS_NS.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#912180; Package findutils. (Mon, 29 Oct 2018 18:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Andreas Metzler <ametzler@bebt.de>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>. (Mon, 29 Oct 2018 18:03:03 GMT) (full text, mbox, link).


Message #10 received at 912180@bugs.debian.org (full text, mbox, reply):

From: Andreas Metzler <ametzler@bebt.de>
To: "Mathieu Parent (Debian)" <sathieu@debian.org>, 912180@bugs.debian.org
Subject: Re: Bug#912180: find: "-type " wrong on bind-mounted char device
Date: Mon, 29 Oct 2018 19:01:43 +0100
Control: forwarded -1 https://savannah.gnu.org/bugs/index.php?54913

On 2018-10-28 "Mathieu Parent (Debian)" <sathieu@debian.org> wrote:
> Package: findutils
> Version: 4.6.0+git+20181018-1
[...]
> The following testcase [1]:

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

Thanks, I have forwarded the report upstream.

cu Andreas

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



Set Bug forwarded-to-address to 'https://savannah.gnu.org/bugs/index.php?54913'. Request was from Andreas Metzler <ametzler@bebt.de> to 912180-submit@bugs.debian.org. (Mon, 29 Oct 2018 18:03:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#912180; Package findutils. (Tue, 12 Mar 2019 12:00:03 GMT) (full text, mbox, link).


Acknowledgement sent to Florian Zumbiehl <florz@florz.de>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>. (Tue, 12 Mar 2019 12:00:03 GMT) (full text, mbox, link).


Message #17 received at 912180@bugs.debian.org (full text, mbox, reply):

From: Florian Zumbiehl <florz@florz.de>
To: 912180@bugs.debian.org
Subject: Also affects -inum
Date: Tue, 12 Mar 2019 12:17:33 +0100
Hi,

different symptom, but the same cause: find -inum (on stretch) doesn't find
files that are mounted because it uses d_ino from getdents(), which
contains the inode number of the moint point rather than of the directory
entry.

The specific use I encountered this bug with was finding a network name
space based on its inode number--but since network name spaces are mounted,
you can't use find for that anymore.

Florian



Marked as found in versions mmdebstrap/0.7.5-2.2. Request was from Andreas Metzler <ametzler@bebt.de> to 1008240-submit@bugs.debian.org. (Mon, 29 Aug 2022 17:09:05 GMT) (full text, mbox, link).


Merged 912180 1008240 Request was from Andreas Metzler <ametzler@bebt.de> to 1008240-submit@bugs.debian.org. (Mon, 29 Aug 2022 17:09:05 GMT) (full text, mbox, link).


Changed Bug forwarded-to-address to 'https://savannah.gnu.org/bugs/?54913' from 'https://savannah.gnu.org/bugs/index.php?54913'. Request was from Trent W. Buck <trentbuck@gmail.com> to control@bugs.debian.org. (Wed, 31 Aug 2022 13:00:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Dec 23 16:46:37 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.