From owner-freebsd-hackers Tue Oct 24 16:51:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from polaris.we.lc.ehu.es (polaris.we.lc.ehu.es [158.227.6.43]) by hub.freebsd.org (Postfix) with ESMTP id D684737B479; Tue, 24 Oct 2000 16:51:39 -0700 (PDT) Received: from v-ger.we.lc.ehu.es (lxpxed.lx.ehu.es [158.227.99.207]) by polaris.we.lc.ehu.es (8.9.1/8.9.1) with ESMTP id BAA10378; Wed, 25 Oct 2000 01:51:36 +0200 (MET DST) Received: from we.lc.ehu.es (localhost [127.0.0.1]) by v-ger.we.lc.ehu.es (8.11.0/8.11.0) with ESMTP id e9ONoL018826; Wed, 25 Oct 2000 01:50:21 +0200 (CEST) (envelope-from jose@we.lc.ehu.es) Message-ID: <39F6203D.123CCE95@we.lc.ehu.es> Date: Wed, 25 Oct 2000 01:50:21 +0200 From: "Jose M. Alcaide" Organization: Universidad del Pais Vasco - Dpto. de Electricidad y Electronica X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: es-ES, es, en-US, en MIME-Version: 1.0 To: Warner Losh Cc: Will Andrews , Jordan Hubbard , Jeremy Lea , freebsd-hackers@FreeBSD.ORG Subject: Re: Who broke "ls" in FreeBSD? and why? References: <20001024081136.K1604@puck.firepipe.net> <12367.972372237@winston.osd.bsdi.com> <200010241757.LAA17136@harmony.village.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Speaking of ls(1)... $ mkdir Arghh $ touch Arghh/{one,two,three} $ ls Arghh one three two $ chmod a-x Arghh $ ls Arghh && echo SUCCESS SUCCESS $ ls -l Arghh && echo SUCCESS SUCCESS ARGGGGHHHHH!!!! :-) This is not the expected behavior. If a directory does not have search permission, but it has read permission, a plain "ls" (or "ls -i") should list its contents, while "ls -l" should fail. And still worse, when ls fails to list the non-searchable directory contents, it does _not_ return an error code. I tried to find the cause of this behavior in the ls source code, but it uses the fts(3) functions, which I am not used to. Cheers, -- JMA ****** Jose M. Alcaide // jose@we.lc.ehu.es // jmas@FreeBSD.org ****** ** "Beware of Programmers who carry screwdrivers" -- Leonard Brandwein ** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message