Date: Sun, 21 Sep 1997 12:26:38 +0400 (MSD) From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: imp@FreeBSD.ORG Subject: bin/4593: FTS broken in -current Message-ID: <199709210826.MAA25213@tejblum.dnttm.rssi.ru> Resent-Message-ID: <199709211020.DAA24762@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709210826.MAA25213>
