From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 17:23:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A569106566C for ; Mon, 1 Mar 2010 17:23:35 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout5.freenet.de (mout5.freenet.de [IPv6:2001:748:100:40::2:7]) by mx1.freebsd.org (Postfix) with ESMTP id D25FF8FC2B for ; Mon, 1 Mar 2010 17:23:34 +0000 (UTC) Received: from [195.4.92.26] (helo=16.mx.freenet.de) by mout5.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #1) id 1Nm9LB-0003IS-Hw; Mon, 01 Mar 2010 18:23:33 +0100 Received: from p57ae2655.dip0.t-ipconnect.de ([87.174.38.85]:36544 helo=ernst.jennejohn.org) by 16.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #2) id 1Nm9LB-0006A9-8Z; Mon, 01 Mar 2010 18:23:33 +0100 Date: Mon, 1 Mar 2010 18:23:32 +0100 From: Gary Jennejohn To: Garrett Cooper Message-ID: <20100301182332.5b7f0855@ernst.jennejohn.org> In-Reply-To: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> References: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.16.2; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:23:35 -0000 On Sun, 28 Feb 2010 18:26:05 -0800 Garrett Cooper wrote: > On Sun, Feb 28, 2010 at 5:11 PM, Alexander Best wrote: > > i have a small test app to check {rm|mk}dir()'s errnos with certain args like > > /, ., /proc and non-empty dirs. i'll submit it to this thread as soon as i > > also add testcases for syscalls like rename(), unlink(), etc. > > > > most of the errno codes returned after applying your patch look correct. i > > wonder however why rmdir("/proc") returns EACCESS as unprivileged user. > > wouldn't it make more sense to also return EBUSY? why complain about > > permission related matters when even root won't be able to perform the > > operation. > > Hmm.. good question. POSIX doesn't fully expound on this case > (http://www.opengroup.org/onlinepubs/009695399/functions/rmdir.html), > and either seem possible... > This maybe from rmdir(2)? [EACCES] Write permission is denied on the directory containing the link to be removed. ls -ldo / drwxr-xr-x 44 root wheel - 1536 Feb 28 18:36 / ls -ldo /proc dr-xr-xr-x 2 root wheel - 512 Sep 7 2008 /proc --- Gary Jennejohn