Date: Mon, 1 Mar 2010 18:23:32 +0100 From: Gary Jennejohn <gary.jennejohn@freenet.de> To: Garrett Cooper <yanefbsd@gmail.com> Cc: Alexander Best <alexbestms@wwu.de>, freebsd-hackers@freebsd.org Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) Message-ID: <20100301182332.5b7f0855@ernst.jennejohn.org> In-Reply-To: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> References: <permail-201003010111581e86ffa800007056-a_best01@message-id.uni-muenster.de> <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 28 Feb 2010 18:26:05 -0800 Garrett Cooper <yanefbsd@gmail.com> wrote: > On Sun, Feb 28, 2010 at 5:11 PM, Alexander Best <alexbestms@wwu.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100301182332.5b7f0855>