From owner-freebsd-audit Wed Jan 9 20: 3:52 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 2D61037B416; Wed, 9 Jan 2002 20:03:47 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id PAA07583; Thu, 10 Jan 2002 15:03:44 +1100 Date: Thu, 10 Jan 2002 15:04:31 +1100 (EST) From: Bruce Evans X-X-Sender: To: Ruslan Ermilov Cc: Sheldon Hearn , , Subject: Re: bin/33187: ls -dF and trailing slashes In-Reply-To: <20020109161906.N41379@sunbay.com> Message-ID: <20020110145750.U10820-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 9 Jan 2002, Ruslan Ermilov wrote: > On Wed, Jan 09, 2002 at 03:51:13PM +0200, Sheldon Hearn wrote: > > > > Hi folks, > > > > What do you think of the following patch, taken from PR bin/33187? > > > > It prevents > > > > ls -dF /usr/ > > > > from producing > > > > /usr// > > > > which may confuse other programs for which this output is used as input. > > > It also doesn't work for ``ls -dF /usr//'' and breaks ``ls -dF /''. It also breaks ls of symlinks. E.g.: $ ls -lF /var/crash /var/crash/ lrwxr-xr-x 1 root wheel 8 Mar 5 2001 /var/crash@ -> /c/crash /var/crash/: total 145202 -rw-r--r-- 1 4294967294 wheel 2 Jan 9 14:44 bounds -rw-r--r-- 1 4294967294 wheel 2630180 Jan 9 14:45 kernel.4 -rw-r--r-- 1 root wheel 5 May 19 1994 minfree -rw------- 1 4294967294 wheel 14680064 Nov 24 21:06 vmcore.1 -rw------- 1 4294967294 wheel 1048576 Nov 24 21:09 vmcore.2 -rw------- 1 4294967294 wheel 7053312 Jan 7 14:16 vmcore.3 -rw------- 1 4294967294 wheel 268435456 Jan 9 14:45 vmcore.4 I think the slash should be stripped in the output at most. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message