delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/09/26/02:24:37

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3BB16F1E.1D148E1@phekda.freeserve.co.uk>
Date: Wed, 26 Sep 2001 07:01:02 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Deep dir problems
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010924121842 DOT 25254M-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Eli Zaretskii wrote:
> Are we sure that chdir is the only function that needs to be fixed to
> prevent disasters in the observed cases?  For example, is it certain
> that "rm -rf" would bail out if chdir is fixed like you suggest?

The Fileutils 4.0 sources always check the return value of chdir. In
application code (src/*.c) it bails out, if there's an error. The library
code (lib/*.c) usually returns an error and in other cases behaves
differently, if chdir fails. In no cases is the return code ignored.

> What about a simple call to `remove' when the argument exceeds these
> limits?

Stating the obvious: If remove can't handle paths that chdir fails on,
then rm will still be broken.

Bye, Rich =]

-- 
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019