Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932146AbVIXHoS (ORCPT ); Sat, 24 Sep 2005 03:44:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932148AbVIXHoS (ORCPT ); Sat, 24 Sep 2005 03:44:18 -0400 Received: from 223-177.adsl.pool.ew.hu ([193.226.223.177]:39946 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S932146AbVIXHoR (ORCPT ); Sat, 24 Sep 2005 03:44:17 -0400 To: viro@ftp.linux.org.uk CC: akpm@osdl.org, linux-kernel@vger.kernel.org In-reply-to: <20050924070150.GL7992@ftp.linux.org.uk> (message from Al Viro on Sat, 24 Sep 2005 08:01:50 +0100) Subject: Re: [PATCH] open: O_DIRECTORY and O_CREAT together should fail References: <20050923122834.659966c4.akpm@osdl.org> <20050924060913.GK7992@ftp.linux.org.uk> <20050924070150.GL7992@ftp.linux.org.uk> Message-Id: From: Miklos Szeredi Date: Sat, 24 Sep 2005 09:43:47 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 27 > > > > 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... OK, I'm convinced. Miklos - 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/