Date: Sun, 2 May 1999 15:10:01 -0700 (PDT) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/11454: mkdir() and chdir() doesn't check argument length Message-ID: <199905022210.PAA55880@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/11454; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905022210.PAA55880>