From owner-freebsd-bugs Mon Nov 25 9:40: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EDA437B401 for ; Mon, 25 Nov 2002 09:40:06 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0F0C43EA9 for ; Mon, 25 Nov 2002 09:40:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAPHe5x3054301 for ; Mon, 25 Nov 2002 09:40:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAPHe5gQ054300; Mon, 25 Nov 2002 09:40:05 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9469937B401 for ; Mon, 25 Nov 2002 09:36:46 -0800 (PST) Received: from polaris.we.lc.ehu.es (polaris.we.lc.ehu.es [158.227.6.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CE1E43ECD for ; Mon, 25 Nov 2002 09:36:42 -0800 (PST) (envelope-from jose@we.lc.ehu.es) Received: from v-ger.we.lc.ehu.es (v-ger.we.lc.ehu.es [158.227.6.51]) by polaris.we.lc.ehu.es (8.11.6/8.11.6) with ESMTP id gAPHaRD15353; Mon, 25 Nov 2002 18:36:27 +0100 (MET) Received: from v-ger.we.lc.ehu.es (localhost [127.0.0.1]) by v-ger.we.lc.ehu.es (8.12.6/8.12.6) with ESMTP id gAPHbKq1004970; Mon, 25 Nov 2002 18:37:20 +0100 (CET) (envelope-from jose@v-ger.we.lc.ehu.es) Received: (from jose@localhost) by v-ger.we.lc.ehu.es (8.12.6/8.12.6/Submit) id gAPHbK1j004969; Mon, 25 Nov 2002 18:37:20 +0100 (CET) Message-Id: <200211251737.gAPHbK1j004969@v-ger.we.lc.ehu.es> Date: Mon, 25 Nov 2002 18:37:20 +0100 (CET) From: "Jose M. Alcaide" Reply-To: "Jose M. Alcaide" To: FreeBSD-gnats-submit@FreeBSD.org Cc: jose@we.lc.ehu.es X-Send-Pr-Version: 3.113 Subject: bin/45723: ls(1)'s wrong behaviour with not searchable directories Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 45723 >Category: bin >Synopsis: ls(1)'s wrong behaviour with not searchable directories >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 25 09:40:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Jose M. Alcaide >Release: FreeBSD 4.7-RELEASE i386 >Organization: Universidad del Pais Vasco - Dept de Electricidad y Electronica >Environment: System: FreeBSD v-ger.we.lc.ehu.es 4.7-RELEASE FreeBSD 4.7-RELEASE #12: Thu Nov 21 18:56:49 CET 2002 root@v-ger.we.lc.ehu.es:/usr/obj/usr/src/sys/V-GER i386 >Description: When a directory does not have search (x) permission, but it still have read permission, its contents must be visible with "ls" (even "ls -i" should show the inode numbers). However, FreeBSD's ls(1) does not show anything. Besides that, a "ls -l" should fail, because search permission is required in order to access the inode contents of the files in the directory; however, "ls -l" gives nothing: no listing, no error message, nothing. >How-To-Repeat: $ mkdir FOOBAR $ cd FOOBAR $ touch a b c d e $ cd .. $ chmod -x FOOBAR $ ls FOOBAR $ ls -l FOOBAR >Fix: I tried to fix this problem, but ls(1) uses the fts(3) functions, and after an hour or so trying to figure how it actually works, I only got a headache. :-( >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message