From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damian Stewart Subject: Re: PROBLEM: hfsplus filesystem allows opendir() on plain files Date: Fri, 05 Dec 2008 09:53:51 +0100 Message-ID: <4938EC1F.7060606@frey.co.nz> References: <493553C0.2090407@frey.co.nz> <20081202222111.GA2738@cynthia.pants.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: Brad Boyer Return-path: Received: from ip-72-55-185-114.static.privatedns.com ([72.55.185.114]:45318 "EHLO webhost.wanderingmonster.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbYLEIyA (ORCPT ); Fri, 5 Dec 2008 03:54:00 -0500 In-Reply-To: <20081202222111.GA2738@cynthia.pants.nu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Brad Boyer wrote: > Maybe the check in the generic code to decide what is a "directory" > should be changed? We could possibly check inode->i_fop->readdir. Hi Brad, Thanks for your reply. This issue came up because at least one major project (the VLC video player) is using 'opendir()' to determine whether or not a path is a file or directory. (They probably ought to be using 'stat()', but they're not, so this issue shows up.) I've reported it on the VLC forums but only got very dismissive replies. The few developers who posted bluntly said it was a 'kernel bug' so they weren't willing to do anything about it; which is a shame, because it leaves those VLC users with videos on HFS+ drives unable to play their videos with the latest version of VLC. Anyways, perhaps your suggestion is the right one, in this case. Cheers d -- damian stewart | skype: damiansnz | damian@frey.co.nz frey | live art with machines | http://www.frey.co.nz