From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22352 invoked from network); 29 Dec 2008 06:13:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Dec 2008 06:13:34 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 45467 invoked from network); 29 Dec 2008 06:13:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Dec 2008 06:13:28 -0000 Received: (qmail 25951 invoked by alias); 29 Dec 2008 06:13:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26187 Received: (qmail 25938 invoked from network); 29 Dec 2008 06:13:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Dec 2008 06:13:22 -0000 Received: from cork.scru.org (cork.scru.org [209.20.67.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 38C3280308BE for ; Mon, 29 Dec 2008 07:13:19 +0100 (CET) Received: by cork.scru.org (Postfix, from userid 1000) id 918F4104A37; Mon, 29 Dec 2008 06:13:17 +0000 (UTC) Date: Mon, 29 Dec 2008 06:13:17 +0000 From: Clint Adams To: Matthias Lederhofer Cc: zsh-workers@sunsite.dk, 397334@bugs.debian.org Subject: Re: [BUG] zgetdir() in a directory of a bind mount returns "." Message-ID: <20081229061317.GA3466@scru.org> Mail-Followup-To: Matthias Lederhofer , zsh-workers@sunsite.dk, 397334@bugs.debian.org References: <20061104192423.GA11308@moooo.ath.cx> <20061105074435.GA19782@moooo.ath.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061105074435.GA19782@moooo.ath.cx> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/8807/Mon Dec 29 06:32:28 2008 on bifrost X-Virus-Status: Clean On Sun, Nov 05, 2006 at 08:44:35AM +0100, Matthias Lederhofer wrote: > The problem is that one device can be mounted on itself using bind > mounts. In this case in line 311 of compat.c pdev and dev are equal > but the inodes differ because readdir() returns the inode of the > target directory of the bind mount and stat(".") in line 252 returned > the inode of the source directory. > Undefining HAVE_STRUCT_DIRENT_D_INO works and I don't know if there is > any other way to work with bind-mounts than not using the inode > returned by readdir(). I think I recall something similar happening with chroots.