From owner-freebsd-bugs Sun May 2 15:10: 6 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5963214BFE for ; Sun, 2 May 1999 15:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA55880; Sun, 2 May 1999 15:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 2 May 1999 15:10:01 -0700 (PDT) Message-Id: <199905022210.PAA55880@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: i386/11454: mkdir() and chdir() doesn't check argument length Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR i386/11454; it has been noted by GNATS. From: Bruce Evans To: FreeBSD-gnats-submit@FreeBSD.ORG, venglin@lagoon.freebsd.org.pl Cc: Subject: Re: i386/11454: mkdir() and chdir() doesn't check argument length Date: Mon, 3 May 1999 08:07:10 +1000 >>Description: > > Chdir() and mkdir() doesn't check argument length, so it's possible >to create an extremly deep directory structure, on which most system >commands won't work. chdir() and mkdir() work correctly. They can't reasonably check the length of the path to the current directory, and POSIX.1 doesn't permit them to fail because the current directory is deep. The bugs are in the system commands. In particular, POSIX.2 specifies that `find' and `rm -r' shall work for arbitarily deep directories (provided directory names longer than PATH_MAX aren't specified on the command line), and that `ls -R' should handle arbitrarily deep directories (it shouldn't fail unless it runs out of memory for keeping track of untraversed directories). `find' seems to traverse deep directories correctly. However, the following don't work: 1) passing long names found by `find' to other utilities. 2) `find . -type d -delete'. It dumps core in deep directories. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message