Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751448AbVIXHBv (ORCPT ); Sat, 24 Sep 2005 03:01:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751450AbVIXHBv (ORCPT ); Sat, 24 Sep 2005 03:01:51 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:58261 "EHLO ZenIV.linux.org.uk") by vger.kernel.org with ESMTP id S1751448AbVIXHBv (ORCPT ); Sat, 24 Sep 2005 03:01:51 -0400 Date: Sat, 24 Sep 2005 08:01:50 +0100 From: Al Viro To: Miklos Szeredi Cc: akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] open: O_DIRECTORY and O_CREAT together should fail Message-ID: <20050924070150.GL7992@ftp.linux.org.uk> References: <20050923122834.659966c4.akpm@osdl.org> <20050924060913.GK7992@ftp.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 24 On Sat, Sep 24, 2005 at 08:41:05AM +0200, Miklos Szeredi wrote: > > > Well yes. But I don't think anybody is using it, and if so they are > > > clearly breaking the rules in man open(2): > > > > Be liberal in what you accept and all such... Everything else aside, > > why bother? > > To conform to well defined semantics? Well-defined is not exactly the word I'd use for that mess (example - we still have the last remnant of ancient BSD idiocy in there; the last case when dangling symlink is still traversed upon object creation, everything else had been fixed since then). And O_DIRECTORY is not the only flag that acquires or loses meaning depending on O_CREAT - consider e.g. O_EXCL. It's a mess, of course, but this mess is part of userland ABI. We tried to fix symlink idiocy, BTW, on the assumption that nothing would be relying on it. Didn't work... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/