[EMAIL PROTECTED] (David Feuer) writes:

> I'm not sure if this is a bug or not, but it smells fishy (I'm not working
> with a bleeding-edge coreutils, so I don't know if this is still there):
>
> In makepath.c:
>
>       /* If we've saved the cwd and DIRPATH is an absolute pathname,
>          we must chdir to `/' in order to enable the chdir optimization.
>          So if chdir ("/") fails, turn off the optimization.  */
>       if (do_chdir && *dirpath == '/' && chdir ("/") < 0)
>         do_chdir = false;
>
> As I understand it (perhaps incorrectly), the only time it might be
> possible to create a directory when it is impossible to chdir to one of
> its parents is when all but the last existing directory have their
> execute bits set.

Hmm, I didn't quite follow that.  But the above code is somethign
different.  It says that paths like /a/b/c must be handled by first
chdir("/"), whereas paths like a/b/c don't need that step.

> it should be possible to turn off the
> chdir optimization at any time in the process if a directory is reached
> that cannot be entered.

If it can't be chdir'ed into, then it can't be used at all, at least
if traditional Unix semantics are used.  (Or are you thinking ACLs?).


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to