From owner-freebsd-bugs Sun Sep 21 03:20:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA24772 for bugs-outgoing; Sun, 21 Sep 1997 03:20:05 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA24762; Sun, 21 Sep 1997 03:20:02 -0700 (PDT) Resent-Date: Sun, 21 Sep 1997 03:20:02 -0700 (PDT) Resent-Message-Id: <199709211020.DAA24762@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, dima@tejblum.dnttm.rssi.ru Received: from phobos.ras.ru (root@phobos.ras.ru [193.124.148.76]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA24682; Sun, 21 Sep 1997 03:16:06 -0700 (PDT) Received: (from uucp@localhost) by phobos.ras.ru (8.8.5/8.8.5) with UUCP id NAA22074; Sun, 21 Sep 1997 13:48:48 +0400 Received: (from uucp@localhost) by helios.dnttm.ru (8.8.5/8.8.5/IP-3) with UUCP id MAA06646; Sun, 21 Sep 1997 12:25:45 +0400 Received: (from dima@localhost) by tejblum.dnttm.rssi.ru (8.8.7/8.8.5) id MAA25213; Sun, 21 Sep 1997 12:26:38 +0400 (MSD) Message-Id: <199709210826.MAA25213@tejblum.dnttm.rssi.ru> Date: Sun, 21 Sep 1997 12:26:38 +0400 (MSD) From: Dmitrij Tejblum Reply-To: dima@tejblum.dnttm.rssi.ru To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: imp@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/4593: FTS broken in -current Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4593 >Category: bin >Synopsis: FTS broken in -current >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 21 03:20:01 PDT 1997 >Last-Modified: >Originator: Dmitrij Tejblum >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD tejblum.dnttm.rssi.ru 3.0-CURRENT FreeBSD 3.0-CURRENT #40: Sun Sep 14 00:40:00 MSD 1997 dima@tejblum.dnttm.rssi.ru:/usr/src/sys/compile/DIMA i386 >Description: The "fix for NetBSD PR#1495" (change in NAPPEND macro), commited to fts.c a couple of weeks ago, broked FTS badly. Now using of FTS with FTS_NOCHDIR option (in particular, FTS with FTS_LOGICAL option) may lead to an absolutely incorrect result. >How-To-Repeat: Try to remove a directory with rm -r directory/ (note '/' at the end) Look at result of find -L directory/ (also note '/' at the end) Look at result of ls -LR directory/ (again note '/' at the end) And so on. >Fix: --- fts.c.00 Sun Aug 31 13:47:24 1997 +++ fts.c Tue Sep 16 13:16:48 1997 @@ -745,11 +745,11 @@ /* * If not changing directories, reset the path back to original * state. */ if (ISSET(FTS_NOCHDIR)) { - if (cp - 1 > sp->fts_path) + if (len == cur->fts_pathlen) --cp; *cp = '\0'; } /* >Audit-Trail: >Unformatted: