Date: Tue, 21 Mar 95 9:14:44 MST From: terry@cs.weber.edu (Terry Lambert) To: jbeukema@hk.super.net (John Beukema) Cc: hackers@FreeBSD.org Subject: Re: Denial of resource attacks Message-ID: <9503211614.AA06745@cs.weber.edu> In-Reply-To: <Pine.SUN.3.91.950321114636.10870E-100000@is1.hk.super.net> from "John Beukema" at Mar 21, 95 12:05:02 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Well, surprise, rm -r fails when the maximum path length is exceeded. I > was forced to write another shell script to step down the chain to the end > and then remove the directories one by one. Time down 1 1/2 hours (am not > very good at shell programing). This should be unlikely, since the directory is relatively pathed. The recursive descent chdirs. > 3. Might it be a good idea to limit the creation of sub-directories > when the max path length will be exceeded, so that rm -r will > continue to work? This is ineffective. The limit is on the basis of the copyin of path names using copyinstr -- the limit being PATH_MAX (1024). A relatively pathed create will not exceed the path length, even if the total agregate path length from / would. Unless you are suggesting the path resoloution ought to determine the path length up to the path component being created... In which case, happy FS hacking as you do the necessary disallowing of all sym links and hard links on dirs (even for root). The current file system doesn't store the parent directory of an inode; lookup would be prohibitively expensive, and symbolic link translation on lookup is going to throw a wrench into things big-time (it's unavoidable). Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503211614.AA06745>