Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757495Ab1EZMIM (ORCPT ); Thu, 26 May 2011 08:08:12 -0400 Received: from lennier.cc.vt.edu ([198.82.162.213]:49951 "EHLO lennier.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757295Ab1EZMIK (ORCPT ); Thu, 26 May 2011 08:08:10 -0400 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3-dev To: Bernd Petrovitsch Cc: Michael Witten , "Ted Ts'o" , Mike Galbraith , Richard Yao , linux-kernel@vger.kernel.org Subject: Re: UNIX Compatibility In-Reply-To: Your message of "Thu, 26 May 2011 13:30:39 +0200." <1306409439.28597.81.camel@thorin> From: Valdis.Kletnieks@vt.edu References: <20110524181619.GC26055@thunk.org> <1306297108.4819.28.camel@marge.simson.net> <64e4614dda6f4558a68a314d7b5979b5-mfwitten@gmail.com> <20110525143602.GE8476@thunk.org> <1306409439.28597.81.camel@thorin> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1306411679_4127P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 26 May 2011 08:07:59 -0400 Message-ID: <38084.1306411679@localhost> X-Mirapoint-Received-SPF: 198.82.161.152 auth3.smtp.vt.edu Valdis.Kletnieks@vt.edu 2 pass X-Mirapoint-IP-Reputation: reputation=neutral-1, source=Fixed, refid=n/a, actions=MAILHURDLE SPF TAG X-Junkmail-Status: score=10/50, host=zidane.cc.vt.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A020207.4DDE42A2.0069,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1406 Lines: 42 --==_Exmh_1306411679_4127P Content-Type: text/plain; charset=us-ascii On Thu, 26 May 2011 13:30:39 +0200, Bernd Petrovitsch said: > Or take the "unlink a directory gives EPERM" example: why is it > specified with an errno that indicates that the user is not allowed to > remove it (and not that the sys-call is the wrong one). Because on some old Unix's, it wasn't the wrong syscall... RATIONALE Unlinking a directory is restricted to the superuser in many historical implementations for reasons given in link() (see also rename()). http://pubs.opengroup.org/onlinepubs/009695399/functions/unlink.html I've encountered at least one system (admittedly 20+ years ago), where unlink("./") actually did work. Took me a while to correlate the weird fsck's at reboots to the program that tried to remove './$A' when $A was unset... --==_Exmh_1306411679_4127P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFN3kKfcC3lWbTT17ARAvLDAKDJwYNfU2+Bj2Jfbfeslwi3jCNxAgCfecCT LQRBNaZnhJ1431I8r5QcBgs= =UND5 -----END PGP SIGNATURE----- --==_Exmh_1306411679_4127P-- -- 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/